svn commit: r243370 - in head/sys/powerpc: aim wii

2012-11-21 Thread Adrian Chadd
Author: adrian
Date: Wed Nov 21 08:04:21 2012
New Revision: 243370
URL: http://svnweb.freebsd.org/changeset/base/243370

Log:
  Setup BAT0 and BAT1 on the Wii.
  
  This is the missing piece for FreeBSD/Wii, but there's still a lot of
  work ahead. We have to reset the MMU in locore before continuing
  the boot process because we don't know how the boot loaders might
  have setup the BATs. We also disable the PCI BAT because there's no PCI
  bus on the Wii.
  
  Thanks to Nathan Whitehorn and Peter Grenhan for their help.
  
  Submitted by: Margarida Gouveia

Added:
  head/sys/powerpc/wii/locore.S   (contents, props changed)
Modified:
  head/sys/powerpc/aim/locore32.S
  head/sys/powerpc/aim/mmu_oea.c

Modified: head/sys/powerpc/aim/locore32.S
==
--- head/sys/powerpc/aim/locore32.S Wed Nov 21 07:56:38 2012
(r243369)
+++ head/sys/powerpc/aim/locore32.S Wed Nov 21 08:04:21 2012
(r243370)
@@ -64,6 +64,7 @@
 #include 
 #include 
 #include 
+#include "opt_platform.h"
 
 #include "opt_kdtrace.h"
 
@@ -129,7 +130,9 @@ __start:
bdnz1b
sync
isync
-
+#ifdef WII
+#include 
+#endif
/* Zero bss, in case we were started by something unhelpful */
li  0,0
lis 8,_edata@ha

Modified: head/sys/powerpc/aim/mmu_oea.c
==
--- head/sys/powerpc/aim/mmu_oea.c  Wed Nov 21 07:56:38 2012
(r243369)
+++ head/sys/powerpc/aim/mmu_oea.c  Wed Nov 21 08:04:21 2012
(r243370)
@@ -620,8 +620,17 @@ moea_cpu_bootstrap(mmu_t mmup, int ap)
isync();
}
 
-   __asm __volatile("mtdbatu 1,%0" :: "r"(battable[8].batu));
-   __asm __volatile("mtdbatl 1,%0" :: "r"(battable[8].batl));
+#ifdef WII
+   /*
+* Special case for the Wii: don't install the PCI BAT.
+*/
+   if (strcmp(installed_platform(), "wii") != 0) {
+#endif
+   __asm __volatile("mtdbatu 1,%0" :: "r"(battable[8].batu));
+   __asm __volatile("mtdbatl 1,%0" :: "r"(battable[8].batl));
+#ifdef WII
+   }
+#endif
isync();
 
