svn commit: r246640 - in user/attilio/vmc-playground: cddl/contrib/opensolaris/cmd/zfs cddl/contrib/opensolaris/lib/libzfs/common lib/libc/net lib/libc/sys sbin/geom/class/eli sys/boot/common sys/b...

Attilio Rao attilio at FreeBSD.org
Sun Feb 10 22:06:08 UTC 2013


Author: attilio
Date: Sun Feb 10 22:06:06 2013
New Revision: 246640
URL: http://svnweb.freebsd.org/changeset/base/246640

Log:
  merge from vmcontention

Modified:
  user/attilio/vmc-playground/cddl/contrib/opensolaris/cmd/zfs/zfs.8
  user/attilio/vmc-playground/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_import.c
  user/attilio/vmc-playground/lib/libc/net/sctp_sys_calls.c
  user/attilio/vmc-playground/lib/libc/sys/sigqueue.2
  user/attilio/vmc-playground/sbin/geom/class/eli/geom_eli.c
  user/attilio/vmc-playground/sys/boot/common/part.c
  user/attilio/vmc-playground/sys/boot/usb/bsd_global.h
  user/attilio/vmc-playground/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_tx.c
  user/attilio/vmc-playground/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev.c
  user/attilio/vmc-playground/sys/dev/usb/net/if_smsc.c
  user/attilio/vmc-playground/sys/dev/usb/template/usb_template.c
  user/attilio/vmc-playground/sys/dev/usb/usb_bus.h
  user/attilio/vmc-playground/sys/dev/usb/usb_controller.h
  user/attilio/vmc-playground/sys/dev/usb/usb_device.c
  user/attilio/vmc-playground/sys/dev/usb/usb_device.h
  user/attilio/vmc-playground/sys/dev/usb/usb_generic.c
  user/attilio/vmc-playground/sys/dev/usb/usb_handle_request.c
  user/attilio/vmc-playground/sys/dev/usb/usb_msctest.c
  user/attilio/vmc-playground/sys/dev/usb/usb_transfer.c
  user/attilio/vmc-playground/sys/dev/usb/usb_util.c
  user/attilio/vmc-playground/sys/dev/usb/wlan/if_rum.c
  user/attilio/vmc-playground/sys/dev/usb/wlan/if_rumvar.h
  user/attilio/vmc-playground/sys/dev/usb/wlan/if_run.c
  user/attilio/vmc-playground/sys/dev/usb/wlan/if_runvar.h
  user/attilio/vmc-playground/sys/dev/usb/wlan/if_uath.c
  user/attilio/vmc-playground/sys/dev/usb/wlan/if_upgt.c
  user/attilio/vmc-playground/sys/dev/usb/wlan/if_upgtvar.h
  user/attilio/vmc-playground/sys/dev/usb/wlan/if_ural.c
  user/attilio/vmc-playground/sys/dev/usb/wlan/if_uralvar.h
  user/attilio/vmc-playground/sys/dev/usb/wlan/if_urtw.c
  user/attilio/vmc-playground/sys/dev/usb/wlan/if_urtwvar.h
  user/attilio/vmc-playground/sys/dev/usb/wlan/if_zyd.c
  user/attilio/vmc-playground/sys/dev/usb/wlan/if_zydreg.h
  user/attilio/vmc-playground/sys/fs/ext2fs/ext2_alloc.c
  user/attilio/vmc-playground/sys/fs/ext2fs/ext2_balloc.c
  user/attilio/vmc-playground/sys/fs/ext2fs/ext2_bmap.c
  user/attilio/vmc-playground/sys/fs/ext2fs/ext2_inode.c
  user/attilio/vmc-playground/sys/fs/ext2fs/ext2_inode_cnv.c
  user/attilio/vmc-playground/sys/fs/ext2fs/ext2_lookup.c
  user/attilio/vmc-playground/sys/fs/ext2fs/ext2_subr.c
  user/attilio/vmc-playground/sys/fs/ext2fs/ext2_vnops.c
  user/attilio/vmc-playground/sys/kern/imgact_elf.c
  user/attilio/vmc-playground/sys/netinet/sctp_pcb.c
  user/attilio/vmc-playground/sys/sys/diskmbr.h
  user/attilio/vmc-playground/sys/ufs/ffs/ffs_alloc.c
  user/attilio/vmc-playground/usr.bin/find/function.c
  user/attilio/vmc-playground/usr.bin/find/main.c
  user/attilio/vmc-playground/usr.sbin/named/Makefile
  user/attilio/vmc-playground/usr.sbin/pciconf/pciconf.c
Directory Properties:
  user/attilio/vmc-playground/   (props changed)
  user/attilio/vmc-playground/cddl/contrib/opensolaris/   (props changed)
  user/attilio/vmc-playground/cddl/contrib/opensolaris/cmd/zfs/   (props changed)
  user/attilio/vmc-playground/cddl/contrib/opensolaris/lib/libzfs/   (props changed)
  user/attilio/vmc-playground/lib/libc/   (props changed)
  user/attilio/vmc-playground/sbin/   (props changed)
  user/attilio/vmc-playground/sys/   (props changed)
  user/attilio/vmc-playground/sys/boot/   (props changed)
  user/attilio/vmc-playground/sys/cddl/contrib/opensolaris/   (props changed)

Modified: user/attilio/vmc-playground/cddl/contrib/opensolaris/cmd/zfs/zfs.8
==============================================================================
--- user/attilio/vmc-playground/cddl/contrib/opensolaris/cmd/zfs/zfs.8	Sun Feb 10 21:56:09 2013	(r246639)
+++ user/attilio/vmc-playground/cddl/contrib/opensolaris/cmd/zfs/zfs.8	Sun Feb 10 22:06:06 2013	(r246640)
@@ -1,5 +1,5 @@
 '\" te
-.\" Copyright (c) 2012, Martin Matuska <mm at FreeBSD.org>.
+.\" Copyright (c) 2013, Martin Matuska <mm at FreeBSD.org>.
 .\" All Rights Reserved.
 .\"
 .\" The contents of this file are subject to the terms of the
@@ -19,16 +19,16 @@
 .\"
 .\" Copyright (c) 2010, Sun Microsystems, Inc. All Rights Reserved.
 .\" Copyright (c) 2012 by Delphix. All rights reserved.
