svn commit: r263479 - head/lib/libnv

2014-03-21 Thread Bryan Drewery
Author: bdrewery
Date: Fri Mar 21 15:30:31 2014
New Revision: 263479
URL: http://svnweb.freebsd.org/changeset/base/263479

Log:
  nv(3) was not in 10.0.
  
  It might be MFC'd to stable/10 for 10.1, but for now update the manual to
  avoid confusion on its availability.
  
  Discussed with:   pjd

Modified:
  head/lib/libnv/nv.3

Modified: head/lib/libnv/nv.3
==
--- head/lib/libnv/nv.3 Fri Mar 21 15:15:30 2014(r263478)
+++ head/lib/libnv/nv.3 Fri Mar 21 15:30:31 2014(r263479)
@@ -28,7 +28,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd October 8, 2013
+.Dd March 21, 2014
 .Dt NV 3
 .Os
 .Sh NAME
@@ -594,7 +594,7 @@ while ((name = nvlist_next(nvl, &type, &
 The
 .Nm libnv
 library appeared in
-.Fx 10.0 .
+.Fx 11.0 .
 .Sh AUTHORS
 .An -nosplit
 The
___
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: r263620 - in head: share/man/man9 sys/amd64/amd64 sys/arm/arm sys/cddl/compat/opensolaris/kern sys/cddl/contrib/opensolaris/uts/common/fs/zfs sys/compat/linprocfs sys/compat/linux sys/c...

2014-03-22 Thread Bryan Drewery
Author: bdrewery
Date: Sat Mar 22 10:26:09 2014
New Revision: 263620
URL: http://svnweb.freebsd.org/changeset/base/263620

Log:
  Rename global cnt to vm_cnt to avoid shadowing.
  
  To reduce the diff struct pcu.cnt field was not renamed, so
  PCPU_OP(cnt.field) is still used. pc_cnt and pcpu are also used in
  kvm(3) and vmstat(8). The goal was to not affect externally used KPI.
  
  Bump __FreeBSD_version_ in case some out-of-tree module/code relies on the
  the global cnt variable.
  
  Exp-run revealed no ports using it directly.
  
  No objection from:arch@
  Sponsored by: EMC / Isilon Storage Division

Modified:
  head/share/man/man9/memguard.9
  head/share/man/man9/vm_set_page_size.9
  head/sys/amd64/amd64/machdep.c
  head/sys/amd64/amd64/pmap.c
  head/sys/amd64/amd64/uma_machdep.c
  head/sys/arm/arm/machdep.c
  head/sys/arm/arm/pmap-v6.c
  head/sys/arm/arm/pmap.c
  head/sys/cddl/compat/opensolaris/kern/opensolaris_kmem.c
  head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c
  head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c
  head/sys/compat/linprocfs/linprocfs.c
  head/sys/compat/linux/linux_misc.c
  head/sys/compat/svr4/svr4_misc.c
  head/sys/fs/tmpfs/tmpfs_subr.c
  head/sys/i386/i386/machdep.c
  head/sys/i386/i386/pmap.c
  head/sys/i386/xen/pmap.c
  head/sys/ia64/ia64/machdep.c
  head/sys/ia64/ia64/uma_machdep.c
  head/sys/kern/init_main.c
  head/sys/kern/kern_malloc.c
  head/sys/kern/kern_mib.c
  head/sys/kern/vfs_bio.c
  head/sys/kern/vfs_subr.c
  head/sys/mips/mips/machdep.c
  head/sys/mips/mips/pmap.c
  head/sys/mips/mips/uma_machdep.c
  head/sys/ofed/drivers/infiniband/core/umem.c
  head/sys/ofed/drivers/infiniband/hw/mthca/mthca_memfree.c
  head/sys/pc98/pc98/machdep.c
  head/sys/powerpc/aim/machdep.c
  head/sys/powerpc/aim/uma_machdep.c
  head/sys/powerpc/booke/machdep.c
  head/sys/powerpc/booke/pmap.c
  head/sys/sparc64/sparc64/machdep.c
  head/sys/sparc64/sparc64/pmap.c
  head/sys/sparc64/sparc64/vm_machdep.c
  head/sys/sys/param.h
  head/sys/sys/vmmeter.h
  head/sys/vm/memguard.c
  head/sys/vm/swap_pager.c
  head/sys/vm/vm_glue.c
  head/sys/vm/vm_map.c
  head/sys/vm/vm_meter.c
  head/sys/vm/vm_mmap.c
  head/sys/vm/vm_object.c
  head/sys/vm/vm_page.c
  head/sys/vm/vm_pageout.c
  head/sys/vm/vm_param.h
  head/sys/vm/vm_phys.c
  head/sys/vm/vm_phys.h
  head/sys/vm/vm_radix.c
  head/sys/vm/vm_zeroidle.c
  head/sys/vm/vnode_pager.c

Modified: head/share/man/man9/memguard.9
==
--- head/share/man/man9/memguard.9  Sat Mar 22 09:23:13 2014
(r263619)
+++ head/share/man/man9/memguard.9  Sat Mar 22 10:26:09 2014
(r263620)
@@ -24,7 +24,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd October 21, 2011
+.Dd March 21, 2014
 .Dt MEMGUARD 9
 .Os
 .Sh NAME
@@ -129,7 +129,7 @@ memory
 .Nm
 is allowed to consume.
 The default is 10, so up to
-.Va cnt.v_page_count Ns /10
+.Va vm_cnt.v_page_count Ns /10
 pages can be used.
 .Nm
 will reserve

Modified: head/share/man/man9/vm_set_page_size.9
==
--- head/share/man/man9/vm_set_page_size.9  Sat Mar 22 09:23:13 2014
(r263619)
+++ head/share/man/man9/vm_set_page_size.9  Sat Mar 22 10:26:09 2014
(r263620)
@@ -26,7 +26,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd July 17, 2001
+.Dd March 21, 2014
 .Dt VM_SET_PAGE_SIZE 9
 .Os
 .Sh NAME
@@ -43,16 +43,16 @@ The
 .Fn vm_set_page_size
 function initializes the system page size.
 If
-.Va cnt.v_page_size
+.Va vm_cnt.v_page_size
 (see
 .In sys/vmmeter.h )
 equals 0,
 .Dv PAGE_SIZE
 is used; otherwise, the value stored in
-.Va cnt.v_page_size
+.Va vm_cnt.v_page_size
 is used.
 If
-.Va cnt.v_page_size
+.Va vm_cnt.v_page_size
 is not a power of two, the system will panic.
 .Pp
 .Fn vm_set_page_size

Modified: head/sys/amd64/amd64/machdep.c
==
--- head/sys/amd64/amd64/machdep.c  Sat Mar 22 09:23:13 2014
(r263619)
+++ head/sys/amd64/amd64/machdep.c  Sat Mar 22 10:26:09 2014
(r263620)
@@ -284,7 +284,7 @@ cpu_startup(dummy)
memsize = (uintmax_t)strtoul(sysenv, (char **)NULL, 10) << 10;
freeenv(sysenv);
}
-   if (memsize < ptoa((uintmax_t)cnt.v_free_count))
+   if (memsize < ptoa((uintmax_t)vm_cnt.v_free_count))
memsize = ptoa((uintmax_t)Maxmem);
printf("real memory  = %ju (%ju MB)\n", memsize, memsize >> 20);
realmem = atop(memsize);
@@ -311,8 +311,8 @@ cpu_startup(dummy)
vm_ksubmap_init(&kmi);
 
printf("avail memory = %ju (%ju MB)\n",
-   ptoa((uintmax_t)cnt.v_free_count),
-   ptoa((uintmax_t)cnt.v_free_count) / 1048576);
+   ptoa((uintmax_t)vm_cnt.v_free_count),
+   ptoa((uintmax_t)vm_cnt.v_free_count) / 1048576);
 
/*
 * Set up buffers, so they can be used to read disk labels.

Modified: h

svn commit: r263621 - stable/10/usr.sbin/pkg

2014-03-22 Thread Bryan Drewery
Author: bdrewery
Date: Sat Mar 22 10:40:04 2014
New Revision: 263621
URL: http://svnweb.freebsd.org/changeset/base/263621

Log:
  MFC r263180:
  
Fix ABI from /usr/local/etc/pkg.conf not being respected.

Modified:
  stable/10/usr.sbin/pkg/config.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/usr.sbin/pkg/config.c
==
--- stable/10/usr.sbin/pkg/config.c Sat Mar 22 10:26:09 2014
(r263620)
+++ stable/10/usr.sbin/pkg/config.c Sat Mar 22 10:40:04 2014
(r263621)
@@ -66,6 +66,7 @@ struct config_entry {
char *value;
STAILQ_HEAD(, config_value) *list;
bool envset;
+   bool main_only; /* Only set in pkg.conf. */
 };
 
 static struct config_entry c[] = {
@@ -76,6 +77,7 @@ static struct config_entry c[] = {
NULL,
NULL,
false,
+   false,
},
[ABI] = {
PKG_CONFIG_STRING,
@@ -84,6 +86,7 @@ static struct config_entry c[] = {
NULL,
NULL,
false,
+   true,
},
[MIRROR_TYPE] = {
PKG_CONFIG_STRING,
@@ -92,6 +95,7 @@ static struct config_entry c[] = {
NULL,
NULL,
false,
+   false,
},
[ASSUME_ALWAYS_YES] = {
PKG_CONFIG_BOOL,
@@ -100,6 +104,7 @@ static struct config_entry c[] = {
NULL,
NULL,
false,
+   true,
},
[SIGNATURE_TYPE] = {
PKG_CONFIG_STRING,
@@ -108,6 +113,7 @@ static struct config_entry c[] = {
NULL,
NULL,
false,
+   false,
},
[FINGERPRINTS] = {
PKG_CONFIG_STRING,
@@ -116,6 +122,7 @@ static struct config_entry c[] = {
NULL,
NULL,
false,
+   false,
},
[REPOS_DIR] = {
PKG_CONFIG_LIST,
@@ -124,6 +131,7 @@ static struct config_entry c[] = {
NULL,
NULL,
false,
+   true,
},
 };
 
@@ -597,6 +605,9 @@ config_parse(ucl_object_t *obj, pkg_conf
for (i = 0; i < CONFIG_SIZE; i++) {
if (c[i].envset)
continue;
+   /* Prevent overriding ABI, ASSUME_ALWAYS_YES, etc. */
+   if (conftype != CONFFILE_PKG && c[i].main_only == true)
+   continue;
switch (c[i].type) {
case PKG_CONFIG_LIST:
c[i].list = temp_config[i].list;
___
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: r263623 - stable/9/usr.sbin/pkg

2014-03-22 Thread Bryan Drewery
Author: bdrewery
Date: Sat Mar 22 10:44:42 2014
New Revision: 263623
URL: http://svnweb.freebsd.org/changeset/base/263623

Log:
  MFC r263180:
  
Fix ABI from /usr/local/etc/pkg.conf not being respected.

Modified:
  stable/9/usr.sbin/pkg/config.c
Directory Properties:
  stable/9/usr.sbin/pkg/   (props changed)

Modified: stable/9/usr.sbin/pkg/config.c
==
--- stable/9/usr.sbin/pkg/config.c  Sat Mar 22 10:42:01 2014
(r263622)
+++ stable/9/usr.sbin/pkg/config.c  Sat Mar 22 10:44:42 2014
(r263623)
@@ -64,6 +64,7 @@ struct config_entry {
char *value;
STAILQ_HEAD(, config_value) *list;
bool envset;
+   bool main_only; /* Only set in pkg.conf. */
 };
 
 static struct config_entry c[] = {
@@ -74,6 +75,7 @@ static struct config_entry c[] = {
NULL,
NULL,
false,
+   false,
},
[ABI] = {
PKG_CONFIG_STRING,
@@ -82,6 +84,7 @@ static struct config_entry c[] = {
NULL,
NULL,
false,
+   true,
},
[MIRROR_TYPE] = {
PKG_CONFIG_STRING,
@@ -90,6 +93,7 @@ static struct config_entry c[] = {
NULL,
NULL,
false,
+   false,
},
[ASSUME_ALWAYS_YES] = {
PKG_CONFIG_BOOL,
@@ -98,6 +102,7 @@ static struct config_entry c[] = {
NULL,
NULL,
false,
+   true,
},
[SIGNATURE_TYPE] = {
PKG_CONFIG_STRING,
@@ -106,6 +111,7 @@ static struct config_entry c[] = {
NULL,
NULL,
false,
+   false,
},
[FINGERPRINTS] = {
PKG_CONFIG_STRING,
@@ -114,6 +120,7 @@ static struct config_entry c[] = {
NULL,
NULL,
false,
+   false,
},
[REPOS_DIR] = {
PKG_CONFIG_LIST,
@@ -122,6 +129,7 @@ static struct config_entry c[] = {
NULL,
NULL,
false,
+   true,
},
 };
 
@@ -394,6 +402,9 @@ config_parse(ucl_object_t *obj, pkg_conf
for (i = 0; i < CONFIG_SIZE; i++) {
if (c[i].envset)
continue;
+   /* Prevent overriding ABI, ASSUME_ALWAYS_YES, etc. */
+   if (conftype != CONFFILE_PKG && c[i].main_only == true)
+   continue;
switch (c[i].type) {
case PKG_CONFIG_LIST:
c[i].list = temp_config[i].list;
___
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: r263624 - stable/10/usr.sbin/pkg

2014-03-22 Thread Bryan Drewery
Author: bdrewery
Date: Sat Mar 22 10:47:49 2014
New Revision: 263624
URL: http://svnweb.freebsd.org/changeset/base/263624

Log:
  MFC r263181:
  
Fix ASSUME_ALWAYS_YES not being parsed properly from config after UCL 
conversion.

Modified:
  stable/10/usr.sbin/pkg/config.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/usr.sbin/pkg/config.c
==
--- stable/10/usr.sbin/pkg/config.c Sat Mar 22 10:44:42 2014
(r263623)
+++ stable/10/usr.sbin/pkg/config.c Sat Mar 22 10:47:49 2014
(r263624)
@@ -594,6 +594,10 @@ config_parse(ucl_object_t *obj, pkg_conf
next);
}
break;
+   case PKG_CONFIG_BOOL:
+   temp_config[i].value =
+   strdup(ucl_object_toboolean(cur) ? "yes" : "no");
+   break;
default:
/* Normal string value. */
temp_config[i].value = strdup(ucl_object_tostring(cur));
___
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: r263625 - stable/9/usr.sbin/pkg

2014-03-22 Thread Bryan Drewery
Author: bdrewery
Date: Sat Mar 22 10:48:07 2014
New Revision: 263625
URL: http://svnweb.freebsd.org/changeset/base/263625

Log:
  MFC r263180:
  
Fix ABI from /usr/local/etc/pkg.conf not being respected.

Modified:
  stable/9/usr.sbin/pkg/config.c
Directory Properties:
  stable/9/usr.sbin/pkg/   (props changed)

Modified: stable/9/usr.sbin/pkg/config.c
==
--- stable/9/usr.sbin/pkg/config.c  Sat Mar 22 10:47:49 2014
(r263624)
+++ stable/9/usr.sbin/pkg/config.c  Sat Mar 22 10:48:07 2014
(r263625)
@@ -391,6 +391,10 @@ config_parse(ucl_object_t *obj, pkg_conf
next);
}
break;
+   case PKG_CONFIG_BOOL:
+   temp_config[i].value =
+   strdup(ucl_object_toboolean(cur) ? "yes" : "no");
+   break;
default:
/* Normal string value. */
temp_config[i].value = strdup(ucl_object_tostring(cur));
___
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: r263626 - stable/9/usr.sbin/pkg

2014-03-22 Thread Bryan Drewery
Author: bdrewery
Date: Sat Mar 22 10:53:30 2014
New Revision: 263626
URL: http://svnweb.freebsd.org/changeset/base/263626

Log:
  Revert r263625 to fix commit msg for blame

Modified:
  stable/9/usr.sbin/pkg/config.c
Directory Properties:
  stable/9/usr.sbin/pkg/   (props changed)

Modified: stable/9/usr.sbin/pkg/config.c
==
--- stable/9/usr.sbin/pkg/config.c  Sat Mar 22 10:48:07 2014
(r263625)
+++ stable/9/usr.sbin/pkg/config.c  Sat Mar 22 10:53:30 2014
(r263626)
@@ -391,10 +391,6 @@ config_parse(ucl_object_t *obj, pkg_conf
next);
}
break;
-   case PKG_CONFIG_BOOL:
-   temp_config[i].value =
-   strdup(ucl_object_toboolean(cur) ? "yes" : "no");
-   break;
default:
/* Normal string value. */
temp_config[i].value = strdup(ucl_object_tostring(cur));
___
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: r263627 - stable/9/usr.sbin/pkg

2014-03-22 Thread Bryan Drewery
Author: bdrewery
Date: Sat Mar 22 10:54:02 2014
New Revision: 263627
URL: http://svnweb.freebsd.org/changeset/base/263627

Log:
  MFC r263181:
  
Fix ASSUME_ALWAYS_YES not being parsed properly from config after UCL 
conversion.

Modified:
  stable/9/usr.sbin/pkg/config.c
Directory Properties:
  stable/9/usr.sbin/pkg/   (props changed)

Modified: stable/9/usr.sbin/pkg/config.c
==
--- stable/9/usr.sbin/pkg/config.c  Sat Mar 22 10:53:30 2014
(r263626)
+++ stable/9/usr.sbin/pkg/config.c  Sat Mar 22 10:54:02 2014
(r263627)
@@ -391,6 +391,10 @@ config_parse(ucl_object_t *obj, pkg_conf
next);
}
break;
+   case PKG_CONFIG_BOOL:
+   temp_config[i].value =
+   strdup(ucl_object_toboolean(cur) ? "yes" : "no");
+   break;
default:
/* Normal string value. */
temp_config[i].value = strdup(ucl_object_tostring(cur));
___
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: r263638 - head/usr.sbin/bsdinstall/scripts

2014-03-22 Thread Bryan Drewery
Author: bdrewery
Date: Sat Mar 22 15:59:26 2014
New Revision: 263638
URL: http://svnweb.freebsd.org/changeset/base/263638

Log:
  Create a root dataset so that /root is outside of the boot environment.
  
  Discussed with:   dteske on sysinstall@
  MFC after:1 month

Modified:
  head/usr.sbin/bsdinstall/scripts/zfsboot

Modified: head/usr.sbin/bsdinstall/scripts/zfsboot
==
--- head/usr.sbin/bsdinstall/scripts/zfsbootSat Mar 22 15:59:18 2014
(r263637)
+++ head/usr.sbin/bsdinstall/scripts/zfsbootSat Mar 22 15:59:26 2014
(r263638)
@@ -129,6 +129,8 @@ f_isset ZFSBOOT_DATASETS || ZFSBOOT_DATA
# Home directories separated so they are common to all BEs
/usr/home   # NB: /home is a symlink to /usr/home
 
+   /root   mountpoint=/root
+
# Ports tree
/usr/ports  compression=lz4,setuid=off
 
___
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: r263650 - head/usr.sbin/pkg

2014-03-22 Thread Bryan Drewery
Author: bdrewery
Date: Sat Mar 22 22:20:43 2014
New Revision: 263650
URL: http://svnweb.freebsd.org/changeset/base/263650

Log:
  Fix build with libucl 20140321

Modified:
  head/usr.sbin/pkg/Makefile

Modified: head/usr.sbin/pkg/Makefile
==
--- head/usr.sbin/pkg/Makefile  Sat Mar 22 18:24:44 2014(r263649)
+++ head/usr.sbin/pkg/Makefile  Sat Mar 22 22:20:43 2014(r263650)
@@ -8,7 +8,7 @@ CFLAGS+=-I${.CURDIR}/../../contrib/libuc
 .PATH: ${.CURDIR}/../../contrib/libucl/include
 DPADD= ${LIBARCHIVE} ${LIBELF} ${LIBFETCH} ${LIBUCL} ${LIBSBUF} ${LIBSSL} \
${LIBCRYPTO}
-LDADD= -larchive -lelf -lfetch -lucl -lsbuf -lssl -lcrypto
+LDADD= -larchive -lelf -lfetch -lucl -lsbuf -lssl -lcrypto -lm
 USEPRIVATELIB= ucl
 
 .include 
___
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: r263686 - head/usr.sbin/pkg

2014-03-24 Thread Bryan Drewery
Author: bdrewery
Date: Mon Mar 24 13:13:52 2014
New Revision: 263686
URL: http://svnweb.freebsd.org/changeset/base/263686

Log:
  Add missing LIBM to DPADD from r263650
  
  Reported by:  jilles

Modified:
  head/usr.sbin/pkg/Makefile

Modified: head/usr.sbin/pkg/Makefile
==
--- head/usr.sbin/pkg/Makefile  Mon Mar 24 12:41:00 2014(r263685)
+++ head/usr.sbin/pkg/Makefile  Mon Mar 24 13:13:52 2014(r263686)
@@ -7,7 +7,7 @@ MAN=pkg.7
 CFLAGS+=-I${.CURDIR}/../../contrib/libucl/include
 .PATH: ${.CURDIR}/../../contrib/libucl/include
 DPADD= ${LIBARCHIVE} ${LIBELF} ${LIBFETCH} ${LIBUCL} ${LIBSBUF} ${LIBSSL} \
-   ${LIBCRYPTO}
+   ${LIBCRYPTO} ${LIBM}
 LDADD= -larchive -lelf -lfetch -lucl -lsbuf -lssl -lcrypto -lm
 USEPRIVATELIB= ucl
 
___
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: r263768 - head/usr.sbin/bsdinstall/scripts

2014-03-26 Thread Bryan Drewery
Author: bdrewery
Date: Wed Mar 26 13:41:30 2014
New Revision: 263768
URL: http://svnweb.freebsd.org/changeset/base/263768

Log:
  Revert r263638 (create /root dataset) for now as it breaks install and needs
  more work in cases such as single-user mode.

Modified:
  head/usr.sbin/bsdinstall/scripts/zfsboot

Modified: head/usr.sbin/bsdinstall/scripts/zfsboot
==
--- head/usr.sbin/bsdinstall/scripts/zfsbootWed Mar 26 10:17:17 2014
(r263767)
+++ head/usr.sbin/bsdinstall/scripts/zfsbootWed Mar 26 13:41:30 2014
(r263768)
@@ -129,8 +129,6 @@ f_isset ZFSBOOT_DATASETS || ZFSBOOT_DATA
# Home directories separated so they are common to all BEs
/usr/home   # NB: /home is a symlink to /usr/home
 
-   /root   mountpoint=/root
-
# Ports tree
/usr/ports  compression=lz4,setuid=off
 
___
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: r263812 - head/share/man/man7

2014-03-27 Thread Bryan Drewery
Author: bdrewery
Date: Thu Mar 27 11:12:35 2014
New Revision: 263812
URL: http://svnweb.freebsd.org/changeset/base/263812

Log:
  Update build(7) with LOCAL_* vars
  
  PR:   docs/178286
  Submitted by: Garrett Cooper 
  Sponsored by: EMC / Isilon Storage Division
  MFC after:1 week

Modified:
  head/share/man/man7/build.7

Modified: head/share/man/man7/build.7
==
--- head/share/man/man7/build.7 Thu Mar 27 11:10:13 2014(r263811)
+++ head/share/man/man7/build.7 Thu Mar 27 11:12:35 2014(r263812)
@@ -24,7 +24,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd October 10, 2012
+.Dd March 27, 2014
 .Dt BUILD 7
 .Os
 .Sh NAME
@@ -411,8 +411,25 @@ then
 is set to the value of
 .Va KERNFAST .
 .It Va LOCAL_DIRS
-If set, this variable supplies a list of additional directories to
-build, relative to the root of the source tree.
+If set, this variable supplies a list of additional directories relative to
+the root of the source tree to build as part of the
+.Cm everything
+target.
+.It Va LOCAL_LIB_DIRS
+If set, this variable supplies a list of additional directories relative to
+the root of the source tree to build as part of the
+.Cm libraries
+target.
+.It Va LOCAL_MTREE
+If set, this variable supplies a list of additional mtrees relative to the
+root of the source tree to use as part of the
+.Cm hierarchy
+target.
+.It Va LOCAL_TOOL_DIRS
+If set, this variable supplies a list of additional directories relative to
+the root of the source tree to build as part of the
+.Cm build-tools
+target.
 .It Va PORTS_MODULES
 A list of ports with kernel modules that should be built and installed
 as part of the
___
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: r263778 - in head: bin lib lib/clang sbin share/mk usr.bin usr.sbin

2014-03-27 Thread Bryan Drewery

On 2014-03-27 10:39, David Chisnall wrote:

On 26 Mar 2014, at 22:30, Dimitry Andric  wrote:

 Add a SUBDIR_PARALLEL option to bsd.subdir.mk, to allow make to 
process

 all the SUBDIR entries in parallel, instead of serially.  Apply this
 option to a selected number of Makefiles, which can greatly speed up 
the

 build on multi-core machines, when using make -j.


THANK YOU!  That's really excellent.  We can probably parallelise
pretty much all of usr.lib and usr.bin as well, but going from using 8
cores to 17 is a very nice improvement.  This should help tinderbox /
Jenkins build a LOT!

David


I'll do some wider tests on the portmgr boxes. We have some 32 cpu 
systems.


--
Regards,
Bryan Drewery
___
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: r263879 - head/usr.bin/kdump

2014-03-28 Thread Bryan Drewery
Author: bdrewery
Date: Fri Mar 28 16:11:20 2014
New Revision: 263879
URL: http://svnweb.freebsd.org/changeset/base/263879

Log:
  Add `-S' to display syscall numbers in the output as well.
  
  This is useful for debugging compat modules.
  
  Sponsored by: EMC / Isilon Storage Division
  Obtained from:Isilon OneFS (based on work by Jeff Hughes)
  MFC after:2 weeks

Modified:
  head/usr.bin/kdump/kdump.1
  head/usr.bin/kdump/kdump.c

Modified: head/usr.bin/kdump/kdump.1
==
--- head/usr.bin/kdump/kdump.1  Fri Mar 28 16:07:27 2014(r263878)
+++ head/usr.bin/kdump/kdump.1  Fri Mar 28 16:11:20 2014(r263879)
@@ -28,7 +28,7 @@
 .\"@(#)kdump.1 8.1 (Berkeley) 6/6/93
 .\" $FreeBSD$
 .\"
-.Dd June 4, 2012
+.Dd March 28, 2014
 .Dt KDUMP 1
 .Os
 .Sh NAME
@@ -36,7 +36,7 @@
 .Nd display kernel trace data
 .Sh SYNOPSIS
 .Nm
-.Op Fl dEnlHRsTA
+.Op Fl dEnlHRSsTA
 .Op Fl f Ar trfile
 .Op Fl m Ar maxdata
 .Op Fl p Ar pid
@@ -95,6 +95,8 @@ Display relative timestamps (time since 
 .It Fl r
 When decoding STRU records, display structure members such as UIDs,
 GIDs, dates etc. symbolically instead of numerically.
+.It Fl S
+Display system call numbers.
 .It Fl s
 Suppress display of I/O data.
 .It Fl T

Modified: head/usr.bin/kdump/kdump.c
==
--- head/usr.bin/kdump/kdump.c  Fri Mar 28 16:07:27 2014(r263878)
+++ head/usr.bin/kdump/kdump.c  Fri Mar 28 16:11:20 2014(r263879)
@@ -123,7 +123,7 @@ void ioctlname(unsigned long, int);
 #defineTIMESTAMP_RELATIVE  0x4
 
 int timestamp, decimal, fancy = 1, suppressdata, tail, threads, maxdata,
-resolv = 0, abiflag = 0;
+resolv = 0, abiflag = 0, syscallno = 0;
 const char *tracefile = DEF_TRACEFILE;
 struct ktr_header ktr_header;
 
@@ -261,7 +261,7 @@ main(int argc, char *argv[])
 
timestamp = TIMESTAMP_NONE;
 
-   while ((ch = getopt(argc,argv,"f:dElm:np:AHRrsTt:")) != -1)
+   while ((ch = getopt(argc,argv,"f:dElm:np:AHRrSsTt:")) != -1)
switch (ch) {
case 'A':
abiflag = 1;
@@ -287,6 +287,9 @@ main(int argc, char *argv[])
case 'r':
resolv = 1;
break;
+   case 'S':
+   syscallno = 1;
+   break;
case 's':
suppressdata = 1;
break;
@@ -678,8 +681,11 @@ ktrsyscall(struct ktr_syscall *ktr, u_in
if ((flags != 0 && ((flags & SV_ABI_MASK) != SV_ABI_FREEBSD)) ||
(ktr->ktr_code >= nsyscalls || ktr->ktr_code < 0))
printf("[%d]", ktr->ktr_code);
-   else
+   else {
printf("%s", syscallnames[ktr->ktr_code]);
+   if (syscallno)
+   printf("[%d]", ktr->ktr_code);
+   }
ip = &ktr->ktr_args[0];
if (narg) {
char c = '(';
@@ -1271,8 +1277,12 @@ ktrsysret(struct ktr_sysret *ktr, u_int 
if ((flags != 0 && ((flags & SV_ABI_MASK) != SV_ABI_FREEBSD)) ||
(code >= nsyscalls || code < 0))
printf("[%d] ", code);
-   else
-   printf("%s ", syscallnames[code]);
+   else {
+   printf("%s", syscallnames[code]);
+   if (syscallno)
+   printf("[%d]", code);
+   printf(" ");
+   }
 
if (error == 0) {
if (fancy) {
@@ -1910,8 +1920,11 @@ linux_ktrsyscall(struct ktr_syscall *ktr
 
if (ktr->ktr_code >= nlinux_syscalls || ktr->ktr_code < 0)
printf("[%d]", ktr->ktr_code);
-   else
+   else {
printf("%s", linux_syscallnames[ktr->ktr_code]);
+   if (syscallno)
+   printf("[%d]", ktr->ktr_code);
+   }
ip = &ktr->ktr_args[0];
if (narg) {
char c = '(';
@@ -1931,8 +1944,12 @@ linux_ktrsysret(struct ktr_sysret *ktr)
 
if (code >= nlinux_syscalls || code < 0)
printf("[%d] ", code);
-   else
-   printf("%s ", linux_syscallnames[code]);
+   else {
+   printf("%s", linux_syscallnames[code]);
+   if (syscallno)
+   printf("[%d]", code);
+   printf(" ");
+   }
 
if (error == 0) {
if (fancy) {
@@ -1965,7 +1982,7 @@ linux_ktrsysret(struct ktr_sysret *ktr)
 void
 usage(void)
 {
-   fprintf(stderr, "usage: kdump [-dEnlHRrsTA] [-f trfile] "
+   fprintf(stderr, "usage: kdump [-dEnlHRrSsTA] [-f trfile] "
"[-m maxdata] [-p pid] [-t trstr]\n");
exit(1);
 }
___
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

svn commit: r263937 - head/etc/pkg

2014-03-30 Thread Bryan Drewery
Author: bdrewery
Date: Sun Mar 30 15:24:17 2014
New Revision: 263937
URL: http://svnweb.freebsd.org/changeset/base/263937

Log:
  Give hint on how to disable the default repository.
  
  Discussed with:   bapt
  MFC after:instantly (preparing EN)

Modified:
  head/etc/pkg/FreeBSD.conf

Modified: head/etc/pkg/FreeBSD.conf
==
--- head/etc/pkg/FreeBSD.conf   Sun Mar 30 15:22:36 2014(r263936)
+++ head/etc/pkg/FreeBSD.conf   Sun Mar 30 15:24:17 2014(r263937)
@@ -1,4 +1,12 @@
 # $FreeBSD$
+#
+# To disable this repository, instead of modifying or removing this file,
+# create a /usr/local/etc/pkg/repos/FreeBSD.conf file:
+#
+#   mkdir -p /usr/local/etc/pkg/repos
+#   echo "FreeBSD: { enabled: no }" > /usr/local/etc/pkg/repos/FreeBSD.conf
+#
+
 FreeBSD: {
   url: "pkg+http://pkg.FreeBSD.org/${ABI}/latest";,
   mirror_type: "srv",
___
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: r263938 - stable/10/etc/pkg

2014-03-30 Thread Bryan Drewery
Author: bdrewery
Date: Sun Mar 30 15:29:54 2014
New Revision: 263938
URL: http://svnweb.freebsd.org/changeset/base/263938

Log:
  MFC r263937:
  
Give hint on how to disable the default repository.

Modified:
  stable/10/etc/pkg/FreeBSD.conf
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/etc/pkg/FreeBSD.conf
==
--- stable/10/etc/pkg/FreeBSD.conf  Sun Mar 30 15:24:17 2014
(r263937)
+++ stable/10/etc/pkg/FreeBSD.conf  Sun Mar 30 15:29:54 2014
(r263938)
@@ -1,4 +1,12 @@
 # $FreeBSD$
+#
+# To disable this repository, instead of modifying or removing this file,
+# create a /usr/local/etc/pkg/repos/FreeBSD.conf file:
+#
+#   mkdir -p /usr/local/etc/pkg/repos
+#   echo "FreeBSD: { enabled: no }" > /usr/local/etc/pkg/repos/FreeBSD.conf
+#
+
 FreeBSD: {
   url: "pkg+http://pkg.FreeBSD.org/${ABI}/latest";,
   mirror_type: "srv",
___
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: r263939 - stable/9/etc/pkg

2014-03-30 Thread Bryan Drewery
Author: bdrewery
Date: Sun Mar 30 15:30:33 2014
New Revision: 263939
URL: http://svnweb.freebsd.org/changeset/base/263939

Log:
  MFC r263937:
  
Give hint on how to disable the default repository.

Modified:
  stable/9/etc/pkg/FreeBSD.conf
Directory Properties:
  stable/9/etc/   (props changed)

Modified: stable/9/etc/pkg/FreeBSD.conf
==
--- stable/9/etc/pkg/FreeBSD.conf   Sun Mar 30 15:29:54 2014
(r263938)
+++ stable/9/etc/pkg/FreeBSD.conf   Sun Mar 30 15:30:33 2014
(r263939)
@@ -1,4 +1,12 @@
 # $FreeBSD$
+#
+# To disable this repository, instead of modifying or removing this file,
+# create a /usr/local/etc/pkg/repos/FreeBSD.conf file:
+#
+#   mkdir -p /usr/local/etc/pkg/repos
+#   echo "FreeBSD: { enabled: no }" > /usr/local/etc/pkg/repos/FreeBSD.conf
+#
+
 FreeBSD: {
   url: "pkg+http://pkg.FreeBSD.org/${ABI}/latest";,
   mirror_type: "srv",
___
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: r263941 - stable/10/sys/kern

2014-03-30 Thread Bryan Drewery
Author: bdrewery
Date: Sun Mar 30 16:48:04 2014
New Revision: 263941
URL: http://svnweb.freebsd.org/changeset/base/263941

Log:
  MFC r263129:
  
Combine similar code from vprintf(9) and log(9).

Modified:
  stable/10/sys/kern/subr_prf.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/kern/subr_prf.c
==
--- stable/10/sys/kern/subr_prf.c   Sun Mar 30 16:04:47 2014
(r263940)
+++ stable/10/sys/kern/subr_prf.c   Sun Mar 30 16:48:04 2014
(r263941)
@@ -248,23 +248,18 @@ ttyprintf(struct tty *tp, const char *fm
return (retval);
 }
 
-/*
- * Log writes to the log buffer, and guarantees not to sleep (so can be
- * called by interrupt routines).  If there is no process reading the
- * log yet, it writes to the console also.
- */
-void
-log(int level, const char *fmt, ...)
+static int
+_vprintf(int level, int flags, const char *fmt, va_list ap)
 {
-   va_list ap;
struct putchar_arg pca;
+   int retval;
 #ifdef PRINTF_BUFR_SIZE
char bufr[PRINTF_BUFR_SIZE];
 #endif
 
pca.tty = NULL;
pca.pri = level;
-   pca.flags = log_open ? TOLOG : TOCONS;
+   pca.flags = flags;
 #ifdef PRINTF_BUFR_SIZE
pca.p_bufr = bufr;
pca.p_next = pca.p_bufr;
@@ -272,12 +267,11 @@ log(int level, const char *fmt, ...)
pca.remain = sizeof(bufr);
*pca.p_next = '\0';
 #else
+   /* Don't buffer console output. */
pca.p_bufr = NULL;
 #endif
 
-   va_start(ap, fmt);
-   kvprintf(fmt, putchar, &pca, 10, ap);
-   va_end(ap);
+   retval = kvprintf(fmt, putchar, &pca, 10, ap);
 
 #ifdef PRINTF_BUFR_SIZE
/* Write any buffered console/log output: */
@@ -289,6 +283,24 @@ log(int level, const char *fmt, ...)
cnputs(pca.p_bufr);
}
 #endif
+
+   return (retval);
+}
+
+/*
+ * Log writes to the log buffer, and guarantees not to sleep (so can be
+ * called by interrupt routines).  If there is no process reading the
+ * log yet, it writes to the console also.
+ */
+void
+log(int level, const char *fmt, ...)
+{
+   va_list ap;
+
+   va_start(ap, fmt);
+   (void)_vprintf(level, log_open ? TOLOG : TOCONS, fmt, ap);
+   va_end(ap);
+
msgbuftrigger = 1;
 }
 
@@ -374,35 +386,9 @@ printf(const char *fmt, ...)
 int
 vprintf(const char *fmt, va_list ap)
 {
-   struct putchar_arg pca;
int retval;
-#ifdef PRINTF_BUFR_SIZE
-   char bufr[PRINTF_BUFR_SIZE];
-#endif
 
-   pca.tty = NULL;
-   pca.flags = TOCONS | TOLOG;
-   pca.pri = -1;
-#ifdef PRINTF_BUFR_SIZE
-   pca.p_bufr = bufr;
-   pca.p_next = pca.p_bufr;
-   pca.n_bufr = sizeof(bufr);
-   pca.remain = sizeof(bufr);
-   *pca.p_next = '\0';
-#else
-   /* Don't buffer console output. */
-   pca.p_bufr = NULL;
-#endif
-
-   retval = kvprintf(fmt, putchar, &pca, 10, ap);
-
-#ifdef PRINTF_BUFR_SIZE
-   /* Write any buffered console/log output: */
-   if (*pca.p_bufr != '\0') {
-   cnputs(pca.p_bufr);
-   msglogstr(pca.p_bufr, pca.pri, /*filter_cr*/ 1);
-   }
-#endif
+   retval = _vprintf(-1, TOCONS | TOLOG, fmt, ap);
 
if (!panicstr)
msgbuftrigger = 1;
___
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: r263942 - stable/9/sys/kern

2014-03-30 Thread Bryan Drewery
Author: bdrewery
Date: Sun Mar 30 16:49:17 2014
New Revision: 263942
URL: http://svnweb.freebsd.org/changeset/base/263942

Log:
  MFC r263129:
  
Combine similar code from vprintf(9) and log(9).

Modified:
  stable/9/sys/kern/subr_prf.c
Directory Properties:
  stable/9/sys/   (props changed)

Modified: stable/9/sys/kern/subr_prf.c
==
--- stable/9/sys/kern/subr_prf.cSun Mar 30 16:48:04 2014
(r263941)
+++ stable/9/sys/kern/subr_prf.cSun Mar 30 16:49:17 2014
(r263942)
@@ -241,23 +241,18 @@ ttyprintf(struct tty *tp, const char *fm
return (retval);
 }
 
-/*
- * Log writes to the log buffer, and guarantees not to sleep (so can be
- * called by interrupt routines).  If there is no process reading the
- * log yet, it writes to the console also.
- */
-void
-log(int level, const char *fmt, ...)
+static int
+_vprintf(int level, int flags, const char *fmt, va_list ap)
 {
-   va_list ap;
struct putchar_arg pca;
+   int retval;
 #ifdef PRINTF_BUFR_SIZE
char bufr[PRINTF_BUFR_SIZE];
 #endif
 
pca.tty = NULL;
pca.pri = level;
-   pca.flags = log_open ? TOLOG : TOCONS;
+   pca.flags = flags;
 #ifdef PRINTF_BUFR_SIZE
pca.p_bufr = bufr;
pca.p_next = pca.p_bufr;
@@ -265,12 +260,11 @@ log(int level, const char *fmt, ...)
pca.remain = sizeof(bufr);
*pca.p_next = '\0';
 #else
+   /* Don't buffer console output. */
pca.p_bufr = NULL;
 #endif
 
-   va_start(ap, fmt);
-   kvprintf(fmt, putchar, &pca, 10, ap);
-   va_end(ap);
+   retval = kvprintf(fmt, putchar, &pca, 10, ap);
 
 #ifdef PRINTF_BUFR_SIZE
/* Write any buffered console/log output: */
@@ -282,6 +276,24 @@ log(int level, const char *fmt, ...)
cnputs(pca.p_bufr);
}
 #endif
+
+   return (retval);
+}
+
+/*
+ * Log writes to the log buffer, and guarantees not to sleep (so can be
+ * called by interrupt routines).  If there is no process reading the
+ * log yet, it writes to the console also.
+ */
+void
+log(int level, const char *fmt, ...)
+{
+   va_list ap;
+
+   va_start(ap, fmt);
+   (void)_vprintf(level, log_open ? TOLOG : TOCONS, fmt, ap);
+   va_end(ap);
+
msgbuftrigger = 1;
 }
 
@@ -367,35 +379,9 @@ printf(const char *fmt, ...)
 int
 vprintf(const char *fmt, va_list ap)
 {
-   struct putchar_arg pca;
int retval;
-#ifdef PRINTF_BUFR_SIZE
-   char bufr[PRINTF_BUFR_SIZE];
-#endif
 
-   pca.tty = NULL;
-   pca.flags = TOCONS | TOLOG;
-   pca.pri = -1;
-#ifdef PRINTF_BUFR_SIZE
-   pca.p_bufr = bufr;
-   pca.p_next = pca.p_bufr;
-   pca.n_bufr = sizeof(bufr);
-   pca.remain = sizeof(bufr);
-   *pca.p_next = '\0';
-#else
-   /* Don't buffer console output. */
-   pca.p_bufr = NULL;
-#endif
-
-   retval = kvprintf(fmt, putchar, &pca, 10, ap);
-
-#ifdef PRINTF_BUFR_SIZE
-   /* Write any buffered console/log output: */
-   if (*pca.p_bufr != '\0') {
-   cnputs(pca.p_bufr);
-   msglogstr(pca.p_bufr, pca.pri, /*filter_cr*/ 1);
-   }
-#endif
+   retval = _vprintf(-1, TOCONS | TOLOG, fmt, ap);
 
if (!panicstr)
msgbuftrigger = 1;
___
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: r263943 - stable/10/sys/fs/tmpfs

2014-03-30 Thread Bryan Drewery
Author: bdrewery
Date: Sun Mar 30 16:51:12 2014
New Revision: 263943
URL: http://svnweb.freebsd.org/changeset/base/263943

Log:
  MFC r263130:
  
Fix -o size less than PAGE_SIZE resulting in SIZE_MAX being used.

Modified:
  stable/10/sys/fs/tmpfs/tmpfs_vfsops.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/fs/tmpfs/tmpfs_vfsops.c
==
--- stable/10/sys/fs/tmpfs/tmpfs_vfsops.c   Sun Mar 30 16:49:17 2014
(r263942)
+++ stable/10/sys/fs/tmpfs/tmpfs_vfsops.c   Sun Mar 30 16:51:12 2014
(r263943)
@@ -200,11 +200,13 @@ tmpfs_mount(struct mount *mp)
 * allowed to use, based on the maximum size the user passed in
 * the mount structure.  A value of zero is treated as if the
 * maximum available space was requested. */
-   if (size_max < PAGE_SIZE || size_max > OFF_MAX - PAGE_SIZE ||
+   if (size_max == 0 || size_max > OFF_MAX - PAGE_SIZE ||
(SIZE_MAX < OFF_MAX && size_max / PAGE_SIZE >= SIZE_MAX))
pages = SIZE_MAX;
-   else
+   else {
+   size_max = roundup(size_max, PAGE_SIZE);
pages = howmany(size_max, PAGE_SIZE);
+   }
MPASS(pages > 0);
 
if (nodes_max <= 3) {
___
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: r263944 - stable/9/sys/fs/tmpfs

2014-03-30 Thread Bryan Drewery
Author: bdrewery
Date: Sun Mar 30 16:56:36 2014
New Revision: 263944
URL: http://svnweb.freebsd.org/changeset/base/263944

Log:
  MFC r263130:
  
Fix -o size less than PAGE_SIZE resulting in SIZE_MAX being used.

Modified:
  stable/9/sys/fs/tmpfs/tmpfs_vfsops.c
Directory Properties:
  stable/9/sys/   (props changed)
  stable/9/sys/fs/   (props changed)

Modified: stable/9/sys/fs/tmpfs/tmpfs_vfsops.c
==
--- stable/9/sys/fs/tmpfs/tmpfs_vfsops.cSun Mar 30 16:51:12 2014
(r263943)
+++ stable/9/sys/fs/tmpfs/tmpfs_vfsops.cSun Mar 30 16:56:36 2014
(r263944)
@@ -237,11 +237,13 @@ tmpfs_mount(struct mount *mp)
 * allowed to use, based on the maximum size the user passed in
 * the mount structure.  A value of zero is treated as if the
 * maximum available space was requested. */
-   if (size_max < PAGE_SIZE || size_max > OFF_MAX - PAGE_SIZE ||
+   if (size_max == 0 || size_max > OFF_MAX - PAGE_SIZE ||
(SIZE_MAX < OFF_MAX && size_max / PAGE_SIZE >= SIZE_MAX))
pages = SIZE_MAX;
-   else
+   else {
+   size_max = roundup(size_max, PAGE_SIZE);
pages = howmany(size_max, PAGE_SIZE);
+   }
MPASS(pages > 0);
 
if (nodes_max <= 3) {
___
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: r263946 - stable/10/sys/fs/tmpfs

2014-03-30 Thread Bryan Drewery
Author: bdrewery
Date: Sun Mar 30 18:22:10 2014
New Revision: 263946
URL: http://svnweb.freebsd.org/changeset/base/263946

Log:
  MFC r263131,r263174,r263175:
  
Tmpfs readdir() redundant logic and code readability cleanup.
  
r263131:
  Cleanup redundant logic and add some comments to help explain how it works
  in lieu of potentially less clear code.
  
r263174:
  Rename cnt to maxcookies and change its use as the condition for when to
  lookup cookies to be less obscure.
  
r263175:
  Add missing FALLTHROUGH comment in tmpfs_dir_getdents for looking up '.'
  and '..'.

Modified:
  stable/10/sys/fs/tmpfs/tmpfs_subr.c
  stable/10/sys/fs/tmpfs/tmpfs_vnops.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/fs/tmpfs/tmpfs_subr.c
==
--- stable/10/sys/fs/tmpfs/tmpfs_subr.c Sun Mar 30 17:59:32 2014
(r263945)
+++ stable/10/sys/fs/tmpfs/tmpfs_subr.c Sun Mar 30 18:22:10 2014
(r263946)
@@ -348,6 +348,9 @@ tmpfs_dirent_hash(const char *name, u_in
 static __inline off_t
 tmpfs_dirent_cookie(struct tmpfs_dirent *de)
 {
+   if (de == NULL)
+   return (TMPFS_DIRCOOKIE_EOF);
+
MPASS(de->td_cookie >= TMPFS_DIRCOOKIE_MIN);
 
return (de->td_cookie);
@@ -1144,7 +1147,7 @@ tmpfs_dir_getdotdotdent(struct tmpfs_nod
  * error code if another error happens.
  */
 int
-tmpfs_dir_getdents(struct tmpfs_node *node, struct uio *uio, int cnt,
+tmpfs_dir_getdents(struct tmpfs_node *node, struct uio *uio, int maxcookies,
 u_long *cookies, int *ncookies)
 {
struct tmpfs_dir_cursor dc;
@@ -1155,25 +1158,33 @@ tmpfs_dir_getdents(struct tmpfs_node *no
TMPFS_VALIDATE_DIR(node);
 
off = 0;
+
+   /*
+* Lookup the node from the current offset.  The starting offset of
+* 0 will lookup both '.' and '..', and then the first real entry,
+* or EOF if there are none.  Then find all entries for the dir that
+* fit into the buffer.  Once no more entries are found (de == NULL),
+* the offset is set to TMPFS_DIRCOOKIE_EOF, which will cause the next
+* call to return 0.
+*/
switch (uio->uio_offset) {
case TMPFS_DIRCOOKIE_DOT:
error = tmpfs_dir_getdotdent(node, uio);
if (error != 0)
return (error);
uio->uio_offset = TMPFS_DIRCOOKIE_DOTDOT;
-   if (cnt != 0)
+   if (cookies != NULL)
cookies[(*ncookies)++] = off = uio->uio_offset;
+   /* FALLTHROUGH */
case TMPFS_DIRCOOKIE_DOTDOT:
error = tmpfs_dir_getdotdotdent(node, uio);
if (error != 0)
return (error);
de = tmpfs_dir_first(node, &dc);
-   if (de == NULL)
-   uio->uio_offset = TMPFS_DIRCOOKIE_EOF;
-   else
-   uio->uio_offset = tmpfs_dirent_cookie(de);
-   if (cnt != 0)
+   uio->uio_offset = tmpfs_dirent_cookie(de);
+   if (cookies != NULL)
cookies[(*ncookies)++] = off = uio->uio_offset;
+   /* EOF. */
if (de == NULL)
return (0);
break;
@@ -1183,7 +1194,7 @@ tmpfs_dir_getdents(struct tmpfs_node *no
de = tmpfs_dir_lookup_cookie(node, uio->uio_offset, &dc);
if (de == NULL)
return (EINVAL);
-   if (cnt != 0)
+   if (cookies != NULL)
off = tmpfs_dirent_cookie(de);
}
 
@@ -1251,25 +1262,19 @@ tmpfs_dir_getdents(struct tmpfs_node *no
error = uiomove(&d, d.d_reclen, uio);
if (error == 0) {
de = tmpfs_dir_next(node, &dc);
-   if (cnt != 0) {
-   if (de == NULL)
-   off = TMPFS_DIRCOOKIE_EOF;
-   else
-   off = tmpfs_dirent_cookie(de);
-   MPASS(*ncookies < cnt);
+   if (cookies != NULL) {
+   off = tmpfs_dirent_cookie(de);
+   MPASS(*ncookies < maxcookies);
cookies[(*ncookies)++] = off;
}
}
} while (error == 0 && uio->uio_resid > 0 && de != NULL);
 
-   /* Update the offset and cache. */
-   if (cnt == 0) {
-   if (de == NULL)
-   off = TMPFS_DIRCOOKIE_EOF;
-   else
-   off = tmpfs_dirent_cookie(de);
-   }
+   /* Skip setting off when using cookies as it is already done above. */
+   if (cookies == NULL)
+   off = tmpfs_dirent_cookie(de);
 
+ 

Re: svn commit: r263981 - in head: lib/libc/gen sys/kern sys/sys

2014-04-01 Thread Bryan Drewery

On 2014-03-31 20:24, Mateusz Guzik wrote:

Author: mjg
Date: Tue Apr  1 03:20:35 2014

New Revision: 263981
URL: http://svnweb.freebsd.org/changeset/base/263981

Log:
  Add a new errno: EMACS - Editor too big.

  Make a best-effort to detect that Emacs is about to executed and 
return

  the error.

  MFC after:1 week

Modified:
  head/lib/libc/gen/errlst.c
  head/sys/kern/kern_exec.c
  head/sys/sys/errno.h

Modified: lib/libc/gen/errlst.c
===
--- head/lib/libc/gen/errlst.c  (263980)
+++ head/lib/libc/gen/errlst.c  (263981)
@@ -155,6 +155,7 @@
"Not permitted in capability mode",   /* 94 - ECAPMODE */
"State not recoverable",  /* 95 - ENOTRECOVERABLE */
"Previous owner died",/* 96 - EOWNERDEAD */
+   "Editor too big", /* 97 - EMACS */
 };
 const int sys_nerr = sizeof(sys_errlist) / sizeof(sys_errlist[0]);

Modified: sys/kern/kern_exec.c
===
--- head/sys/kern/kern_exec.c   (263980)
+++ head/sys/kern/kern_exec.c   (263981)
@@ -337,6 +337,7 @@
int (*img_first)(struct image_params *);
struct pargs *oldargs = NULL, *newargs = NULL;
struct sigacts *oldsigacts, *newsigacts;
+   char *e;
 #ifdef KTRACE
struct vnode *tracevp = NULL;
struct ucred *tracecred = NULL;
@@ -418,6 +419,19 @@

SDT_PROBE(proc, kernel, , exec, args->fname, 0, 0, 0, 0 );

+   /*
+* A best-effort to check whether the file to be run is EMACS
+*/
+   if (args->fname != NULL) {
+   e = args->fname + strlen(args->fname);
+   while (e > args->fname && *e != '/')
+   e--;
+   if (strcasecmp(e, "/emacs") == 0) {
+   error = EMACS;
+   goto exec_fail;
+   }
+   }
+
 interpret:
if (args->fname != NULL) {
 #ifdef CAPABILITY_MODE
Modified: sys/sys/errno.h
===
--- head/sys/sys/errno.h(263980)
+++ head/sys/sys/errno.h(263981)
@@ -178,10 +178,11 @@
 #defineECAPMODE94  /* Not permitted in capability 
mode */
 #defineENOTRECOVERABLE 95  /* State not recoverable */
 #defineEOWNERDEAD  96  /* Previous owner died */
+#defineEMACS   97  /* Editor too big */
 #endif /* _POSIX_SOURCE */

 #ifndef _POSIX_SOURCE
-#defineELAST   96  /* Must be equal largest errno 
*/
+#defineELAST   97  /* Must be equal largest errno 
*/
 #endif /* _POSIX_SOURCE */

 #ifdef _KERNEL


Don't forget errno(2):

Index: lib/libc/sys/intro.2
===
--- lib/libc/sys/intro.2(revision 263940)
+++ lib/libc/sys/intro.2(working copy)
@@ -28,7 +28,7 @@
 .\" @(#)intro.28.5 (Berkeley) 2/27/95
 .\" $FreeBSD$
 .\"
-.Dd May 4, 2013
+.Dd April 1, 2014
 .Dt INTRO 2
 .Os
 .Sh NAME
@@ -474,6 +474,8 @@
 The state protected by a robust mutex is not recoverable.
 .It Er 96 EOWNERDEAD Em "Previous owner died" .
 The owner of a robust mutex terminated while holding the mutex lock.
+.It Er 97 EMACS Em "Editor too big" .
+Attempted to run EMACS.
 .El
 .Sh DEFINITIONS
 .Bl -tag -width Ds

--
Regards,
Bryan Drewery
___
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: r264027 - in head: release share/man/man7

2014-04-02 Thread Bryan Drewery

On 2014-04-02 11:23, Nikolai Lifanov wrote:

On 04/02/14 12:06, Glen Barber wrote:

On Wed, Apr 02, 2014 at 11:55:33AM -0400, Nikolai Lifanov wrote:

On 04/02/14 11:51, Glen Barber wrote:

On Wed, Apr 02, 2014 at 10:40:22AM -0500, Brooks Davis wrote:

On Tue, Apr 01, 2014 at 10:41:27PM +, Glen Barber wrote:

Author: gjb
Date: Tue Apr  1 22:41:26 2014
New Revision: 264027
URL: http://svnweb.freebsd.org/changeset/base/264027

Log:
  Add a new release build variable, WITH_COMPRESSED_IMAGES.

  When set to a non-empty value, the installation medium is
  compressed with gzip(1) as part of the 'install' target in
  the release/ directory.

  With gzip(1) compression, downloadable image are reduced in
  size quite significantly.  Build test against head@263927
  shows the following:

   bootonly.iso:64% smaller
   disc1.iso:   44% smaller
   memstick.img:47% smaller
   mini-memstick.img:   65% smaller
   dvd1.iso:untested

  This option is off by default, I would eventually like to
  turn it on by default, and remove the '-k' flag to gzip(1)
  so only compressed images are published on FTP.


I'd recommend testing xz compression as well.  With UFS images of a 
full
world the savings vs gzip are significant (more than 30% IIRC, but 
it's
need more than a year since I checked so I'm a bit unsure of the 
exact

numbers).



delphij also brought this up.

I have concerns with xz(1), since there was mention in IRC that 
Windows
users may have problems decompressing xz-compressed images.  So, 
gzip(1)

is used because it seems to be the more commonly-supported archive
mechanisms.

The benefit of xz(1) over gzip(1) was only 50M-ish.

  -rw-r--r--  1 root  wheel   601M Mar 28 20:18 disc1.iso
  -rw-r--r--  1 root  wheel   381M Mar 28 20:18 disc1.iso.bz2
  -rw-r--r--  1 root  wheel   392M Mar 28 20:18 disc1.iso.gz
  -rw-r--r--  1 root  wheel   348M Mar 28 20:18 disc1.iso.xz

Glen



How about 7zip (Windows program, not file format)? What would a 
Windows

user use that can decompress gzip and not xz? It was a problem around
~2007, but xz support is no longer rare or exotic.



I don't know, to be honest.  I have no Windows machines to test, so
I can only go by what I am told.

Glen



I just verified it with 7zip for Windows version 9.22. It extracts
.tar.xz archives and decompresses .xz images.

- Nikolai Lifanov


My concern was requiring a *specific* tool to extract the ISO. However I 
do see that Winzip and Winrar both now support XZ as well.


--
Regards,
Bryan Drewery
___
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: r264075 - stable/10/share/man/man7

2014-04-03 Thread Bryan Drewery
Author: bdrewery
Date: Thu Apr  3 14:47:36 2014
New Revision: 264075
URL: http://svnweb.freebsd.org/changeset/base/264075

Log:
  MFC r263812:
  
Update build(7) with LOCAL_* vars

Modified:
  stable/10/share/man/man7/build.7
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/share/man/man7/build.7
==
--- stable/10/share/man/man7/build.7Thu Apr  3 14:13:57 2014
(r264074)
+++ stable/10/share/man/man7/build.7Thu Apr  3 14:47:36 2014
(r264075)
@@ -24,7 +24,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd October 10, 2012
+.Dd March 27, 2014
 .Dt BUILD 7
 .Os
 .Sh NAME
@@ -411,8 +411,25 @@ then
 is set to the value of
 .Va KERNFAST .
 .It Va LOCAL_DIRS
-If set, this variable supplies a list of additional directories to
-build, relative to the root of the source tree.
+If set, this variable supplies a list of additional directories relative to
+the root of the source tree to build as part of the
+.Cm everything
+target.
+.It Va LOCAL_LIB_DIRS
+If set, this variable supplies a list of additional directories relative to
+the root of the source tree to build as part of the
+.Cm libraries
+target.
+.It Va LOCAL_MTREE
+If set, this variable supplies a list of additional mtrees relative to the
+root of the source tree to use as part of the
+.Cm hierarchy
+target.
+.It Va LOCAL_TOOL_DIRS
+If set, this variable supplies a list of additional directories relative to
+the root of the source tree to build as part of the
+.Cm build-tools
+target.
 .It Va PORTS_MODULES
 A list of ports with kernel modules that should be built and installed
 as part of the
___
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: r264042 - in head: include lib/libc/gen lib/libc/include lib/libc/stdlib

2014-04-04 Thread Bryan Drewery
On 4/4/2014 7:23 AM, Jordan Hubbard wrote:
> On Apr 4, 2014, at 4:59 PM, David Chisnall  wrote:
> 
>> I believe that libdispatch most likely won't be imported until there is an 
>> in-tree consumer, but it's in ports and there's nothing stopping ports 
>> depending on it if they want to use it...
> 
> I certainly get and even generally agree with that point of view.  It seems 
> like putting the cart before the horse to bring in any technology before 
> there is a use case demanding said technology, right?
> 
> Right.  However, I think there are also occasional exceptions to that rule.  
> The strlcpy() / strlcat() / … family of functions, for example.  Until they 
> existed (outside of OpenBSD), nobody really used them pervasively enough to 
> achieve their intended purpose (death to buffer overflows in string handling) 
> and it took bringing them in and essentially saying “see?  there!  use those 
> now please!” for adoption and conversion of existing string handling code to 
> eventually, over the course of years, become second nature.
> 
> I think libdispatch is in a very similar category, and you’ll just have to 
> trust me when I say that I’ve had the benefit of watching multiple years 
> worth of slow adoption work its magic there, too.  Without libdispatch, you 
> just use pthreads whenever you need to do something in the background.  
> Without libdispatch, you don’t write code (in libraries or applications) 
> which assumes any sort of run loop at all because, well, there isn’t one.  
> Without libdispatch, you still write careful and limited signal handling 
> functions because there’s no signal trampoline to save your butt if you try 
> to do to much in a signal handler.  I could go on at length!
> 
> Libdispatch (with blocks) is, in short, more akin to a programming idiom than 
> a library.  Without them, you simply write an entirely different style of 
> synchronous, multi-threaded code with mutex locks and pthread join and 
> cancellation points, yada yada yada.  Once libdispatch and blocks are part of 
> the runtime, you slowly leave the old style stuff behind because it’s 
> limited, painful and just nowhere near as sophisticated.  To paraphrase 
> something I heard from more than a few dozen software engineers over the 
> years:  “Libdispatch is the multithreaded programming paradigm I never knew I 
> always wanted.”
> 
> There’s a reason it’s been ported to everything from Windows to Android.  
> It’s hard to go back, once you have made the switch.
> 
> Back to my point, however:  I don’t think FreeBSD programmers are ever going 
> to embrace an idiomatic change of that nature (and it’s pretty significant) 
> until it is part of base, so there’s really a deadlock here.  What’s worse, I 
> also don’t think anyone in *BSD-land is writing code that’s particularly 
> event-aware (the lack of system-wide notifications kind of speaks to that) 
> largely *because* it’s a PITA to do that without a runloop or handy glue code 
> which makes it trivial, the alternative being to use a background thread that 
> tries to coordinate said events with the foreground and that’s just icky.   
> The end-result of this is that an entire somewhat more modern style of 
> programming, where things are more dynamic in the face of things changing on 
> the system, simply doesn’t happen at the OS level and that’s a shame, because 
> the OS *is* a dynamic environment, particularly in the mobile space.
> 
> I guess what I’m advocating is nothing less than a leap of faith?
> 
> - Jordan
> 

Respectfully, as a developer, why would I want to use libdispatch and
not libevent? Libevent looks far more portable.

When I bring up the libdispatch page, I get no sense that picking it for
my project makes sense. I'm not even clear what it is from looking at
the page.

When I pull up libevent's page, I get a much different picture right
away, "Currently, libevent supports /dev/poll, kqueue(2), event ports,
POSIX select(2), Windows select(), poll(2), and epoll(4)."

-- 
Regards,
Bryan Drewery



signature.asc
Description: OpenPGP digital signature


Re: svn commit: r264042 - in head: include lib/libc/gen lib/libc/include lib/libc/stdlib

2014-04-04 Thread Bryan Drewery
On 4/4/2014 7:41 AM, Jordan Hubbard wrote:
> 
> On Apr 4, 2014, at 5:31 PM, Bryan Drewery  wrote:
> 
>> Respectfully, as a developer, why would I want to use libdispatch and
>> not libevent? Libevent looks far more portable.
> 
> Equally respectfully, if you’re comparing libevent and libdispatch at all, 
> then you’re only getting about 10% of what libdispatch actually is.  The 
> event handling piece is really just a small fraction of it.  For a really 
> nice overview written by someone *not* from Apple, I recommend:  
> http://arstechnica.com/apple/2009/08/mac-os-x-10-6/12/
> 
> Libdispatch is also highly portable.  I don’t think there’s an OS flavor it 
> *hasn’t* been ported to at this point.
> 
> - Jordan
> 

Ah, thanks!

The homepage doesn't explain well, and the link to GCD on apple.com is
broken.

-- 
Regards,
Bryan Drewery



signature.asc
Description: OpenPGP digital signature


svn commit: r264142 - head/sys/geom/mirror

2014-04-04 Thread Bryan Drewery
Author: bdrewery
Date: Sat Apr  5 03:01:29 2014
New Revision: 264142
URL: http://svnweb.freebsd.org/changeset/base/264142

Log:
  Show error code when failing to destroy a mirror on delay
  
  Sponsored by: EMC / Isilon Storage Division
  MFC after:2 weeks

Modified:
  head/sys/geom/mirror/g_mirror.c

Modified: head/sys/geom/mirror/g_mirror.c
==
--- head/sys/geom/mirror/g_mirror.c Fri Apr  4 22:20:33 2014
(r264141)
+++ head/sys/geom/mirror/g_mirror.c Sat Apr  5 03:01:29 2014
(r264142)
@@ -2824,7 +2824,8 @@ g_mirror_destroy_delayed(void *arg, int 
G_MIRROR_DEBUG(1, "Destroying %s (delayed).", sc->sc_name);
error = g_mirror_destroy(sc, G_MIRROR_DESTROY_SOFT);
if (error != 0) {
-   G_MIRROR_DEBUG(0, "Cannot destroy %s.", sc->sc_name);
+   G_MIRROR_DEBUG(0, "Cannot destroy %s (error=%d).",
+   sc->sc_name, error);
sx_xunlock(&sc->sc_lock);
}
g_topology_lock();
___
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: r264265 - in head: crypto/openssl/crypto/bn crypto/openssl/crypto/ec crypto/openssl/ssl sys/fs/nfsserver

2014-04-08 Thread Bryan Drewery

On 2014-04-08 13:27, Xin LI wrote:

Author: delphij
Date: Tue Apr  8 18:27:32 2014
New Revision: 264265
URL: http://svnweb.freebsd.org/changeset/base/264265

Log:
  Fix NFS deadlock vulnerability. [SA-14:05]

  Fix "Heartbleed" vulnerability and ECDSA Cache Side-channel
  Attack in OpenSSL. [SA-14:06]

Modified:
  head/crypto/openssl/crypto/bn/bn.h
  head/crypto/openssl/crypto/bn/bn_lib.c
  head/crypto/openssl/crypto/ec/ec2_mult.c
  head/crypto/openssl/ssl/d1_both.c
  head/crypto/openssl/ssl/t1_lib.c
  head/sys/fs/nfsserver/nfs_nfsdserv.c



__FreeBSD_version is needed too.

Also, that this was a partial release of 1.0.1g is confusing a LOT of
users. They think they are still vulnerable. They expect to see 1.0.1g
in 'openssl version'. We could have our own version string in 'openssl
version' to remedy this.

--
Regards,
Bryan Drewery
___
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: r264265 - in head: crypto/openssl/crypto/bn crypto/openssl/crypto/ec crypto/openssl/ssl sys/fs/nfsserver

2014-04-09 Thread Bryan Drewery

On 2014-04-09 09:01, Dag-Erling Smørgrav wrote:

Bryan Drewery  writes:

Also, that this was a partial release of 1.0.1g is confusing a LOT of
users. They think they are still vulnerable. They expect to see 1.0.1g
in 'openssl version'. We could have our own version string in 'openssl
version' to remedy this.


This is no different from what other OSes do, e.g. RHEL6.5:

% cat /etc/redhat-release
Red Hat Enterprise Linux Workstation release 6.5 (Santiago)
% openssl version
OpenSSL 1.0.1e-fips 11 Feb 2013
% TZ=UTC rpm -qi openssl
Name: openssl  Relocations: (not 
relocatable)

Version : 1.0.1eVendor: Red Hat, Inc.
Release : 16.el6_5.7Build Date: Mon 07 Apr
2014 11:34:45 AM UTC
Install Date: Tue 08 Apr 2014 05:18:52 AM UTC  Build Host:
x86-027.build.eng.bos.redhat.com
[...]

which despite the version number and date is *not* vulnerable.

DES


Yes you're right. We're not those projects though. And just because we
have "always" done something a certain way does not mean we must 
forever.


We released 2/3 of 1.0.1g to 10, 1/3 of it to previous releases. I do
recognize it was not officially 'g'. I am just giving feedback from
many confused users. Many of which were just as confused on Debian
and CentOS as well.

I often think we forget the average user's perspective.

--
Regards,
Bryan Drewery
___
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: r264320 - head/sys/geom

2014-04-10 Thread Bryan Drewery
Author: bdrewery
Date: Thu Apr 10 17:00:44 2014
New Revision: 264320
URL: http://svnweb.freebsd.org/changeset/base/264320

Log:
  Fix spelling error in g_trace() call.
  
  Sponsored by: EMC / Isilon Storage Division
  MFC after:1 week

Modified:
  head/sys/geom/geom_disk.c

Modified: head/sys/geom/geom_disk.c
==
--- head/sys/geom/geom_disk.c   Thu Apr 10 16:53:21 2014(r264319)
+++ head/sys/geom/geom_disk.c   Thu Apr 10 17:00:44 2014(r264320)
@@ -164,7 +164,7 @@ g_disk_kerneldump(struct bio *bp, struct
 
gkd = (struct g_kerneldump*)bp->bio_data;
gp = bp->bio_to->geom;
-   g_trace(G_T_TOPOLOGY, "g_disk_kernedump(%s, %jd, %jd)",
+   g_trace(G_T_TOPOLOGY, "g_disk_kerneldump(%s, %jd, %jd)",
gp->name, (intmax_t)gkd->offset, (intmax_t)gkd->length);
if (dp->d_dump == NULL) {
g_io_deliver(bp, ENODEV);
___
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: r264332 - stable/10/usr.bin/kdump

2014-04-10 Thread Bryan Drewery
Author: bdrewery
Date: Fri Apr 11 01:00:51 2014
New Revision: 264332
URL: http://svnweb.freebsd.org/changeset/base/264332

Log:
  MFC r263879:
  
Add `-S' to display syscall numbers in the output as well.

Modified:
  stable/10/usr.bin/kdump/kdump.1
  stable/10/usr.bin/kdump/kdump.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/usr.bin/kdump/kdump.1
==
--- stable/10/usr.bin/kdump/kdump.1 Thu Apr 10 22:39:22 2014
(r264331)
+++ stable/10/usr.bin/kdump/kdump.1 Fri Apr 11 01:00:51 2014
(r264332)
@@ -28,7 +28,7 @@
 .\"@(#)kdump.1 8.1 (Berkeley) 6/6/93
 .\" $FreeBSD$
 .\"
-.Dd June 4, 2012
+.Dd March 28, 2014
 .Dt KDUMP 1
 .Os
 .Sh NAME
@@ -36,7 +36,7 @@
 .Nd display kernel trace data
 .Sh SYNOPSIS
 .Nm
-.Op Fl dEnlHRsTA
+.Op Fl dEnlHRSsTA
 .Op Fl f Ar trfile
 .Op Fl m Ar maxdata
 .Op Fl p Ar pid
@@ -95,6 +95,8 @@ Display relative timestamps (time since 
 .It Fl r
 When decoding STRU records, display structure members such as UIDs,
 GIDs, dates etc. symbolically instead of numerically.
+.It Fl S
+Display system call numbers.
 .It Fl s
 Suppress display of I/O data.
 .It Fl T

Modified: stable/10/usr.bin/kdump/kdump.c
==
--- stable/10/usr.bin/kdump/kdump.c Thu Apr 10 22:39:22 2014
(r264331)
+++ stable/10/usr.bin/kdump/kdump.c Fri Apr 11 01:00:51 2014
(r264332)
@@ -116,7 +116,7 @@ void usage(void);
 void ioctlname(unsigned long, int);
 
 int timestamp, decimal, fancy = 1, suppressdata, tail, threads, maxdata,
-resolv = 0, abiflag = 0;
+resolv = 0, abiflag = 0, syscallno = 0;
 const char *tracefile = DEF_TRACEFILE;
 struct ktr_header ktr_header;
 
@@ -204,7 +204,7 @@ main(int argc, char *argv[])
 
setlocale(LC_CTYPE, "");
 
-   while ((ch = getopt(argc,argv,"f:dElm:np:AHRrsTt:")) != -1)
+   while ((ch = getopt(argc,argv,"f:dElm:np:AHRrSsTt:")) != -1)
switch (ch) {
case 'A':
abiflag = 1;
@@ -230,6 +230,9 @@ main(int argc, char *argv[])
case 'r':
resolv = 1;
break;
+   case 'S':
+   syscallno = 1;
+   break;
case 's':
suppressdata = 1;
break;
@@ -600,8 +603,11 @@ ktrsyscall(struct ktr_syscall *ktr, u_in
if ((flags != 0 && ((flags & SV_ABI_MASK) != SV_ABI_FREEBSD)) ||
(ktr->ktr_code >= nsyscalls || ktr->ktr_code < 0))
printf("[%d]", ktr->ktr_code);
-   else
+   else {
printf("%s", syscallnames[ktr->ktr_code]);
+   if (syscallno)
+   printf("[%d]", ktr->ktr_code);
+   }
ip = &ktr->ktr_args[0];
if (narg) {
char c = '(';
@@ -1193,8 +1199,12 @@ ktrsysret(struct ktr_sysret *ktr, u_int 
if ((flags != 0 && ((flags & SV_ABI_MASK) != SV_ABI_FREEBSD)) ||
(code >= nsyscalls || code < 0))
printf("[%d] ", code);
-   else
-   printf("%s ", syscallnames[code]);
+   else {
+   printf("%s", syscallnames[code]);
+   if (syscallno)
+   printf("[%d]", code);
+   printf(" ");
+   }
 
if (error == 0) {
if (fancy) {
@@ -1840,8 +1850,11 @@ linux_ktrsyscall(struct ktr_syscall *ktr
 
if (ktr->ktr_code >= nlinux_syscalls || ktr->ktr_code < 0)
printf("[%d]", ktr->ktr_code);
-   else
+   else {
printf("%s", linux_syscallnames[ktr->ktr_code]);
+   if (syscallno)
+   printf("[%d]", ktr->ktr_code);
+   }
ip = &ktr->ktr_args[0];
if (narg) {
char c = '(';
@@ -1861,8 +1874,12 @@ linux_ktrsysret(struct ktr_sysret *ktr)
 
if (code >= nlinux_syscalls || code < 0)
printf("[%d] ", code);
-   else
-   printf("%s ", linux_syscallnames[code]);
+   else {
+   printf("%s", linux_syscallnames[code]);
+   if (syscallno)
+   printf("[%d]", code);
+   printf(" ");
+   }
 
if (error == 0) {
if (fancy) {
@@ -1895,7 +1912,7 @@ linux_ktrsysret(struct ktr_sysret *ktr)
 void
 usage(void)
 {
-   fprintf(stderr, "usage: kdump [-dEnlHRrsTA] [-f trfile] "
+   fprintf(stderr, "usage: kdump [-dEnlHRrSsTA] [-f trfile] "
"[-m maxdata] [-p pid] [-t trstr]\n");
exit(1);
 }
___
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: r264333 - stable/9/usr.bin/kdump

2014-04-10 Thread Bryan Drewery
Author: bdrewery
Date: Fri Apr 11 01:04:07 2014
New Revision: 264333
URL: http://svnweb.freebsd.org/changeset/base/264333

Log:
  MFC r263879:
  
Add `-S' to display syscall numbers in the output as well.

Modified:
  stable/9/usr.bin/kdump/kdump.1
  stable/9/usr.bin/kdump/kdump.c
Directory Properties:
  stable/9/usr.bin/kdump/   (props changed)

Modified: stable/9/usr.bin/kdump/kdump.1
==
--- stable/9/usr.bin/kdump/kdump.1  Fri Apr 11 01:00:51 2014
(r264332)
+++ stable/9/usr.bin/kdump/kdump.1  Fri Apr 11 01:04:07 2014
(r264333)
@@ -28,7 +28,7 @@
 .\"@(#)kdump.1 8.1 (Berkeley) 6/6/93
 .\" $FreeBSD$
 .\"
-.Dd June 4, 2012
+.Dd March 28, 2014
 .Dt KDUMP 1
 .Os
 .Sh NAME
@@ -36,7 +36,7 @@
 .Nd display kernel trace data
 .Sh SYNOPSIS
 .Nm
-.Op Fl dEnlHRsTA
+.Op Fl dEnlHRSsTA
 .Op Fl f Ar trfile
 .Op Fl m Ar maxdata
 .Op Fl p Ar pid
@@ -95,6 +95,8 @@ Display relative timestamps (time since 
 .It Fl r
 When decoding STRU records, display structure members such as UIDs,
 GIDs, dates etc. symbolically instead of numerically.
+.It Fl S
+Display system call numbers.
 .It Fl s
 Suppress display of I/O data.
 .It Fl T

Modified: stable/9/usr.bin/kdump/kdump.c
==
--- stable/9/usr.bin/kdump/kdump.c  Fri Apr 11 01:00:51 2014
(r264332)
+++ stable/9/usr.bin/kdump/kdump.c  Fri Apr 11 01:04:07 2014
(r264333)
@@ -109,7 +109,7 @@ void usage(void);
 void ioctlname(unsigned long, int);
 
 int timestamp, decimal, fancy = 1, suppressdata, tail, threads, maxdata,
-resolv = 0, abiflag = 0;
+resolv = 0, abiflag = 0, syscallno = 0;
 const char *tracefile = DEF_TRACEFILE;
 struct ktr_header ktr_header;
 
@@ -172,7 +172,7 @@ main(int argc, char *argv[])
 
setlocale(LC_CTYPE, "");
 
-   while ((ch = getopt(argc,argv,"f:dElm:np:AHRrsTt:")) != -1)
+   while ((ch = getopt(argc,argv,"f:dElm:np:AHRrSsTt:")) != -1)
switch (ch) {
case 'A':
abiflag = 1;
@@ -198,6 +198,9 @@ main(int argc, char *argv[])
case 'r':
resolv = 1;
break;
+   case 'S':
+   syscallno = 1;
+   break;
case 's':
suppressdata = 1;
break;
@@ -515,8 +518,11 @@ ktrsyscall(struct ktr_syscall *ktr, u_in
if ((flags != 0 && ((flags & SV_ABI_MASK) != SV_ABI_FREEBSD)) ||
(ktr->ktr_code >= nsyscalls || ktr->ktr_code < 0))
printf("[%d]", ktr->ktr_code);
-   else
+   else {
printf("%s", syscallnames[ktr->ktr_code]);
+   if (syscallno)
+   printf("[%d]", ktr->ktr_code);
+   }
ip = &ktr->ktr_args[0];
if (narg) {
char c = '(';
@@ -1063,8 +1069,12 @@ ktrsysret(struct ktr_sysret *ktr, u_int 
if ((flags != 0 && ((flags & SV_ABI_MASK) != SV_ABI_FREEBSD)) ||
(code >= nsyscalls || code < 0))
printf("[%d] ", code);
-   else
-   printf("%s ", syscallnames[code]);
+   else {
+   printf("%s", syscallnames[code]);
+   if (syscallno)
+   printf("[%d]", code);
+   printf(" ");
+   }
 
if (error == 0) {
if (fancy) {
@@ -1651,8 +1661,11 @@ linux_ktrsyscall(struct ktr_syscall *ktr
 
if (ktr->ktr_code >= nlinux_syscalls || ktr->ktr_code < 0)
printf("[%d]", ktr->ktr_code);
-   else
+   else {
printf("%s", linux_syscallnames[ktr->ktr_code]);
+   if (syscallno)
+   printf("[%d]", ktr->ktr_code);
+   }
ip = &ktr->ktr_args[0];
if (narg) {
char c = '(';
@@ -1672,8 +1685,12 @@ linux_ktrsysret(struct ktr_sysret *ktr)
 
if (code >= nlinux_syscalls || code < 0)
printf("[%d] ", code);
-   else
-   printf("%s ", linux_syscallnames[code]);
+   else {
+   printf("%s", linux_syscallnames[code]);
+   if (syscallno)
+   printf("[%d]", code);
+   printf(" ");
+   }
 
if (error == 0) {
if (fancy) {
@@ -1706,7 +1723,7 @@ linux_ktrsysret(struct ktr_sysret *ktr)
 void
 usage(void)
 {
-   fprintf(stderr, "usage: kdump [-dEnlHRrsTA] [-f trfile] "
+   fprintf(stderr, "usage: kdump [-dEnlHRrSsTA] [-f trfile] "
"[-m maxdata] [-p pid] [-t trstr]\n");
exit(1);
 }
___
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: r264385 - head/sys/kern

2014-04-12 Thread Bryan Drewery
Author: bdrewery
Date: Sat Apr 12 21:39:17 2014
New Revision: 264385
URL: http://svnweb.freebsd.org/changeset/base/264385

Log:
  Use proper MFSNAMELEN for fs type.
  
  MFC after:2 weeks
  Reviewed by:  rodrigc
  Also spotted by:ambrisko

Modified:
  head/sys/kern/vfs_mount.c

Modified: head/sys/kern/vfs_mount.c
==
--- head/sys/kern/vfs_mount.c   Sat Apr 12 21:04:53 2014(r264384)
+++ head/sys/kern/vfs_mount.c   Sat Apr 12 21:39:17 2014(r264385)
@@ -748,7 +748,7 @@ sys_mount(td, uap)
return (EOPNOTSUPP);
}
 
-   ma = mount_argsu(ma, "fstype", uap->type, MNAMELEN);
+   ma = mount_argsu(ma, "fstype", uap->type, MFSNAMELEN);
ma = mount_argsu(ma, "fspath", uap->path, MNAMELEN);
ma = mount_argb(ma, flags & MNT_RDONLY, "noro");
ma = mount_argb(ma, !(flags & MNT_NOSUID), "nosuid");
___
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: r264420 - head/etc

2014-04-13 Thread Bryan Drewery
Author: bdrewery
Date: Sun Apr 13 20:21:56 2014
New Revision: 264420
URL: http://svnweb.freebsd.org/changeset/base/264420

Log:
  Always install pkg.conf. Don't depend on MK_PKGBOOTSTRAP.
  
  This file is used by pkg(8) from ports as well. Someone may
  choose to not install pkg(7) but still want to consume
  official packages by building or installing pkg(8) manually.
  
  Discussed with:   bapt
  MFC after:1 day (Working on EN)

Modified:
  head/etc/Makefile

Modified: head/etc/Makefile
==
--- head/etc/Makefile   Sun Apr 13 20:12:21 2014(r264419)
+++ head/etc/Makefile   Sun Apr 13 20:21:56 2014(r264420)
@@ -231,9 +231,7 @@ distribution:
 .endif
${_+_}cd ${.CURDIR}/gss; ${MAKE} install
${_+_}cd ${.CURDIR}/periodic; ${MAKE} install
-.if ${MK_PKGBOOTSTRAP} != "no"
${_+_}cd ${.CURDIR}/pkg; ${MAKE} install
-.endif
${_+_}cd ${.CURDIR}/rc.d; ${MAKE} install
${_+_}cd ${.CURDIR}/../gnu/usr.bin/send-pr; ${MAKE} etc-gnats-freefall
${_+_}cd ${.CURDIR}/../share/termcap; ${MAKE} etc-termcap
___
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: r264465 - head/share/skel

2014-04-14 Thread Bryan Drewery
Author: bdrewery
Date: Mon Apr 14 18:07:00 2014
New Revision: 264465
URL: http://svnweb.freebsd.org/changeset/base/264465

Log:
  Prefer /etc/login.conf for some of these environment values.
  
  PR:   conf/186085
  Reported by:  Glen Neff 
  MFC after:2 weeks
  Sponsored by: EMC

Modified:
  head/share/skel/dot.cshrc
  head/share/skel/dot.profile

Modified: head/share/skel/dot.cshrc
==
--- head/share/skel/dot.cshrc   Mon Apr 14 17:54:01 2014(r264464)
+++ head/share/skel/dot.cshrc   Mon Apr 14 18:07:00 2014(r264465)
@@ -12,14 +12,15 @@ alias lals -aF
 alias lf   ls -FA
 alias ll   ls -lAF
 
+# These are normally set through /etc/login.conf.  You may override them here
+# if wanted.
+# set path = (/sbin /bin /usr/sbin /usr/bin /usr/games /usr/local/sbin 
/usr/local/bin $HOME/bin)
+# setenv   BLOCKSIZE   K
 # A righteous umask
-umask 22
-
-set path = (/sbin /bin /usr/sbin /usr/bin /usr/games /usr/local/sbin 
/usr/local/bin $HOME/bin)
+# umask 22
 
 setenv EDITOR  vi
 setenv PAGER   more
-setenv BLOCKSIZE   K
 
 if ($?prompt) then
# An interactive shell -- set some stuff up

Modified: head/share/skel/dot.profile
==
--- head/share/skel/dot.profile Mon Apr 14 17:54:01 2014(r264464)
+++ head/share/skel/dot.profile Mon Apr 14 18:07:00 2014(r264465)
@@ -5,15 +5,16 @@
 # see also sh(1), environ(7).
 #
 
-# remove /usr/games if you want
-PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/games:/usr/local/sbin:/usr/local/bin:$HOME/bin;
 export PATH
+# These are normally set through /etc/login.conf.  You may override them here
+# if wanted.
+# 
PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/games:/usr/local/sbin:/usr/local/bin:$HOME/bin;
 export PATH
+# BLOCKSIZE=K; export BLOCKSIZE
 
 # Setting TERM is normally done through /etc/ttys.  Do only override
 # if you're sure that you'll never log in via telnet or xterm or a
 # serial line.
 # TERM=xterm;  export TERM
 
-BLOCKSIZE=K;   export BLOCKSIZE
 EDITOR=vi; export EDITOR
 PAGER=more;export PAGER
 
___
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: r264499 - head/sys/geom

2014-04-15 Thread Bryan Drewery
Author: bdrewery
Date: Tue Apr 15 14:41:41 2014
New Revision: 264499
URL: http://svnweb.freebsd.org/changeset/base/264499

Log:
  Make g_access() KASSERT() more useful.
  
  Sponsored by: EMC / Isilon Storage Division
  Obtained from:Isilon OneFS
  MFC after:2 weeks

Modified:
  head/sys/geom/geom_subr.c

Modified: head/sys/geom/geom_subr.c
==
--- head/sys/geom/geom_subr.c   Tue Apr 15 13:28:54 2014(r264498)
+++ head/sys/geom/geom_subr.c   Tue Apr 15 14:41:41 2014(r264499)
@@ -912,8 +912,9 @@ g_access(struct g_consumer *cp, int dcr,
 
error = pp->geom->access(pp, dcr, dcw, dce);
KASSERT(dcr > 0 || dcw > 0 || dce > 0 || error == 0,
-   ("Geom provider %s::%s failed closing ->access()",
-   pp->geom->class->name, pp->name));
+   ("Geom provider %s::%s dcr=%d dcw=%d dce=%d error=%d failed "
+   "closing ->access()", pp->geom->class->name, pp->name, dcr, dcw,
+   dce, error));
if (!error) {
/*
 * If we open first write, spoil any partner consumers.
___
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: r264502 - stable/10/etc

2014-04-15 Thread Bryan Drewery
Author: bdrewery
Date: Tue Apr 15 15:18:32 2014
New Revision: 264502
URL: http://svnweb.freebsd.org/changeset/base/264502

Log:
  MFC r264420:
  
Always install pkg.conf. Don't depend on MK_PKGBOOTSTRAP.

Modified:
  stable/10/etc/Makefile
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/etc/Makefile
==
--- stable/10/etc/Makefile  Tue Apr 15 15:11:10 2014(r264501)
+++ stable/10/etc/Makefile  Tue Apr 15 15:18:32 2014(r264502)
@@ -225,9 +225,7 @@ distribution:
${_+_}cd ${.CURDIR}/devd; ${MAKE} install
${_+_}cd ${.CURDIR}/gss; ${MAKE} install
${_+_}cd ${.CURDIR}/periodic; ${MAKE} install
-.if ${MK_PKGBOOTSTRAP} != "no"
${_+_}cd ${.CURDIR}/pkg; ${MAKE} install
-.endif
${_+_}cd ${.CURDIR}/rc.d; ${MAKE} install
${_+_}cd ${.CURDIR}/../gnu/usr.bin/send-pr; ${MAKE} etc-gnats-freefall
${_+_}cd ${.CURDIR}/../share/termcap; ${MAKE} etc-termcap
___
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: r264503 - stable/9/etc

2014-04-15 Thread Bryan Drewery
Author: bdrewery
Date: Tue Apr 15 15:20:37 2014
New Revision: 264503
URL: http://svnweb.freebsd.org/changeset/base/264503

Log:
  MFC r264420:
  
Always install pkg.conf. Don't depend on MK_PKGBOOTSTRAP.

Modified:
  stable/9/etc/Makefile
Directory Properties:
  stable/9/etc/   (props changed)

Modified: stable/9/etc/Makefile
==
--- stable/9/etc/Makefile   Tue Apr 15 15:18:32 2014(r264502)
+++ stable/9/etc/Makefile   Tue Apr 15 15:20:37 2014(r264503)
@@ -228,9 +228,7 @@ distribution:
${_+_}cd ${.CURDIR}/devd; ${MAKE} install
${_+_}cd ${.CURDIR}/gss; ${MAKE} install
${_+_}cd ${.CURDIR}/periodic; ${MAKE} install
-.if ${MK_PKGBOOTSTRAP} != "no"
${_+_}cd ${.CURDIR}/pkg; ${MAKE} install
-.endif
${_+_}cd ${.CURDIR}/rc.d; ${MAKE} install
${_+_}cd ${.CURDIR}/../gnu/usr.bin/send-pr; ${MAKE} etc-gnats-freefall
${_+_}cd ${.CURDIR}/../share/termcap; ${MAKE} etc-termcap
___
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: r264519 - in stable/8: etc etc/mtree etc/pkg share share/keys/pkg/trusted share/man/man7 usr.sbin/pkg

2014-04-15 Thread Bryan Drewery
Author: bdrewery
Date: Tue Apr 15 23:40:47 2014
New Revision: 264519
URL: http://svnweb.freebsd.org/changeset/base/264519

Log:
  MFC Pkg configuration, known public key, and pkg(7) changes to align with 
pkg(8)
  
  This partially merges:
  r229068,r237795,r252048,r257145,r257147,r257150,r257150,r257159,r257164,
  r257168,r257344,r257344,r257667,r257668,r258227,r258550,r263937,r264420
  
  - etc/
- Bring in current pkg configuration from head
- Add /etc/pkg/ and /usr/share/keys to mtree
  - share/keys
- Bring in trusted key fingerprint from head
  - share/man/man7
- Document /usr/share/keys/pkg
  - usr.sbin/pkg
- No longer create pkg.conf as it is deprecated in pkg(8).
- Show security warning when bootstrapping.
  * This is a direct commit as the signature verification is not being
MFC'd due to being too large.
  
  Discussed with:   bapt, gjb

Added:
  stable/8/etc/pkg/
 - copied from r257145, head/etc/pkg/
 - copied from r257344, head/share/keys/
Directory Properties:
  stable/8/share/keys/   (props changed)
Modified:
  stable/8/etc/Makefile
  stable/8/etc/mtree/BSD.root.dist
  stable/8/etc/mtree/BSD.usr.dist
  stable/8/etc/pkg/FreeBSD.conf
  stable/8/share/Makefile
  stable/8/share/keys/pkg/trusted/pkg.freebsd.org.2013102301
  stable/8/share/man/man7/hier.7
  stable/8/usr.sbin/pkg/pkg.c
Directory Properties:
  stable/8/etc/   (props changed)
  stable/8/share/   (props changed)
  stable/8/share/man/   (props changed)
  stable/8/share/man/man7/   (props changed)
  stable/8/usr.sbin/pkg/   (props changed)

Modified: stable/8/etc/Makefile
==
--- stable/8/etc/Makefile   Tue Apr 15 23:27:14 2014(r264518)
+++ stable/8/etc/Makefile   Tue Apr 15 23:40:47 2014(r264519)
@@ -172,6 +172,7 @@ distribution:
${_+_}cd ${.CURDIR}/devd; ${MAKE} install
${_+_}cd ${.CURDIR}/gss; ${MAKE} install
${_+_}cd ${.CURDIR}/periodic; ${MAKE} install
+   ${_+_}cd ${.CURDIR}/pkg; ${MAKE} install
${_+_}cd ${.CURDIR}/rc.d; ${MAKE} install
${_+_}cd ${.CURDIR}/../gnu/usr.bin/send-pr; ${MAKE} etc-gnats-freefall
${_+_}cd ${.CURDIR}/../share/termcap; ${MAKE} etc-termcap

Modified: stable/8/etc/mtree/BSD.root.dist
==
--- stable/8/etc/mtree/BSD.root.distTue Apr 15 23:27:14 2014
(r264518)
+++ stable/8/etc/mtree/BSD.root.distTue Apr 15 23:40:47 2014
(r264519)
@@ -52,6 +52,8 @@
 weekly
 ..
 ..
+pkg
+..
 ppp
 ..
 rc.d

Modified: stable/8/etc/mtree/BSD.usr.dist
==
--- stable/8/etc/mtree/BSD.usr.dist Tue Apr 15 23:27:14 2014
(r264518)
+++ stable/8/etc/mtree/BSD.usr.dist Tue Apr 15 23:40:47 2014
(r264519)
@@ -340,6 +340,14 @@
 ..
 info
 ..
+keys
+pkg
+revoked
+..
+trusted
+..
+..
+..
 locale
 UTF-8
 ..

Modified: stable/8/etc/pkg/FreeBSD.conf
==
--- head/etc/pkg/FreeBSD.conf   Sat Oct 26 03:31:05 2013(r257145)
+++ stable/8/etc/pkg/FreeBSD.conf   Tue Apr 15 23:40:47 2014
(r264519)
@@ -1,6 +1,16 @@
 # $FreeBSD$
+#
+# To disable this repository, instead of modifying or removing this file,
+# create a /usr/local/etc/pkg/repos/FreeBSD.conf file:
+#
+#   mkdir -p /usr/local/etc/pkg/repos
+#   echo "FreeBSD: { enabled: no }" > /usr/local/etc/pkg/repos/FreeBSD.conf
+#
+
 FreeBSD: {
-  url: "pkg+http://pkg.freebsd.org/${ABI}/latest";,
+  url: "pkg+http://pkg.FreeBSD.org/${ABI}/latest";,
   mirror_type: "srv",
-  enabled: "yes"
+  signature_type: "fingerprints",
+  fingerprints: "/usr/share/keys/pkg",
+  enabled: yes
 }

Modified: stable/8/share/Makefile
==
--- stable/8/share/Makefile Tue Apr 15 23:27:14 2014(r264518)
+++ stable/8/share/Makefile Tue Apr 15 23:40:47 2014(r264519)
@@ -9,6 +9,7 @@ SUBDIR= ${_colldef} \
${_dict} \
${_doc} \
${_examples} \
+   keys \
${_man} \
${_me} \
misc \

Modified: stable/8/share/keys/pkg/trusted/pkg.freebsd.org.2013102301
==
--- head/share/keys/pkg/trusted/pkg.freebsd.org.2013102301  Tue Oct 29 
15:07:54 2013(r257344)
+++ stable/8/share/keys/pkg/trusted/pkg.freebsd.org.2013102301  Tue Apr 15 
23:40:47 2014(r264519)
@@ -1,5 +1,4 @@
 # $FreeBSD$
-# This key is for testing purposes only and will be revoked before 10.0-RELEASE
 
 function: "sha256"
 fingerprint: "b

svn commit: r264712 - stable/10/sys/geom

2014-04-20 Thread Bryan Drewery
Author: bdrewery
Date: Mon Apr 21 02:48:04 2014
New Revision: 264712
URL: http://svnweb.freebsd.org/changeset/base/264712

Log:
  MFC r264320:
  
Fix spelling error in g_trace() call.

Modified:
  stable/10/sys/geom/geom_disk.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/geom/geom_disk.c
==
--- stable/10/sys/geom/geom_disk.c  Mon Apr 21 02:09:14 2014
(r264711)
+++ stable/10/sys/geom/geom_disk.c  Mon Apr 21 02:48:04 2014
(r264712)
@@ -184,7 +184,7 @@ g_disk_kerneldump(struct bio *bp, struct
 
gkd = (struct g_kerneldump*)bp->bio_data;
gp = bp->bio_to->geom;
-   g_trace(G_T_TOPOLOGY, "g_disk_kernedump(%s, %jd, %jd)",
+   g_trace(G_T_TOPOLOGY, "g_disk_kerneldump(%s, %jd, %jd)",
gp->name, (intmax_t)gkd->offset, (intmax_t)gkd->length);
if (dp->d_dump == NULL) {
g_io_deliver(bp, ENODEV);
___
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: r264713 - stable/10/sys/geom/mirror

2014-04-20 Thread Bryan Drewery
Author: bdrewery
Date: Mon Apr 21 02:49:41 2014
New Revision: 264713
URL: http://svnweb.freebsd.org/changeset/base/264713

Log:
  MFC r264142:
  
Show error code when failing to destroy a mirror on delay

Modified:
  stable/10/sys/geom/mirror/g_mirror.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/geom/mirror/g_mirror.c
==
--- stable/10/sys/geom/mirror/g_mirror.cMon Apr 21 02:48:04 2014
(r264712)
+++ stable/10/sys/geom/mirror/g_mirror.cMon Apr 21 02:49:41 2014
(r264713)
@@ -2824,7 +2824,8 @@ g_mirror_destroy_delayed(void *arg, int 
G_MIRROR_DEBUG(1, "Destroying %s (delayed).", sc->sc_name);
error = g_mirror_destroy(sc, G_MIRROR_DESTROY_SOFT);
if (error != 0) {
-   G_MIRROR_DEBUG(0, "Cannot destroy %s.", sc->sc_name);
+   G_MIRROR_DEBUG(0, "Cannot destroy %s (error=%d).",
+   sc->sc_name, error);
sx_xunlock(&sc->sc_lock);
}
g_topology_lock();
___
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: r264714 - stable/9/sys/geom

2014-04-20 Thread Bryan Drewery
Author: bdrewery
Date: Mon Apr 21 02:50:42 2014
New Revision: 264714
URL: http://svnweb.freebsd.org/changeset/base/264714

Log:
  MFC r264320:
  
Fix spelling error in g_trace() call.

Modified:
  stable/9/sys/geom/geom_disk.c
Directory Properties:
  stable/9/sys/   (props changed)

Modified: stable/9/sys/geom/geom_disk.c
==
--- stable/9/sys/geom/geom_disk.c   Mon Apr 21 02:49:41 2014
(r264713)
+++ stable/9/sys/geom/geom_disk.c   Mon Apr 21 02:50:42 2014
(r264714)
@@ -187,7 +187,7 @@ g_disk_kerneldump(struct bio *bp, struct
 
gkd = (struct g_kerneldump*)bp->bio_data;
gp = bp->bio_to->geom;
-   g_trace(G_T_TOPOLOGY, "g_disk_kernedump(%s, %jd, %jd)",
+   g_trace(G_T_TOPOLOGY, "g_disk_kerneldump(%s, %jd, %jd)",
gp->name, (intmax_t)gkd->offset, (intmax_t)gkd->length);
if (dp->d_dump == NULL) {
g_io_deliver(bp, ENODEV);
___
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: r264715 - stable/9/sys/geom/mirror

2014-04-20 Thread Bryan Drewery
Author: bdrewery
Date: Mon Apr 21 02:52:08 2014
New Revision: 264715
URL: http://svnweb.freebsd.org/changeset/base/264715

Log:
  MFC r264142:
  
Show error code when failing to destroy a mirror on delay

Modified:
  stable/9/sys/geom/mirror/g_mirror.c
Directory Properties:
  stable/9/sys/   (props changed)

Modified: stable/9/sys/geom/mirror/g_mirror.c
==
--- stable/9/sys/geom/mirror/g_mirror.c Mon Apr 21 02:50:42 2014
(r264714)
+++ stable/9/sys/geom/mirror/g_mirror.c Mon Apr 21 02:52:08 2014
(r264715)
@@ -2802,7 +2802,8 @@ g_mirror_destroy_delayed(void *arg, int 
G_MIRROR_DEBUG(1, "Destroying %s (delayed).", sc->sc_name);
error = g_mirror_destroy(sc, G_MIRROR_DESTROY_SOFT);
if (error != 0) {
-   G_MIRROR_DEBUG(0, "Cannot destroy %s.", sc->sc_name);
+   G_MIRROR_DEBUG(0, "Cannot destroy %s (error=%d).",
+   sc->sc_name, error);
sx_xunlock(&sc->sc_lock);
}
g_topology_lock();
___
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: r264716 - stable/8/sys/geom

2014-04-20 Thread Bryan Drewery
Author: bdrewery
Date: Mon Apr 21 02:53:42 2014
New Revision: 264716
URL: http://svnweb.freebsd.org/changeset/base/264716

Log:
  MFC r264320:
  
Fix spelling error in g_trace() call.

Modified:
  stable/8/sys/geom/geom_disk.c
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/geom/   (props changed)

Modified: stable/8/sys/geom/geom_disk.c
==
--- stable/8/sys/geom/geom_disk.c   Mon Apr 21 02:52:08 2014
(r264715)
+++ stable/8/sys/geom/geom_disk.c   Mon Apr 21 02:53:42 2014
(r264716)
@@ -193,7 +193,7 @@ g_disk_kerneldump(struct bio *bp, struct
 
gkd = (struct g_kerneldump*)bp->bio_data;
gp = bp->bio_to->geom;
-   g_trace(G_T_TOPOLOGY, "g_disk_kernedump(%s, %jd, %jd)",
+   g_trace(G_T_TOPOLOGY, "g_disk_kerneldump(%s, %jd, %jd)",
gp->name, (intmax_t)gkd->offset, (intmax_t)gkd->length);
if (dp->d_dump == NULL) {
g_io_deliver(bp, ENODEV);
___
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: r264717 - stable/8/sys/geom/mirror

2014-04-20 Thread Bryan Drewery
Author: bdrewery
Date: Mon Apr 21 02:54:15 2014
New Revision: 264717
URL: http://svnweb.freebsd.org/changeset/base/264717

Log:
  MFC r264142:
  
Show error code when failing to destroy a mirror on delay

Modified:
  stable/8/sys/geom/mirror/g_mirror.c
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/geom/   (props changed)

Modified: stable/8/sys/geom/mirror/g_mirror.c
==
--- stable/8/sys/geom/mirror/g_mirror.c Mon Apr 21 02:53:42 2014
(r264716)
+++ stable/8/sys/geom/mirror/g_mirror.c Mon Apr 21 02:54:15 2014
(r264717)
@@ -2775,7 +2775,8 @@ g_mirror_destroy_delayed(void *arg, int 
G_MIRROR_DEBUG(1, "Destroying %s (delayed).", sc->sc_name);
error = g_mirror_destroy(sc, G_MIRROR_DESTROY_SOFT);
if (error != 0) {
-   G_MIRROR_DEBUG(0, "Cannot destroy %s.", sc->sc_name);
+   G_MIRROR_DEBUG(0, "Cannot destroy %s (error=%d).",
+   sc->sc_name, error);
sx_xunlock(&sc->sc_lock);
}
g_topology_lock();
___
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: r264795 - head/sys/kern

2014-04-22 Thread Bryan Drewery
Author: bdrewery
Date: Wed Apr 23 02:21:17 2014
New Revision: 264795
URL: http://svnweb.freebsd.org/changeset/base/264795

Log:
  Fix grammar error and trailing newline.
  
  Submitted by: danfe
  MFC after:3 days

Modified:
  head/sys/kern/subr_prf.c

Modified: head/sys/kern/subr_prf.c
==
--- head/sys/kern/subr_prf.cWed Apr 23 02:01:22 2014(r264794)
+++ head/sys/kern/subr_prf.cWed Apr 23 02:21:17 2014(r264795)
@@ -914,7 +914,7 @@ number:
while (percent < fmt)
PCHAR(*percent++);
/*
-* Since we ignore an formatting argument it is no 
+* Since we ignore a formatting argument it is no 
 * longer safe to obey the remaining formatting
 * arguments as the arguments will no longer match
 * the format specs.
@@ -1122,4 +1122,3 @@ hexdump(const void *ptr, int length, con
printf("\n");
}
 }
-
___
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: r264918 - head/usr.bin/sort

2014-04-25 Thread Bryan Drewery
Author: bdrewery
Date: Fri Apr 25 15:27:19 2014
New Revision: 264918
URL: http://svnweb.freebsd.org/changeset/base/264918

Log:
  Fix spelling error.
  
  MFC after:3 days

Modified:
  head/usr.bin/sort/sort.1.in

Modified: head/usr.bin/sort/sort.1.in
==
--- head/usr.bin/sort/sort.1.in Fri Apr 25 14:35:30 2014(r264917)
+++ head/usr.bin/sort/sort.1.in Fri Apr 25 15:27:19 2014(r264918)
@@ -147,7 +147,7 @@ specifications, they apply globally to a
 When attached to a specific key (see
 .Fl k ) ,
 the ordering options override all global ordering options for
-the key they are attahced to.
+the key they are attached to.
 .Bl -tag -width indent
 .It Fl b, Fl Fl ignore-leading-blanks
 Ignore leading blank characters when comparing lines.
___
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: r265072 - head/sys/geom

2014-04-28 Thread Bryan Drewery
Author: bdrewery
Date: Tue Apr 29 01:17:43 2014
New Revision: 265072
URL: http://svnweb.freebsd.org/changeset/base/265072

Log:
  Remove redundant include
  
  MFC after:3 days

Modified:
  head/sys/geom/geom_disk.c

Modified: head/sys/geom/geom_disk.c
==
--- head/sys/geom/geom_disk.c   Tue Apr 29 00:45:42 2014(r265071)
+++ head/sys/geom/geom_disk.c   Tue Apr 29 01:17:43 2014(r265072)
@@ -47,7 +47,6 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 
___
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: r265229 - head/bin/ps

2014-05-02 Thread Bryan Drewery
Author: bdrewery
Date: Fri May  2 15:05:47 2014
New Revision: 265229
URL: http://svnweb.freebsd.org/changeset/base/265229

Log:
  Add -J to filter by matching jail IDs and names.
  
  -J 0 can be used to show only host processes.
  
  Patch partially based on work by bz@
  
  PR:   bin/78763
  MFC after:2 weeks
  Relnotes: yes

Modified:
  head/bin/ps/Makefile
  head/bin/ps/ps.1
  head/bin/ps/ps.c

Modified: head/bin/ps/Makefile
==
--- head/bin/ps/MakefileFri May  2 14:47:53 2014(r265228)
+++ head/bin/ps/MakefileFri May  2 15:05:47 2014(r265229)
@@ -11,7 +11,7 @@ SRCS= fmt.c keyword.c nlist.c print.c ps
 # on large systems.
 #
 CFLAGS+=-DLAZY_PS
-DPADD= ${LIBM} ${LIBKVM}
-LDADD= -lm -lkvm
+DPADD= ${LIBM} ${LIBKVM} ${LIBJAIL}
+LDADD= -lm -lkvm -ljail
 
 .include 

Modified: head/bin/ps/ps.1
==
--- head/bin/ps/ps.1Fri May  2 14:47:53 2014(r265228)
+++ head/bin/ps/ps.1Fri May  2 15:05:47 2014(r265229)
@@ -29,7 +29,7 @@
 .\" @(#)ps.1   8.3 (Berkeley) 4/18/94
 .\" $FreeBSD$
 .\"
-.Dd December 27, 2013
+.Dd May 2, 2014
 .Dt PS 1
 .Os
 .Sh NAME
@@ -40,6 +40,7 @@
 .Op Fl aCcdefHhjlmrSTuvwXxZ
 .Op Fl O Ar fmt | Fl o Ar fmt
 .Op Fl G Ar gid Ns Op , Ns Ar gid Ns Ar ...
+.Op Fl J Ar jid Ns Op , Ns Ar jid Ns Ar ...
 .Op Fl M Ar core
 .Op Fl N Ar system
 .Op Fl p Ar pid Ns Op , Ns Ar pid Ns Ar ...
@@ -62,7 +63,7 @@ will also display processes that do not 
 .Pp
 A different set of processes can be selected for display by using any
 combination of the
-.Fl a , G , p , T , t ,
+.Fl a , G , J , p , T , t ,
 and
 .Fl U
 options.
@@ -152,6 +153,20 @@ Print information associated with the fo
 .Cm user , pid , ppid , pgid , sid , jobc , state , tt , time ,
 and
 .Cm command .
+.It Fl J
+Display information about processes which match the specified jail IDs.
+This may be either the
+.Cm jid
+or
+.Cm name
+of the jail.
+Use
+.Fl J
+.Sy 0
+to display only host processes.
+This flag implies
+.Fl x
+by default.
 .It Fl L
 List the set of keywords available for the
 .Fl O

Modified: head/bin/ps/ps.c
==
--- head/bin/ps/ps.cFri May  2 14:47:53 2014(r265228)
+++ head/bin/ps/ps.cFri May  2 15:05:47 2014(r265229)
@@ -50,6 +50,7 @@ static char sccsid[] = "@(#)ps.c  8.4 (Be
 __FBSDID("$FreeBSD$");
 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -62,6 +63,7 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -124,6 +126,7 @@ struct listinfo {
const char  *lname;
union {
gid_t   *gids;
+   int *jids;
pid_t   *pids;
dev_t   *ttys;
uid_t   *uids;
@@ -132,6 +135,7 @@ struct listinfo {
 };
 
 static int  addelem_gid(struct listinfo *, const char *);
+static int  addelem_jid(struct listinfo *, const char *);
 static int  addelem_pid(struct listinfo *, const char *);
 static int  addelem_tty(struct listinfo *, const char *);
 static int  addelem_uid(struct listinfo *, const char *);
@@ -163,12 +167,12 @@ static char vfmt[] = "pid,state,time,sl,
"%cpu,%mem,command";
 static char Zfmt[] = "label";
 
-#definePS_ARGS "AaCcde" OPT_LAZY_f "G:gHhjLlM:mN:O:o:p:rSTt:U:uvwXxZ"
+#definePS_ARGS "AaCcde" OPT_LAZY_f "G:gHhjJ:LlM:mN:O:o:p:rSTt:U:uvwXxZ"
 
 int
 main(int argc, char *argv[])
 {
-   struct listinfo gidlist, pgrplist, pidlist;
+   struct listinfo gidlist, jidlist, pgrplist, pidlist;
struct listinfo ruidlist, sesslist, ttylist, uidlist;
struct kinfo_proc *kp;
KINFO *kinfo = NULL, *next_KINFO;
@@ -208,6 +212,7 @@ main(int argc, char *argv[])
prtheader = showthreads = wflag = xkeep_implied = 0;
xkeep = -1; /* Neither -x nor -X. */
init_list(&gidlist, addelem_gid, sizeof(gid_t), "group");
+   init_list(&jidlist, addelem_jid, sizeof(int), "jail id");
init_list(&pgrplist, addelem_pid, sizeof(pid_t), "process group");
init_list(&pidlist, addelem_pid, sizeof(pid_t), "process id");
init_list(&ruidlist, addelem_uid, sizeof(uid_t), "ruser");
@@ -275,6 +280,11 @@ main(int argc, char *argv[])
case 'h':
prtheader = ws.ws_row > 5 ? ws.ws_row : 22;
break;
+   case 'J':
+   add_list(&jidlist, optarg);
+   xkeep_implied = 1;
+   nselectors++;
+   break;
case 'j':
parsefmt(jfmt, 0);
_fmt = 1;
@@ -538,6 +548,11 @@ main(int argc, char *argv[])
if (kp->ki_rgid == 

Re: svn commit: r265229 - head/bin/ps

2014-05-02 Thread Bryan Drewery

On 2014-05-02 15:19, Ian Lepore wrote:

On Fri, 2014-05-02 at 15:05 +, Bryan Drewery wrote:

Author: bdrewery
Date: Fri May  2 15:05:47 2014
New Revision: 265229
URL: http://svnweb.freebsd.org/changeset/base/265229

Log:
  Add -J to filter by matching jail IDs and names.

  -J 0 can be used to show only host processes.

  Patch partially based on work by bz@

[...]


I'm getting an error building rescue after this change:

--- rescue.all__D ---
ps.lo: In function `_$$hide$$ ps.lo $a':
_$$hide$$ ps.lo ps.c:(.text+0x26ec): undefined reference to 
`jail_getid'

*** [rescue] Error code 1

bmake[4]: stopped
in
/local/build/staging/freebsd/wand/obj/arm.armv6/local/build/staging/freebsd/wand/src/rescue/rescue
1 error

This is on arm, building with gcc, but I'm not sure whether that's
germane or not.

-- Ian


Yes, sorry about that. Testing a fix. I had made a bad assumption about
rescue. I see now it doesn't work at all like I thought. That's what I
get for not doing a full build. I did test on GCC though.


--
Regards,
Bryan Drewery
___
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: r265239 - head/rescue/rescue

2014-05-02 Thread Bryan Drewery
Author: bdrewery
Date: Fri May  2 20:45:34 2014
New Revision: 265239
URL: http://svnweb.freebsd.org/changeset/base/265239

Log:
  - Fix build WITHOUT_ZFS/WITHOUT_CDDL after r265229, bin/ps needs libjail.
  
  MFC after:2 weeks
  X-MFC-with:   r265229

Modified:
  head/rescue/rescue/Makefile

Modified: head/rescue/rescue/Makefile
==
--- head/rescue/rescue/Makefile Fri May  2 20:41:09 2014(r265238)
+++ head/rescue/rescue/Makefile Fri May  2 20:45:34 2014(r265239)
@@ -52,7 +52,7 @@ CRUNCH_SRCDIRS+= bin
 CRUNCH_PROGS_bin= cat chflags chio chmod cp date dd df echo\
 ed expr getfacl hostname kenv kill ln ls mkdir mv  \
 pkill ps pwd realpath rm rmdir setfacl sh stty sync test
-CRUNCH_LIBS+= -lcrypt -ledit -lkvm -ll -ltermcap -lutil
+CRUNCH_LIBS+= -lcrypt -ledit -ljail -lkvm -ll -ltermcap -lutil
 CRUNCH_BUILDTOOLS+= bin/sh
 
 # Additional options for specific programs
@@ -120,7 +120,7 @@ CRUNCH_PROGS_sbin+= zpool
 
 CRUNCH_LIBS+= -lalias -lcam -lcurses -ldevstat -lipsec
 .if ${MK_ZFS} != "no"
-CRUNCH_LIBS+= -lavl -ljail -lzfs_core -lzfs -lnvpair -lpthread -luutil -lumem
+CRUNCH_LIBS+= -lavl -lzfs_core -lzfs -lnvpair -lpthread -luutil -lumem
 .endif
 CRUNCH_LIBS+= -lgeom -lbsdxml -lkiconv -lmd -lsbuf -lufs -lz
 
___
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: r265229 - head/bin/ps

2014-05-02 Thread Bryan Drewery

On 2014-05-02 15:19, Ian Lepore wrote:

On Fri, 2014-05-02 at 15:05 +, Bryan Drewery wrote:

Author: bdrewery
Date: Fri May  2 15:05:47 2014
New Revision: 265229
URL: http://svnweb.freebsd.org/changeset/base/265229

Log:
  Add -J to filter by matching jail IDs and names.


[...]

I'm getting an error building rescue after this change:

--- rescue.all__D ---
ps.lo: In function `_$$hide$$ ps.lo $a':
_$$hide$$ ps.lo ps.c:(.text+0x26ec): undefined reference to 
`jail_getid'

*** [rescue] Error code 1

bmake[4]: stopped
in
/local/build/staging/freebsd/wand/obj/arm.armv6/local/build/staging/freebsd/wand/src/rescue/rescue
1 error

This is on arm, building with gcc, but I'm not sure whether that's
germane or not.

-- Ian


Fixed in r265239.

Was only if not building ZFS.

--
Regards,
Bryan Drewery
___
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: r265249 - in head: contrib/top usr.bin/top

2014-05-02 Thread Bryan Drewery
Author: bdrewery
Date: Fri May  2 23:30:39 2014
New Revision: 265249
URL: http://svnweb.freebsd.org/changeset/base/265249

Log:
  Add -J command/flag to filter by jail name/jid. This will automatically
  display the JID as well (the -j command/flag).
  
0 displays host.
+ displays all.
  
  MFC after:2 weeks
  Relnotes: yes

Modified:
  head/contrib/top/machine.h
  head/contrib/top/top.X
  head/contrib/top/top.c
  head/usr.bin/top/Makefile
  head/usr.bin/top/machine.c

Modified: head/contrib/top/machine.h
==
--- head/contrib/top/machine.h  Fri May  2 23:23:18 2014(r265248)
+++ head/contrib/top/machine.h  Fri May  2 23:30:39 2014(r265249)
@@ -66,6 +66,7 @@ struct process_select
 int thread;/* show threads */
 int uid;   /* only this uid (unless uid == -1) */
 int wcpu;  /* show weighted cpu */
+int jid;   /* only this jid (unless jid == -1) */
 int jail;  /* show jail ID */
 int kidle; /* show per-CPU idle threads */
 char *command; /* only this command (unless == NULL) */

Modified: head/contrib/top/top.X
==
--- head/contrib/top/top.X  Fri May  2 23:23:18 2014(r265248)
+++ head/contrib/top/top.X  Fri May  2 23:30:39 2014(r265249)
@@ -20,6 +20,8 @@ top \- display and update information ab
 ] [
 .BI \-s time
 ] [
+.BI \-J jail
+] [
 .BI \-U username
 ] [
 .I number
@@ -171,6 +173,21 @@ values are \*(lqcpu\*(rq, \*(lqsize\*(rq
 but may vary on different operating systems.  Note that
 not all operating systems support this option.
 .TP
+.BI \-J jail
+Show only those processes owned by
+.IR jail .
+This may be either the
+.B jid
+or
+.B name
+of the jail.
+Use
+.B 0
+to limit to host processes.
+Using this option implies the
+.B \-j
+flag.
+.PP
 .BI \-U username
 Show only those processes owned by
 .IR username .
@@ -315,6 +332,12 @@ Toggle the display of
 .IR jail (8)
 ID.
 .TP
+.B J
+Display only processes owned by a specific jail (prompt for jail).
+If the jail specified is simply \*(lq+\*(rq, then processes belonging
+to all jails and the host will be displayed.
+This will also enable the display of JID.
+.TP
 .B P
 Toggle the display of per-CPU statistics.
 .TP

Modified: head/contrib/top/top.c
==
--- head/contrib/top/top.c  Fri May  2 23:23:18 2014(r265248)
+++ head/contrib/top/top.c  Fri May  2 23:30:39 2014(r265249)
@@ -38,7 +38,9 @@ char *copyright =
 #include 
 #include 
 #include 
+#include 
 #include 
+#include 
 
 /* includes specific to top */
 #include "display.h"   /* interface to display package */
@@ -198,9 +200,9 @@ char *argv[];
 fd_set readfds;
 
 #ifdef ORDER
-static char command_chars[] = "\f qh?en#sdkriIutHmSCajzPo";
+static char command_chars[] = "\f qh?en#sdkriIutHmSCajzPJo";
 #else
-static char command_chars[] = "\f qh?en#sdkriIutHmSCajzP";
+static char command_chars[] = "\f qh?en#sdkriIutHmSCajzPJ";
 #endif
 /* these defines enumerate the "strchr"s of the commands in command_chars */
 #define CMD_redraw 0
@@ -228,8 +230,9 @@ char *argv[];
 #defineCMD_jidtog  21
 #define CMD_kidletog   22
 #define CMD_pcputog23
+#define CMD_jail   24
 #ifdef ORDER
-#define CMD_order   24
+#define CMD_order   25
 #endif
 
 /* set the buffer for stdout */
@@ -261,6 +264,7 @@ char *argv[];
 ps.uid = -1;
 ps.thread  = No;
 ps.wcpu= 1;
+ps.jid = -1;
 ps.jail= No;
 ps.kidle   = Yes;
 ps.command = NULL;
@@ -288,7 +292,7 @@ char *argv[];
optind = 1;
}
 
-   while ((i = getopt(ac, av, "CSIHPabijnquvzs:d:U:m:o:t")) != EOF)
+   while ((i = getopt(ac, av, "CSIHPabijJ:nquvzs:d:U:m:o:t")) != EOF)
{
switch(i)
{
@@ -413,6 +417,15 @@ char *argv[];
ps.jail = !ps.jail;
break;
 
+ case 'J': /* display only jail's processes */
+   if ((ps.jid = jail_getid(optarg)) == -1)
+   {
+   fprintf(stderr, "%s: unknown jail\n", optarg);
+   exit(1);
+   }
+   ps.jail = 1;
+   break;
+
  case 'P':
pcpu_stats = !pcpu_stats;
break;
@@ -425,7 +438,7 @@ char *argv[];
fprintf(stderr,
 "Top version %s\n"
 "Usage: %s [-abCHIijnPqStuvz] [-d count] [-m io | cpu] [-o field] [-s time]\n"
-"   [-U username] [number]\n",
+"   [-J jail] [-U username] [number]\n",
version_string(), myname);
exit(1);
}
@@ -1085,6 +1098,44 @@ restart:
reset_display();
putchar('\r');

svn commit: r265250 - head/contrib/top

2014-05-02 Thread Bryan Drewery
Author: bdrewery
Date: Fri May  2 23:32:44 2014
New Revision: 265250
URL: http://svnweb.freebsd.org/changeset/base/265250

Log:
  - Add a hint for 'u' and 'J' command that '+' displays all.
  
  MFC after:2 weeks

Modified:
  head/contrib/top/top.c

Modified: head/contrib/top/top.c
==
--- head/contrib/top/top.c  Fri May  2 23:30:39 2014(r265249)
+++ head/contrib/top/top.c  Fri May  2 23:32:44 2014(r265250)
@@ -1007,7 +1007,7 @@ restart:
 
case CMD_user:
new_message(MT_standout,
-   "Username to show: ");
+   "Username to show (+ for all): ");
if (readline(tempbuf2, sizeof(tempbuf2), No) > 
0)
{
if (tempbuf2[0] == '+' &&
@@ -1101,7 +1101,7 @@ restart:
 
case CMD_jail:
new_message(MT_standout,
-   "Jail to show: ");
+   "Jail to show (+ for all): ");
if (readline(tempbuf2, sizeof(tempbuf2), No) > 
0)
{
if (tempbuf2[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: r265250 - head/contrib/top

2014-05-02 Thread Bryan Drewery
On 5/2/2014 6:39 PM, Justin Hibbits wrote:
> On Fri, May 2, 2014 at 4:32 PM, Bryan Drewery  wrote:
>> Author: bdrewery
>> Date: Fri May  2 23:32:44 2014
>> New Revision: 265250
>> URL: http://svnweb.freebsd.org/changeset/base/265250
>>
>> Log:
>>   - Add a hint for 'u' and 'J' command that '+' displays all.
>>
> 
> Thanks!  I keep forgetting about '+'.
> 
> - Justin
> 

I had no idea about it!

-- 
Regards,
Bryan Drewery



signature.asc
Description: OpenPGP digital signature


svn commit: r265251 - head/contrib/top

2014-05-02 Thread Bryan Drewery
Author: bdrewery
Date: Fri May  2 23:47:14 2014
New Revision: 265251
URL: http://svnweb.freebsd.org/changeset/base/265251

Log:
  - Add J command to help.
  
  MFC after:2 weeks
  X-MFC-with:   r265249

Modified:
  head/contrib/top/commands.c

Modified: head/contrib/top/commands.c
==
--- head/contrib/top/commands.c Fri May  2 23:32:44 2014(r265250)
+++ head/contrib/top/commands.c Fri May  2 23:47:14 2014(r265251)
@@ -74,6 +74,7 @@ e   - list errors generated by last 
 H   - toggle the displaying of threads\n\
 i or I  - toggle the displaying of idle processes\n\
 j   - toggle the displaying of jail ID\n\
+J   - display processes for only one jail (+ selects all jails)\n\
 k   - kill processes; send a signal to a list of processes\n\
 m   - toggle the display between 'cpu' and 'io' modes\n\
 n or #  - change number of processes to display\n", stdout);
___
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: r265267 - head/usr.bin/top

2014-05-03 Thread Bryan Drewery
Author: bdrewery
Date: Sat May  3 15:03:47 2014
New Revision: 265267
URL: http://svnweb.freebsd.org/changeset/base/265267

Log:
  Fix width/alignment of JID column. Make it support up to the maximum
  7-wide JIDs. On a system using jails for common tasks the JID can
  quickly increase.
  
  MFC after:2 weeks

Modified:
  head/usr.bin/top/machine.c

Modified: head/usr.bin/top/machine.c
==
--- head/usr.bin/top/machine.c  Sat May  3 14:04:04 2014(r265266)
+++ head/usr.bin/top/machine.c  Sat May  3 15:03:47 2014(r265267)
@@ -67,6 +67,9 @@ static int namelength = TOP_USERNAME_LEN
 #else
 static int namelength = 8;
 #endif
+/* TOP_JID_LEN based on max of 99 */
+#define TOP_JID_LEN 7
+static int jidlength;
 static int cmdlengthdelta;
 
 /* Prototypes for top internals */
@@ -101,26 +104,26 @@ struct handle {
  */
 
 static char io_header[] =
-"  PID%s %-*.*s   VCSW  IVCSW   READ  WRITE  FAULT  TOTAL PERCENT COMMAND";
+"  PID%*s %-*.*s   VCSW  IVCSW   READ  WRITE  FAULT  TOTAL PERCENT 
COMMAND";
 
 #define io_Proc_format \
-"%5d%s %-*.*s %6ld %6ld %6ld %6ld %6ld %6ld %6.2f%% %.*s"
+"%5d%*s %-*.*s %6ld %6ld %6ld %6ld %6ld %6ld %6.2f%% %.*s"
 
 static char smp_header_thr[] =
-"  PID%s %-*.*s  THR PRI NICE   SIZERES STATE   C   TIME %7s COMMAND";
+"  PID%*s %-*.*s  THR PRI NICE   SIZERES STATE   C   TIME %7s COMMAND";
 static char smp_header[] =
-"  PID%s %-*.*s "   "PRI NICE   SIZERES STATE   C   TIME %7s COMMAND";
+"  PID%*s %-*.*s "   "PRI NICE   SIZERES STATE   C   TIME %7s COMMAND";
 
 #define smp_Proc_format \
-"%5d%s %-*.*s %s%3d %4s%7s %6s %-6.6s %2d%7s %6.2f%% %.*s"
+"%5d%*s %-*.*s %s%3d %4s%7s %6s %-6.6s %2d%7s %6.2f%% %.*s"
 
 static char up_header_thr[] =
-"  PID%s %-*.*s  THR PRI NICE   SIZERES STATETIME %7s COMMAND";
+"  PID%*s %-*.*s  THR PRI NICE   SIZERES STATETIME %7s COMMAND";
 static char up_header[] =
-"  PID%s %-*.*s "   "PRI NICE   SIZERES STATETIME %7s COMMAND";
+"  PID%*s %-*.*s "   "PRI NICE   SIZERES STATETIME %7s COMMAND";
 
 #define up_Proc_format \
-"%5d%s %-*.*s %s%3d %4s%7s %6s %-6.6s%.0d%7s %6.2f%% %.*s"
+"%5d%*s %-*.*s %s%3d %4s%7s %6s %-6.6s%.0d%7s %6.2f%% %.*s"
 
 
 /* process state names for the "STATE" column of the display */
@@ -393,6 +396,11 @@ format_header(char *uname_field)
 {
static char Header[128];
const char *prehead;
+   
+   if (ps.jail)
+   jidlength = TOP_JID_LEN + 1;/* +1 for extra left space. */
+   else
+   jidlength = 0;
 
switch (displaymode) {
case DISP_CPU:
@@ -406,14 +414,14 @@ format_header(char *uname_field)
(ps.thread ? smp_header : smp_header_thr) :
(ps.thread ? up_header : up_header_thr);
snprintf(Header, sizeof(Header), prehead,
-   ps.jail ? " JID" : "",
+   jidlength, ps.jail ? " JID" : "",
namelength, namelength, uname_field,
ps.wcpu ? "WCPU" : "CPU");
break;
case DISP_IO:
prehead = io_header;
snprintf(Header, sizeof(Header), prehead,
-   ps.jail ? " JID" : "",
+   jidlength, ps.jail ? " JID" : "",
namelength, namelength, uname_field);
break;
}
@@ -806,7 +814,7 @@ format_next_process(caddr_t handle, char
int cpu, state;
struct rusage ru, *rup;
long p_tot, s_tot;
-   char *proc_fmt, thr_buf[6], jid_buf[6];
+   char *proc_fmt, thr_buf[6], jid_buf[TOP_JID_LEN + 1];
char *cmdbuf = NULL;
char **args;
const int cmdlen = 128;
@@ -962,8 +970,8 @@ format_next_process(caddr_t handle, char
if (ps.jail == 0) 
jid_buf[0] = '\0';
else
-   snprintf(jid_buf, sizeof(jid_buf), " %*d",
-   sizeof(jid_buf) - 3, pp->ki_jid);
+   snprintf(jid_buf, sizeof(jid_buf), "%*d",
+   jidlength - 1, pp->ki_jid);
 
if (displaymode == DISP_IO) {
oldp = get_old_proc(pp);
@@ -984,7 +992,7 @@ format_next_process(caddr_t handle, char
 
snprintf(fmt, sizeof(fmt), io_Proc_format,
pp->ki_pid,
-   jid_buf,
+   jidlength, jid_buf,
namelength, namelength, (*get_userid)(pp->ki_ruid),
rup->ru_nvcsw,
rup->ru_nivcsw,
@@ -1019,7 +1027,7 @@ format_next_process(caddr_t handle, char
 
snprintf(fmt, sizeof(fmt), proc_fmt,
pp->ki_pid,
-   jid_buf,
+   jidlength, jid_buf,
namelength, namelength, (*get_userid)(pp->ki_ruid),
thr_buf,
pp->ki_pri.pri_level - PZERO,
___

Re: svn commit: r251794 - in head: . contrib/cvs etc etc/mtree gnu/usr.bin gnu/usr.bin/cvs share/doc/psd share/doc/psd/28.cvs share/mk tools/build/mk tools/build/options tools/tools/nanobsd/gateworks

2013-06-15 Thread Bryan Drewery
On 6/15/2013 3:29 PM, Eitan Adler wrote:
> Author: eadler
> Date: Sat Jun 15 20:29:07 2013
> New Revision: 251794
> URL: http://svnweb.freebsd.org/changeset/base/251794
> 
> Log:
>   Remove CVS from the base system.

Were you going to submit an exp-run request for this too?

>   
>   Discussed with: many
>   Reviewed by:peter, zi
>   Approved by:    core

-- 
Regards,
Bryan Drewery



signature.asc
Description: OpenPGP digital signature


Re: svn commit: r251794 - in head: . contrib/cvs etc etc/mtree gnu/usr.bin gnu/usr.bin/cvs share/doc/psd share/doc/psd/28.cvs share/mk tools/build/mk tools/build/options tools/tools/nanobsd/gateworks

2013-06-15 Thread Bryan Drewery
On 6/15/2013 6:16 PM, Eitan Adler wrote:
> On Sun, Jun 16, 2013 at 12:34 AM, Bryan Drewery  wrote:
>> On 6/15/2013 3:29 PM, Eitan Adler wrote:
>>> Author: eadler
>>> Date: Sat Jun 15 20:29:07 2013
>>> New Revision: 251794
>>> URL: http://svnweb.freebsd.org/changeset/base/251794
>>>
>>> Log:
>>>   Remove CVS from the base system.
>>
>> Were you going to submit an exp-run request for this too?
> 
> It was considered at one point but the types of problems which are
> possible to show up as a result of this are unlikely to show up at
> build time.
> 

bz@ and I both specifically asked to have an exp-run done. You agreed
with bz on arch@, and told me in May you had submitted a PR. I can find
no PR for this assigned to portmgr though.

There are build-time dependencies on cvs. This is just grepping my last
(partial) exp-run logs for '/usr/bin/n?cvs'


> logs/cvswrap-0.2.log:checking for specified path to real cvs(1)... default: 
> '/usr/bin/ncvs'
> logs/en-freebsd-doc-41380_1,1.log:[]\T1/pcr/m/n/9 cvspserver stream tcp 
> nowait root /usr/bin/cvs cvs -f -l -R -T
> logs/en-freebsd-doc-41380_1,1.log:[]\T1/pcr/m/n/9 cvspserver stream tcp 
> nowait root /usr/bin/cvs cvs -f -l -R -T
> logs/en-freebsd-doc-41380_1,1.log:[]\T1/pcr/m/n/9 cvspserver stream tcp 
> nowait root /usr/bin/cvs cvs -f -l -R -T
> logs/en-freebsd-doc-41380_1,1.log:[]\T1/pcr/m/n/9 cvspserver stream tcp 
> nowait root /usr/bin/cvs cvs -f -l -R -T
> logs/en-freebsd-doc-41380_1,1.log:[]\T1/pcr/m/n/9 cvspserver stream tcp 
> nowait root /usr/bin/cvs cvs -f -l -R -T
> logs/en-freebsd-doc-41380_1,1.log:[]\T1/pcr/m/n/9 cvspserver stream tcp 
> nowait root /usr/bin/cvs cvs -f -l -R -T
> logs/libwww-5.4.0_4.log:checking for cvs... /usr/bin/cvs
> logs/rancid-2.3.8.log:checking for cvs... /usr/bin/cvs
> logs/cvsd-1.0.18.log:checking for cvs... /usr/bin/cvs
> logs/zh_tw-freebsd-doc-41380_1,1.log:[]\T1/pcr/m/n/9 cvspserver stream tcp 
> nowait root /usr/bin/cvs cvs -f -l -R -T
> logs/zh_tw-freebsd-doc-41380_1,1.log:[]\T1/pcr/m/n/9 cvspserver stream tcp 
> nowait root /usr/bin/cvs cvs -f -l -R -T
> logs/zh_tw-freebsd-doc-41380_1,1.log:[]\T1/pcr/m/n/9 cvspserver stream tcp 
> nowait root /usr/bin/cvs cvs -f -l -R -T
> logs/zh_tw-freebsd-doc-41380_1,1.log:[]\T1/pcr/m/n/9 cvspserver stream tcp 
> nowait root /usr/bin/cvs cvs -f -l -R -T
> logs/zh_tw-freebsd-doc-41380_1,1.log:[]\T1/pcr/m/n/9 cvspserver stream tcp 
> nowait root /usr/bin/cvs cvs -f -l -R -T
> logs/zh_tw-freebsd-doc-41380_1,1.log:[]\T1/pcr/m/n/9 cvspserver stream tcp 
> nowait root /usr/bin/cvs cvs -f -l -R -T
> logs/rpm-5.2.1_3.log:checking for cvs... /usr/bin/cvs
> logs/rssh-2.3.4.log:checking for cvs... /usr/bin/cvs
> logs/tex-omegaware-old-2.0.2_5.log:checking for cvs... /usr/bin/cvs
> logs/rancid-devel-2.3.2a10_1.log:checking for cvs... /usr/bin/cvs
> logs/gtkdiff-1.8.0_9.log:checking for cvs... /usr/bin/cvs
> logs/pt-freebsd-doc-41380_1,1.log:[]\T1/pcr/m/n/9 cvspserver stream tcp 
> nowait root /usr/bin/cvs cvs -f -l -R -T
> logs/pt-freebsd-doc-41380_1,1.log:[]\T1/pcr/m/n/9 cvspserver stream tcp 
> nowait root /usr/bin/cvs cvs -f -l -R -T
> logs/pt-freebsd-doc-41380_1,1.log:[]\T1/pcr/m/n/9 cvspserver stream tcp 
> nowait root /usr/bin/cvs cvs -f -l -R -T
> logs/pt-freebsd-doc-41380_1,1.log:[]\T1/pcr/m/n/9 cvspserver stream tcp 
> nowait root /usr/bin/cvs cvs -f -l -R -T
> logs/pt-freebsd-doc-41380_1,1.log:[]\T1/pcr/m/n/9 cvspserver stream tcp 
> nowait root /usr/bin/cvs cvs -f -l -R -T
> logs/pt-freebsd-doc-41380_1,1.log:[]\T1/pcr/m/n/9 cvspserver stream tcp 
> nowait root /usr/bin/cvs cvs -f -l -R -T



-- 
Regards,
Bryan Drewery



signature.asc
Description: OpenPGP digital signature


Re: svn commit: r251794 - in head: . contrib/cvs etc etc/mtree gnu/usr.bin gnu/usr.bin/cvs share/doc/psd share/doc/psd/28.cvs share/mk tools/build/mk tools/build/options tools/tools/nanobsd/gateworks

2013-06-16 Thread Bryan Drewery
On 6/15/2013 10:06 PM, Peter Wemm wrote:
> On Sat, Jun 15, 2013 at 4:34 PM, Bryan Drewery  wrote:
> 
>> There are build-time dependencies on cvs. This is just grepping my last
>> (partial) exp-run logs for '/usr/bin/n?cvs'
> 
> Where was this righteous indignation when the perl 5.14.2 -> 5.14
> directory rename abomination was unleashed?  Why wasn't every perl
> port micro version bumped?   If ever there was a festering pile of
> horse excrement, that was one.
> 

ports/178368

-- 
Regards,
Bryan Drewery



signature.asc
Description: OpenPGP digital signature


svn commit: r249489 - head/etc/rc.d

2013-04-14 Thread Bryan Drewery
Author: bdrewery (ports committer)
Date: Sun Apr 14 21:11:19 2013
New Revision: 249489
URL: http://svnweb.freebsd.org/changeset/base/249489

Log:
  Run configtest before restarting so that the system is not
  left without a running sshd.
  
  Approved by:  des
  MFC after:1 week

Modified:
  head/etc/rc.d/sshd

Modified: head/etc/rc.d/sshd
==
--- head/etc/rc.d/sshd  Sun Apr 14 20:03:48 2013(r249488)
+++ head/etc/rc.d/sshd  Sun Apr 14 21:11:19 2013(r249489)
@@ -14,6 +14,7 @@ rcvar="sshd_enable"
 command="/usr/sbin/${name}"
 keygen_cmd="sshd_keygen"
 start_precmd="sshd_precmd"
+restart_precmd="sshd_configtest"
 configtest_cmd="sshd_configtest"
 pidfile="/var/run/${name}.pid"
 extra_commands="configtest keygen reload"
___
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: r249555 - head/etc/rc.d

2013-04-16 Thread Bryan Drewery
Author: bdrewery (ports committer)
Date: Tue Apr 16 17:30:13 2013
New Revision: 249555
URL: http://svnweb.freebsd.org/changeset/base/249555

Log:
  Also call configtest before reload to ensure working config.
  
  Approved by:  jhb
  MFC after:1 week
  X-MFC-With:   r249489

Modified:
  head/etc/rc.d/sshd

Modified: head/etc/rc.d/sshd
==
--- head/etc/rc.d/sshd  Tue Apr 16 17:20:52 2013(r249554)
+++ head/etc/rc.d/sshd  Tue Apr 16 17:30:13 2013(r249555)
@@ -14,6 +14,7 @@ rcvar="sshd_enable"
 command="/usr/sbin/${name}"
 keygen_cmd="sshd_keygen"
 start_precmd="sshd_precmd"
+reload_precmd="sshd_configtest"
 restart_precmd="sshd_configtest"
 configtest_cmd="sshd_configtest"
 pidfile="/var/run/${name}.pid"
___
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: r249489 - head/etc/rc.d

2013-04-16 Thread Bryan Drewery
On 4/16/2013 11:20 AM, John Baldwin wrote:
> On Sunday, April 14, 2013 5:11:20 pm Bryan Drewery wrote:
>> Author: bdrewery (ports committer)
>> Date: Sun Apr 14 21:11:19 2013
>> New Revision: 249489
>> URL: http://svnweb.freebsd.org/changeset/base/249489
>>
>> Log:
>>   Run configtest before restarting so that the system is not
>>   left without a running sshd.
>>   
>>   Approved by:   des
>>   MFC after: 1 week
>>
>> Modified:
>>   head/etc/rc.d/sshd
> 
> Maybe do the same for 'reload' as well?
> 

Done.

-- 
Regards,
Bryan Drewery



signature.asc
Description: OpenPGP digital signature


Re: svn commit: r248352 - in stable/9: etc share/mk

2013-04-21 Thread Bryan Drewery
On 3/17/2013 9:10 AM, Dmitry Morozovsky wrote:
> On Fri, 15 Mar 2013, Brooks Davis wrote:
> 
>> Author: brooks
>> Date: Fri Mar 15 21:32:40 2013
>> New Revision: 248352
>> URL: http://svnweb.freebsd.org/changeset/base/248352
>>
>> Log:
>>   MFC r245752,246913,247162
>>   
>>   Replace all known uses of ln in the build process with appropriate
>>   install -l invocations via new INSTALL_LINK and INSTALL_SYMLINK
>>   variables.
> 
> It seems this merge breaks ``make distribution'' and hence mergemaster if 
> your 
> base system is not updated yet (for example, while updating jail):
> 
> root@castor:/FreeBSD/rinet/src.9.newcarp# uname -a
> FreeBSD castor.rinet.ru 9.1-STABLE FreeBSD 9.1-STABLE #0 r245742: Mon Jan 21 
> 21:29:07 MSK 2013 ma...@castor.rinet.ru:/usr/obj/usr/src/sys/CASTOR  amd64
> 
> root@castor:/FreeBSD/rinet/src.9.newcarp# make hierarchy DESTDIR=/tmp/xxx
> cd /FreeBSD/rinet/src.9.newcarp/etc; 
> /usr/obj/FreeBSD/rinet/src.9.newcarp/make.amd64/make LOCAL_MTREE= distrib-dirs
> mtree -deU -f /FreeBSD/rinet/src.9.newcarp/etc/mtree/BSD.root.dist -p 
> /tmp/xxx/
> mtree -deU -f /FreeBSD/rinet/src.9.newcarp/etc/mtree/BSD.var.dist -p 
> /tmp/xxx/var
> mtree -deU -f /FreeBSD/rinet/src.9.newcarp/etc/mtree/BSD.usr.dist -p 
> /tmp/xxx/usr
> mtree -deU -f /FreeBSD/rinet/src.9.newcarp/etc/mtree/BSD.include.dist -p 
> /tmp/xxx/usr/include
> mtree -deU -f /FreeBSD/rinet/src.9.newcarp/etc/mtree/BIND.chroot.dist -p 
> /tmp/xxx/var/named
> mtree -deU -f /FreeBSD/rinet/src.9.newcarp/etc/mtree/BSD.groff.dist -p 
> /tmp/xxx/usr
> mtree -deU -f /FreeBSD/rinet/src.9.newcarp/etc/mtree/BSD.sendmail.dist -p 
> /tmp/xxx/
> install -l s usr/src/sys /tmp/xxx/sys
> install: illegal option -- l
> usage: install [-bCcMpSsv] [-B suffix] [-f flags] [-g group] [-m mode]
>[-o owner] file1 file2
>install [-bCcMpSsv] [-B suffix] [-f flags] [-g group] [-m mode]
>[-o owner] file1 ... fileN directory
>install -d [-v] [-g group] [-m mode] [-o owner] directory ...
> *** [distrib-dirs] Error code 64
> 
> Stop in /FreeBSD/rinet/src.9.newcarp/etc.
> 
> [snip]
> 

I also ran into something similar today upgrading from 9.1-R to HEAD. I
had INSTALL=install -C in my make.conf, causing:

> /usr/obj/usr/src/tmp/legacy/usr/libexec/catman.local -> 
> /usr/obj/usr/src/tmp/legacy/usr/libexec/makewhatis.local
> install: illegal option -- l
> 
> usage: install [-bCcMpSsv] [-B suffix] [-f flags] [-g group] [-m mode]
>[-o owner] file1 file2
>install [-bCcMpSsv] [-B suffix] [-f flags] [-g group] [-m mode]
>[-o owner] file1 ... fileN directory
>install -d [-v] [-g group] [-m mode] [-o owner] directory ...
> *** [_installlinks] Error code 64


After updating my make.conf to INSTALL+= -C I was able to finish buildworld.

I suggest updating the examples to not encourage overriding INSTALL like
this:

http://people.freebsd.org/~bdrewery/INSTALL-buildworld-install-l.txt

This may warrant an UPDATING entry as well.

Thoughts?

-- 
Regards,
Bryan Drewery



signature.asc
Description: OpenPGP digital signature


svn commit: r249807 - head

2013-04-23 Thread Bryan Drewery
Author: bdrewery (ports committer)
Date: Tue Apr 23 13:07:58 2013
New Revision: 249807
URL: http://svnweb.freebsd.org/changeset/base/249807

Log:
  Fix installkernel requiring users/groups defined in CHECK_UIDS
  and CHECK_GIDS to exist since r152680. This is only needed for
  installworld. The documented procedure of running mergemaster -p
  to check for missing users is only needed for installworld, not
  for installkernel. This fixes auditdistd incorrectly being
  required for installkernel.
  
  PR:   misc/174405
  Approved by:  bapt

Modified:
  head/Makefile.inc1

Modified: head/Makefile.inc1
==
--- head/Makefile.inc1  Tue Apr 23 13:03:17 2013(r249806)
+++ head/Makefile.inc1  Tue Apr 23 13:07:58 2013(r249807)
@@ -647,7 +647,6 @@ CHECK_GIDS+=smmsp
 CHECK_UIDS+=   proxy
 CHECK_GIDS+=   proxy authpf
 .endif
-installcheck: installcheck_UGID
 installcheck_UGID:
 .for uid in ${CHECK_UIDS}
@if ! `id -u ${uid} >/dev/null 2>&1`; then \
@@ -703,7 +702,7 @@ EXTRA_DISTRIBUTIONS+=   lib32
 
 MTREE_MAGIC?=  mtree 2.0
 
-distributeworld installworld: installcheck
+distributeworld installworld: installcheck installcheck_UGID
mkdir -p ${INSTALLTMP}
progs=$$(for prog in ${ITOOLS}; do \
if progpath=`which $$prog`; then \
___
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: r249893 - head

2013-04-25 Thread Bryan Drewery
Author: bdrewery (ports committer)
Date: Thu Apr 25 12:05:17 2013
New Revision: 249893
URL: http://svnweb.freebsd.org/changeset/base/249893

Log:
  Fix installworld with DB_FROM_SRC after r249807
  
  Approved by:  bapt
  Reported by:  Tom Everett

Modified:
  head/Makefile.inc1

Modified: head/Makefile.inc1
==
--- head/Makefile.inc1  Thu Apr 25 11:25:24 2013(r249892)
+++ head/Makefile.inc1  Thu Apr 25 12:05:17 2013(r249893)
@@ -616,6 +616,7 @@ kernel-toolchain: ${TOOLCHAIN_TGTS:N_inc
 # Checks to be sure system is ready for installworld/installkernel.
 #
 installcheck:
+installcheck_UGID:
 
 #
 # Require DESTDIR to be set if installing for a different architecture or
___
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: r249952 - in head/share: examples/etc man/man5

2013-04-26 Thread Bryan Drewery
Author: bdrewery (ports committer)
Date: Fri Apr 26 19:56:14 2013
New Revision: 249952
URL: http://svnweb.freebsd.org/changeset/base/249952

Log:
  Fix examples for overriding INSTALL to not suggest hardcoding
  'install' since it breaks buildworld after the introduction and
  use of 'install -l' in r245752. Overriding INSTALL causes
  /usr/bin/install to be used instead of the proper
  /usr/src/tools/install.sh which handles the new flag.
  
  Approved by:  bapt
  MFC after:2 weeks

Modified:
  head/share/examples/etc/make.conf
  head/share/man/man5/make.conf.5

Modified: head/share/examples/etc/make.conf
==
--- head/share/examples/etc/make.conf   Fri Apr 26 19:49:37 2013
(r249951)
+++ head/share/examples/etc/make.conf   Fri Apr 26 19:56:14 2013
(r249952)
@@ -97,7 +97,7 @@
 #COPTFLAGS= -O -pipe
 #
 # Compare before install.
-#INSTALL=install -C
+#INSTALL+= -C
 #
 # Mtree will follow symlinks.
 #MTREE_FOLLOWS_SYMLINKS= -L

Modified: head/share/man/man5/make.conf.5
==
--- head/share/man/man5/make.conf.5 Fri Apr 26 19:49:37 2013
(r249951)
+++ head/share/man/man5/make.conf.5 Fri Apr 26 19:56:14 2013
(r249952)
@@ -24,7 +24,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd January 21, 2013
+.Dd April 26, 2013
 .Dt MAKE.CONF 5
 .Os
 .Sh NAME
@@ -205,7 +205,7 @@ instead of
 the default install command.
 To install only files for which the target differs or does not exist, use
 .Bd -literal -offset indent
-INSTALL="install -C"
+INSTALL+= -C
 .Ed
 Note that some makefiles (including those in
 .Pa /usr/share/mk )
___
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: r261801 - head/contrib/libc++/include

2014-02-13 Thread Bryan Drewery
On 2/12/2014 12:14 PM, Dimitry Andric wrote:
> Author: dim
> Date: Wed Feb 12 18:14:49 2014
> New Revision: 261801
> URL: http://svnweb.freebsd.org/changeset/base/261801
> 
> Log:
>   An ABI incompatibility crept into the libc++ 3.4 import in r261283.  It
>   was caused by upstream libc++ commit r194536, which aimed to make the
>   headers more standards-compliant, by making std::pair's copy constructor
>   trivial.  Unfortunately, this could cause certain C++ applications using
>   shared libraries built against the previous version of libc++ to crash.
>   
>   Fix the ABI incompatibility by making std::pair's copy constructor
>   non-trivial again.
>   


>   Please note: Any C++ applications or shared libraries built with libc++
>   between r261283 and this revision should be recompiled.

*Please* bump __FreeBSD_version__ for ABI changes and notify portmgr@ of
such cases that clearly affect package building.

>   
>   Reported by:stefanf
>   MFC after:  3 weeks
>   X-MFC-With: r261283
> 
> Modified:
>   head/contrib/libc++/include/__config
> 
> Modified: head/contrib/libc++/include/__config
> ==
> --- head/contrib/libc++/include/__config  Wed Feb 12 16:39:56 2014
> (r261800)
> +++ head/contrib/libc++/include/__config  Wed Feb 12 18:14:49 2014
> (r261801)
> @@ -567,7 +567,7 @@ template  struct __static_asse
>  #define _LIBCPP_WCTYPE_IS_MASK
>  #endif
>  
> -#if defined(__APPLE__)
> +#if defined(__APPLE__) || defined(__FreeBSD__)
>  #ifndef _LIBCPP_TRIVIAL_PAIR_COPY_CTOR
>  #  define _LIBCPP_TRIVIAL_PAIR_COPY_CTOR 0
>  #endif
> 


-- 
Regards,
Bryan Drewery



signature.asc
Description: OpenPGP digital signature


svn commit: r261931 - in head/etc: defaults rc.d

2014-02-15 Thread Bryan Drewery
Author: bdrewery
Date: Sat Feb 15 14:50:47 2014
New Revision: 261931
URL: http://svnweb.freebsd.org/changeset/base/261931

Log:
  Allow overriding rctl.conf(5) file location for /etc/rc.d/rctl
  
  Reviewed by:  trasz
  Approved by:  bapt (mentor)
  MFC after:  1 week

Modified:
  head/etc/defaults/rc.conf
  head/etc/rc.d/rctl

Modified: head/etc/defaults/rc.conf
==
--- head/etc/defaults/rc.conf   Sat Feb 15 14:46:48 2014(r261930)
+++ head/etc/defaults/rc.conf   Sat Feb 15 14:50:47 2014(r261931)
@@ -660,6 +660,10 @@ mixer_enable="YES" # Run the sound mixer
 opensm_enable="NO" # Opensm(8) for infiniband devices defaults to off
 casperd_enable="YES"   # casperd(8) daemon
 
+# rctl(8) requires kernel options RACCT and RCTL
+rctl_enable="NO"   # Load rctl(8) rules on boot
+rctl_rules="/etc/rctl.conf"# rctl(8) ruleset. See rctl.conf(5).
+
 ##
 ### Jail Configuration (see rc.conf(5) manual page) ##
 ##

Modified: head/etc/rc.d/rctl
==
--- head/etc/rc.d/rctl  Sat Feb 15 14:46:48 2014(r261930)
+++ head/etc/rc.d/rctl  Sat Feb 15 14:50:47 2014(r261931)
@@ -15,7 +15,7 @@ stop_cmd="rctl_stop"
 
 rctl_start()
 {
-   if [ -f /etc/rctl.conf ]; then
+   if [ -f ${rctl_rules} ]; then
while read var comments
do
case ${var} in
@@ -25,7 +25,7 @@ rctl_start()
rctl -a "${var}"
;;
esac
-   done < /etc/rctl.conf
+   done < ${rctl_rules}
fi
 }
 
___
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: r261932 - head/share/man/man5

2014-02-15 Thread Bryan Drewery
Author: bdrewery
Date: Sat Feb 15 14:52:12 2014
New Revision: 261932
URL: http://svnweb.freebsd.org/changeset/base/261932

Log:
  Add forgotten rc.conf(5) update with r261931
  
  Reviewed by:  trasz
  Approved by:  bapt (mentor)
  MFC after:1 week

Modified:
  head/share/man/man5/rc.conf.5

Modified: head/share/man/man5/rc.conf.5
==
--- head/share/man/man5/rc.conf.5   Sat Feb 15 14:50:47 2014
(r261931)
+++ head/share/man/man5/rc.conf.5   Sat Feb 15 14:52:12 2014
(r261932)
@@ -24,7 +24,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd February 13, 2014
+.Dd February 15, 2014
 .Dt RC.CONF 5
 .Os
 .Sh NAME
@@ -4429,6 +4429,26 @@ interface if desired.
 Defines the total number of seconds to wait for link to become usable,
 polled at a 1-second interval.
 The default is 30.
+.It Va rctl_enable
+.Pq Vt bool
+Set to
+.Dq Li YES
+to load
+.Xr rctl 8
+rules from the defined ruleset.
+The kernel must be built with
+.Cd "options RACCT"
+and
+.Cd "options RCTL" .
+.It Va rctl_rules
+.Pq Vt str
+Set to
+.Pa /etc/rctl.conf
+by default.
+This variables contains the
+.Xr rctl.conf 5
+ruleset to load for
+.Xr rctl 8 .
 .El
 .Sh FILES
 .Bl -tag -width ".Pa /etc/defaults/rc.conf" -compact
___
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: r261934 - head/usr.bin/rctl

2014-02-15 Thread Bryan Drewery
Author: bdrewery
Date: Sat Feb 15 14:56:50 2014
New Revision: 261934
URL: http://svnweb.freebsd.org/changeset/base/261934

Log:
  Rework rctl(8) manpage
  
  - Note that kernel options are required
  - Shift parameters around in SYNOPSIS to make it more clear that there are
different modes
  - For all literal symbols such as 'process' or 'loginclass' or 'wallclock',
etc, make them into bold symbols with .Sy
  - For each subject:subject-id:etc: use .Em to underline to make it more clear
they relate to the rule syntax
  - Document how devd(8) support works
  - Move RSS warning to BUGS and replace RSS with 'memoryuse' since 'RSS' is not
defined in the manpage
  - Add more examples around listing existing rules
  - Make rule syntax into a list to improve readability
  - Add a list of subjects and their corresponding subject-id same as
RESOURCES/ACTIONS have lists
  - Note that rctl(8) takes affect on all current and future processes
  - Note that amount can take human numbers
  - Add reference to login.conf(5) in few places login class is mentioned
  
  Reviewed by:  trasz
  Approved by:  bapt (mentor)
  MFC after:1 week

Modified:
  head/usr.bin/rctl/rctl.8

Modified: head/usr.bin/rctl/rctl.8
==
--- head/usr.bin/rctl/rctl.8Sat Feb 15 14:55:35 2014(r261933)
+++ head/usr.bin/rctl/rctl.8Sat Feb 15 14:56:50 2014(r261934)
@@ -25,7 +25,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd December 3, 2012
+.Dd February 14, 2014
 .Dt RCTL 8
 .Os
 .Sh NAME
@@ -40,17 +40,24 @@
 .Fl a
 .Op Ar rule
 .Nm
+.Fl l
 .Op Fl h
 .Op Fl n
-.Fl l
 .Op Ar filter
 .Nm
 .Fl r
 .Op Ar filter
 .Nm
-.Op Fl h
 .Fl u
+.Op Fl h
 .Op Ar filter
+.Pp
+.Nm
+requires the kernel to be compiled with:
+.Bd -ragged -offset indent
+.Cd "options RACCT"
+.Cd "options RCTL"
+.Ed
 .Sh DESCRIPTION
 When called without options, the
 .Nm
@@ -77,8 +84,15 @@ Remove rules matching
 .Ar filter
 from the RCTL database.
 .It Fl u Ar filter
-Display resource usage for a subject (process, user, login class
-or jail) matching the
+Display resource usage for a subject
+.Po
+.Sy process ,
+.Sy user ,
+.Sy loginclass
+or
+.Sy jail
+.Pc
+matching the
 .Ar filter .
 .It Fl h
 "Human-readable" output.
@@ -87,24 +101,49 @@ Gigabyte, Terabyte and Petabyte.
 .It Fl n
 Display user IDs numerically rather than converting them to a user name.
 .El
+.Pp
+Modifying rules affects all currently running and future processes matching
+the rule.
 .Sh RULE SYNTAX
 Syntax for a rule is subject:subject-id:resource:action=amount/per.
 .Pp
-Subject defines the kind of entity the rule applies to.
-It can be either process, user, login class, or jail.
-.Pp
-Subject ID identifies the subject.
-It can be a process ID, user name, numerical user ID, login class name,
+.Bl -tag -width "subject-id" -compact -offset indent
+.It subject
+defines the kind of entity the rule applies to.
+It can be either
+.Sy process ,
+.Sy user ,
+.Sy loginclass ,
+or
+.Sy jail .
+.It subject-id
+identifies the
+.Em subject .
+It can be a process ID, user name, numerical user ID, login class name from
+.Xr login.conf 5 ,
 or jail name.
-.Pp
-Resource identifies the resource the rule controls.
-.Pp
-Action defines what will happen when a process exceeds the allowed amount.
-.Pp
-Amount defines how much of the resource a process can use before
-the defined action triggers.
-.Pp
-The per field defines what entity the amount gets accounted for.
+.It resource
+identifies the resource the rule controls.
+See the
+.Sx RESOURCES
+section below for details.
+.It action
+defines what will happen when a process exceeds the allowed
+.Em amount .
+See the
+.Sx ACTIONS
+section below for details.
+.It amount
+defines how much of the resource a process can use before
+the defined
+.Em action
+triggers.
+Resources which limit bytes may use prefixes from
+.Xr expand_number 3 .
+.It per
+defines what entity the
+.Em amount
+gets accounted for.
 For example, rule "loginclass:users:vmem:deny=100M/process" means
 that each process of any user belonging to login class "users" may allocate
 up to 100MB of virtual memory.
@@ -114,58 +153,86 @@ by all the processes of that user will n
 Rule "loginclass:users:vmem:deny=100M/loginclass" would mean that the sum of
 virtual memory allocated by all processes of all users belonging to that login
 class will not exceed 100MB.
+.El
 .Pp
-Valid rule has all those fields specified, except for the per, which defaults
-to the value of subject.
-.Pp
-A filter is a rule for which one of more fields other than per is left empty.
+A valid rule has all those fields specified, except for
+.Em per ,
+which defaults
+to the value of
+.Em subject .
+.Pp
+A filter is a rule for which one of more fields other than
+.Em per
+is left empty.
 For example, a filter that matches every rule could be written as ":::=/",
 or, in short, ":".
 A filter that matches all the login classes would be "loginclass:".
-A filte

svn commit: r262005 - head/sys/kern

2014-02-16 Thread Bryan Drewery
Author: bdrewery
Date: Sun Feb 16 23:10:46 2014
New Revision: 262005
URL: http://svnweb.freebsd.org/changeset/base/262005

Log:
  Remove redundant memcpy of fd_ofiles in fdgrowtable() added in r247602
  
  Discussed with:   mjg
  Approved by:  bapt (mentor)
  MFC after:2 weeks

Modified:
  head/sys/kern/kern_descrip.c

Modified: head/sys/kern/kern_descrip.c
==
--- head/sys/kern/kern_descrip.cSun Feb 16 23:08:21 2014
(r262004)
+++ head/sys/kern/kern_descrip.cSun Feb 16 23:10:46 2014
(r262005)
@@ -1537,7 +1537,6 @@ fdgrowtable(struct filedesc *fdp, int nf
memcpy(nmap, omap, NDSLOTS(onfiles) * sizeof(*omap));
 
/* update the pointers and counters */
-   memcpy(ntable, otable, onfiles * sizeof(ntable[0]));
fdp->fd_ofiles = ntable;
fdp->fd_map = nmap;
 
___
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: r262006 - head/sys/kern

2014-02-16 Thread Bryan Drewery
Author: bdrewery
Date: Mon Feb 17 00:00:39 2014
New Revision: 262006
URL: http://svnweb.freebsd.org/changeset/base/262006

Log:
  Fix M_FILEDESC leak in fdgrowtable() introduced in r244510.
  
  fdgrowtable() now only reallocates fd_map when necessary.
  
  This fixes fdgrowtable() to use the same logic as fdescfree() for
  when to free the fd_map. The logic in fdescfree() is intended to
  not free the initial static allocation, however the fd_map grows
  at a slower rate than the table does. The table is intended to hold
  20 fd, but its initial map has many more slots than 20.  The slot
  sizing causes NDSLOTS(20) through NDSLOTS(63) to be 1 which matches
  NDSLOTS(20), so fdescfree() was assuming that the fd_map was still
  the initial allocation and not freeing it.
  
  This partially reverts r244510 by reintroducing some of the logic
  it removed in fdgrowtable().
  
  Reviewed by:  mjg
  Approved by:  bapt (mentor)
  MFC after:2 weeks

Modified:
  head/sys/kern/kern_descrip.c

Modified: head/sys/kern/kern_descrip.c
==
--- head/sys/kern/kern_descrip.cSun Feb 16 23:10:46 2014
(r262005)
+++ head/sys/kern/kern_descrip.cMon Feb 17 00:00:39 2014
(r262006)
@@ -1521,7 +1521,7 @@ fdgrowtable(struct filedesc *fdp, int nf
return;
 
/*
-* Allocate a new table and map.  We need enough space for the
+* Allocate a new table.  We need enough space for the
 * file entries themselves and the struct freetable we will use
 * when we decommission the table and place it on the freelist.
 * We place the struct freetable in the middle so we don't have
@@ -1529,16 +1529,20 @@ fdgrowtable(struct filedesc *fdp, int nf
 */
ntable = malloc(nnfiles * sizeof(ntable[0]) + sizeof(struct freetable),
M_FILEDESC, M_ZERO | M_WAITOK);
-   nmap = malloc(NDSLOTS(nnfiles) * NDSLOTSIZE, M_FILEDESC,
-   M_ZERO | M_WAITOK);
-
/* copy the old data over and point at the new tables */
memcpy(ntable, otable, onfiles * sizeof(*otable));
-   memcpy(nmap, omap, NDSLOTS(onfiles) * sizeof(*omap));
-
-   /* update the pointers and counters */
fdp->fd_ofiles = ntable;
-   fdp->fd_map = nmap;
+
+   /* Allocate a new map only if the old is not large enough.  It will
+* grow at a slower rate than the table as it can map more
+* entries than the table can hold. */
+   if (NDSLOTS(nnfiles) > NDSLOTS(onfiles)) {
+   nmap = malloc(NDSLOTS(nnfiles) * NDSLOTSIZE, M_FILEDESC,
+   M_ZERO | M_WAITOK);
+   /* copy over the old data and update the pointer */
+   memcpy(nmap, omap, NDSLOTS(onfiles) * sizeof(*omap));
+   fdp->fd_map = nmap;
+   }
 
/*
 * In order to have a valid pattern for fget_unlocked()
@@ -1554,8 +1558,6 @@ fdgrowtable(struct filedesc *fdp, int nf
 * reference entries within it.  Instead, place it on a freelist
 * which will be processed when the struct filedesc is released.
 *
-* Do, however, free the old map.
-*
 * Note that if onfiles == NDFILE, we're dealing with the original
 * static allocation contained within (struct filedesc0 *)fdp,
 * which must not be freed.
@@ -1565,8 +1567,12 @@ fdgrowtable(struct filedesc *fdp, int nf
fdp0 = (struct filedesc0 *)fdp;
ft->ft_table = otable;
SLIST_INSERT_HEAD(&fdp0->fd_free, ft, ft_next);
-   free(omap, M_FILEDESC);
}
+   /* The map does not have the same possibility of threads still
+* holding references to it.  So always free it as long as it
+* does not reference the original static allocation. */
+   if (NDSLOTS(onfiles) > NDSLOTS(NDFILE))
+   free(omap, M_FILEDESC);
 }
 
 /*
___
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: r262075 - stable/10/usr.sbin/newsyslog

2014-02-17 Thread Bryan Drewery
Author: bdrewery
Date: Mon Feb 17 15:57:16 2014
New Revision: 262075
URL: http://svnweb.freebsd.org/changeset/base/262075

Log:
  MFC r261401:
  
Fix newsyslog(8) to use the size of the file instead of the blocks it
takes on disk, as advertised in newsyslog.conf(5).
  
  Approved by:  bapt (mentor, implicit)

Modified:
  stable/10/usr.sbin/newsyslog/newsyslog.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/usr.sbin/newsyslog/newsyslog.c
==
--- stable/10/usr.sbin/newsyslog/newsyslog.cMon Feb 17 15:51:19 2014
(r262074)
+++ stable/10/usr.sbin/newsyslog/newsyslog.cMon Feb 17 15:57:16 2014
(r262075)
@@ -2284,7 +2284,7 @@ sizefile(const char *file)
 
if (stat(file, &sb) < 0)
return (-1);
-   return (kbytes(dbtob(sb.st_blocks)));
+   return (kbytes(sb.st_size));
 }
 
 /*
___
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: r262076 - stable/9/usr.sbin/newsyslog

2014-02-17 Thread Bryan Drewery
Author: bdrewery
Date: Mon Feb 17 16:07:58 2014
New Revision: 262076
URL: http://svnweb.freebsd.org/changeset/base/262076

Log:
  MFC r261401:
  
Fix newsyslog(8) to use the size of the file instead of the blocks it
takes on disk, as advertised in newsyslog.conf(5).
  
  Approved by:  bapt (mentor, implicit)

Modified:
  stable/9/usr.sbin/newsyslog/newsyslog.c
Directory Properties:
  stable/9/usr.sbin/newsyslog/   (props changed)

Modified: stable/9/usr.sbin/newsyslog/newsyslog.c
==
--- stable/9/usr.sbin/newsyslog/newsyslog.c Mon Feb 17 15:57:16 2014
(r262075)
+++ stable/9/usr.sbin/newsyslog/newsyslog.c Mon Feb 17 16:07:58 2014
(r262076)
@@ -2282,7 +2282,7 @@ sizefile(const char *file)
 
if (stat(file, &sb) < 0)
return (-1);
-   return (kbytes(dbtob(sb.st_blocks)));
+   return (kbytes(sb.st_size));
 }
 
 /*
___
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: r262078 - stable/8/usr.sbin/newsyslog

2014-02-17 Thread Bryan Drewery
Author: bdrewery
Date: Mon Feb 17 16:18:04 2014
New Revision: 262078
URL: http://svnweb.freebsd.org/changeset/base/262078

Log:
  MFC r261401:
  
Fix newsyslog(8) to use the size of the file instead of the blocks it
takes on disk, as advertised in newsyslog.conf(5).
  
  Approved by:  bapt (mentor, implicit)

Modified:
  stable/8/usr.sbin/newsyslog/newsyslog.c
Directory Properties:
  stable/8/usr.sbin/newsyslog/   (props changed)

Modified: stable/8/usr.sbin/newsyslog/newsyslog.c
==
--- stable/8/usr.sbin/newsyslog/newsyslog.c Mon Feb 17 16:17:56 2014
(r262077)
+++ stable/8/usr.sbin/newsyslog/newsyslog.c Mon Feb 17 16:18:04 2014
(r262078)
@@ -2248,7 +2248,7 @@ sizefile(const char *file)
 
if (stat(file, &sb) < 0)
return (-1);
-   return (kbytes(dbtob(sb.st_blocks)));
+   return (kbytes(sb.st_size));
 }
 
 /*
___
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: r262220 - head/share/termcap

2014-02-19 Thread Bryan Drewery
Author: bdrewery
Date: Wed Feb 19 13:06:50 2014
New Revision: 262220
URL: http://svnweb.freebsd.org/changeset/base/262220

Log:
  Add missing Save Cursor support for VT520
  
  Submitted by: IWAMOTO Kouichi 
  PR:   conf/174937
  Obtained from:http://web.mit.edu/dosathena/doc/www/ek-vt520-rm.pdf
  Approved by:  bapt (mentor)
  MFC after:2 weeks

Modified:
  head/share/termcap/termcap.src

Modified: head/share/termcap/termcap.src
==
--- head/share/termcap/termcap.src  Wed Feb 19 09:56:00 2014
(r262219)
+++ head/share/termcap/termcap.src  Wed Feb 19 13:06:50 2014
(r262220)
@@ -2729,7 +2729,7 @@ vt520|DEC VT520 :\
:kb=\b:kd=\E[B:ke=\E>:kl=\E[D:\
:kr=\E[C:ks=\E=:ku=\E[A:nd=\E[C:\
:rc=\E8:rf=/usr/lib/tabset/vt100:\
-   :se=\E[m:so=\E[7m:\
+   :sc=\E7:se=\E[m:so=\E[7m:\
:sr=\EM:ue=\E[m:up=\E[A:us=\E[4m:nl=\E[B:ko=do,nd,up:
 #
 vt520nam|vt520-nam|v520n|DEC VT520 with no automargins:\
___
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: r262328 - head/sys/kern

2014-02-21 Thread Bryan Drewery
Author: bdrewery
Date: Sat Feb 22 04:28:49 2014
New Revision: 262328
URL: http://svnweb.freebsd.org/changeset/base/262328

Log:
  Fix style of comment blocks.
  
  Reported by:  peter
  Approved by:  bapt (mentor, implicit)
  X-MFC with:   r262006

Modified:
  head/sys/kern/kern_descrip.c

Modified: head/sys/kern/kern_descrip.c
==
--- head/sys/kern/kern_descrip.cSat Feb 22 03:36:45 2014
(r262327)
+++ head/sys/kern/kern_descrip.cSat Feb 22 04:28:49 2014
(r262328)
@@ -1533,9 +1533,11 @@ fdgrowtable(struct filedesc *fdp, int nf
memcpy(ntable, otable, onfiles * sizeof(*otable));
fdp->fd_ofiles = ntable;
 
-   /* Allocate a new map only if the old is not large enough.  It will
+   /*
+* Allocate a new map only if the old is not large enough.  It will
 * grow at a slower rate than the table as it can map more
-* entries than the table can hold. */
+* entries than the table can hold.
+*/
if (NDSLOTS(nnfiles) > NDSLOTS(onfiles)) {
nmap = malloc(NDSLOTS(nnfiles) * NDSLOTSIZE, M_FILEDESC,
M_ZERO | M_WAITOK);
@@ -1568,9 +1570,11 @@ fdgrowtable(struct filedesc *fdp, int nf
ft->ft_table = otable;
SLIST_INSERT_HEAD(&fdp0->fd_free, ft, ft_next);
}
-   /* The map does not have the same possibility of threads still
+   /*
+* The map does not have the same possibility of threads still
 * holding references to it.  So always free it as long as it
-* does not reference the original static allocation. */
+* does not reference the original static allocation.
+*/
if (NDSLOTS(onfiles) > NDSLOTS(NDFILE))
free(omap, M_FILEDESC);
 }
___
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: r262384 - in stable/10: etc/defaults etc/rc.d share/man/man5

2014-02-23 Thread Bryan Drewery
Author: bdrewery
Date: Sun Feb 23 20:04:29 2014
New Revision: 262384
URL: http://svnweb.freebsd.org/changeset/base/262384

Log:
  MFC r261931,r261932:
  
Allow overriding rctl.conf(5) file location for /etc/rc.d/rctl
  
  Approved by:  bapt (mentor, implicit)

Modified:
  stable/10/etc/defaults/rc.conf
  stable/10/etc/rc.d/rctl
  stable/10/share/man/man5/rc.conf.5
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/etc/defaults/rc.conf
==
--- stable/10/etc/defaults/rc.conf  Sun Feb 23 19:18:04 2014
(r262383)
+++ stable/10/etc/defaults/rc.conf  Sun Feb 23 20:04:29 2014
(r262384)
@@ -663,6 +663,10 @@ newsyslog_flags="-CN"  # Newsyslog flags 
 mixer_enable="YES" # Run the sound mixer.
 opensm_enable="NO" # Opensm(8) for infiniband devices defaults to off
 
+# rctl(8) requires kernel options RACCT and RCTL
+rctl_enable="NO"   # Load rctl(8) rules on boot
+rctl_rules="/etc/rctl.conf"# rctl(8) ruleset. See rctl.conf(5).
+
 ##
 ### Jail Configuration (see rc.conf(5) manual page) ##
 ##

Modified: stable/10/etc/rc.d/rctl
==
--- stable/10/etc/rc.d/rctl Sun Feb 23 19:18:04 2014(r262383)
+++ stable/10/etc/rc.d/rctl Sun Feb 23 20:04:29 2014(r262384)
@@ -15,7 +15,7 @@ stop_cmd="rctl_stop"
 
 rctl_start()
 {
-   if [ -f /etc/rctl.conf ]; then
+   if [ -f ${rctl_rules} ]; then
while read var comments
do
case ${var} in
@@ -25,7 +25,7 @@ rctl_start()
rctl -a "${var}"
;;
esac
-   done < /etc/rctl.conf
+   done < ${rctl_rules}
fi
 }
 

Modified: stable/10/share/man/man5/rc.conf.5
==
--- stable/10/share/man/man5/rc.conf.5  Sun Feb 23 19:18:04 2014
(r262383)
+++ stable/10/share/man/man5/rc.conf.5  Sun Feb 23 20:04:29 2014
(r262384)
@@ -24,7 +24,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd December 25, 2013
+.Dd February 15, 2014
 .Dt RC.CONF 5
 .Os
 .Sh NAME
@@ -4416,6 +4416,26 @@ interface if desired.
 Defines the total number of seconds to wait for link to become usable,
 polled at a 1-second interval.
 The default is 30.
+.It Va rctl_enable
+.Pq Vt bool
+Set to
+.Dq Li YES
+to load
+.Xr rctl 8
+rules from the defined ruleset.
+The kernel must be built with
+.Cd "options RACCT"
+and
+.Cd "options RCTL" .
+.It Va rctl_rules
+.Pq Vt str
+Set to
+.Pa /etc/rctl.conf
+by default.
+This variables contains the
+.Xr rctl.conf 5
+ruleset to load for
+.Xr rctl 8 .
 .El
 .Sh FILES
 .Bl -tag -width ".Pa /etc/defaults/rc.conf" -compact
___
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: r262385 - stable/10/usr.bin/rctl

2014-02-23 Thread Bryan Drewery
Author: bdrewery
Date: Sun Feb 23 20:07:30 2014
New Revision: 262385
URL: http://svnweb.freebsd.org/changeset/base/262385

Log:
  MFC r261934:
  
Rework rctl(8) manpage
  
  Approved by:  bapt (mentor, implicit)

Modified:
  stable/10/usr.bin/rctl/rctl.8
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/usr.bin/rctl/rctl.8
==
--- stable/10/usr.bin/rctl/rctl.8   Sun Feb 23 20:04:29 2014
(r262384)
+++ stable/10/usr.bin/rctl/rctl.8   Sun Feb 23 20:07:30 2014
(r262385)
@@ -25,7 +25,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd December 3, 2012
+.Dd February 14, 2014
 .Dt RCTL 8
 .Os
 .Sh NAME
@@ -40,17 +40,24 @@
 .Fl a
 .Op Ar rule
 .Nm
+.Fl l
 .Op Fl h
 .Op Fl n
-.Fl l
 .Op Ar filter
 .Nm
 .Fl r
 .Op Ar filter
 .Nm
-.Op Fl h
 .Fl u
+.Op Fl h
 .Op Ar filter
+.Pp
+.Nm
+requires the kernel to be compiled with:
+.Bd -ragged -offset indent
+.Cd "options RACCT"
+.Cd "options RCTL"
+.Ed
 .Sh DESCRIPTION
 When called without options, the
 .Nm
@@ -77,8 +84,15 @@ Remove rules matching
 .Ar filter
 from the RCTL database.
 .It Fl u Ar filter
-Display resource usage for a subject (process, user, login class
-or jail) matching the
+Display resource usage for a subject
+.Po
+.Sy process ,
+.Sy user ,
+.Sy loginclass
+or
+.Sy jail
+.Pc
+matching the
 .Ar filter .
 .It Fl h
 "Human-readable" output.
@@ -87,24 +101,49 @@ Gigabyte, Terabyte and Petabyte.
 .It Fl n
 Display user IDs numerically rather than converting them to a user name.
 .El
+.Pp
+Modifying rules affects all currently running and future processes matching
+the rule.
 .Sh RULE SYNTAX
 Syntax for a rule is subject:subject-id:resource:action=amount/per.
 .Pp
-Subject defines the kind of entity the rule applies to.
-It can be either process, user, login class, or jail.
-.Pp
-Subject ID identifies the subject.
-It can be a process ID, user name, numerical user ID, login class name,
+.Bl -tag -width "subject-id" -compact -offset indent
+.It subject
+defines the kind of entity the rule applies to.
+It can be either
+.Sy process ,
+.Sy user ,
+.Sy loginclass ,
+or
+.Sy jail .
+.It subject-id
+identifies the
+.Em subject .
+It can be a process ID, user name, numerical user ID, login class name from
+.Xr login.conf 5 ,
 or jail name.
-.Pp
-Resource identifies the resource the rule controls.
-.Pp
-Action defines what will happen when a process exceeds the allowed amount.
-.Pp
-Amount defines how much of the resource a process can use before
-the defined action triggers.
-.Pp
-The per field defines what entity the amount gets accounted for.
+.It resource
+identifies the resource the rule controls.
+See the
+.Sx RESOURCES
+section below for details.
+.It action
+defines what will happen when a process exceeds the allowed
+.Em amount .
+See the
+.Sx ACTIONS
+section below for details.
+.It amount
+defines how much of the resource a process can use before
+the defined
+.Em action
+triggers.
+Resources which limit bytes may use prefixes from
+.Xr expand_number 3 .
+.It per
+defines what entity the
+.Em amount
+gets accounted for.
 For example, rule "loginclass:users:vmem:deny=100M/process" means
 that each process of any user belonging to login class "users" may allocate
 up to 100MB of virtual memory.
@@ -114,58 +153,86 @@ by all the processes of that user will n
 Rule "loginclass:users:vmem:deny=100M/loginclass" would mean that the sum of
 virtual memory allocated by all processes of all users belonging to that login
 class will not exceed 100MB.
+.El
 .Pp
-Valid rule has all those fields specified, except for the per, which defaults
-to the value of subject.
-.Pp
-A filter is a rule for which one of more fields other than per is left empty.
+A valid rule has all those fields specified, except for
+.Em per ,
+which defaults
+to the value of
+.Em subject .
+.Pp
+A filter is a rule for which one of more fields other than
+.Em per
+is left empty.
 For example, a filter that matches every rule could be written as ":::=/",
 or, in short, ":".
 A filter that matches all the login classes would be "loginclass:".
-A filter that matches all defined rules for maxproc resource would be
+A filter that matches all defined rules for
+.Sy maxproc
+resource would be
 "::maxproc".
+.Sh SUBJECTS
+.Bl -column -offset 3n "pseudoterminals" ".Sy username or numerical User ID"
+.It Em subject Ta Em subject-id
+.It Sy process Ta numerical Process ID
+.It Sy user Ta user name or numerical User ID
+.It Sy loginclass Ta login class from
+.Xr login.conf 5
+.It Sy jail Ta jail name
+.El
 .Sh RESOURCES
 .Bl -column -offset 3n "pseudoterminals"
-.It cputime Ta "CPU time, in seconds"
-.It datasize Ta "data size, in bytes"
-.It stacksize Ta "stack size, in bytes"
-.It coredumpsize Ta "core dump size, in bytes"
-.It memoryuse Ta "resident set size, in bytes"
-.It memorylocked Ta "locked memory, in bytes"
-.It maxproc Ta "number of processes"
-.It openfiles Ta "file descriptor table size"
-.It

Re: svn commit: r262467 - head/bin/sh

2014-02-24 Thread Bryan Drewery
On 2/24/2014 9:05 PM, Daichi GOTO wrote:
> Author: daichi (ports committer)
> Date: Tue Feb 25 03:05:43 2014
> New Revision: 262467
> URL: http://svnweb.freebsd.org/changeset/base/262467
> 
> Log:
>   sh: Add -h option to SYNOPSIS
>   
>   Reviewed by:jilles
>   MFC after:  soon
> 
> Modified:
>   head/bin/sh/sh.1
> 
> Modified: head/bin/sh/sh.1
> ==
> --- head/bin/sh/sh.1  Tue Feb 25 02:58:11 2014(r262466)
> +++ head/bin/sh/sh.1  Tue Feb 25 03:05:43 2014(r262467)
> @@ -40,14 +40,14 @@
>  .Nd command interpreter (shell)
>  .Sh SYNOPSIS
>  .Nm
> -.Op Fl /+abCEefIimnPpTuVvx
> +.Op Fl /+abCEefhIimnPpTuVvx
>  .Op Fl /+o Ar longname
>  .Oo
>  .Ar script
>  .Op Ar arg ...
>  .Oc
>  .Nm
> -.Op Fl /+abCEefIimnPpTuVvx
> +.Op Fl /+abCEefhIimnPpTuVvx
>  .Op Fl /+o Ar longname
>  .Fl c Ar string
>  .Oo
> @@ -55,7 +55,7 @@
>  .Op Ar arg ...
>  .Oc
>  .Nm
> -.Op Fl /+abCEefIimnPpTuVvx
> +.Op Fl /+abCEefhIimnPpTuVvx
>  .Op Fl /+o Ar longname
>  .Fl s
>  .Op Ar arg ...
> 

.Dd bump is needed too.

-- 
Regards,
Bryan Drewery



signature.asc
Description: OpenPGP digital signature


svn commit: r262692 - stable/10/sys/kern

2014-03-02 Thread Bryan Drewery
Author: bdrewery
Date: Sun Mar  2 16:04:27 2014
New Revision: 262692
URL: http://svnweb.freebsd.org/changeset/base/262692

Log:
  MFC r262005:
  
Remove redundant memcpy of fd_ofiles in fdgrowtable()
  
  Approved by:  bapt (mentor, implicit)

Modified:
  stable/10/sys/kern/kern_descrip.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/kern/kern_descrip.c
==
--- stable/10/sys/kern/kern_descrip.c   Sun Mar  2 15:53:39 2014
(r262691)
+++ stable/10/sys/kern/kern_descrip.c   Sun Mar  2 16:04:27 2014
(r262692)
@@ -1538,7 +1538,6 @@ fdgrowtable(struct filedesc *fdp, int nf
memcpy(nmap, omap, NDSLOTS(onfiles) * sizeof(*omap));
 
/* update the pointers and counters */
-   memcpy(ntable, otable, onfiles * sizeof(ntable[0]));
fdp->fd_ofiles = ntable;
fdp->fd_map = nmap;
 
___
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: r262693 - stable/10/sys/kern

2014-03-02 Thread Bryan Drewery
Author: bdrewery
Date: Sun Mar  2 16:25:56 2014
New Revision: 262693
URL: http://svnweb.freebsd.org/changeset/base/262693

Log:
  MFC r262006,r262328:
  
   r262006:
Fix M_FILEDESC leak in fdgrowtable() introduced in r244510.
fdgrowtable() now only reallocates fd_map when necessary.
   r262328:
Style.
  
  Approved by:  bapt (mentor, implicit)

Modified:
  stable/10/sys/kern/kern_descrip.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/kern/kern_descrip.c
==
--- stable/10/sys/kern/kern_descrip.c   Sun Mar  2 16:04:27 2014
(r262692)
+++ stable/10/sys/kern/kern_descrip.c   Sun Mar  2 16:25:56 2014
(r262693)
@@ -1522,7 +1522,7 @@ fdgrowtable(struct filedesc *fdp, int nf
return;
 
/*
-* Allocate a new table and map.  We need enough space for the
+* Allocate a new table.  We need enough space for the
 * file entries themselves and the struct freetable we will use
 * when we decommission the table and place it on the freelist.
 * We place the struct freetable in the middle so we don't have
@@ -1530,16 +1530,22 @@ fdgrowtable(struct filedesc *fdp, int nf
 */
ntable = malloc(nnfiles * sizeof(ntable[0]) + sizeof(struct freetable),
M_FILEDESC, M_ZERO | M_WAITOK);
-   nmap = malloc(NDSLOTS(nnfiles) * NDSLOTSIZE, M_FILEDESC,
-   M_ZERO | M_WAITOK);
-
/* copy the old data over and point at the new tables */
memcpy(ntable, otable, onfiles * sizeof(*otable));
-   memcpy(nmap, omap, NDSLOTS(onfiles) * sizeof(*omap));
-
-   /* update the pointers and counters */
fdp->fd_ofiles = ntable;
-   fdp->fd_map = nmap;
+
+   /*
+* Allocate a new map only if the old is not large enough.  It will
+* grow at a slower rate than the table as it can map more
+* entries than the table can hold.
+*/
+   if (NDSLOTS(nnfiles) > NDSLOTS(onfiles)) {
+   nmap = malloc(NDSLOTS(nnfiles) * NDSLOTSIZE, M_FILEDESC,
+   M_ZERO | M_WAITOK);
+   /* copy over the old data and update the pointer */
+   memcpy(nmap, omap, NDSLOTS(onfiles) * sizeof(*omap));
+   fdp->fd_map = nmap;
+   }
 
/*
 * In order to have a valid pattern for fget_unlocked()
@@ -1555,8 +1561,6 @@ fdgrowtable(struct filedesc *fdp, int nf
 * reference entries within it.  Instead, place it on a freelist
 * which will be processed when the struct filedesc is released.
 *
-* Do, however, free the old map.
-*
 * Note that if onfiles == NDFILE, we're dealing with the original
 * static allocation contained within (struct filedesc0 *)fdp,
 * which must not be freed.
@@ -1566,8 +1570,14 @@ fdgrowtable(struct filedesc *fdp, int nf
fdp0 = (struct filedesc0 *)fdp;
ft->ft_table = otable;
SLIST_INSERT_HEAD(&fdp0->fd_free, ft, ft_next);
-   free(omap, M_FILEDESC);
}
+   /*
+* The map does not have the same possibility of threads still
+* holding references to it.  So always free it as long as it
+* does not reference the original static allocation.
+*/
+   if (NDSLOTS(onfiles) > NDSLOTS(NDFILE))
+   free(omap, M_FILEDESC);
 }
 
 /*
___
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: r263021 - head/lib/libfetch

2014-03-11 Thread Bryan Drewery
Author: bdrewery
Date: Tue Mar 11 13:47:11 2014
New Revision: 263021
URL: http://svnweb.freebsd.org/changeset/base/263021

Log:
  Support Last-Modified behind proxies which return UTC instead of GMT.
  
  The standard states that GMT must be used, but that UTC is equivalent. Still
  parse UTC as otherwise this causes problems for pkg(8). It will refetch
  the repository every time 'pkg update' or other remote operations
  are used behind these proxies.
  
  RFC2616: "All HTTP date/time stamps MUST be represented in Greenwich Mean
  Time (GMT), without exception. For the purposes of HTTP, GMT is exactly equal
  to UTC (Coordinated Universal Time).""
  
  Approved by:  bapt (mentor)
  Reviewed by:  des, peter
  Sponsored by: EMC / Isilon Storage Division
  MFC after:1 week

Modified:
  head/lib/libfetch/http.c

Modified: head/lib/libfetch/http.c
==
--- head/lib/libfetch/http.cTue Mar 11 13:16:03 2014(r263020)
+++ head/lib/libfetch/http.cTue Mar 11 13:47:11 2014(r263021)
@@ -876,6 +876,12 @@ http_parse_mtime(const char *p, time_t *
strncpy(locale, setlocale(LC_TIME, NULL), sizeof(locale));
setlocale(LC_TIME, "C");
r = strptime(p, "%a, %d %b %Y %H:%M:%S GMT", &tm);
+   /*
+* Some proxies use UTC in response, but it should still be
+* parsed. RFC2616 states GMT and UTC are exactly equal for HTTP.
+*/
+   if (r == NULL)
+   r = strptime(p, "%a, %d %b %Y %H:%M:%S UTC", &tm);
/* XXX should add support for date-2 and date-3 */
setlocale(LC_TIME, locale);
if (r == NULL)
___
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: r263098 - stable/10/share/termcap

2014-03-12 Thread Bryan Drewery
Author: bdrewery
Date: Thu Mar 13 01:12:27 2014
New Revision: 263098
URL: http://svnweb.freebsd.org/changeset/base/263098

Log:
  MFC r262220:
  
Add missing Save Cursor support for VT520
  
  PR:   conf/174937

Modified:
  stable/10/share/termcap/termcap.src
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/share/termcap/termcap.src
==
--- stable/10/share/termcap/termcap.src Wed Mar 12 19:52:04 2014
(r263097)
+++ stable/10/share/termcap/termcap.src Thu Mar 13 01:12:27 2014
(r263098)
@@ -2729,7 +2729,7 @@ vt520|DEC VT520 :\
:kb=\b:kd=\E[B:ke=\E>:kl=\E[D:\
:kr=\E[C:ks=\E=:ku=\E[A:nd=\E[C:\
:rc=\E8:rf=/usr/lib/tabset/vt100:\
-   :se=\E[m:so=\E[7m:\
+   :sc=\E7:se=\E[m:so=\E[7m:\
:sr=\EM:ue=\E[m:up=\E[A:us=\E[4m:nl=\E[B:ko=do,nd,up:
 #
 vt520nam|vt520-nam|v520n|DEC VT520 with no automargins:\
___
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: r263099 - stable/9/share/termcap

2014-03-12 Thread Bryan Drewery
Author: bdrewery
Date: Thu Mar 13 01:14:37 2014
New Revision: 263099
URL: http://svnweb.freebsd.org/changeset/base/263099

Log:
  MFC r262220:
  
Add missing Save Cursor support for VT520
  
  PR:   conf/174937

Modified:
  stable/9/share/termcap/termcap.src
Directory Properties:
  stable/9/share/termcap/   (props changed)

Modified: stable/9/share/termcap/termcap.src
==
--- stable/9/share/termcap/termcap.src  Thu Mar 13 01:12:27 2014
(r263098)
+++ stable/9/share/termcap/termcap.src  Thu Mar 13 01:14:37 2014
(r263099)
@@ -2729,7 +2729,7 @@ vt520|DEC VT520 :\
:kb=\b:kd=\E[B:ke=\E>:kl=\E[D:\
:kr=\E[C:ks=\E=:ku=\E[A:nd=\E[C:\
:rc=\E8:rf=/usr/lib/tabset/vt100:\
-   :se=\E[m:so=\E[7m:\
+   :sc=\E7:se=\E[m:so=\E[7m:\
:sr=\EM:ue=\E[m:up=\E[A:us=\E[4m:nl=\E[B:ko=do,nd,up:
 #
 vt520nam|vt520-nam|v520n|DEC VT520 with no automargins:\
___
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: r263100 - stable/8/share/termcap

2014-03-12 Thread Bryan Drewery
Author: bdrewery
Date: Thu Mar 13 01:16:51 2014
New Revision: 263100
URL: http://svnweb.freebsd.org/changeset/base/263100

Log:
  MFC r262220:
  
Add missing Save Cursor support for VT520
  
  PR:   conf/174937

Modified:
  stable/8/share/termcap/termcap.src
Directory Properties:
  stable/8/share/termcap/   (props changed)

Modified: stable/8/share/termcap/termcap.src
==
--- stable/8/share/termcap/termcap.src  Thu Mar 13 01:14:37 2014
(r263099)
+++ stable/8/share/termcap/termcap.src  Thu Mar 13 01:16:51 2014
(r263100)
@@ -2729,7 +2729,7 @@ vt520|DEC VT520 :\
:kb=\b:kd=\E[B:ke=\E>:kl=\E[D:\
:kr=\E[C:ks=\E=:ku=\E[A:nd=\E[C:\
:rc=\E8:rf=/usr/lib/tabset/vt100:\
-   :se=\E[m:so=\E[7m:\
+   :sc=\E7:se=\E[m:so=\E[7m:\
:sr=\EM:ue=\E[m:up=\E[A:us=\E[4m:nl=\E[B:ko=do,nd,up:
 #
 vt520nam|vt520-nam|v520n|DEC VT520 with no automargins:\
___
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: r263129 - head/sys/kern

2014-03-13 Thread Bryan Drewery
Author: bdrewery
Date: Fri Mar 14 01:17:11 2014
New Revision: 263129
URL: http://svnweb.freebsd.org/changeset/base/263129

Log:
  Combine similar code from vprintf(9) and log(9).
  
  MFC after:2 weeks

Modified:
  head/sys/kern/subr_prf.c

Modified: head/sys/kern/subr_prf.c
==
--- head/sys/kern/subr_prf.cFri Mar 14 01:10:54 2014(r263128)
+++ head/sys/kern/subr_prf.cFri Mar 14 01:17:11 2014(r263129)
@@ -248,23 +248,18 @@ ttyprintf(struct tty *tp, const char *fm
return (retval);
 }
 
-/*
- * Log writes to the log buffer, and guarantees not to sleep (so can be
- * called by interrupt routines).  If there is no process reading the
- * log yet, it writes to the console also.
- */
-void
-log(int level, const char *fmt, ...)
+static int
+_vprintf(int level, int flags, const char *fmt, va_list ap)
 {
-   va_list ap;
struct putchar_arg pca;
+   int retval;
 #ifdef PRINTF_BUFR_SIZE
char bufr[PRINTF_BUFR_SIZE];
 #endif
 
pca.tty = NULL;
pca.pri = level;
-   pca.flags = log_open ? TOLOG : TOCONS;
+   pca.flags = flags;
 #ifdef PRINTF_BUFR_SIZE
pca.p_bufr = bufr;
pca.p_next = pca.p_bufr;
@@ -272,12 +267,11 @@ log(int level, const char *fmt, ...)
pca.remain = sizeof(bufr);
*pca.p_next = '\0';
 #else
+   /* Don't buffer console output. */
pca.p_bufr = NULL;
 #endif
 
-   va_start(ap, fmt);
-   kvprintf(fmt, putchar, &pca, 10, ap);
-   va_end(ap);
+   retval = kvprintf(fmt, putchar, &pca, 10, ap);
 
 #ifdef PRINTF_BUFR_SIZE
/* Write any buffered console/log output: */
@@ -289,6 +283,24 @@ log(int level, const char *fmt, ...)
cnputs(pca.p_bufr);
}
 #endif
+
+   return (retval);
+}
+
+/*
+ * Log writes to the log buffer, and guarantees not to sleep (so can be
+ * called by interrupt routines).  If there is no process reading the
+ * log yet, it writes to the console also.
+ */
+void
+log(int level, const char *fmt, ...)
+{
+   va_list ap;
+
+   va_start(ap, fmt);
+   (void)_vprintf(level, log_open ? TOLOG : TOCONS, fmt, ap);
+   va_end(ap);
+
msgbuftrigger = 1;
 }
 
@@ -374,35 +386,9 @@ printf(const char *fmt, ...)
 int
 vprintf(const char *fmt, va_list ap)
 {
-   struct putchar_arg pca;
int retval;
-#ifdef PRINTF_BUFR_SIZE
-   char bufr[PRINTF_BUFR_SIZE];
-#endif
 
-   pca.tty = NULL;
-   pca.flags = TOCONS | TOLOG;
-   pca.pri = -1;
-#ifdef PRINTF_BUFR_SIZE
-   pca.p_bufr = bufr;
-   pca.p_next = pca.p_bufr;
-   pca.n_bufr = sizeof(bufr);
-   pca.remain = sizeof(bufr);
-   *pca.p_next = '\0';
-#else
-   /* Don't buffer console output. */
-   pca.p_bufr = NULL;
-#endif
-
-   retval = kvprintf(fmt, putchar, &pca, 10, ap);
-
-#ifdef PRINTF_BUFR_SIZE
-   /* Write any buffered console/log output: */
-   if (*pca.p_bufr != '\0') {
-   cnputs(pca.p_bufr);
-   msglogstr(pca.p_bufr, pca.pri, /*filter_cr*/ 1);
-   }
-#endif
+   retval = _vprintf(-1, TOCONS | TOLOG, fmt, ap);
 
if (!panicstr)
msgbuftrigger = 1;
___
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: r263130 - head/sys/fs/tmpfs

2014-03-13 Thread Bryan Drewery
Author: bdrewery
Date: Fri Mar 14 01:43:55 2014
New Revision: 263130
URL: http://svnweb.freebsd.org/changeset/base/263130

Log:
  Fix -o size less than PAGE_SIZE resulting in SIZE_MAX being used.
  
  Discussed with:   kib
  MFC after:2 weeks

Modified:
  head/sys/fs/tmpfs/tmpfs_vfsops.c

Modified: head/sys/fs/tmpfs/tmpfs_vfsops.c
==
--- head/sys/fs/tmpfs/tmpfs_vfsops.cFri Mar 14 01:17:11 2014
(r263129)
+++ head/sys/fs/tmpfs/tmpfs_vfsops.cFri Mar 14 01:43:55 2014
(r263130)
@@ -200,11 +200,13 @@ tmpfs_mount(struct mount *mp)
 * allowed to use, based on the maximum size the user passed in
 * the mount structure.  A value of zero is treated as if the
 * maximum available space was requested. */
-   if (size_max < PAGE_SIZE || size_max > OFF_MAX - PAGE_SIZE ||
+   if (size_max == 0 || size_max > OFF_MAX - PAGE_SIZE ||
(SIZE_MAX < OFF_MAX && size_max / PAGE_SIZE >= SIZE_MAX))
pages = SIZE_MAX;
-   else
+   else {
+   size_max = roundup(size_max, PAGE_SIZE);
pages = howmany(size_max, PAGE_SIZE);
+   }
MPASS(pages > 0);
 
if (nodes_max <= 3) {
___
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: r263131 - head/sys/fs/tmpfs

2014-03-13 Thread Bryan Drewery
Author: bdrewery
Date: Fri Mar 14 02:10:30 2014
New Revision: 263131
URL: http://svnweb.freebsd.org/changeset/base/263131

Log:
  Cleanup redundant logic and add some comments to help explain how
  it works in lieu of potentially less clear code.
  
  Sponsored by: EMC / Isilon Storage Division
  Discussed with:   Russell Cattelan

Modified:
  head/sys/fs/tmpfs/tmpfs_subr.c

Modified: head/sys/fs/tmpfs/tmpfs_subr.c
==
--- head/sys/fs/tmpfs/tmpfs_subr.c  Fri Mar 14 01:43:55 2014
(r263130)
+++ head/sys/fs/tmpfs/tmpfs_subr.c  Fri Mar 14 02:10:30 2014
(r263131)
@@ -348,6 +348,9 @@ tmpfs_dirent_hash(const char *name, u_in
 static __inline off_t
 tmpfs_dirent_cookie(struct tmpfs_dirent *de)
 {
+   if (de == NULL)
+   return (TMPFS_DIRCOOKIE_EOF);
+
MPASS(de->td_cookie >= TMPFS_DIRCOOKIE_MIN);
 
return (de->td_cookie);
@@ -1155,6 +1158,15 @@ tmpfs_dir_getdents(struct tmpfs_node *no
TMPFS_VALIDATE_DIR(node);
 
off = 0;
+
+   /*
+* Lookup the node from the current offset.  The starting offset of
+* 0 will lookup both '.' and '..', and then the first real entry,
+* or EOF if there are none.  Then find all entries for the dir that
+* fit into the buffer.  Once no more entries are found (de == NULL),
+* the offset is set to TMPFS_DIRCOOKIE_EOF, which will cause the next
+* call to return 0.
+*/
switch (uio->uio_offset) {
case TMPFS_DIRCOOKIE_DOT:
error = tmpfs_dir_getdotdent(node, uio);
@@ -1168,12 +1180,10 @@ tmpfs_dir_getdents(struct tmpfs_node *no
if (error != 0)
return (error);
de = tmpfs_dir_first(node, &dc);
-   if (de == NULL)
-   uio->uio_offset = TMPFS_DIRCOOKIE_EOF;
-   else
-   uio->uio_offset = tmpfs_dirent_cookie(de);
+   uio->uio_offset = tmpfs_dirent_cookie(de);
if (cnt != 0)
cookies[(*ncookies)++] = off = uio->uio_offset;
+   /* EOF. */
if (de == NULL)
return (0);
break;
@@ -1252,10 +1262,7 @@ tmpfs_dir_getdents(struct tmpfs_node *no
if (error == 0) {
de = tmpfs_dir_next(node, &dc);
if (cnt != 0) {
-   if (de == NULL)
-   off = TMPFS_DIRCOOKIE_EOF;
-   else
-   off = tmpfs_dirent_cookie(de);
+   off = tmpfs_dirent_cookie(de);
MPASS(*ncookies < cnt);
cookies[(*ncookies)++] = off;
}
@@ -1263,12 +1270,8 @@ tmpfs_dir_getdents(struct tmpfs_node *no
} while (error == 0 && uio->uio_resid > 0 && de != NULL);
 
/* Update the offset and cache. */
-   if (cnt == 0) {
-   if (de == NULL)
-   off = TMPFS_DIRCOOKIE_EOF;
-   else
-   off = tmpfs_dirent_cookie(de);
-   }
+   if (cnt == 0)
+   off = tmpfs_dirent_cookie(de);
 
uio->uio_offset = off;
node->tn_dir.tn_readdir_lastn = off;
___
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: r263174 - head/sys/fs/tmpfs

2014-03-14 Thread Bryan Drewery
Author: bdrewery
Date: Fri Mar 14 13:55:48 2014
New Revision: 263174
URL: http://svnweb.freebsd.org/changeset/base/263174

Log:
  Rename cnt to maxcookies and change its use as the condition for when to
  lookup cookies to be less obscure.
  
  No functional change.
  
  Since r245115, cnt has not really been needed in tmpfs_dir_getdents().  Keep
  it for the MPASS() for now though.
  
  Sponsored by: EMC / Isilon Storage Division
  MFC after:2 weeks

Modified:
  head/sys/fs/tmpfs/tmpfs_subr.c
  head/sys/fs/tmpfs/tmpfs_vnops.c

Modified: head/sys/fs/tmpfs/tmpfs_subr.c
==
--- head/sys/fs/tmpfs/tmpfs_subr.c  Fri Mar 14 12:55:06 2014
(r263173)
+++ head/sys/fs/tmpfs/tmpfs_subr.c  Fri Mar 14 13:55:48 2014
(r263174)
@@ -1147,7 +1147,7 @@ tmpfs_dir_getdotdotdent(struct tmpfs_nod
  * error code if another error happens.
  */
 int
-tmpfs_dir_getdents(struct tmpfs_node *node, struct uio *uio, int cnt,
+tmpfs_dir_getdents(struct tmpfs_node *node, struct uio *uio, int maxcookies,
 u_long *cookies, int *ncookies)
 {
struct tmpfs_dir_cursor dc;
@@ -1173,7 +1173,7 @@ tmpfs_dir_getdents(struct tmpfs_node *no
if (error != 0)
return (error);
uio->uio_offset = TMPFS_DIRCOOKIE_DOTDOT;
-   if (cnt != 0)
+   if (cookies != NULL)
cookies[(*ncookies)++] = off = uio->uio_offset;
case TMPFS_DIRCOOKIE_DOTDOT:
error = tmpfs_dir_getdotdotdent(node, uio);
@@ -1181,7 +1181,7 @@ tmpfs_dir_getdents(struct tmpfs_node *no
return (error);
de = tmpfs_dir_first(node, &dc);
uio->uio_offset = tmpfs_dirent_cookie(de);
-   if (cnt != 0)
+   if (cookies != NULL)
cookies[(*ncookies)++] = off = uio->uio_offset;
/* EOF. */
if (de == NULL)
@@ -1193,7 +1193,7 @@ tmpfs_dir_getdents(struct tmpfs_node *no
de = tmpfs_dir_lookup_cookie(node, uio->uio_offset, &dc);
if (de == NULL)
return (EINVAL);
-   if (cnt != 0)
+   if (cookies != NULL)
off = tmpfs_dirent_cookie(de);
}
 
@@ -1261,18 +1261,19 @@ tmpfs_dir_getdents(struct tmpfs_node *no
error = uiomove(&d, d.d_reclen, uio);
if (error == 0) {
de = tmpfs_dir_next(node, &dc);
-   if (cnt != 0) {
+   if (cookies != NULL) {
off = tmpfs_dirent_cookie(de);
-   MPASS(*ncookies < cnt);
+   MPASS(*ncookies < maxcookies);
cookies[(*ncookies)++] = off;
}
}
} while (error == 0 && uio->uio_resid > 0 && de != NULL);
 
-   /* Update the offset and cache. */
-   if (cnt == 0)
+   /* Skip setting off when using cookies as it is already done above. */
+   if (cookies == NULL)
off = tmpfs_dirent_cookie(de);
 
+   /* Update the offset and cache. */
uio->uio_offset = off;
node->tn_dir.tn_readdir_lastn = off;
node->tn_dir.tn_readdir_lastp = de;

Modified: head/sys/fs/tmpfs/tmpfs_vnops.c
==
--- head/sys/fs/tmpfs/tmpfs_vnops.c Fri Mar 14 12:55:06 2014
(r263173)
+++ head/sys/fs/tmpfs/tmpfs_vnops.c Fri Mar 14 13:55:48 2014
(r263174)
@@ -1199,32 +1199,38 @@ tmpfs_readdir(struct vop_readdir_args *v
 
int error;
ssize_t startresid;
-   int cnt = 0;
+   int maxcookies;
struct tmpfs_node *node;
 
/* This operation only makes sense on directory nodes. */
if (vp->v_type != VDIR)
return ENOTDIR;
 
+   maxcookies = 0;
node = VP_TO_TMPFS_DIR(vp);
 
startresid = uio->uio_resid;
 
+   /* Allocate cookies for NFS and compat modules. */
if (cookies != NULL && ncookies != NULL) {
-   cnt = howmany(node->tn_size, sizeof(struct tmpfs_dirent)) + 2;
-   *cookies = malloc(cnt * sizeof(**cookies), M_TEMP, M_WAITOK);
+   maxcookies = howmany(node->tn_size,
+   sizeof(struct tmpfs_dirent)) + 2;
+   *cookies = malloc(maxcookies * sizeof(**cookies), M_TEMP,
+   M_WAITOK);
*ncookies = 0;
}
 
-   if (cnt == 0)
+   if (cookies == NULL)
error = tmpfs_dir_getdents(node, uio, 0, NULL, NULL);
else
-   error = tmpfs_dir_getdents(node, uio, cnt, *cookies, ncookies);
+   error = tmpfs_dir_getdents(node, uio, maxcookies, *cookies,
+   ncookies);
 
+   /* Buffer was filled without hitting EOF. */
 

svn commit: r263175 - head/sys/fs/tmpfs

2014-03-14 Thread Bryan Drewery
Author: bdrewery
Date: Fri Mar 14 13:58:02 2014
New Revision: 263175
URL: http://svnweb.freebsd.org/changeset/base/263175

Log:
  Add missing FALLTHROUGH comment in tmpfs_dir_getdents for looking up '.' and
  '..'.
  
  Reviewed by:  Russell Cattelan
  Sponsored by: EMC / Isilon Storage Division
  MFC after:2 weeks

Modified:
  head/sys/fs/tmpfs/tmpfs_subr.c

Modified: head/sys/fs/tmpfs/tmpfs_subr.c
==
--- head/sys/fs/tmpfs/tmpfs_subr.c  Fri Mar 14 13:55:48 2014
(r263174)
+++ head/sys/fs/tmpfs/tmpfs_subr.c  Fri Mar 14 13:58:02 2014
(r263175)
@@ -1175,6 +1175,7 @@ tmpfs_dir_getdents(struct tmpfs_node *no
uio->uio_offset = TMPFS_DIRCOOKIE_DOTDOT;
if (cookies != NULL)
cookies[(*ncookies)++] = off = uio->uio_offset;
+   /* FALLTHROUGH */
case TMPFS_DIRCOOKIE_DOTDOT:
error = tmpfs_dir_getdotdotdent(node, uio);
if (error != 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"


svn commit: r263180 - head/usr.sbin/pkg

2014-03-14 Thread Bryan Drewery
Author: bdrewery
Date: Fri Mar 14 17:20:45 2014
New Revision: 263180
URL: http://svnweb.freebsd.org/changeset/base/263180

Log:
  Fix ABI from /usr/local/etc/pkg.conf not being respected.
  
  Regression from r259266.
  
  Sponsored by: EMC / Isilon Storage Division
  MFC after:1 week

Modified:
  head/usr.sbin/pkg/config.c

Modified: head/usr.sbin/pkg/config.c
==
--- head/usr.sbin/pkg/config.c  Fri Mar 14 17:20:23 2014(r263179)
+++ head/usr.sbin/pkg/config.c  Fri Mar 14 17:20:45 2014(r263180)
@@ -66,6 +66,7 @@ struct config_entry {
char *value;
STAILQ_HEAD(, config_value) *list;
bool envset;
+   bool main_only; /* Only set in pkg.conf. */
 };
 
 static struct config_entry c[] = {
@@ -76,6 +77,7 @@ static struct config_entry c[] = {
NULL,
NULL,
false,
+   false,
},
[ABI] = {
PKG_CONFIG_STRING,
@@ -84,6 +86,7 @@ static struct config_entry c[] = {
NULL,
NULL,
false,
+   true,
},
[MIRROR_TYPE] = {
PKG_CONFIG_STRING,
@@ -92,6 +95,7 @@ static struct config_entry c[] = {
NULL,
NULL,
false,
+   false,
},
[ASSUME_ALWAYS_YES] = {
PKG_CONFIG_BOOL,
@@ -100,6 +104,7 @@ static struct config_entry c[] = {
NULL,
NULL,
false,
+   true,
},
[SIGNATURE_TYPE] = {
PKG_CONFIG_STRING,
@@ -108,6 +113,7 @@ static struct config_entry c[] = {
NULL,
NULL,
false,
+   false,
},
[FINGERPRINTS] = {
PKG_CONFIG_STRING,
@@ -116,6 +122,7 @@ static struct config_entry c[] = {
NULL,
NULL,
false,
+   false,
},
[REPOS_DIR] = {
PKG_CONFIG_LIST,
@@ -124,6 +131,7 @@ static struct config_entry c[] = {
NULL,
NULL,
false,
+   true,
},
 };
 
@@ -597,6 +605,9 @@ config_parse(ucl_object_t *obj, pkg_conf
for (i = 0; i < CONFIG_SIZE; i++) {
if (c[i].envset)
continue;
+   /* Prevent overriding ABI, ASSUME_ALWAYS_YES, etc. */
+   if (conftype != CONFFILE_PKG && c[i].main_only == true)
+   continue;
switch (c[i].type) {
case PKG_CONFIG_LIST:
c[i].list = temp_config[i].list;
___
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: r263181 - head/usr.sbin/pkg

2014-03-14 Thread Bryan Drewery
Author: bdrewery
Date: Fri Mar 14 17:37:38 2014
New Revision: 263181
URL: http://svnweb.freebsd.org/changeset/base/263181

Log:
  Fix ASSUME_ALWAYS_YES not being parsed properly from config after UCL 
conversion.
  
  Sponsored by: EMC / Isilon Storage Division
  MFC after:1 week

Modified:
  head/usr.sbin/pkg/config.c

Modified: head/usr.sbin/pkg/config.c
==
--- head/usr.sbin/pkg/config.c  Fri Mar 14 17:20:45 2014(r263180)
+++ head/usr.sbin/pkg/config.c  Fri Mar 14 17:37:38 2014(r263181)
@@ -594,6 +594,10 @@ config_parse(ucl_object_t *obj, pkg_conf
next);
}
break;
+   case PKG_CONFIG_BOOL:
+   temp_config[i].value =
+   strdup(ucl_object_toboolean(cur) ? "yes" : "no");
+   break;
default:
/* Normal string value. */
temp_config[i].value = strdup(ucl_object_tostring(cur));
___
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: r263287 - head/tools/tools/nanobsd

2014-03-17 Thread Bryan Drewery
Author: bdrewery
Date: Tue Mar 18 01:14:49 2014
New Revision: 263287
URL: http://svnweb.freebsd.org/changeset/base/263287

Log:
  'pkg(8) add' has no internal restriction on number of packages.
  
  Submitted by: tj
  MFC after:1 week

Modified:
  head/tools/tools/nanobsd/nanobsd.sh

Modified: head/tools/tools/nanobsd/nanobsd.sh
==
--- head/tools/tools/nanobsd/nanobsd.sh Tue Mar 18 01:00:14 2014
(r263286)
+++ head/tools/tools/nanobsd/nanobsd.sh Tue Mar 18 01:14:49 2014
(r263287)
@@ -809,10 +809,9 @@ cust_pkgng () (
'env ASSUME_ALWAYS_YES=YES /usr/sbin/pkg info | 
/usr/bin/wc -l'`
 
# Attempt to install more packages
-   # ...but no more than 200 at a time due to (XXX still the 
case?) pkg_add's internal
# limitations.
chroot ${NANO_WORLDDIR} sh -c \
-   'ls Pkg/*txz | xargs -n 200 env ASSUME_ALWAYS_YES=YES 
/usr/sbin/pkg add ' || true
+   'ls Pkg/*txz | xargs env ASSUME_ALWAYS_YES=YES 
/usr/sbin/pkg add ' || true
 
# See what that got us
now=`chroot ${NANO_WORLDDIR} sh -c \
___
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: r263288 - head/tools/tools/nanobsd

2014-03-17 Thread Bryan Drewery
Author: bdrewery
Date: Tue Mar 18 01:17:08 2014
New Revision: 263288
URL: http://svnweb.freebsd.org/changeset/base/263288

Log:
  Remove comment meant for removal in r263287
  
  X-MFC-with:   263287

Modified:
  head/tools/tools/nanobsd/nanobsd.sh

Modified: head/tools/tools/nanobsd/nanobsd.sh
==
--- head/tools/tools/nanobsd/nanobsd.sh Tue Mar 18 01:14:49 2014
(r263287)
+++ head/tools/tools/nanobsd/nanobsd.sh Tue Mar 18 01:17:08 2014
(r263288)
@@ -809,7 +809,6 @@ cust_pkgng () (
'env ASSUME_ALWAYS_YES=YES /usr/sbin/pkg info | 
/usr/bin/wc -l'`
 
# Attempt to install more packages
-   # limitations.
chroot ${NANO_WORLDDIR} sh -c \
'ls Pkg/*txz | xargs env ASSUME_ALWAYS_YES=YES 
/usr/sbin/pkg add ' || true
 
___
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: r263325 - stable/10/lib/libfetch

2014-03-18 Thread Bryan Drewery
Author: bdrewery
Date: Wed Mar 19 00:53:24 2014
New Revision: 263325
URL: http://svnweb.freebsd.org/changeset/base/263325

Log:
  MFC r263021:
  
Support Last-Modified behind proxies which return UTC instead of GMT.

Modified:
  stable/10/lib/libfetch/http.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/lib/libfetch/http.c
==
--- stable/10/lib/libfetch/http.c   Wed Mar 19 00:38:27 2014
(r263324)
+++ stable/10/lib/libfetch/http.c   Wed Mar 19 00:53:24 2014
(r263325)
@@ -876,6 +876,12 @@ http_parse_mtime(const char *p, time_t *
strncpy(locale, setlocale(LC_TIME, NULL), sizeof(locale));
setlocale(LC_TIME, "C");
r = strptime(p, "%a, %d %b %Y %H:%M:%S GMT", &tm);
+   /*
+* Some proxies use UTC in response, but it should still be
+* parsed. RFC2616 states GMT and UTC are exactly equal for HTTP.
+*/
+   if (r == NULL)
+   r = strptime(p, "%a, %d %b %Y %H:%M:%S UTC", &tm);
/* XXX should add support for date-2 and date-3 */
setlocale(LC_TIME, locale);
if (r == NULL)
___
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: r263326 - stable/9/lib/libfetch

2014-03-18 Thread Bryan Drewery
Author: bdrewery
Date: Wed Mar 19 00:54:43 2014
New Revision: 263326
URL: http://svnweb.freebsd.org/changeset/base/263326

Log:
  MFC r263021:
  
Support Last-Modified behind proxies which return UTC instead of GMT.

Modified:
  stable/9/lib/libfetch/http.c
Directory Properties:
  stable/9/lib/libfetch/   (props changed)

Modified: stable/9/lib/libfetch/http.c
==
--- stable/9/lib/libfetch/http.cWed Mar 19 00:53:24 2014
(r263325)
+++ stable/9/lib/libfetch/http.cWed Mar 19 00:54:43 2014
(r263326)
@@ -878,6 +878,12 @@ http_parse_mtime(const char *p, time_t *
strncpy(locale, setlocale(LC_TIME, NULL), sizeof(locale));
setlocale(LC_TIME, "C");
r = strptime(p, "%a, %d %b %Y %H:%M:%S GMT", &tm);
+   /*
+* Some proxies use UTC in response, but it should still be
+* parsed. RFC2616 states GMT and UTC are exactly equal for HTTP.
+*/
+   if (r == NULL)
+   r = strptime(p, "%a, %d %b %Y %H:%M:%S UTC", &tm);
/* XXX should add support for date-2 and date-3 */
setlocale(LC_TIME, locale);
if (r == NULL)
___
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"


  1   2   3   4   5   6   7   8   9   10   >