__asm __volatile("mtibatu 1,%0" :: "r"(0));
@@ -660,26 +669,26 @@ moea_bootstrap(mmu_t mmup, vm_offset_t k
 battable[0x0].batl = BATL(0x, BAT_M, BAT_PP_RW);
 battable[0x0].batu = BATU(0x, BAT_BL_256M, BAT_Vs);
 
-/*
- * Map PCI memory space.
- */
-battable[0x8].batl = BATL(0x8000, BAT_I|BAT_G, BAT_PP_RW);
-battable[0x8].batu = BATU(0x8000, BAT_BL_256M, BAT_Vs);
+   /*
+* Map PCI memory space.
+*/
+   battable[0x8].batl = BATL(0x8000, BAT_I|BAT_G, BAT_PP_RW);
+   battable[0x8].batu = BATU(0x8000, BAT_BL_256M, BAT_Vs);
 
-battable[0x9].batl = BATL(0x9000, BAT_I|BAT_G, BAT_PP_RW);
-battable[0x9].batu = BATU(0x9000, BAT_BL_256M, BAT_Vs);
+   battable[0x9].batl = BATL(0x9000, BAT_I|BAT_G, BAT_PP_RW);
+   battable[0x9].batu = BATU(0x9000, BAT_BL_256M, BAT_Vs);
 
-battable[0xa].batl = BATL(0xa000, BAT_I|BAT_G, BAT_PP_RW);
-battable[0xa].batu = BATU(0xa000, BAT_BL_256M, BAT_Vs);
+   battable[0xa].batl = BATL(0xa000, BAT_I|BAT_G, BAT_PP_RW);
+   battable[0xa].batu = BATU(0xa000, BAT_BL_256M, BAT_Vs);
 
-battable[0xb].batl = BATL(0xb000, BAT_I|BAT_G, BAT_PP_RW);
-battable[0xb].batu = BATU(0xb000, BAT_BL_256M, BAT_Vs);
+   battable[0xb].batl = BATL(0xb000, BAT_I|BAT_G, BAT_PP_RW);
+   battable[0xb].batu = BATU(0xb000, BAT_BL_256M, BAT_Vs);
 
-/*
- * Map obio devices.
- */
-battable[0xf].batl = BATL(0xf000, BAT_I|BAT_G, BAT_PP_RW);
-battable[0xf].batu = BATU(0xf000, BAT_BL_256M, BAT_Vs);
+   /*
+* Map obio devices.
+*/
+   battable[0xf].batl = BATL(0xf000, BAT_I|BAT_G, BAT_PP_RW);
+   battable[0xf].batu = BATU(0xf000, BAT_BL_256M, BAT_Vs);
 
/*
 * Use an IBAT and a DBAT to map the bottom segment of memory
@@ -694,9 +703,15 @@ moea_bootstrap(mmu_t mmup, vm_offset_t k
:: "r"(battable[0].batu), "r"(battable[0].batl));
mtmsr(msr);
 
-   /* map pci space */
-   __asm __volatile("mtdbatu 1,%0" :: "r"(battable[8].batu));
-   __asm __volatile("mtdbatl 1,%0" :: "r"(battable[8].batl));
+#ifdef WII
+if (strcmp(installed_platform(), "wii") != 0) {
+#endif
+   /* map pci space */
+   __asm __volatile("mtdbatu 1,%0" :: "r"(battable[8].batu));
+   __asm __volatile("mtdbatl 1,%0" :: "r"(battable[8].batl));
+#ifdef WII
+   }
+#endif
isync();
 
/* set global direct map flag */

Added: head/sys/powerpc/wii/locore.S
==
--- /dev/null   00:00:00 1970   (empty, bec

Re: svn commit: r243228 - head/etc

2012-11-21 Thread Chris Rees
On 20 Nov 2012 13:53, "Bruce Evans"  wrote:
>
> On Tue, 20 Nov 2012, John Hay wrote:
>
>> On Sun, Nov 18, 2012 at 02:21:05PM +, Chris Rees wrote:
>>>
>>> Log:
>>>   cp -R misses out dotfiles; use pax instead to copy file hierarchies
>>>
>>>   PR:   conf/99721 (based on)
>>>   Submitted by: Florian Zavatzki 
>>>   Approved by:  hrs
>>>   MFC after:1 month
>>>
>>> Modified:
>>>   head/etc/rc.initdiskless
>>>
>>> Modified: head/etc/rc.initdiskless
>>>
==
>>> --- head/etc/rc.initdisklessSun Nov 18 14:05:28 2012
 (r243227)
>>> +++ head/etc/rc.initdisklessSun Nov 18 14:21:05 2012
 (r243228)
>>> @@ -354,7 +354,7 @@ for i in ${templates} ; do
>>> subdir=${j##*/}
>>> if [ -d $j -a ! -f $j.cpio.gz  ]; then
>>> create_md $subdir
>>> -   cp -Rp $j/ /$subdir
>>> +   (cd $j && pax -rw . /$subdir)
>>> fi
>>>  done
>>>  for j in /conf/$i/*.cpio.gz ; do
>>
>>
>> Have you tested this on a diskless and readonly system? It looks like pax
>> need to write something in /tmp and it might not be writeable yet. I got
>> an error, after the first of /bin/pax not found and having to add that to
>> the list of files needed.
>
>
> It uses mkstemp(3), normally in /tmp but it honors $TMPDIR.  It seems to
> always create 1 temporary file (even for copying a single regular file),
> and sometimes 2 temporary files.  Both of the temporary files seem to be
> to hold metadata for file times and hashes, in case it is too large for
> memory.  cp -Rp probably needs to do the same (except it is imperfect to
> unnecessarily assume that /tmp is writable), to fix its link and timestamp
> handling.
>
> BTW, I think it is a large bug that ed and vi create temporary files even
> before you change anything.  Even view(1) (vi -R) wants to scribble on
> /var/tmp/vi.recover.  At least it doesn't refuse to start if this is not
> writeable.  ed(1) is considerably more broken.  It
> - hard codes /tmp and doesn't use _PATH_TMP or honor $TMPDIR
> - always scribbles in /tmp
> - refuses to start if /tmp is not writeable.
> This makes ed(1) wlays broken in single user shells until '/' is mounted
> rw, although ed is the only editor that is sure to be there and the
> reason for using a single user shell is often that there is a problem
> with mounting '/' rw.

*sigh*

Hiroki Sato tested it, but i don't know if he had ro /.  This appears to
have caused a few problems, possibly more than the benefit of the change
(hard links).

I'm inclined to be a coward and just revert this later; anyone who can get
there before me, feel free.

When I'm done with the other rc PRs (haha) I'll look at fixing our cp.

Chris
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r243372 - in head: sbin/mdconfig sys/dev/md

2012-11-21 Thread Jaakko Heinonen
Author: jh
Date: Wed Nov 21 16:56:47 2012
New Revision: 243372
URL: http://svnweb.freebsd.org/changeset/base/243372

Log:
  Disallow attaching preloaded memory disks via ioctl.
  
  - The feature is dangerous because the kernel code didn't check
validity of the memory address provided from user space.
  - It seems that mdconfig(8) never really supported attaching preloaded
memory disks.
  - Preloaded memory disks are automatically attached during md(4)
initialization. Thus there shouldn't be much use for the feature.
  
  PR:   kern/169683
  Discussed on: freebsd-hackers

Modified:
  head/sbin/mdconfig/mdconfig.c
  head/sys/dev/md/md.c

Modified: head/sbin/mdconfig/mdconfig.c
==
--- head/sbin/mdconfig/mdconfig.c   Wed Nov 21 09:50:31 2012
(r243371)
+++ head/sbin/mdconfig/mdconfig.c   Wed Nov 21 16:56:47 2012
(r243372)
@@ -84,7 +84,7 @@ usage(void)
 "   mdconfig -r -u unit -s size [-o [no]force]\n"
 "   mdconfig -l [-v] [-n] [-u unit]\n"
 "   mdconfig file\n");
-   fprintf(stderr, "\t\ttype = {malloc, preload, vnode, swap}\n");
+   fprintf(stderr, "\t\ttype = {malloc, vnode, swap}\n");
fprintf(stderr, "\t\toption = {cluster, compress, reserve}\n");
fprintf(stderr, "\t\tsize = %%d (512 byte blocks), %%db (B),\n");
fprintf(stderr, "\t\t   %%dk (kB), %%dm (MB), %%dg (GB) or\n");
@@ -148,8 +148,6 @@ main(int argc, char **argv)
if (!strcmp(optarg, "malloc")) {
mdio.md_type = MD_MALLOC;
mdio.md_options |= MD_AUTOUNIT | MD_COMPRESS;
-   } else if (!strcmp(optarg, "preload")) {
-   mdio.md_type = MD_PRELOAD;
} else if (!strcmp(optarg, "vnode")) {
mdio.md_type = MD_VNODE;
mdio.md_options |= MD_CLUSTER | MD_AUTOUNIT | 
MD_COMPRESS;

Modified: head/sys/dev/md/md.c
==
--- head/sys/dev/md/md.cWed Nov 21 09:50:31 2012(r243371)
+++ head/sys/dev/md/md.cWed Nov 21 16:56:47 2012(r243372)
@@ -854,27 +854,6 @@ mdinit(struct md_s *sc)
DEVSTAT_ALL_SUPPORTED, DEVSTAT_TYPE_DIRECT, DEVSTAT_PRIORITY_MAX);
 }
 
-/*
- * XXX: we should check that the range they feed us is mapped.
- * XXX: we should implement read-only.
- */
-
-static int
-mdcreate_preload(struct md_s *sc, struct md_ioctl *mdio)
-{
-
-   if (mdio->md_options & ~(MD_AUTOUNIT | MD_FORCE))
-   return (EINVAL);
-   if (mdio->md_base == 0)
-   return (EINVAL);
-   sc->flags = mdio->md_options & MD_FORCE;
-   /* Cast to pointer size, then to pointer to avoid warning */
-   sc->pl_ptr = (u_char *)(uintptr_t)mdio->md_base;
-   sc->pl_len = (size_t)sc->mediasize;
-   return (0);
-}
-
-
 static int
 mdcreate_malloc(struct md_s *sc, struct md_ioctl *mdio)
 {
@@ -1238,8 +1217,12 @@ xmdctlioctl(struct cdev *dev, u_long cmd
error = mdcreate_malloc(sc, mdio);
break;
case MD_PRELOAD:
-   sc->start = mdstart_preload;
-   error = mdcreate_preload(sc, mdio);
+   /*
+* We disallow attaching preloaded memory disks via
+* ioctl. Preloaded memory disks are automatically
+* attached in g_md_init().
+*/
+   error = EOPNOTSUPP;
break;
case MD_VNODE:
sc->start = mdstart_vnode;
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r243373 - head/sys/dev/md

2012-11-21 Thread Jaakko Heinonen
Author: jh
Date: Wed Nov 21 17:05:57 2012
New Revision: 243373
URL: http://svnweb.freebsd.org/changeset/base/243373

Log:
  Print correct unit number when attaching preloaded memory disks.
  Retire now unused mdunits variable.

Modified:
  head/sys/dev/md/md.c

Modified: head/sys/dev/md/md.c
==
--- head/sys/dev/md/md.cWed Nov 21 16:56:47 2012(r243372)
+++ head/sys/dev/md/md.cWed Nov 21 17:05:57 2012(r243373)
@@ -137,7 +137,6 @@ static g_access_t g_md_access;
 static void g_md_dumpconf(struct sbuf *sb, const char *indent,
 struct g_geom *gp, struct g_consumer *cp __unused, struct g_provider *pp);
 
-static int mdunits;
 static struct cdev *status_dev = 0;
 static struct sx md_sx;
 static struct unrhdr *md_uh;
@@ -1309,7 +1308,7 @@ mdctlioctl(struct cdev *dev, u_long cmd,
 }
 
 static void
-md_preloaded(u_char *image, size_t length)
+md_preloaded(u_char *image, size_t length, const char *name)
 {
struct md_s *sc;
int error;
@@ -1327,6 +1326,10 @@ md_preloaded(u_char *image, size_t lengt
rootdevnames[0] = MD_ROOT_FSTYPE ":/dev/md0";
 #endif
mdinit(sc);
+   if (name != NULL) {
+   printf("%s%d: Preloaded image <%s> %zd bytes at %p\n",
+   MD_NAME, sc->unit, name, length, image);
+   }
 }
 
 static void
@@ -1347,7 +1350,7 @@ g_md_init(struct g_class *mp __unused)
md_uh = new_unrhdr(0, INT_MAX, NULL);
 #ifdef MD_ROOT_SIZE
sx_xlock(&md_sx);
-   md_preloaded(mfs_root.start, sizeof(mfs_root.start));
+   md_preloaded(mfs_root.start, sizeof(mfs_root.start), NULL);
sx_xunlock(&md_sx);
 #endif
/* XXX: are preload_* static or do they need Giant ? */
@@ -1363,10 +1366,8 @@ g_md_init(struct g_class *mp __unused)
ptr = preload_fetch_addr(mod);
len = preload_fetch_size(mod);
if (ptr != NULL && len != 0) {
-   printf("%s%d: Preloaded image <%s> %d bytes at %p\n",
-   MD_NAME, mdunits, name, len, ptr);
sx_xlock(&md_sx);
-   md_preloaded(ptr, len);
+   md_preloaded(ptr, len, name);
sx_xunlock(&md_sx);
}
}
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r243374 - head/etc

2012-11-21 Thread Chris Rees
Author: crees (ports committer)
Date: Wed Nov 21 18:12:28 2012
New Revision: 243374
URL: http://svnweb.freebsd.org/changeset/base/243374

Log:
  Revert r243228.  This commit appears to cause more trouble than
  it was designed to avoid; the issue described in the PR was no
  longer an issue anyway.

Modified:
  head/etc/rc.initdiskless

Modified: head/etc/rc.initdiskless
==
--- head/etc/rc.initdisklessWed Nov 21 17:05:57 2012(r243373)
+++ head/etc/rc.initdisklessWed Nov 21 18:12:28 2012(r243374)
@@ -354,7 +354,7 @@ for i in ${templates} ; do
subdir=${j##*/}
if [ -d $j -a ! -f $j.cpio.gz  ]; then
create_md $subdir
-   (cd $j && pax -rw . /$subdir)
+   cp -Rp $j/ /$subdir
fi
 done
 for j in /conf/$i/*.cpio.gz ; do
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r243375 - in stable/9/sys/ofed: drivers/infiniband/core drivers/infiniband/ulp/sdp include/linux

2012-11-21 Thread Dimitry Andric
Author: dim
Date: Wed Nov 21 18:27:02 2012
New Revision: 243375
URL: http://svnweb.freebsd.org/changeset/base/243375

Log:
  MFC r242933:
  
  Redo r242842, now actually fixing the warnings, as follows:
  - In sys/ofed/drivers/infiniband/core/cma.c, an enum struct member is
interpreted as an int, so cast it to an int.
  - In sys/ofed/drivers/infiniband/core/ud_header.c, initialize the
packet_length variable in ib_ud_header_init(), to prevent undefined
behaviour.
  - In sys/ofed/drivers/infiniband/ulp/sdp/sdp_rx.c, call rdma_notify()
with the correct enum type and value.
  - In sys/ofed/include/linux/pci.h, change the PCI_DEVICE and PCI_VDEVICE
macros to use C99 struct initializers, so additional members can be
overridden.
  
  Reviewed by:  delphij, Garrett Cooper 

Modified:
  stable/9/sys/ofed/drivers/infiniband/core/cma.c
  stable/9/sys/ofed/drivers/infiniband/core/ud_header.c
  stable/9/sys/ofed/drivers/infiniband/ulp/sdp/sdp_rx.c
  stable/9/sys/ofed/include/linux/pci.h
Directory Properties:
  stable/9/sys/   (props changed)

Modified: stable/9/sys/ofed/drivers/infiniband/core/cma.c
==
--- stable/9/sys/ofed/drivers/infiniband/core/cma.c Wed Nov 21 18:12:28 
2012(r243374)
+++ stable/9/sys/ofed/drivers/infiniband/core/cma.c Wed Nov 21 18:27:02 
2012(r243375)
@@ -1312,7 +1312,7 @@ static int cma_iw_handler(struct iw_cm_i
*sin = iw_event->local_addr;
sin = (struct sockaddr_in *) &id_priv->id.route.addr.dst_addr;
*sin = iw_event->remote_addr;
-   switch (iw_event->status) {
+   switch ((int)iw_event->status) {
case 0:
event.event = RDMA_CM_EVENT_ESTABLISHED;
break;

Modified: stable/9/sys/ofed/drivers/infiniband/core/ud_header.c
==
--- stable/9/sys/ofed/drivers/infiniband/core/ud_header.c   Wed Nov 21 
18:12:28 2012(r243374)
+++ stable/9/sys/ofed/drivers/infiniband/core/ud_header.c   Wed Nov 21 
18:27:02 2012(r243375)
@@ -230,7 +230,7 @@ void ib_ud_header_init(int  pay
   int  immediate_present,
   struct ib_ud_header *header)
 {
-   u16 packet_length;
+   u16 packet_length = 0;
 
memset(header, 0, sizeof *header);
 

Modified: stable/9/sys/ofed/drivers/infiniband/ulp/sdp/sdp_rx.c
==
--- stable/9/sys/ofed/drivers/infiniband/ulp/sdp/sdp_rx.c   Wed Nov 21 
18:12:28 2012(r243374)
+++ stable/9/sys/ofed/drivers/infiniband/ulp/sdp/sdp_rx.c   Wed Nov 21 
18:27:02 2012(r243375)
@@ -590,7 +590,7 @@ sdp_rx_comp_work(struct work_struct *wor
if (unlikely(!ssk->poll_cq)) {
struct rdma_cm_id *id = ssk->id;
if (id && id->qp)
-   rdma_notify(id, RDMA_CM_EVENT_ESTABLISHED);
+   rdma_notify(id, IB_EVENT_COMM_EST);
goto out;
}
 

Modified: stable/9/sys/ofed/include/linux/pci.h
==
--- stable/9/sys/ofed/include/linux/pci.h   Wed Nov 21 18:12:28 2012
(r243374)
+++ stable/9/sys/ofed/include/linux/pci.h   Wed Nov 21 18:27:02 2012
(r243375)
@@ -73,10 +73,12 @@ struct pci_device_id {
 #definePCI_DEVICE_ID_MELLANOX_SINAI0x6274
 
 
-#define PCI_VDEVICE(vendor, device)\
-   PCI_VENDOR_ID_##vendor, (device), PCI_ANY_ID, PCI_ANY_ID, 0, 0
-#definePCI_DEVICE(vendor, device)  
\
-   (vendor), (device), PCI_ANY_ID, PCI_ANY_ID, 0, 0
+#define PCI_VDEVICE(_vendor, _device)  \
+   .vendor = PCI_VENDOR_ID_##_vendor, .device = (_device), \
+   .subvendor = PCI_ANY_ID, .subdevice = PCI_ANY_ID
+#definePCI_DEVICE(_vendor, _device)
\
+   .vendor = (_vendor), .device = (_device),   \
+   .subvendor = PCI_ANY_ID, .subdevice = PCI_ANY_ID
 
 #defineto_pci_dev(n)   container_of(n, struct pci_dev, dev)
 
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r243376 - in stable/9/contrib/libc++: . include src src/support

2012-11-21 Thread Dimitry Andric
Author: dim
Date: Wed Nov 21 18:38:56 2012
New Revision: 243376
URL: http://svnweb.freebsd.org/changeset/base/243376

Log:
  MFC r241903:
  
Import libc++ trunk r165949.  Among other improvements and bug fixes,
this has many visibility problems fixed, which should help with
compiling certain ports that exercise C++11 mode (i.e. Firefox).
  
Also, belatedly add the LICENSE.TXT and accompanying CREDITS.TXT files,
which are referred to in all the source files.
  
  MFC r241907:
  
Fix two -Wsystem-header warnings in libc++ that were exposed by the new
ATF import.  These have also been sent upstream.

Added:
  stable/9/contrib/libc++/CREDITS.TXT
 - copied unchanged from r241903, head/contrib/libc++/CREDITS.TXT
  stable/9/contrib/libc++/LICENSE.TXT
 - copied unchanged from r241903, head/contrib/libc++/LICENSE.TXT
Deleted:
  stable/9/contrib/libc++/src/support/
Modified:
  stable/9/contrib/libc++/include/__bit_reference
  stable/9/contrib/libc++/include/__config
  stable/9/contrib/libc++/include/__hash_table
  stable/9/contrib/libc++/include/__locale
  stable/9/contrib/libc++/include/__mutex_base
  stable/9/contrib/libc++/include/__tree
  stable/9/contrib/libc++/include/__tuple
  stable/9/contrib/libc++/include/__undef_min_max
  stable/9/contrib/libc++/include/algorithm
  stable/9/contrib/libc++/include/array
  stable/9/contrib/libc++/include/atomic
  stable/9/contrib/libc++/include/bitset
  stable/9/contrib/libc++/include/chrono
  stable/9/contrib/libc++/include/cmath
  stable/9/contrib/libc++/include/complex
  stable/9/contrib/libc++/include/condition_variable
  stable/9/contrib/libc++/include/cstddef
  stable/9/contrib/libc++/include/cstdio
  stable/9/contrib/libc++/include/cstdlib
  stable/9/contrib/libc++/include/deque
  stable/9/contrib/libc++/include/exception
  stable/9/contrib/libc++/include/forward_list
  stable/9/contrib/libc++/include/fstream
  stable/9/contrib/libc++/include/functional
  stable/9/contrib/libc++/include/future
  stable/9/contrib/libc++/include/ios
  stable/9/contrib/libc++/include/iosfwd
  stable/9/contrib/libc++/include/istream
  stable/9/contrib/libc++/include/iterator
  stable/9/contrib/libc++/include/list
  stable/9/contrib/libc++/include/locale
  stable/9/contrib/libc++/include/map
  stable/9/contrib/libc++/include/memory
  stable/9/contrib/libc++/include/mutex
  stable/9/contrib/libc++/include/new
  stable/9/contrib/libc++/include/ostream
  stable/9/contrib/libc++/include/queue
  stable/9/contrib/libc++/include/random
  stable/9/contrib/libc++/include/regex
  stable/9/contrib/libc++/include/stack
  stable/9/contrib/libc++/include/streambuf
  stable/9/contrib/libc++/include/string
  stable/9/contrib/libc++/include/system_error
  stable/9/contrib/libc++/include/thread
  stable/9/contrib/libc++/include/tuple
  stable/9/contrib/libc++/include/type_traits
  stable/9/contrib/libc++/include/unordered_map
  stable/9/contrib/libc++/include/utility
  stable/9/contrib/libc++/include/valarray
  stable/9/contrib/libc++/include/vector
  stable/9/contrib/libc++/src/condition_variable.cpp
  stable/9/contrib/libc++/src/debug.cpp
  stable/9/contrib/libc++/src/exception.cpp
  stable/9/contrib/libc++/src/future.cpp
  stable/9/contrib/libc++/src/ios.cpp
  stable/9/contrib/libc++/src/iostream.cpp
  stable/9/contrib/libc++/src/locale.cpp
  stable/9/contrib/libc++/src/memory.cpp
  stable/9/contrib/libc++/src/mutex.cpp
  stable/9/contrib/libc++/src/new.cpp
  stable/9/contrib/libc++/src/random.cpp
  stable/9/contrib/libc++/src/stdexcept.cpp
  stable/9/contrib/libc++/src/thread.cpp
  stable/9/contrib/libc++/src/typeinfo.cpp
Directory Properties:
  stable/9/contrib/libc++/   (props changed)

Copied: stable/9/contrib/libc++/CREDITS.TXT (from r241903, 
head/contrib/libc++/CREDITS.TXT)
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ stable/9/contrib/libc++/CREDITS.TXT Wed Nov 21 18:38:56 2012
(r243376, copy of r241903, head/contrib/libc++/CREDITS.TXT)
@@ -0,0 +1,76 @@
+This file is a partial list of people who have contributed to the LLVM/libc++
+project.  If you have contributed a patch or made some other contribution to
+LLVM/libc++, please submit a patch to this file to add yourself, and it will be
+done!
+
+The list is sorted by surname and formatted to allow easy grepping and
+beautification by scripts.  The fields are: name (N), email (E), web-address
+(W), PGP key ID and fingerprint (P), description (D), and snail-mail address
+(S).
+
+N: Howard Hinnant
+E: hhinn...@apple.com
+D: Architect and primary author of libc++
+
+N: Marshall Clow
+E: mclow.li...@gmail.com
+E: marsh...@idio.com
+D: Minor patches and bug fixes.
+
+N: Bjorn Reese
+E: bre...@users.sourceforge.net
+D: Initial regex prototype
+
+N: David Chisnall
+E: theraven at theravensnest dot org
+D: FreeBSD and Solaris ports, libcxxrt support, some atomics work.
+
+N: Ruben Van Boxem
+E: vanboxem do

svn commit: r243380 - head/sys/dev/usb/serial

2012-11-21 Thread Hans Petter Selasky
Author: hselasky
Date: Wed Nov 21 22:04:40 2012
New Revision: 243380
URL: http://svnweb.freebsd.org/changeset/base/243380

Log:
  Fix uplcom clear stall logic for PL2303HX.
  
  Submitted by: Mark Johnston
  MFC after:1 week

Modified:
  head/sys/dev/usb/serial/uplcom.c

Modified: head/sys/dev/usb/serial/uplcom.c
==
--- head/sys/dev/usb/serial/uplcom.cWed Nov 21 21:03:14 2012
(r243379)
+++ head/sys/dev/usb/serial/uplcom.cWed Nov 21 22:04:40 2012
(r243380)
@@ -432,11 +432,21 @@ uplcom_attach(device_t dev)
usbd_errstr(error));
goto detach;
}
-   /* clear stall at first run */
-   mtx_lock(&sc->sc_mtx);
-   usbd_xfer_set_stall(sc->sc_xfer[UPLCOM_BULK_DT_WR]);
-   usbd_xfer_set_stall(sc->sc_xfer[UPLCOM_BULK_DT_RD]);
-   mtx_unlock(&sc->sc_mtx);
+
+   if (sc->sc_chiptype != TYPE_PL2303HX) {
+   /* HX variants seem to lock up after a clear stall request. */
+   mtx_lock(&sc->sc_mtx);
+   usbd_xfer_set_stall(sc->sc_xfer[UPLCOM_BULK_DT_WR]);
+   usbd_xfer_set_stall(sc->sc_xfer[UPLCOM_BULK_DT_RD]);
+   mtx_unlock(&sc->sc_mtx);
+   } else {
+   if (uplcom_pl2303_do(sc->sc_udev, UT_WRITE_VENDOR_DEVICE,
+   UPLCOM_SET_REQUEST, 8, 0, 0) ||
+   uplcom_pl2303_do(sc->sc_udev, UT_WRITE_VENDOR_DEVICE,
+   UPLCOM_SET_REQUEST, 9, 0, 0)) {
+   goto detach;
+   }
+   }
 
error = ucom_attach(&sc->sc_super_ucom, &sc->sc_ucom, 1, sc,
&uplcom_callback, &sc->sc_mtx);
@@ -555,9 +565,6 @@ uplcom_pl2303_init(struct usb_device *ud
if (err)
return (EIO);

-   if (uplcom_pl2303_do(udev, UT_WRITE_VENDOR_DEVICE, UPLCOM_SET_REQUEST, 
8, 0, 0)
-   || uplcom_pl2303_do(udev, UT_WRITE_VENDOR_DEVICE, 
UPLCOM_SET_REQUEST, 9, 0, 0))
-   return (EIO);
return (0);
 }
 
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r243320 - head/usr.bin/cut

2012-11-21 Thread Pawel Jakub Dawidek
On Tue, Nov 20, 2012 at 01:57:21AM +, Eitan Adler wrote:
> Author: eadler
> Date: Tue Nov 20 01:57:21 2012
> New Revision: 243320
> URL: http://svnweb.freebsd.org/changeset/base/243320
> 
> Log:
>   Add 'w' flag to:
>   
>   Use whitespace (spaces and tabs) as the delimiter.
>   Consecutive spaces and tabs count as one single field
>   separator.

That's very useful.

-- 
Pawel Jakub Dawidek   http://www.wheelsystems.com
FreeBSD committer http://www.FreeBSD.org
Am I Evil? Yes, I Am! http://tupytaj.pl


pgpbEA1d9BfuP.pgp
Description: PGP signature


Re: svn commit: r243341 - head/sys/kern

2012-11-21 Thread Pawel Jakub Dawidek
On Tue, Nov 20, 2012 at 03:33:48PM +, Konstantin Belousov wrote:
> Author: kib
> Date: Tue Nov 20 15:33:48 2012
> New Revision: 243341
> URL: http://svnweb.freebsd.org/changeset/base/243341
> 
> Log:
>   Add a special meaning to the negative ticks argument for
>   taskqueue_enqueue_timeout().  Do not rearm the callout if it is
>   already armed and the ticks is negative.  Otherwise rearm it to fire
>   in abs(ticks) ticks in the future.

Can you document that in taskqueue(9)?

-- 
Pawel Jakub Dawidek   http://www.wheelsystems.com
FreeBSD committer http://www.FreeBSD.org
Am I Evil? Yes, I Am! http://tupytaj.pl


pgpfabF6sBbPT.pgp
Description: PGP signature


Re: svn commit: r243341 - head/sys/kern

2012-11-21 Thread Konstantin Belousov
On Wed, Nov 21, 2012 at 11:38:35PM +0100, Pawel Jakub Dawidek wrote:
> On Tue, Nov 20, 2012 at 03:33:48PM +, Konstantin Belousov wrote:
> > Author: kib
> > Date: Tue Nov 20 15:33:48 2012
> > New Revision: 243341
> > URL: http://svnweb.freebsd.org/changeset/base/243341
> > 
> > Log:
> >   Add a special meaning to the negative ticks argument for
> >   taskqueue_enqueue_timeout().  Do not rearm the callout if it is
> >   already armed and the ticks is negative.  Otherwise rearm it to fire
> >   in abs(ticks) ticks in the future.
> 
> Can you document that in taskqueue(9)?

Yes, I will, before the MFC.


pgpQlU6Mx5YU5.pgp
Description: PGP signature


svn commit: r243382 - stable/9/sys/netinet6

2012-11-21 Thread Andrey V. Elsukov
Author: ae
Date: Thu Nov 22 00:22:54 2012
New Revision: 243382
URL: http://svnweb.freebsd.org/changeset/base/243382

Log:
  MFC r243028:
zoneid has unsigned type.
  
  MFC r243029:
SCOPE6_LOCK protects V_sid_default, no need to acquire it without
any access to V_sid_default.
  
  MFC r243031:
if_afdata lock was converted from mutex to rwlock a long ago, so we can
replace IF_AFDATA_LOCK() macro depending to the access type.
  
  MFC r243148:
Reduce the overhead of locking, use IF_AFDATA_RLOCK() when we are doing
simple lookups.

Modified:
  stable/9/sys/netinet6/icmp6.c
  stable/9/sys/netinet6/in6_src.c
  stable/9/sys/netinet6/ip6_input.c
  stable/9/sys/netinet6/nd6.c
  stable/9/sys/netinet6/nd6_rtr.c
  stable/9/sys/netinet6/scope6.c
Directory Properties:
  stable/9/sys/   (props changed)

Modified: stable/9/sys/netinet6/icmp6.c
==
--- stable/9/sys/netinet6/icmp6.c   Thu Nov 22 00:08:20 2012
(r243381)
+++ stable/9/sys/netinet6/icmp6.c   Thu Nov 22 00:22:54 2012
(r243382)
@@ -2681,9 +2681,9 @@ icmp6_redirect_output(struct mbuf *m0, s
struct nd_opt_hdr *nd_opt;
char *lladdr;
 
-   IF_AFDATA_LOCK(ifp);
+   IF_AFDATA_RLOCK(ifp);
ln = nd6_lookup(router_ll6, 0, ifp);
-   IF_AFDATA_UNLOCK(ifp);
+   IF_AFDATA_RUNLOCK(ifp);
if (ln == NULL)
goto nolladdropt;
 

Modified: stable/9/sys/netinet6/in6_src.c
==
--- stable/9/sys/netinet6/in6_src.c Thu Nov 22 00:08:20 2012
(r243381)
+++ stable/9/sys/netinet6/in6_src.c Thu Nov 22 00:22:54 2012
(r243382)
@@ -608,9 +608,9 @@ selectroute(struct sockaddr_in6 *dstsock
 
rt = ron->ro_rt;
ifp = rt->rt_ifp;
-   IF_AFDATA_LOCK(ifp);
+   IF_AFDATA_RLOCK(ifp);
la = lla_lookup(LLTABLE6(ifp), 0, (struct sockaddr 
*)&sin6_next->sin6_addr);
-   IF_AFDATA_UNLOCK(ifp);
+   IF_AFDATA_RUNLOCK(ifp);
if (la != NULL) 
LLE_RUNLOCK(la);
else {

Modified: stable/9/sys/netinet6/ip6_input.c
==
--- stable/9/sys/netinet6/ip6_input.c   Thu Nov 22 00:08:20 2012
(r243381)
+++ stable/9/sys/netinet6/ip6_input.c   Thu Nov 22 00:22:54 2012
(r243382)
@@ -685,10 +685,10 @@ passin:
dst6.sin6_len = sizeof(struct sockaddr_in6);
dst6.sin6_addr = ip6->ip6_dst;
ifp = m->m_pkthdr.rcvif;
-   IF_AFDATA_LOCK(ifp);
+   IF_AFDATA_RLOCK(ifp);
lle = lla_lookup(LLTABLE6(ifp), 0,
 (struct sockaddr *)&dst6);
-   IF_AFDATA_UNLOCK(ifp);
+   IF_AFDATA_RUNLOCK(ifp);
if ((lle != NULL) && (lle->la_flags & LLE_IFADDR)) {
struct ifaddr *ifa;
struct in6_ifaddr *ia6;

Modified: stable/9/sys/netinet6/nd6.c
==
--- stable/9/sys/netinet6/nd6.c Thu Nov 22 00:08:20 2012(r243381)
+++ stable/9/sys/netinet6/nd6.c Thu Nov 22 00:22:54 2012(r243382)
@@ -978,12 +978,12 @@ nd6_is_addr_neighbor(struct sockaddr_in6
 * Even if the address matches none of our addresses, it might be
 * in the neighbor cache.
 */
-   IF_AFDATA_LOCK(ifp);
+   IF_AFDATA_RLOCK(ifp);
if ((lle = nd6_lookup(&addr->sin6_addr, 0, ifp)) != NULL) {
LLE_RUNLOCK(lle);
rc = 1;
}
-   IF_AFDATA_UNLOCK(ifp);
+   IF_AFDATA_RUNLOCK(ifp);
return (rc);
 }
 
@@ -1502,9 +1502,9 @@ nd6_ioctl(u_long cmd, caddr_t data, stru
if ((error = in6_setscope(&nb_addr, ifp, NULL)) != 0)
return (error);
 
-   IF_AFDATA_LOCK(ifp);
+   IF_AFDATA_RLOCK(ifp);
ln = nd6_lookup(&nb_addr, 0, ifp);
-   IF_AFDATA_UNLOCK(ifp);
+   IF_AFDATA_RUNLOCK(ifp);
 
if (ln == NULL) {
error = EINVAL;
@@ -2223,9 +2223,9 @@ nd6_storelladdr(struct ifnet *ifp, struc
/*
 * the entry should have been created in nd6_store_lladdr
 */
-   IF_AFDATA_LOCK(ifp);
+   IF_AFDATA_RLOCK(ifp);
ln = lla_lookup(LLTABLE6(ifp), 0, dst);
-   IF_AFDATA_UNLOCK(ifp);
+   IF_AFDATA_RUNLOCK(ifp);
if ((ln == NULL) || !(ln->la_flags & LLE_VALID)) {
if (ln != NULL)
LLE_RUNLOCK(ln);

Modified: stable/9/sys/netinet6/nd6_rtr.c
==
--- stable/9/sys/netinet6/nd6_rtr.c Thu Nov 22 00:08:20 2012
(r243381)
+++ stable/9/sys/netinet6/nd6_rtr.c Thu Nov 22 00:22:54 2012   

svn commit: r243383 - stable/8/sys/netinet6

2012-11-21 Thread Andrey V. Elsukov
Author: ae
Date: Thu Nov 22 00:25:57 2012
New Revision: 243383
URL: http://svnweb.freebsd.org/changeset/base/243383

Log:
  MFC r243028:
zoneid has unsigned type.
  
  MFC r243029:
SCOPE6_LOCK protects V_sid_default, no need to acquire it without
any access to V_sid_default.
  
  MFC r243031:
if_afdata lock was converted from mutex to rwlock a long ago, so we can
replace IF_AFDATA_LOCK() macro depending to the access type.
  
  MFC r243148:
Reduce the overhead of locking, use IF_AFDATA_RLOCK() when we are doing
simple lookups.

Modified:
  stable/8/sys/netinet6/icmp6.c
  stable/8/sys/netinet6/in6_src.c
  stable/8/sys/netinet6/ip6_input.c
  stable/8/sys/netinet6/nd6.c
  stable/8/sys/netinet6/nd6_rtr.c
  stable/8/sys/netinet6/scope6.c
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/netinet6/   (props changed)

Modified: stable/8/sys/netinet6/icmp6.c
==
--- stable/8/sys/netinet6/icmp6.c   Thu Nov 22 00:22:54 2012
(r243382)
+++ stable/8/sys/netinet6/icmp6.c   Thu Nov 22 00:25:57 2012
(r243383)
@@ -2600,9 +2600,9 @@ icmp6_redirect_output(struct mbuf *m0, s
struct nd_opt_hdr *nd_opt;
char *lladdr;
 
-   IF_AFDATA_LOCK(ifp);
+   IF_AFDATA_RLOCK(ifp);
ln = nd6_lookup(router_ll6, 0, ifp);
-   IF_AFDATA_UNLOCK(ifp);
+   IF_AFDATA_RUNLOCK(ifp);
if (ln == NULL)
goto nolladdropt;
 

Modified: stable/8/sys/netinet6/in6_src.c
==
--- stable/8/sys/netinet6/in6_src.c Thu Nov 22 00:22:54 2012
(r243382)
+++ stable/8/sys/netinet6/in6_src.c Thu Nov 22 00:25:57 2012
(r243383)
@@ -608,9 +608,9 @@ selectroute(struct sockaddr_in6 *dstsock
 
rt = ron->ro_rt;
ifp = rt->rt_ifp;
-   IF_AFDATA_LOCK(ifp);
+   IF_AFDATA_RLOCK(ifp);
la = lla_lookup(LLTABLE6(ifp), 0, (struct sockaddr 
*)&sin6_next->sin6_addr);
-   IF_AFDATA_UNLOCK(ifp);
+   IF_AFDATA_RUNLOCK(ifp);
if (la != NULL) 
LLE_RUNLOCK(la);
else {

Modified: stable/8/sys/netinet6/ip6_input.c
==
--- stable/8/sys/netinet6/ip6_input.c   Thu Nov 22 00:22:54 2012
(r243382)
+++ stable/8/sys/netinet6/ip6_input.c   Thu Nov 22 00:25:57 2012
(r243383)
@@ -542,10 +542,10 @@ passin:
dst6.sin6_len = sizeof(struct sockaddr_in6);
dst6.sin6_addr = ip6->ip6_dst;
ifp = m->m_pkthdr.rcvif;
-   IF_AFDATA_LOCK(ifp);
+   IF_AFDATA_RLOCK(ifp);
lle = lla_lookup(LLTABLE6(ifp), 0,
 (struct sockaddr *)&dst6);
-   IF_AFDATA_UNLOCK(ifp);
+   IF_AFDATA_RUNLOCK(ifp);
if ((lle != NULL) && (lle->la_flags & LLE_IFADDR)) {
struct ifaddr *ifa;
struct in6_ifaddr *ia6;

Modified: stable/8/sys/netinet6/nd6.c
==
--- stable/8/sys/netinet6/nd6.c Thu Nov 22 00:22:54 2012(r243382)
+++ stable/8/sys/netinet6/nd6.c Thu Nov 22 00:25:57 2012(r243383)
@@ -977,12 +977,12 @@ nd6_is_addr_neighbor(struct sockaddr_in6
 * Even if the address matches none of our addresses, it might be
 * in the neighbor cache.
 */
-   IF_AFDATA_LOCK(ifp);
+   IF_AFDATA_RLOCK(ifp);
if ((lle = nd6_lookup(&addr->sin6_addr, 0, ifp)) != NULL) {
LLE_RUNLOCK(lle);
rc = 1;
}
-   IF_AFDATA_UNLOCK(ifp);
+   IF_AFDATA_RUNLOCK(ifp);
return (rc);
 }
 
@@ -1402,9 +1402,9 @@ nd6_ioctl(u_long cmd, caddr_t data, stru
if ((error = in6_setscope(&nb_addr, ifp, NULL)) != 0)
return (error);
 
-   IF_AFDATA_LOCK(ifp);
+   IF_AFDATA_RLOCK(ifp);
ln = nd6_lookup(&nb_addr, 0, ifp);
-   IF_AFDATA_UNLOCK(ifp);
+   IF_AFDATA_RUNLOCK(ifp);
 
if (ln == NULL) {
error = EINVAL;
@@ -2096,9 +2096,9 @@ nd6_storelladdr(struct ifnet *ifp, struc
/*
 * the entry should have been created in nd6_store_lladdr
 */
-   IF_AFDATA_LOCK(ifp);
+   IF_AFDATA_RLOCK(ifp);
ln = lla_lookup(LLTABLE6(ifp), 0, dst);
-   IF_AFDATA_UNLOCK(ifp);
+   IF_AFDATA_RUNLOCK(ifp);
if ((ln == NULL) || !(ln->la_flags & LLE_VALID)) {
if (ln != NULL)
LLE_RUNLOCK(ln);

Modified: stable/8/sys/netinet6/nd6_rtr.c
==
--- stable/8/sys/netinet6/nd6_rtr.c Thu Nov 22 00:22:54 2012
(r243382)
+++ stable/8/sys/netinet

svn commit: r243387 - head/sys/dev/mmc

2012-11-21 Thread Ed Maste
Author: emaste
Date: Thu Nov 22 03:54:51 2012
New Revision: 243387
URL: http://svnweb.freebsd.org/changeset/base/243387

Log:
  Use %u for unsigned serial number

Modified:
  head/sys/dev/mmc/mmc.c

Modified: head/sys/dev/mmc/mmc.c
==
--- head/sys/dev/mmc/mmc.c  Thu Nov 22 03:45:14 2012(r243386)
+++ head/sys/dev/mmc/mmc.c  Thu Nov 22 03:54:51 2012(r243387)
@@ -878,7 +878,7 @@ mmc_format_card_id_string(struct mmc_iva
else
snprintf(oidstr, sizeof(oidstr), "0x%04x", ivar->cid.oid);
snprintf(ivar->card_id_string, sizeof(ivar->card_id_string),
-   "%s%s %s %d.%d SN %d MFG %02d/%04d by %d %s",
+   "%s%s %s %d.%d SN %u MFG %02d/%04d by %d %s",
ivar->mode == mode_sd ? "SD" : "MMC", ivar->high_cap ? "HC" : "",
ivar->cid.pnm, ivar->cid.prv >> 4, ivar->cid.prv & 0x0f,
ivar->cid.psn, ivar->cid.mdt_month, ivar->cid.mdt_year,
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r243392 - head/share/mk

2012-11-21 Thread Simon J. Gerraty
Author: sjg
Date: Thu Nov 22 04:50:42 2012
New Revision: 243392
URL: http://svnweb.freebsd.org/changeset/base/243392

Log:
  INSTALL_AS_USER: output of id -un will never match 0 so use id -u
  and USER for BINOWN etc.
  
  Approved by:  marcel (mentor)

Modified:
  head/share/mk/bsd.own.mk

Modified: head/share/mk/bsd.own.mk
==
--- head/share/mk/bsd.own.mkThu Nov 22 04:17:32 2012(r243391)
+++ head/share/mk/bsd.own.mkThu Nov 22 04:50:42 2012(r243392)
@@ -678,11 +678,14 @@ CTFCONVERT_CMD=   @:
 .endif 
 
 .if ${MK_INSTALL_AS_USER} != "no"
-_uid!= id -un
+_uid!= id -u
 .if ${_uid} != 0
+.if !defined(USER)
+USER!= id -un
+.endif
 _gid!= id -gn
 .for x in BIN CONF DOC INFO KMOD LIB MAN NLS SHARE
-$xOWN= ${_uid}
+$xOWN= ${USER}
 $xGRP= ${_gid}
 .endfor
 .endif
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r243393 - head/share/mk

2012-11-21 Thread Simon J. Gerraty
Author: sjg
Date: Thu Nov 22 04:53:09 2012
New Revision: 243393
URL: http://svnweb.freebsd.org/changeset/base/243393

Log:
  If .PARSEDIR is defined we have bmake, and CTFCONVERT_CMD can be empty.
  
  PR:   172440
  Approved by:  marcel (mentor)

Modified:
  head/share/mk/bsd.own.mk

Modified: head/share/mk/bsd.own.mk
==
--- head/share/mk/bsd.own.mkThu Nov 22 04:50:42 2012(r243392)
+++ head/share/mk/bsd.own.mkThu Nov 22 04:53:09 2012(r243393)
@@ -671,7 +671,7 @@ MK_${var}:= no
 
 .if ${MK_CTF} != "no"
 CTFCONVERT_CMD=${CTFCONVERT} ${CTFFLAGS} ${.TARGET}
-.elif defined(MAKE_VERSION) && ${MAKE_VERSION} >= 520300
+.elif defined(.PARSEDIR) || (defined(MAKE_VERSION) && ${MAKE_VERSION} >= 
520300)
 CTFCONVERT_CMD=
 .else
 CTFCONVERT_CMD=@:
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r243395 - vendor-sys/illumos/dist/common/zfs vendor-sys/illumos/dist/uts/common/fs/zfs vendor/illumos/dist/man/man1m

2012-11-21 Thread Martin Matuska
Author: mm
Date: Thu Nov 22 06:45:28 2012
New Revision: 243395
URL: http://svnweb.freebsd.org/changeset/base/243395

Log:
  Update vendor/illumos/dist and vendor-sys/illumos/dist
  to illumos-gate 13889:a67716f16746
  (illumos zfs issue #3254)

Modified:
  vendor-sys/illumos/dist/common/zfs/zfs_prop.c
  vendor-sys/illumos/dist/uts/common/fs/zfs/zfs_vnops.c

Changes in other areas also in this revision:
Modified:
  vendor/illumos/dist/man/man1m/zfs.1m

Modified: vendor-sys/illumos/dist/common/zfs/zfs_prop.c
==
--- vendor-sys/illumos/dist/common/zfs/zfs_prop.c   Thu Nov 22 05:48:29 
2012(r243394)
+++ vendor-sys/illumos/dist/common/zfs/zfs_prop.c   Thu Nov 22 06:45:28 
2012(r243395)
@@ -109,6 +109,7 @@ zfs_prop_init(void)
{ "discard",ZFS_ACL_DISCARD },
{ "groupmask",  ZFS_ACL_GROUPMASK },
{ "passthrough", ZFS_ACL_PASSTHROUGH },
+   { "restricted", ZFS_ACL_RESTRICTED },
{ NULL }
};
 
@@ -217,7 +218,8 @@ zfs_prop_init(void)
"hidden | visible", "SNAPDIR", snapdir_table);
zprop_register_index(ZFS_PROP_ACLMODE, "aclmode", ZFS_ACL_DISCARD,
PROP_INHERIT, ZFS_TYPE_FILESYSTEM,
-   "discard | groupmask | passthrough", "ACLMODE", acl_mode_table);
+   "discard | groupmask | passthrough | restricted", "ACLMODE",
+   acl_mode_table);
zprop_register_index(ZFS_PROP_ACLINHERIT, "aclinherit",
ZFS_ACL_RESTRICTED, PROP_INHERIT, ZFS_TYPE_FILESYSTEM,
"discard | noallow | restricted | passthrough | passthrough-x",

Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/zfs_vnops.c
==
--- vendor-sys/illumos/dist/uts/common/fs/zfs/zfs_vnops.c   Thu Nov 22 
05:48:29 2012(r243394)
+++ vendor-sys/illumos/dist/uts/common/fs/zfs/zfs_vnops.c   Thu Nov 22 
06:45:28 2012(r243395)
@@ -2982,6 +2982,12 @@ top:
uint64_t acl_obj;
new_mode = (pmode & S_IFMT) | (vap->va_mode & ~S_IFMT);
 
+   if (zp->z_zfsvfs->z_acl_mode == ZFS_ACL_RESTRICTED &&
+   !(zp->z_pflags & ZFS_ACL_TRIVIAL)) {
+   err = EPERM;
+   goto out;
+   }
+
if (err = zfs_acl_chmod_setattr(zp, &aclp, new_mode))
goto out;
 
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r243395 - vendor-sys/illumos/dist/common/zfs vendor-sys/illumos/dist/uts/common/fs/zfs vendor/illumos/dist/man/man1m

2012-11-21 Thread Martin Matuska
Author: mm
Date: Thu Nov 22 06:45:28 2012
New Revision: 243395
URL: http://svnweb.freebsd.org/changeset/base/243395

Log:
  Update vendor/illumos/dist and vendor-sys/illumos/dist
  to illumos-gate 13889:a67716f16746
  (illumos zfs issue #3254)

Modified:
  vendor/illumos/dist/man/man1m/zfs.1m

Changes in other areas also in this revision:
Modified:
  vendor-sys/illumos/dist/common/zfs/zfs_prop.c
  vendor-sys/illumos/dist/uts/common/fs/zfs/zfs_vnops.c

Modified: vendor/illumos/dist/man/man1m/zfs.1m
==
--- vendor/illumos/dist/man/man1m/zfs.1mThu Nov 22 05:48:29 2012
(r243394)
+++ vendor/illumos/dist/man/man1m/zfs.1mThu Nov 22 06:45:28 2012
(r243395)
@@ -830,7 +830,7 @@ mode from the application.
 .sp
 .ne 2
 .na
-\fB\fBaclmode\fR=\fBdiscard\fR | \fBgroupmask\fR | \fBpassthrough\fR\fR
+\fB\fBaclmode\fR=\fBdiscard\fR | \fBgroupmask\fR | \fBpassthrough\fR\fR | 
\fBrestricted\fR\fR
 .ad
 .sp .6
 .RS 4n
@@ -839,10 +839,18 @@ an \fBaclmode\fR property of \fBdiscard\
 entries that do not represent the mode of the file. An \fBaclmode\fR property
 of \fBgroupmask\fR reduces permissions granted in all \fBALLOW\fR entries found
 in the \fBACL\fR such that they are no greater than the group permissions
-specified by \fBchmod\fR.  A file system with an \fBaclmode\fR property of
+specified by \fBchmod\fR(2).  A file system with an \fBaclmode\fR property of
 \fBpassthrough\fR indicates that no changes are made to the \fBACL\fR other
-than creating or updating the necessary \fBACL\fR entries to
-represent the new mode of the file or directory.
+than creating or updating the necessary \fBACL\fR entries to represent the new
+mode of the file or directory. An \fBaclmode\fR property of \fBrestricted\fR
+will cause the \fBchmod\fR(2) operation to return an error when used on any
+file or directory which has a non-trivial \fBACL\fR whose entries can not be
+represented by a mode. \fBchmod\fR(2) is required to change the set user ID,
+set group ID, or sticky bits on a file or directory, as they do not have
+equivalent \fBACL\fR entries. In order to use \fBchmod\fR(2) on a file or
+directory with a non-trivial \fBACL\fR when \fBaclmode\fR is set to
+\fBrestricted\fR, you must first remove all \fBACL\fR entries which do not
+represent the current mode.
 .RE
 
 .sp
@@ -3939,7 +3947,7 @@ Interface Stability   Committed
 \fBssh\fR(1), \fBiscsitadm\fR(1M), \fBmount\fR(1M), \fBshare\fR(1M),
 \fBsharemgr\fR(1M), \fBunshare\fR(1M), \fBzonecfg\fR(1M), \fBzpool\fR(1M),
 \fBchmod\fR(2), \fBstat\fR(2), \fBwrite\fR(2), \fBfsync\fR(3C),
-\fBdfstab\fR(4), \fBattributes\fR(5)
+\fBdfstab\fR(4), \fBacl\fR(5), \fBattributes\fR(5)
 .sp
 .LP
 See the \fBgzip\fR(1) man page, which is not part of the SunOS man page
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"