-.\" Copyright (c) 2012 Nexenta Systems, Inc. All Rights Reserved.
 .\" Copyright (c) 2012, Joyent, Inc. All rights reserved.
 .\" Copyright (c) 2011, Pawel Jakub Dawidek <pjd at FreeBSD.org>
 .\" Copyright (c) 2012, Glen Barber <gjb at FreeBSD.org>
 .\" Copyright (c) 2012, Bryan Drewery <bdrewery at FreeBSD.org>
 .\" Copyright (c) 2013 by Saso Kiselkov. All rights reserved.
+.\" Copyright (c) 2013 Nexenta Systems, Inc. All Rights Reserved.
 .\"
 .\" $FreeBSD$
 .\"
-.Dd February 8, 2012
+.Dd February 10, 2012
 .Dt ZFS 8
 .Os
 .Sh NAME
@@ -40,14 +40,12 @@
 .Nm
 .Cm create
 .Op Fl pu
-.Op Fl o Ar property Ns = Ns Ar value
-.Ar ... filesystem
+.Oo Fl o Ar property Ns = Ns Ar value Oc Ns ... Ar filesystem
 .Nm
 .Cm create
 .Op Fl ps
 .Op Fl b Ar blocksize
-.Op Fl o Ar property Ns = Ns Ar value
-.Ar ...
+.Oo Fl o Ar property Ns = Ns Ar value Oc Ns ...
 .Fl V
 .Ar size volume
 .Nm
@@ -60,13 +58,13 @@
 .Sm off
 .Ar snapshot
 .Op % Ns Ar snapname
-.Op , Ns Ar ...
+.Op , Ns ...
 .Sm on
 .Nm
 .Cm snapshot
 .Op Fl r
-.Op Fl o Ar property Ns = Ns Ar value
-.Ar ... filesystem at snapname Ns | Ns Ar volume at snapname
+.Oo Fl o Ar property Ns = Ns Ar value Oc Ns ...
+.Ar filesystem at snapname Ns | Ns Ar volume at snapname
 .Nm
 .Cm rollback
 .Op Fl rRf
@@ -74,8 +72,8 @@
 .Nm
 .Cm clone
 .Op Fl p
-.Op Fl o Ar property Ns = Ns Ar value
-.Ar ... snapshot filesystem Ns | Ns Ar volume
+.Oo Fl o Ar property Ns = Ns Ar value Oc Ns ...
+.Ar snapshot filesystem Ns | Ns Ar volume
 .Nm
 .Cm promote
 .Ar clone-filesystem
@@ -103,31 +101,29 @@
 .Cm list
 .Op Fl r Ns | Ns Fl d Ar depth
 .Op Fl H
-.Op Fl o Ar property Ns Op , Ns Ar ...
-.Op Fl t Ar type Ns Op , Ns Ar ...
-.Op Fl s Ar property
-.Ar ...
-.Op Fl S Ar property
-.Ar ...
+.Op Fl o Ar property Ns Oo , Ns property Ns Oc Ns ...
+.Op Fl t Ar type Ns Oo , Ns type Ns Oc Ns ...
+.Oo Fl s Ar property Oc Ns ...
+.Oo Fl S Ar property Oc Ns ...
 .Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot
 .Nm
 .Cm set
 .Ar property Ns = Ns Ar value
-.Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot
+.Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot Ns ...
 .Nm
 .Cm get
 .Op Fl r Ns | Ns Fl d Ar depth
 .Op Fl Hp
-.Op Fl o Ar all | field Ns Op , Ns Ar ...
-.Op Fl t Ar type Ns Op , Ns Ar ...
-.Op Fl s Ar source Ns Op , Ns Ar ...
-.Ar all | property Ns Op , Ns Ar ...
-.Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot
+.Op Fl o Ar all | field Ns Oo , Ns Ar field Oc Ns ...
+.Op Fl t Ar type Ns Oo Ns , Ar type Oc Ns ...
+.Op Fl s Ar source Ns Oo Ns , Ns Ar source Oc Ns ...
+.Ar all | property Ns Oo Ns , Ns Ar property Oc Ns ...
+.Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot Ns ...
 .Nm
 .Cm inherit
 .Op Fl rS
 .Ar property
-.Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot
+.Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot Ns ...
 .Nm
 .Cm upgrade
 .Op Fl v
@@ -139,29 +135,25 @@
 .Nm
 .Cm userspace
 .Op Fl Hinp
-.Op Fl o Ar field Ns Op , Ns Ar ...
-.Op Fl s Ar field
-.Ar ...
-.Op Fl S Ar field
-.Ar ...
-.Op Fl t Ar type Ns Op , Ns Ar ...
+.Op Fl o Ar field Ns Oo , Ns Ar field Oc Ns ...
+.Oo Fl s Ar field Oc Ns ...
+.Oo Fl S Ar field Oc Ns ...
+.Op Fl t Ar type Ns Oo Ns , Ns Ar type Oc Ns ...
 .Ar filesystem Ns | Ns Ar snapshot
 .Nm
 .Cm groupspace
 .Op Fl Hinp
-.Op Fl o Ar field Ns Op , Ns Ar ...
-.Op Fl s Ar field
-.Ar ...
-.Op Fl S Ar field
-.Ar ...
-.Op Fl t Ar type Ns Op , Ns Ar ...
+.Op Fl o Ar field Ns Oo , Ns field Oc Ns ...
+.Oo Fl s Ar field Oc Ns ...
+.Oo Fl S Ar field Oc Ns ...
+.Op Fl t Ar type Ns Oo Ns , Ns Ar type Oc Ns ...
 .Ar filesystem Ns | Ns Ar snapshot
 .Nm
 .Cm mount
 .Nm
 .Cm mount
 .Op Fl vO
-.Op Fl o Ar property Ns Op , Ns Ar ...
+.Op Fl o Ar property Ns Oo , Ns Ar property Oc Ns ...
 .Fl a | Ar filesystem
 .Nm
 .Cm unmount
@@ -193,63 +185,71 @@
 .Nm
 .Cm allow
 .Op Fl ldug
-.Cm everyone Ns | Ns Ar user Ns | Ns Ar group Ns Op , Ns Ar ...
-.Ar perm Ns | Ns Ar @setname Ns Op , Ns Ar ...
+.Ar user Ns | Ns Ar group Ns Oo Ns , Ns Ar user Ns | Ns Ar group Oc Ns ...
+.Ar perm Ns | Ns Ar @setname Ns
+.Oo Ns , Ns Ar perm Ns | Ns Ar @setname Oc Ns ...
 .Ar filesystem Ns | Ns Ar volume
 .Nm
 .Cm allow
 .Op Fl ld
