Date: Mon, 8 Dec 2014 03:36:44 +0000 (UTC) From: Garrett Cooper <ngie@FreeBSD.org> To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r275590 - in projects/building-blocks: cddl/contrib/opensolaris/cmd/zfs cddl/contrib/opensolaris/lib/libnvpair cddl/contrib/opensolaris/lib/libzfs/common cddl/contrib/opensolaris/tools/... Message-ID: <201412080336.sB83aiuK016689@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: ngie Date: Mon Dec 8 03:36:43 2014 New Revision: 275590 URL: https://svnweb.freebsd.org/changeset/base/275590 Log: MFhead @ r275589 Added: projects/building-blocks/cddl/contrib/opensolaris/lib/libnvpair/nvpair_json.c - copied unchanged from r275589, head/cddl/contrib/opensolaris/lib/libnvpair/nvpair_json.c projects/building-blocks/usr.bin/iscsictl/iscsi.conf.5 - copied unchanged from r275589, head/usr.bin/iscsictl/iscsi.conf.5 Deleted: projects/building-blocks/sbin/iscontrol/iscsi.conf.5 projects/building-blocks/sys/cddl/compat/opensolaris/sys/cyclic.h projects/building-blocks/sys/cddl/compat/opensolaris/sys/cyclic_impl.h projects/building-blocks/sys/cddl/dev/cyclic/ projects/building-blocks/sys/modules/cyclic/ Modified: projects/building-blocks/cddl/contrib/opensolaris/cmd/zfs/zfs_main.c projects/building-blocks/cddl/contrib/opensolaris/lib/libnvpair/libnvpair.h projects/building-blocks/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c projects/building-blocks/cddl/contrib/opensolaris/tools/ctf/cvt/ctftools.h projects/building-blocks/cddl/lib/libnvpair/Makefile projects/building-blocks/contrib/binutils/gas/config/tc-arm.c projects/building-blocks/lib/msun/src/e_j0.c projects/building-blocks/lib/msun/src/e_j0f.c projects/building-blocks/sbin/iscontrol/Makefile projects/building-blocks/share/misc/committers-ports.dot projects/building-blocks/share/misc/organization.dot projects/building-blocks/share/mk/bsd.compiler.mk projects/building-blocks/sys/arm/arm/cpufunc_asm_arm11x6.S projects/building-blocks/sys/arm/arm/fusu.S projects/building-blocks/sys/arm/arm/stdatomic.c projects/building-blocks/sys/arm/arm/support.S projects/building-blocks/sys/arm/mv/mv_pci.c projects/building-blocks/sys/arm/ti/ti_smc.S projects/building-blocks/sys/arm/xscale/ixp425/ixp425_a4x_io.S projects/building-blocks/sys/arm/xscale/ixp425/ixp425_pci_asm.S projects/building-blocks/sys/boot/kshim/bsd_kernel.h projects/building-blocks/sys/cam/ctl/ctl.c projects/building-blocks/sys/cam/ctl/ctl_backend.h projects/building-blocks/sys/cam/ctl/ctl_backend_block.c projects/building-blocks/sys/cam/ctl/ctl_private.h projects/building-blocks/sys/cam/ctl/ctl_ser_table.c projects/building-blocks/sys/cddl/compat/opensolaris/sys/cpuvar.h projects/building-blocks/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c projects/building-blocks/sys/cddl/contrib/opensolaris/uts/common/dtrace/fasttrap.c projects/building-blocks/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dataset.c projects/building-blocks/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_scan.c projects/building-blocks/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio.c projects/building-blocks/sys/cddl/contrib/opensolaris/uts/common/sys/cpuvar.h projects/building-blocks/sys/cddl/contrib/opensolaris/uts/common/sys/dtrace.h projects/building-blocks/sys/cddl/contrib/opensolaris/uts/common/sys/isa_defs.h projects/building-blocks/sys/cddl/dev/fbt/fbt.c projects/building-blocks/sys/cddl/dev/profile/profile.c projects/building-blocks/sys/dev/cxgbe/adapter.h projects/building-blocks/sys/dev/cxgbe/t4_sge.c projects/building-blocks/sys/dev/usb/controller/saf1761_otg.c projects/building-blocks/sys/geom/raid/md_nvidia.c projects/building-blocks/sys/geom/raid/md_sii.c projects/building-blocks/sys/kern/kern_clocksource.c projects/building-blocks/sys/libkern/arm/ffs.S projects/building-blocks/sys/modules/Makefile projects/building-blocks/sys/modules/dtrace/Makefile.inc projects/building-blocks/sys/modules/dtrace/dtraceall/dtraceall.c projects/building-blocks/sys/netinet/sctp_input.c projects/building-blocks/sys/netinet/sctp_usrreq.c projects/building-blocks/sys/netinet/sctputil.c projects/building-blocks/sys/netinet/udp_usrreq.c projects/building-blocks/sys/netipsec/key.c projects/building-blocks/sys/sys/dtrace_bsd.h projects/building-blocks/sys/sys/param.h projects/building-blocks/sys/vm/vm_mmap.c projects/building-blocks/sys/vm/vm_object.c projects/building-blocks/usr.bin/iscsictl/Makefile projects/building-blocks/usr.bin/patch/patch.c projects/building-blocks/usr.bin/patch/pch.c projects/building-blocks/usr.sbin/ctladm/ctladm.8 Directory Properties: projects/building-blocks/ (props changed) projects/building-blocks/cddl/ (props changed) projects/building-blocks/cddl/contrib/opensolaris/ (props changed) projects/building-blocks/cddl/contrib/opensolaris/cmd/zfs/ (props changed) projects/building-blocks/cddl/contrib/opensolaris/lib/libzfs/ (props changed) projects/building-blocks/contrib/binutils/ (props changed) projects/building-blocks/sbin/ (props changed) projects/building-blocks/share/ (props changed) projects/building-blocks/sys/ (props changed) projects/building-blocks/sys/boot/ (props changed) projects/building-blocks/sys/cddl/contrib/opensolaris/ (props changed) Modified: projects/building-blocks/cddl/contrib/opensolaris/cmd/zfs/zfs_main.c ============================================================================== --- projects/building-blocks/cddl/contrib/opensolaris/cmd/zfs/zfs_main.c Mon Dec 8 03:32:26 2014 (r275589) +++ projects/building-blocks/cddl/contrib/opensolaris/cmd/zfs/zfs_main.c Mon Dec 8 03:36:43 2014 (r275590) @@ -68,6 +68,7 @@ #ifdef sun #include <aclutils.h> #include <directory.h> +#include <idmap.h> #endif #include "zfs_iter.h" @@ -2390,10 +2391,9 @@ userspace_cb(void *arg, const char *doma /* SMB */ char sid[ZFS_MAXNAMELEN + 32]; uid_t id; - uint64_t classes; #ifdef sun int err; - directory_error_t e; + int flag = IDMAP_REQ_FLG_USE_CACHE; #endif smbentity = B_TRUE; @@ -2416,10 +2416,13 @@ userspace_cb(void *arg, const char *doma if (err == 0) { rid = id; if (!cb->cb_sid2posix) { - e = directory_name_from_sid(NULL, sid, &name, - &classes); - if (e != NULL) - directory_error_free(e); + if (type == USTYPE_SMB_USR) { + (void) idmap_getwinnamebyuid(rid, flag, + &name, NULL); + } else { + (void) idmap_getwinnamebygid(rid, flag, + &name, NULL); + } if (name == NULL) name = sid; } Modified: projects/building-blocks/cddl/contrib/opensolaris/lib/libnvpair/libnvpair.h ============================================================================== --- projects/building-blocks/cddl/contrib/opensolaris/lib/libnvpair/libnvpair.h Mon Dec 8 03:32:26 2014 (r275589) +++ projects/building-blocks/cddl/contrib/opensolaris/lib/libnvpair/libnvpair.h Mon Dec 8 03:36:43 2014 (r275590) @@ -20,6 +20,7 @@ */ /* * Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2013, Joyent, Inc. All rights reserved. */ #ifndef _LIBNVPAIR_H @@ -46,6 +47,7 @@ extern int nvpair_value_match_regex(nvpa char **); extern void nvlist_print(FILE *, nvlist_t *); +extern int nvlist_print_json(FILE *, nvlist_t *); extern void dump_nvlist(nvlist_t *, int); /* Copied: projects/building-blocks/cddl/contrib/opensolaris/lib/libnvpair/nvpair_json.c (from r275589, head/cddl/contrib/opensolaris/lib/libnvpair/nvpair_json.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ projects/building-blocks/cddl/contrib/opensolaris/lib/libnvpair/nvpair_json.c Mon Dec 8 03:36:43 2014 (r275590, copy of r275589, head/cddl/contrib/opensolaris/lib/libnvpair/nvpair_json.c) @@ -0,0 +1,403 @@ +/* + * This file and its contents are supplied under the terms of the + * Common Development and Distribution License ("CDDL"), version 1.0. + * You may only use this file in accordance with the terms of version + * 1.0 of the CDDL. + * + * A full copy of the text of the CDDL should have accompanied this + * source. A copy of the CDDL is also available via the Internet at + * http://www.illumos.org/license/CDDL. + */ +/* + * Copyright (c) 2014, Joyent, Inc. + */ + +#include <stdio.h> +#include <stdlib.h> +#include <strings.h> +#include <wchar.h> +#include <sys/debug.h> + +#include "libnvpair.h" + +#define FPRINTF(fp, ...) \ + do { \ + if (fprintf(fp, __VA_ARGS__) < 0) \ + return (-1); \ + } while (0) + +/* + * When formatting a string for JSON output we must escape certain characters, + * as described in RFC4627. This applies to both member names and + * DATA_TYPE_STRING values. + * + * This function will only operate correctly if the following conditions are + * met: + * + * 1. The input String is encoded in the current locale. + * + * 2. The current locale includes the Basic Multilingual Plane (plane 0) + * as defined in the Unicode standard. + * + * The output will be entirely 7-bit ASCII (as a subset of UTF-8) with all + * representable Unicode characters included in their escaped numeric form. + */ +static int +nvlist_print_json_string(FILE *fp, const char *input) +{ + mbstate_t mbr; + wchar_t c; + size_t sz; + + bzero(&mbr, sizeof (mbr)); + + FPRINTF(fp, "\""); + while ((sz = mbrtowc(&c, input, MB_CUR_MAX, &mbr)) > 0) { + switch (c) { + case '"': + FPRINTF(fp, "\\\""); + break; + case '\n': + FPRINTF(fp, "\\n"); + break; + case '\r': + FPRINTF(fp, "\\r"); + break; + case '\\': + FPRINTF(fp, "\\\\"); + break; + case '\f': + FPRINTF(fp, "\\f"); + break; + case '\t': + FPRINTF(fp, "\\t"); + break; + case '\b': + FPRINTF(fp, "\\b"); + break; + default: + if ((c >= 0x00 && c <= 0x1f) || + (c > 0x7f && c <= 0xffff)) { + /* + * Render both Control Characters and Unicode + * characters in the Basic Multilingual Plane + * as JSON-escaped multibyte characters. + */ + FPRINTF(fp, "\\u%04x", (int)(0xffff & c)); + } else if (c >= 0x20 && c <= 0x7f) { + /* + * Render other 7-bit ASCII characters directly + * and drop other, unrepresentable characters. + */ + FPRINTF(fp, "%c", (int)(0xff & c)); + } + break; + } + input += sz; + } + + if (sz == (size_t)-1 || sz == (size_t)-2) { + /* + * We last read an invalid multibyte character sequence, + * so return an error. + */ + return (-1); + } + + FPRINTF(fp, "\""); + return (0); +} + +/* + * Dump a JSON-formatted representation of an nvlist to the provided FILE *. + * This routine does not output any new-lines or additional whitespace other + * than that contained in strings, nor does it call fflush(3C). + */ +int +nvlist_print_json(FILE *fp, nvlist_t *nvl) +{ + nvpair_t *curr; + boolean_t first = B_TRUE; + + FPRINTF(fp, "{"); + + for (curr = nvlist_next_nvpair(nvl, NULL); curr; + curr = nvlist_next_nvpair(nvl, curr)) { + data_type_t type = nvpair_type(curr); + + if (!first) + FPRINTF(fp, ","); + else + first = B_FALSE; + + if (nvlist_print_json_string(fp, nvpair_name(curr)) == -1) + return (-1); + FPRINTF(fp, ":"); + + switch (type) { + case DATA_TYPE_STRING: { + char *string = fnvpair_value_string(curr); + if (nvlist_print_json_string(fp, string) == -1) + return (-1); + break; + } + + case DATA_TYPE_BOOLEAN: { + FPRINTF(fp, "true"); + break; + } + + case DATA_TYPE_BOOLEAN_VALUE: { + FPRINTF(fp, "%s", fnvpair_value_boolean_value(curr) == + B_TRUE ? "true" : "false"); + break; + } + + case DATA_TYPE_BYTE: { + FPRINTF(fp, "%hhu", fnvpair_value_byte(curr)); + break; + } + + case DATA_TYPE_INT8: { + FPRINTF(fp, "%hhd", fnvpair_value_int8(curr)); + break; + } + + case DATA_TYPE_UINT8: { + FPRINTF(fp, "%hhu", fnvpair_value_uint8_t(curr)); + break; + } + + case DATA_TYPE_INT16: { + FPRINTF(fp, "%hd", fnvpair_value_int16(curr)); + break; + } + + case DATA_TYPE_UINT16: { + FPRINTF(fp, "%hu", fnvpair_value_uint16(curr)); + break; + } + + case DATA_TYPE_INT32: { + FPRINTF(fp, "%d", fnvpair_value_int32(curr)); + break; + } + + case DATA_TYPE_UINT32: { + FPRINTF(fp, "%u", fnvpair_value_uint32(curr)); + break; + } + + case DATA_TYPE_INT64: { + FPRINTF(fp, "%lld", + (long long)fnvpair_value_int64(curr)); + break; + } + + case DATA_TYPE_UINT64: { + FPRINTF(fp, "%llu", + (unsigned long long)fnvpair_value_uint64(curr)); + break; + } + + case DATA_TYPE_HRTIME: { + hrtime_t val; + VERIFY0(nvpair_value_hrtime(curr, &val)); + FPRINTF(fp, "%llu", (unsigned long long)val); + break; + } + + case DATA_TYPE_DOUBLE: { + double val; + VERIFY0(nvpair_value_double(curr, &val)); + FPRINTF(fp, "%f", val); + break; + } + + case DATA_TYPE_NVLIST: { + if (nvlist_print_json(fp, + fnvpair_value_nvlist(curr)) == -1) + return (-1); + break; + } + + case DATA_TYPE_STRING_ARRAY: { + char **val; + uint_t valsz, i; + VERIFY0(nvpair_value_string_array(curr, &val, &valsz)); + FPRINTF(fp, "["); + for (i = 0; i < valsz; i++) { + if (i > 0) + FPRINTF(fp, ","); + if (nvlist_print_json_string(fp, val[i]) == -1) + return (-1); + } + FPRINTF(fp, "]"); + break; + } + + case DATA_TYPE_NVLIST_ARRAY: { + nvlist_t **val; + uint_t valsz, i; + VERIFY0(nvpair_value_nvlist_array(curr, &val, &valsz)); + FPRINTF(fp, "["); + for (i = 0; i < valsz; i++) { + if (i > 0) + FPRINTF(fp, ","); + if (nvlist_print_json(fp, val[i]) == -1) + return (-1); + } + FPRINTF(fp, "]"); + break; + } + + case DATA_TYPE_BOOLEAN_ARRAY: { + boolean_t *val; + uint_t valsz, i; + VERIFY0(nvpair_value_boolean_array(curr, &val, &valsz)); + FPRINTF(fp, "["); + for (i = 0; i < valsz; i++) { + if (i > 0) + FPRINTF(fp, ","); + FPRINTF(fp, val[i] == B_TRUE ? + "true" : "false"); + } + FPRINTF(fp, "]"); + break; + } + + case DATA_TYPE_BYTE_ARRAY: { + uchar_t *val; + uint_t valsz, i; + VERIFY0(nvpair_value_byte_array(curr, &val, &valsz)); + FPRINTF(fp, "["); + for (i = 0; i < valsz; i++) { + if (i > 0) + FPRINTF(fp, ","); + FPRINTF(fp, "%hhu", val[i]); + } + FPRINTF(fp, "]"); + break; + } + + case DATA_TYPE_UINT8_ARRAY: { + uint8_t *val; + uint_t valsz, i; + VERIFY0(nvpair_value_uint8_array(curr, &val, &valsz)); + FPRINTF(fp, "["); + for (i = 0; i < valsz; i++) { + if (i > 0) + FPRINTF(fp, ","); + FPRINTF(fp, "%hhu", val[i]); + } + FPRINTF(fp, "]"); + break; + } + + case DATA_TYPE_INT8_ARRAY: { + int8_t *val; + uint_t valsz, i; + VERIFY0(nvpair_value_int8_array(curr, &val, &valsz)); + FPRINTF(fp, "["); + for (i = 0; i < valsz; i++) { + if (i > 0) + FPRINTF(fp, ","); + FPRINTF(fp, "%hhd", val[i]); + } + FPRINTF(fp, "]"); + break; + } + + case DATA_TYPE_UINT16_ARRAY: { + uint16_t *val; + uint_t valsz, i; + VERIFY0(nvpair_value_uint16_array(curr, &val, &valsz)); + FPRINTF(fp, "["); + for (i = 0; i < valsz; i++) { + if (i > 0) + FPRINTF(fp, ","); + FPRINTF(fp, "%hu", val[i]); + } + FPRINTF(fp, "]"); + break; + } + + case DATA_TYPE_INT16_ARRAY: { + int16_t *val; + uint_t valsz, i; + VERIFY0(nvpair_value_int16_array(curr, &val, &valsz)); + FPRINTF(fp, "["); + for (i = 0; i < valsz; i++) { + if (i > 0) + FPRINTF(fp, ","); + FPRINTF(fp, "%hd", val[i]); + } + FPRINTF(fp, "]"); + break; + } + + case DATA_TYPE_UINT32_ARRAY: { + uint32_t *val; + uint_t valsz, i; + VERIFY0(nvpair_value_uint32_array(curr, &val, &valsz)); + FPRINTF(fp, "["); + for (i = 0; i < valsz; i++) { + if (i > 0) + FPRINTF(fp, ","); + FPRINTF(fp, "%u", val[i]); + } + FPRINTF(fp, "]"); + break; + } + + case DATA_TYPE_INT32_ARRAY: { + int32_t *val; + uint_t valsz, i; + VERIFY0(nvpair_value_int32_array(curr, &val, &valsz)); + FPRINTF(fp, "["); + for (i = 0; i < valsz; i++) { + if (i > 0) + FPRINTF(fp, ","); + FPRINTF(fp, "%d", val[i]); + } + FPRINTF(fp, "]"); + break; + } + + case DATA_TYPE_UINT64_ARRAY: { + uint64_t *val; + uint_t valsz, i; + VERIFY0(nvpair_value_uint64_array(curr, &val, &valsz)); + FPRINTF(fp, "["); + for (i = 0; i < valsz; i++) { + if (i > 0) + FPRINTF(fp, ","); + FPRINTF(fp, "%llu", + (unsigned long long)val[i]); + } + FPRINTF(fp, "]"); + break; + } + + case DATA_TYPE_INT64_ARRAY: { + int64_t *val; + uint_t valsz, i; + VERIFY0(nvpair_value_int64_array(curr, &val, &valsz)); + FPRINTF(fp, "["); + for (i = 0; i < valsz; i++) { + if (i > 0) + FPRINTF(fp, ","); + FPRINTF(fp, "%lld", (long long)val[i]); + } + FPRINTF(fp, "]"); + break; + } + + case DATA_TYPE_UNKNOWN: + return (-1); + } + } + + FPRINTF(fp, "}"); + return (0); +} Modified: projects/building-blocks/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c ============================================================================== --- projects/building-blocks/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c Mon Dec 8 03:32:26 2014 (r275589) +++ projects/building-blocks/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c Mon Dec 8 03:36:43 2014 (r275590) @@ -2615,7 +2615,7 @@ userquota_propname_decode(const char *pr boolean_t isuser; domain[0] = '\0'; - + *ridp = 0; /* Figure out the property type ({user|group}{quota|space}) */ for (type = 0; type < ZFS_NUM_USERQUOTA_PROPS; type++) { if (strncmp(propname, zfs_userquota_prop_prefixes[type], @@ -2637,23 +2637,46 @@ userquota_propname_decode(const char *pr * It's a SID name (eg "user@domain") that needs to be * turned into S-1-domainID-RID. */ - directory_error_t e; + int flag = 0; + idmap_stat stat, map_stat; + uid_t pid; + idmap_rid_t rid; + idmap_get_handle_t *gh = NULL; + + stat = idmap_get_create(&gh); + if (stat != IDMAP_SUCCESS) { + idmap_get_destroy(gh); + return (ENOMEM); + } if (zoned && getzoneid() == GLOBAL_ZONEID) return (ENOENT); if (isuser) { - e = directory_sid_from_user_name(NULL, - cp, &numericsid); + stat = idmap_getuidbywinname(cp, NULL, flag, &pid); + if (stat < 0) + return (ENOENT); + stat = idmap_get_sidbyuid(gh, pid, flag, &numericsid, + &rid, &map_stat); } else { - e = directory_sid_from_group_name(NULL, - cp, &numericsid); + stat = idmap_getgidbywinname(cp, NULL, flag, &pid); + if (stat < 0) + return (ENOENT); + stat = idmap_get_sidbygid(gh, pid, flag, &numericsid, + &rid, &map_stat); + } + if (stat < 0) { + idmap_get_destroy(gh); + return (ENOENT); } - if (e != NULL) { - directory_error_free(e); + stat = idmap_get_mappings(gh); + idmap_get_destroy(gh); + + if (stat < 0) { return (ENOENT); } if (numericsid == NULL) return (ENOENT); cp = numericsid; + *ridp = rid; /* will be further decoded below */ #else /* !sun */ return (ENOENT); @@ -2663,12 +2686,15 @@ userquota_propname_decode(const char *pr if (strncmp(cp, "S-1-", 4) == 0) { /* It's a numeric SID (eg "S-1-234-567-89") */ (void) strlcpy(domain, cp, domainlen); - cp = strrchr(domain, '-'); - *cp = '\0'; - cp++; - errno = 0; - *ridp = strtoull(cp, &end, 10); + if (*ridp == 0) { + cp = strrchr(domain, '-'); + *cp = '\0'; + cp++; + *ridp = strtoull(cp, &end, 10); + } else { + end = ""; + } if (numericsid) { free(numericsid); numericsid = NULL; Modified: projects/building-blocks/cddl/contrib/opensolaris/tools/ctf/cvt/ctftools.h ============================================================================== --- projects/building-blocks/cddl/contrib/opensolaris/tools/ctf/cvt/ctftools.h Mon Dec 8 03:32:26 2014 (r275589) +++ projects/building-blocks/cddl/contrib/opensolaris/tools/ctf/cvt/ctftools.h Mon Dec 8 03:36:43 2014 (r275590) @@ -26,8 +26,6 @@ #ifndef _CTFTOOLS_H #define _CTFTOOLS_H -#pragma ident "%Z%%M% %I% %E% SMI" - /* * Functions and data structures used in the manipulation of stabs and CTF data */ @@ -39,6 +37,8 @@ #include <gelf.h> #include <pthread.h> +#include <sys/ccompile.h> + #ifdef __cplusplus extern "C" { #endif @@ -435,8 +435,8 @@ int streq(const char *, const char *); int findelfsecidx(Elf *, const char *, const char *); size_t elf_ptrsz(Elf *); char *mktmpname(const char *, const char *); -void terminate(const char *, ...); -void aborterr(const char *, ...); +void terminate(const char *, ...) __NORETURN; +void aborterr(const char *, ...) __NORETURN; void set_terminate_cleanup(void (*)(void)); void elfterminate(const char *, const char *, ...); void warning(const char *, ...); Modified: projects/building-blocks/cddl/lib/libnvpair/Makefile ============================================================================== --- projects/building-blocks/cddl/lib/libnvpair/Makefile Mon Dec 8 03:32:26 2014 (r275589) +++ projects/building-blocks/cddl/lib/libnvpair/Makefile Mon Dec 8 03:36:43 2014 (r275590) @@ -9,6 +9,7 @@ SRCS= libnvpair.c \ nvpair_alloc_system.c \ nvpair_alloc_fixed.c \ nvpair.c \ + nvpair_json.c \ fnvpair.c WARNS?= 0 Modified: projects/building-blocks/contrib/binutils/gas/config/tc-arm.c ============================================================================== --- projects/building-blocks/contrib/binutils/gas/config/tc-arm.c Mon Dec 8 03:32:26 2014 (r275589) +++ projects/building-blocks/contrib/binutils/gas/config/tc-arm.c Mon Dec 8 03:36:43 2014 (r275590) @@ -6789,7 +6789,11 @@ do_co_reg (void) { inst.instruction |= inst.operands[0].reg << 8; inst.instruction |= inst.operands[1].imm << 21; - inst.instruction |= inst.operands[2].reg << 12; + /* If this is a vector we are using the APSR_nzcv syntax, encode as r15 */ + if (inst.operands[2].isvec != 0) + inst.instruction |= 15 << 12; + else + inst.instruction |= inst.operands[2].reg << 12; inst.instruction |= inst.operands[3].reg << 16; inst.instruction |= inst.operands[4].reg; inst.instruction |= inst.operands[5].imm << 5; Modified: projects/building-blocks/lib/msun/src/e_j0.c ============================================================================== --- projects/building-blocks/lib/msun/src/e_j0.c Mon Dec 8 03:32:26 2014 (r275589) +++ projects/building-blocks/lib/msun/src/e_j0.c Mon Dec 8 03:36:43 2014 (r275590) @@ -115,7 +115,7 @@ __ieee754_j0(double x) if(ix<0x3f200000) { /* |x| < 2**-13 */ if(huge+x>one) { /* raise inexact if x != 0 */ if(ix<0x3e400000) return one; /* |x|<2**-27 */ - else return one - 0.25*x*x; + else return one - x*x/4; } } z = x*x; Modified: projects/building-blocks/lib/msun/src/e_j0f.c ============================================================================== --- projects/building-blocks/lib/msun/src/e_j0f.c Mon Dec 8 03:32:26 2014 (r275589) +++ projects/building-blocks/lib/msun/src/e_j0f.c Mon Dec 8 03:36:43 2014 (r275590) @@ -69,10 +69,10 @@ __ieee754_j0f(float x) } return z; } - if(ix<0x39000000) { /* |x| < 2**-13 */ + if(ix<0x3c000000) { /* |x| < 2**-7 */ if(huge+x>one) { /* raise inexact if x != 0 */ - if(ix<0x32000000) return one; /* |x|<2**-27 */ - else return one - (float)0.25*x*x; + if(ix<0x39800000) return one; /* |x|<2**-12 */ + else return one - x*x/4; } } z = x*x; Modified: projects/building-blocks/sbin/iscontrol/Makefile ============================================================================== --- projects/building-blocks/sbin/iscontrol/Makefile Mon Dec 8 03:32:26 2014 (r275589) +++ projects/building-blocks/sbin/iscontrol/Makefile Mon Dec 8 03:36:43 2014 (r275590) @@ -8,6 +8,6 @@ S= ${.CURDIR}/../../sys WARNS?= 3 CFLAGS+= -I$S -MAN= iscsi.conf.5 iscontrol.8 +MAN= iscontrol.8 .include <bsd.prog.mk> Modified: projects/building-blocks/share/misc/committers-ports.dot ============================================================================== --- projects/building-blocks/share/misc/committers-ports.dot Mon Dec 8 03:32:26 2014 (r275589) +++ projects/building-blocks/share/misc/committers-ports.dot Mon Dec 8 03:36:43 2014 (r275590) @@ -126,6 +126,7 @@ josef [label="Josef El-Rayes\njosef@Free jpaetzel [label="Josh Paetzel\njpaetzel@FreeBSD.org\n2008/09/05"] jsa [label="Joseph S. Atkinson\njsa@FreeBSD.org\n2010/07/15"] jylefort [label="Jean-Yves Lefort\njylefort@FreeBSD.org\n2005/04/12"] +kami [label="Dominic Fandrey\nkami@FreeBSD.org\n2014/09/09"] kevlo [label="Kevin Lo\nkevlo@FreeBSD.org\n2003/02/21"] kmoore [label="Kris Moore\nkmoore@FreeBSD.org\n2009/04/14"] knu [label="Akinori Musha\nknu@FreeBSD.org\n2000/03/22"] @@ -190,6 +191,7 @@ rodrigo [label="Rodrigo Osorio\nrodrigo@ romain [label="Romain Tartiere\nromain@FreeBSD.org\n2010/01/24"] sahil [label="Sahil Tandon\nsahil@FreeBSD.org\n2010/04/11"] sat [label="Andrew Pantyukhin\nsat@FreeBSD.org\n2006/05/06"] +sbruno [label="Sean Bruno\nsbruno@FreeBSD.org\n2014/09/14"] sbz [label="Sofian Brabez\nsbz@FreeBSD.org\n2011/03/14"] scheidell [label="Michael Scheidell\nscheidell@FreeBSD.org\n2011/11/06"] sem [label="Sergey Matveychuk\nsem@FreeBSD.org\n2004/07/07"] @@ -256,14 +258,17 @@ avilla -> jhale avilla -> rakuco bdrewery -> dbn +bdrewery -> sbruno bdrewery -> trociny bapt -> bdrewery bapt -> eadler +bapt -> grembo bapt -> jlaffaye bapt -> marius bapt -> marino bapt -> rodrigo +bapt -> sbruno beat -> decke beat -> marius @@ -291,6 +296,8 @@ crees -> madpilot crees -> gblach crees -> tijl +cs -> kami + culot -> danilo culot -> jase culot -> marino @@ -339,6 +346,7 @@ fjoe -> osa flo -> bar flo -> jase +flo -> grembo flz -> garga flz -> johans @@ -389,6 +397,7 @@ knu -> maho knu -> nobutaka knu -> nork +koobs -> kami koobs -> xmj krion -> brooks Modified: projects/building-blocks/share/misc/organization.dot ============================================================================== --- projects/building-blocks/share/misc/organization.dot Mon Dec 8 03:32:26 2014 (r275589) +++ projects/building-blocks/share/misc/organization.dot Mon Dec 8 03:36:43 2014 (r275590) @@ -30,7 +30,7 @@ coresecretary [label="Core Team Secretar doccommitters [label="Doc/www Committers\ndoc-committers@FreeBSD.org"] doceng [label="Documentation Engineering Team\ndoceng@FreeBSD.org\ngjb, blackend,\ngabor, hrs"] portscommitters [label="Ports Committers\nports-committers@FreeBSD.org"] -portmgr [label="Port Management Team\nportmgr@FreeBSD.org\nantoine, bapt, bdrewery,\ndecke, erwin, mat,\nmiwi, swills, tabthorpe"] +portmgr [label="Port Management Team\nportmgr@FreeBSD.org\nantoine, bapt, bdrewery,\ndecke, erwin, mat, swills"] portmgrsecretary [label="Port Management Team Secretary\nportmgr-secretary@FreeBSD.org\nculot"] re [label="Primary Release Engineering Team\nre@FreeBSD.org\nkib, blackend, jpaetzel, hrs, kensmith"] secteam [label="Security Team\nsecteam@FreeBSD.org\nsimon, qingli, delphij,\nremko, philip, stas, cperciva,\ncsjp, rwatson, miwi, bz"] Modified: projects/building-blocks/share/mk/bsd.compiler.mk ============================================================================== --- projects/building-blocks/share/mk/bsd.compiler.mk Mon Dec 8 03:32:26 2014 (r275589) +++ projects/building-blocks/share/mk/bsd.compiler.mk Mon Dec 8 03:36:43 2014 (r275590) @@ -25,7 +25,7 @@ .if !target(__<bsd.compiler.mk>__) __<bsd.compiler.mk>__: -.if !defined(COMPILER_TYPE) && !defined(COMPILER_VERSION) +.if !defined(COMPILER_TYPE) || !defined(COMPILER_VERSION) _v!= ${CC} --version 2>/dev/null || echo 0.0.0 .if !defined(COMPILER_TYPE) . if ${CC:T:M*gcc*} Modified: projects/building-blocks/sys/arm/arm/cpufunc_asm_arm11x6.S ============================================================================== --- projects/building-blocks/sys/arm/arm/cpufunc_asm_arm11x6.S Mon Dec 8 03:32:26 2014 (r275589) +++ projects/building-blocks/sys/arm/arm/cpufunc_asm_arm11x6.S Mon Dec 8 03:36:43 2014 (r275590) @@ -62,7 +62,7 @@ #include <machine/asm.h> __FBSDID("$FreeBSD$"); - .cpu arm1136js + .cpu arm1176jz-s #if 0 #define Invalidate_I_cache(Rtmp1, Rtmp2) \ Modified: projects/building-blocks/sys/arm/arm/fusu.S ============================================================================== --- projects/building-blocks/sys/arm/arm/fusu.S Mon Dec 8 03:32:26 2014 (r275589) +++ projects/building-blocks/sys/arm/arm/fusu.S Mon Dec 8 03:36:43 2014 (r275590) @@ -38,6 +38,8 @@ #include "assym.s" __FBSDID("$FreeBSD$"); + .syntax unified + #ifdef _ARM_ARCH_6 #define GET_PCB(tmp) \ mrc p15, 0, tmp, c13, c0, 4; \ @@ -83,7 +85,7 @@ EENTRY_NP(casuword32) ldrt r5, [r0] cmp r5, r1 movne r0, r5 - streqt r2, [r0] + strteq r2, [r0] #endif moveq r0, r1 2: @@ -269,7 +271,7 @@ _C_LABEL(fusubailout): fusupcbfaulttext: .asciz "Yikes - no valid PCB during fusuxxx() addr=%08x\n" - .align 0 + .align 2 #endif /* Modified: projects/building-blocks/sys/arm/arm/stdatomic.c ============================================================================== --- projects/building-blocks/sys/arm/arm/stdatomic.c Mon Dec 8 03:32:26 2014 (r275589) +++ projects/building-blocks/sys/arm/arm/stdatomic.c Mon Dec 8 03:36:43 2014 (r275590) @@ -850,8 +850,13 @@ EMIT_FETCH_AND_OP_N(N, uintN_t, ldr, str EMIT_FETCH_AND_OP_N(N, uintN_t, ldr, str, fetch_and_sub, "sub") \ EMIT_FETCH_AND_OP_N(N, uintN_t, ldr, str, fetch_and_xor, "eor") +#ifdef __clang__ +EMIT_ALL_OPS_N(1, uint8_t, "ldrb", "strb", "strbeq") +EMIT_ALL_OPS_N(2, uint16_t, "ldrh", "strh", "strheq") +#else EMIT_ALL_OPS_N(1, uint8_t, "ldrb", "strb", "streqb") EMIT_ALL_OPS_N(2, uint16_t, "ldrh", "strh", "streqh") +#endif EMIT_ALL_OPS_N(4, uint32_t, "ldr", "str", "streq") #ifndef __clang__ Modified: projects/building-blocks/sys/arm/arm/support.S ============================================================================== --- projects/building-blocks/sys/arm/arm/support.S Mon Dec 8 03:32:26 2014 (r275589) +++ projects/building-blocks/sys/arm/arm/support.S Mon Dec 8 03:36:43 2014 (r275590) @@ -1364,6 +1364,8 @@ ENTRY(memcpy) strbge r2, [r3], #0x01 strbgt ip, [r3] RET +/* Place a literal pool here for the above ldr instructions to use */ +.ltorg /* Modified: projects/building-blocks/sys/arm/mv/mv_pci.c ============================================================================== --- projects/building-blocks/sys/arm/mv/mv_pci.c Mon Dec 8 03:32:26 2014 (r275589) +++ projects/building-blocks/sys/arm/mv/mv_pci.c Mon Dec 8 03:36:43 2014 (r275590) @@ -1171,7 +1171,7 @@ mv_pcib_alloc_msi(device_t dev, device_t for (i = start; i < start + count; i++) { setbit(&sc->sc_msi_bitmap, i); - irqs[i] = MSI_IRQ + i; + *irqs++ = MSI_IRQ + i; } debugf("%s: start: %x count: %x\n", __func__, start, count); Modified: projects/building-blocks/sys/arm/ti/ti_smc.S ============================================================================== --- projects/building-blocks/sys/arm/ti/ti_smc.S Mon Dec 8 03:32:26 2014 (r275589) +++ projects/building-blocks/sys/arm/ti/ti_smc.S Mon Dec 8 03:36:43 2014 (r275590) @@ -26,7 +26,7 @@ #include <machine/asm.h> __FBSDID("$FreeBSD$"); - .arch armv7a + .cpu cortex-a8 .arch_extension sec /* Issue a smc #0 call */ Modified: projects/building-blocks/sys/arm/xscale/ixp425/ixp425_a4x_io.S ============================================================================== --- projects/building-blocks/sys/arm/xscale/ixp425/ixp425_a4x_io.S Mon Dec 8 03:32:26 2014 (r275589) +++ projects/building-blocks/sys/arm/xscale/ixp425/ixp425_a4x_io.S Mon Dec 8 03:36:43 2014 (r275590) @@ -56,6 +56,7 @@ ENTRY(a4x_bs_r_1) ldr r0, [r1, r2, LSL #2] and r0, r0, #0xff mov pc, lr +END(a4x_bs_r_1) ENTRY(a4x_bs_r_2) ldr r0, [r1, r2, LSL #2] @@ -63,10 +64,12 @@ ENTRY(a4x_bs_r_2) orr r1, r1, r1, lsl #8 and r0, r0, r1 mov pc, lr +END(a4x_bs_r_2) ENTRY(a4x_bs_r_4) ldr r0, [r1, r2, LSL #2] mov pc, lr +END(a4x_bs_r_4) /* * Write single @@ -75,6 +78,7 @@ ENTRY(a4x_bs_w_1) and r3, r3, #0xff str r3, [r1, r2, LSL #2] mov pc, lr +END(a4x_bs_w_1) ENTRY(a4x_bs_w_2) mov r0, #0xff @@ -82,10 +86,12 @@ ENTRY(a4x_bs_w_2) and r3, r3, r0 str r3, [r1, r2, LSL #2] mov pc, lr +END(a4x_bs_w_2) ENTRY(a4x_bs_w_4) str r3, [r1, r2, LSL #2] mov pc, lr +END(a4x_bs_w_4) /* * Read multiple @@ -101,6 +107,7 @@ ENTRY(a4x_bs_rm_1) strb r3, [r1], #1 bne 1b mov pc, lr +END(a4x_bs_rm_1) ENTRY(a4x_bs_rm_2) add r0, r1, r2, lsl #2 @@ -113,6 +120,7 @@ ENTRY(a4x_bs_rm_2) strh r3, [r1], #2 bne 1b mov pc, lr +END(a4x_bs_rm_2) /* * Write multiple @@ -128,6 +136,7 @@ ENTRY(a4x_bs_wm_1) str r3, [r0] bne 1b mov pc, lr +END(a4x_bs_wm_1) ENTRY(a4x_bs_wm_2) add r0, r1, r2, lsl #2 @@ -140,3 +149,4 @@ ENTRY(a4x_bs_wm_2) str r3, [r0] bne 1b mov pc, lr +END(a4x_bs_wm_2) Modified: projects/building-blocks/sys/arm/xscale/ixp425/ixp425_pci_asm.S ============================================================================== --- projects/building-blocks/sys/arm/xscale/ixp425/ixp425_pci_asm.S Mon Dec 8 03:32:26 2014 (r275589) +++ projects/building-blocks/sys/arm/xscale/ixp425/ixp425_pci_asm.S Mon Dec 8 03:36:43 2014 (r275590) @@ -58,6 +58,7 @@ ENTRY(ixp425_pci_mem_bs_r_1) ldrb r0, [r1, r2] #endif /* __ARMEB__ */ mov pc, lr +END(ixp425_pci_mem_bs_r_1) ENTRY(ixp425_pci_mem_bs_r_2) #ifdef __ARMEB__ @@ -68,10 +69,12 @@ ENTRY(ixp425_pci_mem_bs_r_2) ldrh r0, [r1, r2] #endif /* __ARMEB__ */ mov pc, lr +END(ixp425_pci_mem_bs_r_2) ENTRY(ixp425_pci_mem_bs_r_4) ldr r0, [r1, r2] mov pc, lr +END(ixp425_pci_mem_bs_r_4) /* * write single @@ -86,6 +89,7 @@ ENTRY(ixp425_pci_mem_bs_w_1) strb r3, [r1, r2] #endif /* __ARMEB__ */ mov pc, lr +END(ixp425_pci_mem_bs_w_1) ENTRY(ixp425_pci_mem_bs_w_2) #ifdef __ARMEB__ @@ -96,7 +100,9 @@ ENTRY(ixp425_pci_mem_bs_w_2) strh r3, [r1, r2] #endif /* __ARMEB__ */ mov pc, lr +END(ixp425_pci_mem_bs_w_2) ENTRY(ixp425_pci_mem_bs_w_4) str r3, [r1, r2] mov pc, lr +END(ixp425_pci_mem_bs_w_4) Modified: projects/building-blocks/sys/boot/kshim/bsd_kernel.h ============================================================================== --- projects/building-blocks/sys/boot/kshim/bsd_kernel.h Mon Dec 8 03:32:26 2014 (r275589) +++ projects/building-blocks/sys/boot/kshim/bsd_kernel.h Mon Dec 8 03:36:43 2014 (r275590) @@ -109,6 +109,8 @@ SYSINIT_ENTRY(uniq##_entry, "sysuninit", #define cold 0 #define BUS_PROBE_GENERIC 0 #define CALLOUT_RETURNUNLOCKED 0x1 +#undef ffs +#define ffs(x) __builtin_ffs(x) #undef va_list #define va_list __builtin_va_list #undef va_size Modified: projects/building-blocks/sys/cam/ctl/ctl.c ============================================================================== --- projects/building-blocks/sys/cam/ctl/ctl.c Mon Dec 8 03:32:26 2014 (r275589) +++ projects/building-blocks/sys/cam/ctl/ctl.c Mon Dec 8 03:36:43 2014 (r275590) @@ -433,7 +433,9 @@ static int ctl_inquiry_evpd_lbp(struct c static int ctl_inquiry_evpd(struct ctl_scsiio *ctsio); static int ctl_inquiry_std(struct ctl_scsiio *ctsio); static int ctl_get_lba_len(union ctl_io *io, uint64_t *lba, uint64_t *len); -static ctl_action ctl_extent_check(union ctl_io *io1, union ctl_io *io2); +static ctl_action ctl_extent_check(union ctl_io *io1, union ctl_io *io2, + bool seq); +static ctl_action ctl_extent_check_seq(union ctl_io *io1, union ctl_io *io2); static ctl_action ctl_check_for_blockage(struct ctl_lun *lun, union ctl_io *pending_io, union ctl_io *ooa_io); static ctl_action ctl_check_ooa(struct ctl_lun *lun, union ctl_io *pending_io, @@ -4347,8 +4349,7 @@ ctl_init_log_page_index(struct ctl_lun * continue; if (page_index->page_code == SLS_LOGICAL_BLOCK_PROVISIONING && - ((lun->be_lun->flags & CTL_LUN_FLAG_UNMAP) == 0 || - lun->backend->lun_attr == NULL)) + lun->backend->lun_attr == NULL) continue; if (page_index->page_code != prev) { @@ -4591,6 +4592,17 @@ ctl_alloc_lun(struct ctl_softc *ctl_soft if (value != NULL && strcmp(value, "on") == 0) lun->flags |= CTL_LUN_READONLY; + lun->serseq = CTL_LUN_SERSEQ_OFF; + if (be_lun->flags & CTL_LUN_FLAG_SERSEQ_READ) + lun->serseq = CTL_LUN_SERSEQ_READ; + value = ctl_get_opt(&be_lun->options, "serseq"); + if (value != NULL && strcmp(value, "on") == 0) + lun->serseq = CTL_LUN_SERSEQ_ON; + else if (value != NULL && strcmp(value, "read") == 0) + lun->serseq = CTL_LUN_SERSEQ_READ; + else if (value != NULL && strcmp(value, "off") == 0) + lun->serseq = CTL_LUN_SERSEQ_OFF; + lun->ctl_softc = ctl_softc; TAILQ_INIT(&lun->ooa_queue); TAILQ_INIT(&lun->blocked_queue); @@ -10253,8 +10265,8 @@ ctl_inquiry_evpd_lbp(struct ctl_scsiio * lbp_ptr->page_code = SVPD_LBP; scsi_ulto2b(sizeof(*lbp_ptr) - 4, lbp_ptr->page_length); + lbp_ptr->threshold_exponent = CTL_LBP_EXPONENT; if (lun != NULL && lun->be_lun->flags & CTL_LUN_FLAG_UNMAP) { - lbp_ptr->threshold_exponent = CTL_LBP_EXPONENT; lbp_ptr->flags = SVPD_LBP_UNMAP | SVPD_LBP_WS16 | SVPD_LBP_WS10 | SVPD_LBP_RZ | SVPD_LBP_ANC_SUP; lbp_ptr->prov_type = SVPD_LBP_THIN; @@ -10753,15 +10765,15 @@ ctl_get_lba_len(union ctl_io *io, uint64 } static ctl_action -ctl_extent_check_lba(uint64_t lba1, uint64_t len1, uint64_t lba2, uint64_t len2) +ctl_extent_check_lba(uint64_t lba1, uint64_t len1, uint64_t lba2, uint64_t len2, + bool seq) { uint64_t endlba1, endlba2; *** DIFF OUTPUT TRUNCATED AT 1000 LINES ***
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201412080336.sB83aiuK016689>