-.Fl e
-.Ar perm Ns | Ns Ar @setname Ns Op , Ns Ar ...
+.Fl e Ns | Ns Cm everyone
+.Ar perm Ns | Ns Ar @setname Ns Op Ns , Ns Ar perm Ns | Ns Ar @setname Ns
+.Ns ...
 .Ar filesystem Ns | Ns Ar volume
 .Nm
 .Cm allow
 .Fl c
-.Ar perm Ns | Ns Ar @setname Ns Op , Ns Ar ...
+.Ar perm Ns | Ns Ar @setname Ns Op Ns , Ns Ar perm Ns | Ns Ar @setname Ns
+.Ns ...
 .Ar filesystem Ns | Ns Ar volume
 .Nm
 .Cm allow
 .Fl s
 .Ar @setname
-.Ar perm Ns | Ns Ar @setname Ns Op , Ns Ar ...
+.Ar perm Ns | Ns Ar @setname Ns Op Ns , Ns Ar perm Ns | Ns Ar @setname Ns
+.Ns ...
 .Ar filesystem Ns | Ns Ar volume
 .Nm
 .Cm unallow
 .Op Fl rldug
-.Cm everyone Ns | Ns Ar user Ns | Ns Ar group Ns Op , Ns Ar ...
-.Op Ar perm Ns | Ns Ar @setname Ns Op , Ns Ar ...
+.Ar user Ns | Ns Ar group Ns Oo Ns , Ns Ar user Ns | Ns Ar group Oc Ns ...
+.Oo Ar perm Ns | Ns Ar @setname Ns Op , Ns Ar perm Ns | Ns Ar @setname Ns
+.Ns ... Oc
 .Ar filesystem Ns | Ns Ar volume
 .Nm
 .Cm unallow
 .Op Fl rld
-.Fl e
-.Op Ar perm Ns | Ns Ar @setname Ns Op , Ns Ar ...
+.Fl e Ns | Ns Cm everyone
+.Oo Ar perm Ns | Ns Ar @setname Ns Op , Ns Ar perm Ns | Ns Ar @setname Ns
+.Ns ... Oc
 .Ar filesystem Ns | Ns Ar volume
 .Nm
 .Cm unallow
 .Op Fl r
 .Fl c
-.Op Ar perm Ns | Ns Ar @setname Ns Op , Ns Ar ...
+.Oo Ar perm Ns | Ns Ar @setname Ns Op , Ns Ar perm Ns | Ns Ar @setname Ns
+.Ns ... Oc
 .Ar filesystem Ns | Ns Ar volume
 .Nm
 .Cm unallow
 .Op Fl r
 .Fl s
 .Ar @setname
-.Ar perm Ns | Ns Ar @setname Ns Op , Ns Ar ...
+.Oo Ar perm Ns | Ns Ar @setname Ns Op , Ns Ar perm Ns | Ns Ar @setname Ns
+.Ns ... Oc
 .Ar filesystem Ns | Ns Ar volume
 .Nm
 .Cm hold
 .Op Fl r
-.Ar tag snapshot ...
+.Ar tag snapshot Ns ...
 .Nm
 .Cm holds
 .Op Fl r
-.Ar snapshot ...
+.Ar snapshot Ns ...
 .Nm
 .Cm release
 .Op Fl r
-.Ar tag snapshot ...
+.Ar tag snapshot Ns ...
 .Nm
 .Cm diff
 .Op Fl FHt
@@ -1165,7 +1165,7 @@ When the
 .Sy sharenfs
 property is changed for a dataset, the
 .Xr mountd 8
-dameon is reloaded.
+daemon is reloaded.
 .It Sy logbias Ns = Ns Cm latency | throughput
 Provide a hint to
 .Tn ZFS
@@ -1411,8 +1411,8 @@ Displays a help message.
 .Nm
 .Cm create
 .Op Fl pu
-.Op Fl o Ar property Ns = Ns Ar value
-.Ar ... filesystem
+.Oo Fl o Ar property Ns = Ns Ar value Oc Ns ...
+.Ar filesystem
 .Xc
 .Pp
 Creates a new
@@ -1449,8 +1449,7 @@ options.
 .Cm create
 .Op Fl ps
 .Op Fl b Ar blocksize
-.Op Fl o Ar property Ns = Ns Ar value
-.Ar ...
+.Oo Fl o Ar property Ns = Ns Ar value Oc Ns ...
 .Fl V
 .Ar size volume
 .Xc
@@ -1550,7 +1549,7 @@ behavior for mounted file systems in use
 .Sm off
 .Ar snapshot
 .Op % Ns Ar snapname
-.Op , Ns Ar ...
+.Op , Ns ...
 .Sm on
 .Xc
 .Pp
@@ -1611,8 +1610,7 @@ behavior for mounted file systems in use
 .Nm
 .Cm snapshot
 .Op Fl r
-.Op Fl o Ar property Ns = Ns Ar value
-.Ar ...
+.Oo Fl o Ar property Ns = Ns Ar value Oc Ns ...
 .Ar filesystem at snapname Ns | Ns volume at snapname
 .Xc
 .Pp
@@ -1659,8 +1657,8 @@ option to force an unmount of any clone 
 .Nm
 .Cm clone
 .Op Fl p
-.Op Fl o Ar property Ns = Ns Ar value
-.Ar ... snapshot filesystem Ns | Ns Ar volume
+.Oo Fl o Ar property Ns = Ns Ar value Oc Ns ...
+.Ar snapshot filesystem Ns | Ns Ar volume
 .Xc
 .Pp
 Creates a clone of the given snapshot. See the
@@ -1763,13 +1761,11 @@ only dataset that can be renamed recursi
 .Cm list
 .Op Fl r Ns | Ns Fl d Ar depth
 .Op Fl H
-.Op Fl o Ar property Ns Op , Ns Ar ...
-.Op Fl t Ar type Ns Op , Ns Ar ...
-.Op Fl s Ar property
-.Ar ...
-.Op Fl S Ar property
-.Ar ...
-.Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot
+.Op Fl o Ar property Ns Oo , Ns Ar property Oc Ns ...
+.Op Fl t Ar type Ns Oo , Ns Ar type Oc Ns ...
+.Oo Fl s Ar property Oc Ns ...
+.Oo Fl S Ar property Oc Ns ...
+.Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot Ns ...
 .Xc
 .Pp
 Lists the property information for the given datasets in tabular form. If
@@ -1795,7 +1791,7 @@ will display only the dataset and its di
 .It Fl H
 Used for scripting mode. Do not print headers and separate fields by a single
 tab instead of arbitrary white space.
-.It Fl o Ar property Ns Op , Ns Ar ...
+.It Fl o Ar property Ns Oo , Ns Ar property Oc Ns ...
 A comma-separated list of properties to display. The property must be:
 .Bl -bullet -offset 2n
 .It
@@ -1819,7 +1815,7 @@ shortcut for specifying
 .Sy filesystem,volume
 syntax.
 .El
-.It Fl t Ar type Ns Op , Ns Ar ...
+.It Fl t Ar type Ns Oo , Ns Ar type Oc Ns ...
 A comma-separated list of types to display, where
 .Ar type
 is one of
@@ -1882,11 +1878,11 @@ section.
 .Cm get
 .Op Fl r Ns | Ns Fl d Ar depth
 .Op Fl Hp
-.Op Fl o Ar all | field Ns Op , Ns Ar ...
-.Op Fl t Ar type Ns Op , Ns Ar ...
-.Op Fl s Ar source Ns Op , Ns Ar ...
-.Ar all | property Ns Op , Ns Ar ...
-.Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot
+.Op Fl o Ar all | field Ns Oo , Ns Ar field Oc Ns ...
+.Op Fl t Ar type Ns Oo , Ns Ar type Oc Ns ...
+.Op Fl s Ar source Ns Oo , Ns Ar source Oc Ns ...
+.Ar all | property Ns Oo , Ns Ar property Oc Ns ...
+.Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot Ns ...
 .Xc
 .Pp
 Displays properties for the given datasets. If no datasets are specified, then
@@ -1936,7 +1932,7 @@ omitted, and fields are explicitly separ
 arbitrary amount of space.
 .It Fl p
 Display numbers in parseable (exact) values.
-.It Fl o Cm all | Ar field Ns Op , Ns Ar ...
+.It Fl o Cm all | Ar field Ns Oo , Ns Ar field Oc Ns ...
 A comma-separated list of columns to display. Supported values are
 .Sy name,property,value,received,source .
 Default values are
@@ -1944,7 +1940,7 @@ Default values are
 The keyword
 .Cm all
 specifies all columns.
-.It Fl t Ar type Ns Op , Ns Ar ...
+.It Fl t Ar type Ns Oo , Ns Ar type Oc Ns ...
 A comma-separated list of types to display, where
 .Ar type
 is one of
@@ -1952,7 +1948,7 @@ is one of
 For example, specifying
 .Fl t Cm snapshot
 displays only snapshots.
-.It Fl s Ar source Ns Op , Ns Ar ...
+.It Fl s Ar source Ns Oo , Ns Ar source Oc Ns ...
 A comma-separated list of sources to display. Those properties coming from a
 source other than those in this list are ignored. Each source must be one of
 the following:
@@ -1964,7 +1960,7 @@ The default value is all sources.
 .Cm inherit
 .Op Fl rS
 .Ar property
-.Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot
+.Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot Ns ...
 .Xc
 .Pp
 Clears the specified property, causing it to be inherited from an ancestor. If
@@ -2039,12 +2035,10 @@ Upgrade the specified file system.
 .Nm
 .Cm userspace
 .Op Fl Hinp
-.Op Fl o Ar field Ns Op , Ns Ar ...
-.Op Fl s Ar field
-.Ar ...
-.Op Fl S Ar field
-.Ar ...
-.Op Fl t Ar type Ns Op , Ns Ar ...
+.Op Fl o Ar field Ns Oo , Ns Ar field Oc Ns ...
+.Oo Fl s Ar field Oc Ns ...
+.Oo Fl S Ar field Oc Ns ...
+.Op Fl t Ar type Ns Oo , Ns Ar type Oc Ns ...
 .Ar filesystem Ns | Ns Ar snapshot
 .Xc
 .Pp
@@ -2061,7 +2055,7 @@ Print numeric ID instead of user/group n
 Do not print headers, use tab-delimited output.
 .It Fl p
 Use exact (parsable) numeric output.
-.It Fl o Ar field Ns Op , Ns Ar ...
+.It Fl o Ar field Ns Oo , Ns Ar field Oc Ns ...
 Display only the specified fields from the following set:
 .Sy type,name,used,quota .
 The default is to display all fields.
@@ -2076,7 +2070,7 @@ another. The default is
 .It Fl S Ar field
 Sort by this field in reverse order. See
 .Fl s .
-.It Fl t Ar type Ns Op , Ns Ar ...
+.It Fl t Ar type Ns Oo , Ns Ar type Oc Ns ...
 Print only the specified types from the following set:
 .Sy all,posixuser,smbuser,posixgroup,smbgroup .
 .Pp
@@ -2092,12 +2086,10 @@ Translate SID to POSIX ID. This flag cur
 .Nm
 .Cm groupspace
 .Op Fl Hinp
-.Op Fl o Ar field Ns Op , Ns Ar ...
-.Op Fl s Ar field
-.Ar ...
-.Op Fl S Ar field
-.Ar ...
-.Op Fl t Ar type Ns Op , Ns Ar ...
+.Op Fl o Ar field Ns Oo , Ns Ar field Oc Ns ...
+.Oo Fl s Ar field Oc Ns ...
+.Oo Fl S Ar field Oc Ns ...
+.Op Fl t Ar type Ns Oo , Ns Ar type Oc Ns ...
 .Ar filesystem Ns | Ns Ar snapshot
 .Xc
 .Pp
@@ -2121,7 +2113,7 @@ file systems currently mounted.
 .Nm
 .Cm mount
 .Op Fl vO
-.Op Fl o Ar property Ns Op , Ns Ar ...
+.Op Fl o Ar property Ns Oo , Ns Ar property Oc Ns ...
 .Fl a | Ar filesystem
 .Xc
 .Pp
@@ -2134,7 +2126,7 @@ Report mount progress.
 .It Fl O
 Perform an overlay mount. Overlay mounts are not supported on
 .Fx .
-.It Fl o Ar property Ns Op , Ns Ar ...
+.It Fl o Ar property Ns Oo , Ns Ar property Oc Ns ...
 An optional, comma-separated list of mount options to use temporarily for the
 duration of the mount. See the
 .Qq Sx Temporary Mount Point Properties
@@ -2453,16 +2445,18 @@ for more information.
 .Nm
 .Cm allow
 .Op Fl ldug
-.Cm everyone Ns | Ns Ar user Ns | Ns Ar group Ns Op , Ns Ar ...
-.Ar perm Ns | Ns Ar @setname Ns Op , Ns Ar ...
+.Ar user Ns | Ns Ar group Ns Oo Ns , Ns Ar user Ns | Ns Ar group Oc Ns ...
+.Ar perm Ns | Ns Ar @setname Ns
+.Oo Ns , Ns Ar perm Ns | Ns Ar @setname Oc Ns ...
 .Ar filesystem Ns | Ns Ar volume
 .Xc
 .It Xo
 .Nm
 .Cm allow
 .Op Fl ld
-.Fl e
-.Ar perm Ns | Ns Ar @setname Ns Op , Ns Ar ...
+.Fl e Ns | Ns Cm everyone
+.Ar perm Ns | Ns Ar @setname Ns Op Ns , Ns Ar perm Ns | Ns Ar @setname Ns
+.Ns ...
 .Ar filesystem Ns | Ns Ar volume
 .Xc
 .Pp
@@ -2472,26 +2466,31 @@ administration permission for the file s
 .Bl -tag -width indent
 .It Xo
 .Op Fl ug
-.Cm everyone Ns | Ns Ar user Ns | Ns Ar group Ns Op , Ns Ar ...
+.Ar user Ns | Ns Ar group Ns Oo , Ar user Ns | Ns Ar group Oc Ns ...
 .Xc
 Specifies to whom the permissions are delegated. Multiple entities can be
 specified as a comma-separated list. If neither of the
 .Fl ug
 options are specified, then the argument is interpreted preferentially as the
-keyword "everyone", then as a user name, and lastly as a group name. To specify
-a user or group named "everyone", use the
+keyword
+.Cm everyone ,
+then as a user name, and lastly as a group name. To specify
+a user or group named
+.Qq everyone ,
+use the
 .Fl u
 or
 .Fl g
 options. To specify a group with the same name as a user, use the
 .Fl g
 option.
+.It Op Fl e Ns | Ns Cm everyone
+Specifies that the permissions be delegated to
+.Qq everyone .
 .It Xo
-.Op Fl e
-.Ar perm Ns | Ns Ar @setname Ns Op , Ns Ar ...
+.Ar perm Ns | Ns Ar @setname Ns Oo , Ns Ar perm Ns | Ns Ar @setname Oc Ns ...
 .Xc
-Specifies that the permissions be delegated to "everyone".
-Multiple permissions
+The permissions to delegate. Multiple permissions
 may be specified as a comma-separated list. Permission names are the same as
 .Tn ZFS
 subcommand and property names. See the property list below. Property set names,
@@ -2598,7 +2597,8 @@ protocol
 .Nm
 .Cm allow
 .Fl c
-.Ar perm Ns | Ns Ar @setname Ns Op , Ns Ar ...
+.Ar perm Ns | Ns Ar @setname Ns Op Ns , Ns Ar perm Ns | Ns Ar @setname Ns
+.Ns ...
 .Ar filesystem Ns | Ns Ar volume
 .Xc
 .Pp
@@ -2609,7 +2609,8 @@ creator of any newly-created descendent 
 .Cm allow
 .Fl s
 .Ar @setname
-.Ar perm Ns | Ns Ar @setname Ns Op , Ns Ar ...
+.Ar perm Ns | Ns Ar @setname Ns Op Ns , Ns Ar perm Ns | Ns Ar @setname Ns
+.Ns ...
 .Ar filesystem Ns | Ns Ar volume
 .Xc
 .Pp
@@ -2625,16 +2626,18 @@ and can be no more than 64 characters lo
 .Nm
 .Cm unallow
 .Op Fl rldug
-.Cm everyone Ns | Ns Ar user Ns | Ns Ar group Ns Op , Ns Ar ...
-.Op Ar perm Ns | Ns Ar @setname Ns Op , Ns Ar ...
+.Ar user Ns | Ns Ar group Ns Oo Ns , Ns Ar user Ns | Ns Ar group Oc Ns ...
+.Oo Ar perm Ns | Ns Ar @setname Ns Op , Ns Ar perm Ns | Ns Ar @setname Ns
+.Ns ... Oc
 .Ar filesystem Ns | Ns Ar volume
 .Xc
 .It Xo
 .Nm
 .Cm unallow
 .Op Fl rld
-.Fl e
-.Op Ar perm Ns | Ns Ar @setname Ns Op , Ns Ar ...
+.Fl e Ns | Ns Cm everyone
+.Oo Ar perm Ns | Ns Ar @setname Ns Op , Ns Ar perm Ns | Ns Ar @setname Ns
+.Ns ... Oc
 .Ar filesystem Ns | Ns Ar volume
 .Xc
 .It Xo
@@ -2642,7 +2645,8 @@ and can be no more than 64 characters lo
 .Cm unallow
 .Op Fl r
 .Fl c
-.Op Ar perm Ns | Ns Ar @setname Ns Op , Ns Ar ...
+.Oo Ar perm Ns | Ns Ar @setname Ns Op , Ns Ar perm Ns | Ns Ar @setname Ns
+.Ns ... Oc
 .Ar filesystem Ns | Ns Ar volume
 .Xc
 .Pp
@@ -2651,10 +2655,12 @@ Removes permissions that were granted wi
 command. No permissions are explicitly denied, so other permissions granted are
 still in effect. For example, if the permission is granted by an ancestor. If
 no permissions are specified, then all permissions for the specified
-.Ar user , group , No or Ar everyone
-are removed. Specifying "everyone" (or using the
-.Fl e
-option) only removes the permissions that were granted to "everyone",
+.Ar user , group , No or everyone
+are removed. Specifying
+.Cm everyone
+.Po or using the Fl e
+option
+.Pc only removes the permissions that were granted to everyone ,
 not all permissions for every user and group. See the
 .Qq Nm Cm allow
 command for a description of the
@@ -2670,7 +2676,8 @@ Recursively remove the permissions from 
 .Op Fl r
 .Fl s
 .Ar @setname
-.Ar perm Ns | Ns Ar @setname Ns Op , Ns Ar ...
+.Oo Ar perm Ns | Ns Ar @setname Ns Op , Ns Ar perm Ns | Ns Ar @setname Ns
+.Ns ... Oc
 .Ar filesystem Ns | Ns Ar volume
 .Xc
 .Pp
@@ -2680,7 +2687,7 @@ then all permissions are removed, thus r
 .Nm
 .Cm hold
 .Op Fl r
-.Ar tag snapshot ...
+.Ar tag snapshot Ns ...
 .Xc
 .Pp
 Adds a single reference, named with the
@@ -2701,7 +2708,7 @@ snapshots of all descendent file systems
 .Nm
 .Cm holds
 .Op Fl r
-.Ar snapshot ...
+.Ar snapshot Ns ...
 .Xc
 .Pp
 Lists all existing user references for the given snapshot or snapshots.
@@ -2714,7 +2721,7 @@ listing the holds on the named snapshot.
 .Nm
 .Cm release
 .Op Fl r
-.Ar tag snapshot ...
+.Ar tag snapshot Ns ...
 .Xc
 .Pp
 Removes a single reference, named with the

Modified: user/attilio/vmc-playground/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_import.c
==============================================================================
--- user/attilio/vmc-playground/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_import.c	Sun Feb 10 21:56:09 2013	(r246639)
+++ user/attilio/vmc-playground/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_import.c	Sun Feb 10 22:06:06 2013	(r246640)
@@ -526,13 +526,12 @@ get_configs(libzfs_handle_t *hdl, pool_l
 				 *	version
 				 *	pool guid
 				 *	name
-				 *	pool txg (if available)
 				 *	comment (if available)
 				 *	pool state
 				 *	hostid (if available)
 				 *	hostname (if available)
 				 */
-				uint64_t state, version, pool_txg;
+				uint64_t state, version;
 				char *comment = NULL;
 
 				version = fnvlist_lookup_uint64(tmp,
@@ -548,11 +547,6 @@ get_configs(libzfs_handle_t *hdl, pool_l
 				fnvlist_add_string(config,
 				    ZPOOL_CONFIG_POOL_NAME, name);
 
-				if (nvlist_lookup_uint64(tmp,
-				    ZPOOL_CONFIG_POOL_TXG, &pool_txg) == 0)
-					fnvlist_add_uint64(config,
-					    ZPOOL_CONFIG_POOL_TXG, pool_txg);
-
 				if (nvlist_lookup_string(tmp,
 				    ZPOOL_CONFIG_COMMENT, &comment) == 0)
 					fnvlist_add_string(config,

Modified: user/attilio/vmc-playground/lib/libc/net/sctp_sys_calls.c
==============================================================================
--- user/attilio/vmc-playground/lib/libc/net/sctp_sys_calls.c	Sun Feb 10 21:56:09 2013	(r246639)
+++ user/attilio/vmc-playground/lib/libc/net/sctp_sys_calls.c	Sun Feb 10 22:06:06 2013	(r246640)
@@ -583,36 +583,36 @@ sctp_sendmsg(int s,
 	if ((tolen > 0) &&
 	    ((to == NULL) || (tolen < sizeof(struct sockaddr)))) {
 		errno = EINVAL;
-		return -1;
+		return (-1);
 	}
 	if (to && (tolen > 0)) {
 		if (to->sa_family == AF_INET) {
 			if (tolen != sizeof(struct sockaddr_in)) {
 				errno = EINVAL;
-				return -1;
+				return (-1);
 			}
 			if ((to->sa_len > 0) &&
 			    (to->sa_len != sizeof(struct sockaddr_in))) {
 				errno = EINVAL;
-				return -1;
+				return (-1);
 			}
 			memcpy(&addr, to, sizeof(struct sockaddr_in));
 			addr.in.sin_len = sizeof(struct sockaddr_in);
 		} else if (to->sa_family == AF_INET6) {
 			if (tolen != sizeof(struct sockaddr_in6)) {
 				errno = EINVAL;
-				return -1;
+				return (-1);
 			}
 			if ((to->sa_len > 0) &&
 			    (to->sa_len != sizeof(struct sockaddr_in6))) {
 				errno = EINVAL;
-				return -1;
+				return (-1);
 			}
 			memcpy(&addr, to, sizeof(struct sockaddr_in6));
 			addr.in6.sin6_len = sizeof(struct sockaddr_in6);
 		} else {
 			errno = EAFNOSUPPORT;
-			return -1;
+			return (-1);
 		}
 		who = (struct sockaddr *)&addr;
 	}
@@ -836,7 +836,7 @@ sctp_sendmsgx(int sd,
 	sinfo.sinfo_ssn = stream_no;
 	sinfo.sinfo_timetolive = timetolive;
 	sinfo.sinfo_context = context;
-	return sctp_sendx(sd, msg, len, addrs, addrcnt, &sinfo, 0);
+	return (sctp_sendx(sd, msg, len, addrs, addrcnt, &sinfo, 0));
 }
 
 ssize_t

Modified: user/attilio/vmc-playground/lib/libc/sys/sigqueue.2
==============================================================================
--- user/attilio/vmc-playground/lib/libc/sys/sigqueue.2	Sun Feb 10 21:56:09 2013	(r246639)
+++ user/attilio/vmc-playground/lib/libc/sys/sigqueue.2	Sun Feb 10 22:06:06 2013	(r246640)
@@ -117,7 +117,7 @@ or a system-wide resource limit has been
 The value of the
 .Fa signo
 argument is an invalid or unsupported signal number.
-.It Bq Er EEPERM
+.It Bq Er EPERM
 The process does not have the appropriate privilege to send the signal
 to the receiving process.
 .It Bq Er ESRCH

Modified: user/attilio/vmc-playground/sbin/geom/class/eli/geom_eli.c
==============================================================================
--- user/attilio/vmc-playground/sbin/geom/class/eli/geom_eli.c	Sun Feb 10 21:56:09 2013	(r246639)
+++ user/attilio/vmc-playground/sbin/geom/class/eli/geom_eli.c	Sun Feb 10 22:06:06 2013	(r246640)
@@ -326,22 +326,6 @@ eli_main(struct gctl_req *req, unsigned 
 		gctl_error(req, "Unknown command: %s.", name);
 }
 
-static void
-arc4rand(unsigned char *buf, size_t size)
-{
-	uint32_t *buf4;
-	size_t size4;
-	unsigned int i;
-
-	buf4 = (uint32_t *)buf;
-	size4 = size / 4;
-
-	for (i = 0; i < size4; i++)
-		buf4[i] = arc4random();
-	for (i *= 4; i < size; i++)
-		buf[i] = arc4random() % 0xff;
-}
-
 static bool
 eli_is_attached(const char *prov)
 {
@@ -396,6 +380,8 @@ eli_genkey_files(struct gctl_req *req, b
 			while ((done = read(fd, buf, sizeof(buf))) > 0)
 				g_eli_crypto_hmac_update(ctxp, buf, done);
 		} else /* if (strcmp(type, "passfile") == 0) */ {
+			assert(strcmp(type, "passfile") == 0);
+
 			while ((done = read(fd, buf, sizeof(buf) - 1)) > 0) {
 				buf[done] = '\0';
 				p = strchr(buf, '\n');
@@ -813,8 +799,8 @@ eli_init(struct gctl_req *req)
 	}
 
 	md.md_keys = 0x01;
-	arc4rand(md.md_salt, sizeof(md.md_salt));
-	arc4rand(md.md_mkeys, sizeof(md.md_mkeys));
+	arc4random_buf(md.md_salt, sizeof(md.md_salt));
+	arc4random_buf(md.md_mkeys, sizeof(md.md_mkeys));
 
 	/* Generate user key. */
 	if (eli_genkey(req, &md, key, true) == NULL) {
@@ -1146,7 +1132,7 @@ eli_delkey_detached(struct gctl_req *req
 
 	all = gctl_get_int(req, "all");
 	if (all)
-		arc4rand(md.md_mkeys, sizeof(md.md_mkeys));
+		arc4random_buf(md.md_mkeys, sizeof(md.md_mkeys));
 	else {
 		force = gctl_get_int(req, "force");
 		val = gctl_get_intmax(req, "keyno");
@@ -1170,7 +1156,7 @@ eli_delkey_detached(struct gctl_req *req
 			return;
 		}
 		mkeydst = md.md_mkeys + nkey * G_ELI_MKEYLEN;
-		arc4rand(mkeydst, G_ELI_MKEYLEN);
+		arc4random_buf(mkeydst, G_ELI_MKEYLEN);
 	}
 
 	eli_metadata_store(req, prov, &md);
@@ -1262,13 +1248,14 @@ eli_trash_metadata(struct gctl_req *req,
 
 	error = 0;
 	do {
-		arc4rand(sector, size);
+		arc4random_buf(sector, size);
 		if (pwrite(fd, sector, size, offset) != size) {
 			if (error == 0)
 				error = errno;
 		}
 		(void)g_flush(fd);
 	} while (--overwrites > 0);
+	free(sector);
 	if (error != 0) {
 		gctl_error(req, "Cannot trash metadata on provider %s: %s.",
 		    prov, strerror(error));

Modified: user/attilio/vmc-playground/sys/boot/common/part.c
==============================================================================
--- user/attilio/vmc-playground/sys/boot/common/part.c	Sun Feb 10 21:56:09 2013	(r246639)
+++ user/attilio/vmc-playground/sys/boot/common/part.c	Sun Feb 10 22:06:06 2013	(r246640)
@@ -645,9 +645,13 @@ ptable_open(void *dev, off_t sectors, ui
 	/* Do we have some invalid values? */
 	if (i != NDOSPART ||
 	    (table->type == PTABLE_GPT && count > 1)) {
-		table->type = PTABLE_NONE;
-		DEBUG("invalid values detected, ignore partition table");
-		goto out;
+		if (dp[1].dp_typ != DOSPTYP_HFS) {
+			table->type = PTABLE_NONE;
+			DEBUG("invalid values detected, ignore "
+			    "partition table");
+			goto out;
+		}
+		DEBUG("Bootcamp detected");
 	}
 #ifdef LOADER_GPT_SUPPORT
 	if (table->type == PTABLE_GPT) {

Modified: user/attilio/vmc-playground/sys/boot/usb/bsd_global.h
==============================================================================
--- user/attilio/vmc-playground/sys/boot/usb/bsd_global.h	Sun Feb 10 21:56:09 2013	(r246639)
+++ user/attilio/vmc-playground/sys/boot/usb/bsd_global.h	Sun Feb 10 22:06:06 2013	(r246640)
@@ -39,6 +39,7 @@
 #include <dev/usb/usb_process.h>
 #include <dev/usb/usb_busdma.h>
 #include <dev/usb/usb_dynamic.h>
+#include <dev/usb/usb_transfer.h>
 #include <dev/usb/usb_device.h>
 #include <dev/usb/usb_hub.h>
 #include <dev/usb/usb_controller.h>
@@ -52,7 +53,6 @@
 #include <dev/usb/usb_pf.h>
 #include <dev/usb/usb_request.h>
 #include <dev/usb/usb_util.h>
-#include <dev/usb/usb_transfer.h>
 #include <dev/usb/usb_compat_linux.h>
 #include <dev/usb/usbhid.h>
 #include <dev/usb/usb_ioctl.h>

Modified: user/attilio/vmc-playground/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_tx.c
==============================================================================
--- user/attilio/vmc-playground/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_tx.c	Sun Feb 10 21:56:09 2013	(r246639)
+++ user/attilio/vmc-playground/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_tx.c	Sun Feb 10 22:06:06 2013	(r246640)
@@ -21,7 +21,7 @@
 /*
  * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
  * Copyright 2011 Nexenta Systems, Inc.  All rights reserved.
- * Copyright (c) 2012 by Delphix. All rights reserved.
+ * Copyright (c) 2013 by Delphix. All rights reserved.
  */
 
 #include <sys/dmu.h>
@@ -284,6 +284,7 @@ dmu_tx_count_write(dmu_tx_hold_t *txh, u
 			delta = P2NPHASE(off, dn->dn_datablksz);
 		}
 
+		min_ibs = max_ibs = dn->dn_indblkshift;
 		if (dn->dn_maxblkid > 0) {
 			/*
 			 * The blocksize can't change,
@@ -291,13 +292,6 @@ dmu_tx_count_write(dmu_tx_hold_t *txh, u
 			 */
 			ASSERT(dn->dn_datablkshift != 0);
 			min_bs = max_bs = dn->dn_datablkshift;
-			min_ibs = max_ibs = dn->dn_indblkshift;
-		} else if (dn->dn_indblkshift > max_ibs) {
-			/*
-			 * This ensures that if we reduce DN_MAX_INDBLKSHIFT,
-			 * the code will still work correctly on older pools.
-			 */
-			min_ibs = max_ibs = dn->dn_indblkshift;
 		}
 
 		/*

Modified: user/attilio/vmc-playground/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev.c
==============================================================================
--- user/attilio/vmc-playground/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev.c	Sun Feb 10 21:56:09 2013	(r246639)
+++ user/attilio/vmc-playground/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev.c	Sun Feb 10 22:06:06 2013	(r246640)
@@ -1334,7 +1334,8 @@ vdev_validate(vdev_t *vd, boolean_t stri
 	if (vd->vdev_ops->vdev_op_leaf && vdev_readable(vd)) {
 		uint64_t aux_guid = 0;
 		nvlist_t *nvl;
-		uint64_t txg = strict ? spa->spa_config_txg : -1ULL;
+		uint64_t txg = spa_last_synced_txg(spa) != 0 ?
+		    spa_last_synced_txg(spa) : -1ULL;
 
 		if ((label = vdev_label_read_config(vd, txg)) == NULL) {
 			vdev_set_state(vd, B_TRUE, VDEV_STATE_CANT_OPEN,
@@ -1521,7 +1522,7 @@ vdev_reopen(vdev_t *vd)
 		    !l2arc_vdev_present(vd))
 			l2arc_add_vdev(spa, vd);
 	} else {
-		(void) vdev_validate(vd, spa_last_synced_txg(spa));
+		(void) vdev_validate(vd, B_TRUE);
 	}
 
 	/*

Modified: user/attilio/vmc-playground/sys/dev/usb/net/if_smsc.c
==============================================================================
--- user/attilio/vmc-playground/sys/dev/usb/net/if_smsc.c	Sun Feb 10 21:56:09 2013	(r246639)
+++ user/attilio/vmc-playground/sys/dev/usb/net/if_smsc.c	Sun Feb 10 22:06:06 2013	(r246640)
@@ -99,9 +99,9 @@ __FBSDID("$FreeBSD$");
 #include <dev/usb/usb_debug.h>
 #include <dev/usb/usb_process.h>
 
-#include <dev/usb/usb_device.h>
 #include <dev/usb/net/usb_ethernet.h>
-#include "if_smscreg.h"
+
+#include <dev/usb/net/if_smscreg.h>
 
 #ifdef USB_DEBUG
 static int smsc_debug = 0;

Modified: user/attilio/vmc-playground/sys/dev/usb/template/usb_template.c
==============================================================================
--- user/attilio/vmc-playground/sys/dev/usb/template/usb_template.c	Sun Feb 10 21:56:09 2013	(r246639)
+++ user/attilio/vmc-playground/sys/dev/usb/template/usb_template.c	Sun Feb 10 22:06:06 2013	(r246640)
@@ -849,20 +849,20 @@ usb_hw_ep_resolve(struct usb_device *ude
 	struct usb_device_descriptor *dd;
 	uint16_t mps;
 
-	if (desc == NULL) {
+	if (desc == NULL)
 		return (USB_ERR_INVAL);
-	}
+
 	/* get bus methods */
 	methods = udev->bus->methods;
 
-	if (methods->get_hw_ep_profile == NULL) {
+	if (methods->get_hw_ep_profile == NULL)
 		return (USB_ERR_INVAL);
-	}
+
 	if (desc->bDescriptorType == UDESC_DEVICE) {
 
-		if (desc->bLength < sizeof(*dd)) {
+		if (desc->bLength < sizeof(*dd))
 			return (USB_ERR_INVAL);
-		}
+
 		dd = (void *)desc;
 
 		/* get HW control endpoint 0 profile */
@@ -909,13 +909,12 @@ usb_hw_ep_resolve(struct usb_device *ude
 		}
 		return (0);		/* success */
 	}
-	if (desc->bDescriptorType != UDESC_CONFIG) {
+	if (desc->bDescriptorType != UDESC_CONFIG)
 		return (USB_ERR_INVAL);
-	}
-	if (desc->bLength < sizeof(*(ues->cd))) {
+	if (desc->bLength < sizeof(*(ues->cd)))
 		return (USB_ERR_INVAL);
-	}
-	ues = udev->bus->scratch[0].hw_ep_scratch;
+
+	ues = udev->scratch.hw_ep_scratch;
 
 	memset(ues, 0, sizeof(*ues));
 
@@ -1236,13 +1235,18 @@ usb_temp_setup(struct usb_device *udev,
 {
 	struct usb_temp_setup *uts;
 	void *buf;
+	usb_error_t error;
 	uint8_t n;
+	uint8_t do_unlock;
 
-	if (tdd == NULL) {
-		/* be NULL safe */
+	/* be NULL safe */
+	if (tdd == NULL)
 		return (0);
-	}
-	uts = udev->bus->scratch[0].temp_setup;
+
+	/* Protect scratch area */
+	do_unlock = usbd_enum_lock(udev);
+
+	uts = udev->scratch.temp_setup;
 
 	memset(uts, 0, sizeof(*uts));
 
@@ -1255,17 +1259,24 @@ usb_temp_setup(struct usb_device *udev,
 
 	if (uts->err) {
 		/* some error happened */
-		return (uts->err);
+		goto done;
 	}
 	/* sanity check */
 	if (uts->size == 0) {
-		return (USB_ERR_INVAL);
+		uts->err = USB_ERR_INVAL;
+		goto done;
 	}
 	/* allocate zeroed memory */
 	uts->buf = malloc(uts->size, M_USB, M_WAITOK | M_ZERO);
+	/*
+	 * Allow malloc() to return NULL regardless of M_WAITOK flag.
+	 * This helps when porting the software to non-FreeBSD
+	 * systems.
+	 */
 	if (uts->buf == NULL) {

*** DIFF OUTPUT TRUNCATED AT 1000 LINES ***


More information about the svn-src-user mailing list