CVS commit: src/sbin/mount_null

2016-07-24 Thread Eric Haszlakiewicz
Module Name:src
Committed By:   erh
Date:   Mon Jul 25 04:40:51 UTC 2016

Modified Files:
src/sbin/mount_null: mount_null.c

Log Message:
Eliminate the distinct path check, since the paths don't actually need to be
 distinct and allowing this makes certain useful tasks possible, such as
 fixing an unpopulated /dev while a tmpfs is mounted over it.
However, require the paths to be different, as mounting a path directly over
 itself has the side effect of causing any other mount points within that path
 to no longer be accessible, and is difficult to unmount when done on /.


To generate a diff of this commit:
cvs rdiff -u -r1.19 -r1.20 src/sbin/mount_null/mount_null.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sbin/mount_null

2016-07-24 Thread Eric Haszlakiewicz
Module Name:src
Committed By:   erh
Date:   Mon Jul 25 04:40:51 UTC 2016

Modified Files:
src/sbin/mount_null: mount_null.c

Log Message:
Eliminate the distinct path check, since the paths don't actually need to be
 distinct and allowing this makes certain useful tasks possible, such as
 fixing an unpopulated /dev while a tmpfs is mounted over it.
However, require the paths to be different, as mounting a path directly over
 itself has the side effect of causing any other mount points within that path
 to no longer be accessible, and is difficult to unmount when done on /.


To generate a diff of this commit:
cvs rdiff -u -r1.19 -r1.20 src/sbin/mount_null/mount_null.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sbin/mount_null/mount_null.c
diff -u src/sbin/mount_null/mount_null.c:1.19 src/sbin/mount_null/mount_null.c:1.20
--- src/sbin/mount_null/mount_null.c:1.19	Mon Aug 29 14:35:02 2011
+++ src/sbin/mount_null/mount_null.c	Mon Jul 25 04:40:51 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: mount_null.c,v 1.19 2011/08/29 14:35:02 joerg Exp $	*/
+/*	$NetBSD: mount_null.c,v 1.20 2016/07/25 04:40:51 erh Exp $	*/
 
 /*
  * Copyright (c) 1992, 1993, 1994
@@ -42,7 +42,7 @@ __COPYRIGHT("@(#) Copyright (c) 1992, 19
 #if 0
 static char sccsid[] = "@(#)mount_null.c	8.6 (Berkeley) 4/26/95";
 #else
-__RCSID("$NetBSD: mount_null.c,v 1.19 2011/08/29 14:35:02 joerg Exp $");
+__RCSID("$NetBSD: mount_null.c,v 1.20 2016/07/25 04:40:51 erh Exp $");
 #endif
 #endif /* not lint */
 
@@ -65,7 +65,6 @@ static const struct mntopt mopts[] = {
 };
 
 int	mount_null(int argc, char **argv);
-static int	subdir(const char *, const char *);
 __dead static void	usage(void);
 
 #ifndef MOUNT_NOMAIN
@@ -117,8 +116,8 @@ mount_null(int argc, char *argv[])
 		warnx("using \"%s\" instead.", canon_dir);
 	}
 
-	if (subdir(target, canon_dir) || subdir(canon_dir, target))
-		errx(1, "%s (%s) and %s (%s) are not distinct paths",
+	if (strcmp(target, canon_dir) == 0)
+		errx(1, "%s (%s) and %s (%s) are identical paths",
 		argv[0], target, argv[1], canon_dir);
 
 	args.la.target = target;
@@ -128,21 +127,6 @@ mount_null(int argc, char *argv[])
 	exit(0);
 }
 
-static int
-subdir(const char *p, const char *dir)
-{
-	int l;
-
-	l = strlen(dir);
-	if (l <= 1)
-		return (1);
-
-	if ((strncmp(p, dir, l) == 0) && (p[l] == '/' || p[l] == '\0'))
-		return (1);
-
-	return (0);
-}
-
 static void
 usage(void)
 {



CVS commit: src/share/mk

2014-11-30 Thread Eric Haszlakiewicz
Module Name:src
Committed By:   erh
Date:   Mon Dec  1 01:34:30 UTC 2014

Modified Files:
src/share/mk: bsd.dep.mk bsd.hostlib.mk bsd.hostprog.mk bsd.lib.mk
bsd.prog.mk

Log Message:
PR toolchain/9618: add .d to MKDEP_SUFFIXES so the depend files are rebuilt
if any of their dependencies (i.e. the files they refer to) are changed.
This allows changes to transitive included headers to be handled properly.


To generate a diff of this commit:
cvs rdiff -u -r1.81 -r1.82 src/share/mk/bsd.dep.mk
cvs rdiff -u -r1.18 -r1.19 src/share/mk/bsd.hostlib.mk
cvs rdiff -u -r1.73 -r1.74 src/share/mk/bsd.hostprog.mk
cvs rdiff -u -r1.355 -r1.356 src/share/mk/bsd.lib.mk
cvs rdiff -u -r1.290 -r1.291 src/share/mk/bsd.prog.mk

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/share/mk/bsd.dep.mk
diff -u src/share/mk/bsd.dep.mk:1.81 src/share/mk/bsd.dep.mk:1.82
--- src/share/mk/bsd.dep.mk:1.81	Sat Jul 19 17:19:22 2014
+++ src/share/mk/bsd.dep.mk	Mon Dec  1 01:34:30 2014
@@ -1,4 +1,4 @@
-#	$NetBSD: bsd.dep.mk,v 1.81 2014/07/19 17:19:22 plunky Exp $
+#	$NetBSD: bsd.dep.mk,v 1.82 2014/12/01 01:34:30 erh Exp $
 
 # Basic targets
 realdepend:	beforedepend .depend afterdepend
@@ -9,7 +9,7 @@ beforedepend .depend afterdepend: # ensu
 # Default values
 MKDEP?=			mkdep
 MKDEPCXX?=		mkdep
-MKDEP_SUFFIXES?=	.o
+MKDEP_SUFFIXES?=	.o .d
 
 # Build rules
 # some of the rules involve .h sources, so remove them from mkdep line

Index: src/share/mk/bsd.hostlib.mk
diff -u src/share/mk/bsd.hostlib.mk:1.18 src/share/mk/bsd.hostlib.mk:1.19
--- src/share/mk/bsd.hostlib.mk:1.18	Thu Apr 10 19:02:18 2014
+++ src/share/mk/bsd.hostlib.mk	Mon Dec  1 01:34:30 2014
@@ -1,4 +1,4 @@
-#	$NetBSD: bsd.hostlib.mk,v 1.18 2014/04/10 19:02:18 plunky Exp $
+#	$NetBSD: bsd.hostlib.mk,v 1.19 2014/12/01 01:34:30 erh Exp $
 
 .include bsd.init.mk
 .include bsd.sys.mk
@@ -7,7 +7,7 @@
 
 # Default values
 CFLAGS+=	${COPTS}
-MKDEP_SUFFIXES?=	.o .lo
+MKDEP_SUFFIXES?=	.o .lo .d
 
 # Override these:
 MKDEP:=		${HOST_MKDEP}

Index: src/share/mk/bsd.hostprog.mk
diff -u src/share/mk/bsd.hostprog.mk:1.73 src/share/mk/bsd.hostprog.mk:1.74
--- src/share/mk/bsd.hostprog.mk:1.73	Thu Apr 10 19:02:18 2014
+++ src/share/mk/bsd.hostprog.mk	Mon Dec  1 01:34:30 2014
@@ -1,4 +1,4 @@
-#	$NetBSD: bsd.hostprog.mk,v 1.73 2014/04/10 19:02:18 plunky Exp $
+#	$NetBSD: bsd.hostprog.mk,v 1.74 2014/12/01 01:34:30 erh Exp $
 #	@(#)bsd.prog.mk	8.2 (Berkeley) 4/2/94
 
 .include bsd.init.mk
@@ -81,7 +81,7 @@ LIBRUMPFS_TMPFS?=	/usr/lib/librumpfs_tmp
 LIBRUMPFS_UDF?=		/usr/lib/librumpfs_udf.a
 LIBRUMPFS_UFS?=		/usr/lib/librumpfs_ufs.a
 
-MKDEP_SUFFIXES?=	.lo .ln
+MKDEP_SUFFIXES?=	.lo .ln .d
 
 # Override these:
 INSTALL:=	${INSTALL:NSTRIP=*}

Index: src/share/mk/bsd.lib.mk
diff -u src/share/mk/bsd.lib.mk:1.355 src/share/mk/bsd.lib.mk:1.356
--- src/share/mk/bsd.lib.mk:1.355	Fri Jun 13 01:17:45 2014
+++ src/share/mk/bsd.lib.mk	Mon Dec  1 01:34:30 2014
@@ -1,4 +1,4 @@
-#	$NetBSD: bsd.lib.mk,v 1.355 2014/06/13 01:17:45 mrg Exp $
+#	$NetBSD: bsd.lib.mk,v 1.356 2014/12/01 01:34:30 erh Exp $
 #	@(#)bsd.lib.mk	8.3 (Berkeley) 4/22/94
 
 .include bsd.init.mk
@@ -64,7 +64,7 @@ DPADD+=		${LIBDO.${_lib}}/lib${_lib}.so	
 .endif	# }
 
 # Build and install rules
-MKDEP_SUFFIXES?=	.o .po .pico .go .ln
+MKDEP_SUFFIXES?=	.o .po .pico .go .ln .d
 
 .if !defined(SHLIB_MAJOR)  exists(${SHLIB_VERSION_FILE})		# {
 SHLIB_MAJOR != . ${SHLIB_VERSION_FILE} ; echo $$major

Index: src/share/mk/bsd.prog.mk
diff -u src/share/mk/bsd.prog.mk:1.290 src/share/mk/bsd.prog.mk:1.291
--- src/share/mk/bsd.prog.mk:1.290	Tue Mar 25 09:52:55 2014
+++ src/share/mk/bsd.prog.mk	Mon Dec  1 01:34:30 2014
@@ -1,4 +1,4 @@
-#	$NetBSD: bsd.prog.mk,v 1.290 2014/03/25 09:52:55 ozaki-r Exp $
+#	$NetBSD: bsd.prog.mk,v 1.291 2014/12/01 01:34:30 erh Exp $
 #	@(#)bsd.prog.mk	8.2 (Berkeley) 4/2/94
 
 .ifndef HOSTPROG
@@ -59,7 +59,7 @@ CFLAGS+=	${COPTS}
 CFLAGS+=	-g
 .endif
 OBJCFLAGS+=	${OBJCOPTS}
-MKDEP_SUFFIXES?=	.o .ln
+MKDEP_SUFFIXES?=	.o .ln .d
 
 # CTF preserve debug symbols
 .if (${MKCTF:Uno} != no)  (${CFLAGS:M-g} != )



CVS commit: src/share/mk

2014-11-30 Thread Eric Haszlakiewicz
Module Name:src
Committed By:   erh
Date:   Mon Dec  1 01:34:30 UTC 2014

Modified Files:
src/share/mk: bsd.dep.mk bsd.hostlib.mk bsd.hostprog.mk bsd.lib.mk
bsd.prog.mk

Log Message:
PR toolchain/9618: add .d to MKDEP_SUFFIXES so the depend files are rebuilt
if any of their dependencies (i.e. the files they refer to) are changed.
This allows changes to transitive included headers to be handled properly.


To generate a diff of this commit:
cvs rdiff -u -r1.81 -r1.82 src/share/mk/bsd.dep.mk
cvs rdiff -u -r1.18 -r1.19 src/share/mk/bsd.hostlib.mk
cvs rdiff -u -r1.73 -r1.74 src/share/mk/bsd.hostprog.mk
cvs rdiff -u -r1.355 -r1.356 src/share/mk/bsd.lib.mk
cvs rdiff -u -r1.290 -r1.291 src/share/mk/bsd.prog.mk

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/arch/i386/stand/lib

2014-07-19 Thread Eric Haszlakiewicz
Module Name:src
Committed By:   erh
Date:   Sat Jul 19 14:50:21 UTC 2014

Modified Files:
src/sys/arch/i386/stand/lib: bios_disk.S

Log Message:
Fix bootxx_* and boot on machines where the bios sets high bits of %eax on 
success.


To generate a diff of this commit:
cvs rdiff -u -r1.21 -r1.22 src/sys/arch/i386/stand/lib/bios_disk.S

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/i386/stand/lib/bios_disk.S
diff -u src/sys/arch/i386/stand/lib/bios_disk.S:1.21 src/sys/arch/i386/stand/lib/bios_disk.S:1.22
--- src/sys/arch/i386/stand/lib/bios_disk.S:1.21	Thu Jun 16 13:27:59 2011
+++ src/sys/arch/i386/stand/lib/bios_disk.S	Sat Jul 19 14:50:21 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: bios_disk.S,v 1.21 2011/06/16 13:27:59 joerg Exp $	*/
+/*	$NetBSD: bios_disk.S,v 1.22 2014/07/19 14:50:21 erh Exp $	*/
 
 /*
  * Ported to boot 386BSD by Julian Elischer (jul...@tfs.com) Sept 1992
@@ -133,6 +133,9 @@ ENTRY(biosdisk_read)
 	calll	_C_LABEL(real_to_prot) # back to protected mode
 	.code32
 
+	andl$0x, %eax  # Some bioses set high bits in %eax
+	   #  on success, interfering with our
+	   #  return value.  Clear those out.
 	movl	%eax, 28(%esp)
 
 	popa



CVS commit: src/sys/arch/i386/stand/lib

2014-07-19 Thread Eric Haszlakiewicz
Module Name:src
Committed By:   erh
Date:   Sat Jul 19 14:50:21 UTC 2014

Modified Files:
src/sys/arch/i386/stand/lib: bios_disk.S

Log Message:
Fix bootxx_* and boot on machines where the bios sets high bits of %eax on 
success.


To generate a diff of this commit:
cvs rdiff -u -r1.21 -r1.22 src/sys/arch/i386/stand/lib/bios_disk.S

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/usr.bin/stat

2012-12-02 Thread Eric Haszlakiewicz
Module Name:src
Committed By:   erh
Date:   Sun Dec  2 21:13:07 UTC 2012

Modified Files:
src/usr.bin/stat: stat.1 stat.c

Log Message:
Honor the -t option to set the time format when running stat -s.
Document the format used by -s on the man page.


To generate a diff of this commit:
cvs rdiff -u -r1.34 -r1.35 src/usr.bin/stat/stat.1
cvs rdiff -u -r1.36 -r1.37 src/usr.bin/stat/stat.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/usr.bin/stat/stat.1
diff -u src/usr.bin/stat/stat.1:1.34 src/usr.bin/stat/stat.1:1.35
--- src/usr.bin/stat/stat.1:1.34	Thu Sep 22 20:23:55 2011
+++ src/usr.bin/stat/stat.1	Sun Dec  2 21:13:07 2012
@@ -1,4 +1,4 @@
-.\	$NetBSD: stat.1,v 1.34 2011/09/22 20:23:55 apb Exp $
+.\	$NetBSD: stat.1,v 1.35 2012/12/02 21:13:07 erh Exp $
 .\
 .\ Copyright (c) 2002-2011 The NetBSD Foundation, Inc.
 .\ All rights reserved.
@@ -168,6 +168,17 @@ suitable for initializing variables.
 When run as
 .Nm readlink ,
 suppress error messages.
+This is equivalent to specifying 
+.Bd -literal 
+FMT=st_dev=%d st_ino=%i st_mode=%#p st_nlink=%l st_uid=%u st_gid=%g
+FMT=$FMT st_rdev=%r st_size=%z st_atime=%Sa st_mtime=%Sm st_ctime=%Sc
+FMT=$FMT st_birthtime=%SB st_blksize=%k st_blocks=%b st_flags=%f
+stat -t %s -f $FMT .
+.Ed
+Note that if you use a timeformat that contains embedded whitespace or shell 
+meta-characters you will need to include appropriate quoting so the
+.Fl s
+output remains valid.
 .It Fl t Ar timefmt
 Display timestamps using the specified format.
 This format is

Index: src/usr.bin/stat/stat.c
diff -u src/usr.bin/stat/stat.c:1.36 src/usr.bin/stat/stat.c:1.37
--- src/usr.bin/stat/stat.c:1.36	Thu Sep 22 20:23:56 2011
+++ src/usr.bin/stat/stat.c	Sun Dec  2 21:13:07 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: stat.c,v 1.36 2011/09/22 20:23:56 apb Exp $ */
+/*	$NetBSD: stat.c,v 1.37 2012/12/02 21:13:07 erh Exp $ */
 
 /*
  * Copyright (c) 2002-2011 The NetBSD Foundation, Inc.
@@ -35,7 +35,7 @@
 
 #include sys/cdefs.h
 #if !defined(lint)
-__RCSID($NetBSD: stat.c,v 1.36 2011/09/22 20:23:56 apb Exp $);
+__RCSID($NetBSD: stat.c,v 1.37 2012/12/02 21:13:07 erh Exp $);
 #endif
 
 #if ! HAVE_NBTOOL_CONFIG_H
@@ -76,7 +76,7 @@ __RCSID($NetBSD: stat.c,v 1.36 2011/09/
 #if HAVE_STRUCT_STAT_ST_BIRTHTIME
 #define DEF_B \%SB\ 
 #define RAW_B %B 
-#define SHELL_B st_birthtime=%B 
+#define SHELL_B st_birthtime=%SB 
 #else /* HAVE_STRUCT_STAT_ST_BIRTHTIME */
 #define DEF_B
 #define RAW_B
@@ -99,7 +99,7 @@ __RCSID($NetBSD: stat.c,v 1.36 2011/09/
 #define SHELL_FORMAT \
 	st_dev=%d st_ino=%i st_mode=%#p st_nlink=%l  \
 	st_uid=%u st_gid=%g st_rdev=%r st_size=%z  \
-	st_atime=%a st_mtime=%m st_ctime=%c  SHELL_B \
+	st_atime=%Sa st_mtime=%Sm st_ctime=%Sc  SHELL_B \
 	st_blksize=%k st_blocks=%b SHELL_F
 #define LINUX_FORMAT \
 	  File: \%N\%n \
@@ -299,6 +299,8 @@ main(int argc, char *argv[])
 		break;
 	case 's':
 		statfmt = SHELL_FORMAT;
+		if (timefmt == NULL)
+			timefmt = %s;
 		break;
 	case 'x':
 		statfmt = LINUX_FORMAT;



CVS commit: src/usr.bin/stat

2012-12-02 Thread Eric Haszlakiewicz
Module Name:src
Committed By:   erh
Date:   Sun Dec  2 21:13:07 UTC 2012

Modified Files:
src/usr.bin/stat: stat.1 stat.c

Log Message:
Honor the -t option to set the time format when running stat -s.
Document the format used by -s on the man page.


To generate a diff of this commit:
cvs rdiff -u -r1.34 -r1.35 src/usr.bin/stat/stat.1
cvs rdiff -u -r1.36 -r1.37 src/usr.bin/stat/stat.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src

2012-05-13 Thread Eric Haszlakiewicz
Module Name:src
Committed By:   erh
Date:   Mon May 14 04:28:28 UTC 2012

Modified Files:
src/share/man/man4: uhid.4
src/sys/dev/usb: uhid.c

Log Message:
Implement USB_GET_DEVICE_DESC for uhid devices so there's a way to get the
product and vendor information.


To generate a diff of this commit:
cvs rdiff -u -r1.20 -r1.21 src/share/man/man4/uhid.4
cvs rdiff -u -r1.86 -r1.87 src/sys/dev/usb/uhid.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/share/man/man4/uhid.4
diff -u src/share/man/man4/uhid.4:1.20 src/share/man/man4/uhid.4:1.21
--- src/share/man/man4/uhid.4:1.20	Wed Apr 30 13:10:54 2008
+++ src/share/man/man4/uhid.4	Mon May 14 04:28:27 2012
@@ -1,4 +1,4 @@
-.\ $NetBSD: uhid.4,v 1.20 2008/04/30 13:10:54 martin Exp $
+.\ $NetBSD: uhid.4,v 1.21 2012/05/14 04:28:27 erh Exp $
 .\
 .\ Copyright (c) 1999, 2001 The NetBSD Foundation, Inc.
 .\ All rights reserved.
@@ -115,6 +115,8 @@ It should be
 or
 .Dv UHID_FEATURE_REPORT .
 This call may fail if the device does not support this feature.
+.It Dv USB_GET_DEVICE_DESC (usb_device_descriptor_t)
+Return the device descriptor.
 .It Dv USB_GET_DEVICEINFO (struct usb_device_info)
 Get an information summary for the device.
 This call will not issue any USB transactions.

Index: src/sys/dev/usb/uhid.c
diff -u src/sys/dev/usb/uhid.c:1.86 src/sys/dev/usb/uhid.c:1.87
--- src/sys/dev/usb/uhid.c:1.86	Tue Mar  6 03:35:29 2012
+++ src/sys/dev/usb/uhid.c	Mon May 14 04:28:28 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: uhid.c,v 1.86 2012/03/06 03:35:29 mrg Exp $	*/
+/*	$NetBSD: uhid.c,v 1.87 2012/05/14 04:28:28 erh Exp $	*/
 
 /*
  * Copyright (c) 1998, 2004, 2008 The NetBSD Foundation, Inc.
@@ -35,7 +35,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: uhid.c,v 1.86 2012/03/06 03:35:29 mrg Exp $);
+__KERNEL_RCSID(0, $NetBSD: uhid.c,v 1.87 2012/05/14 04:28:28 erh Exp $);
 
 #include opt_compat_netbsd.h
 
@@ -570,6 +570,11 @@ uhid_do_ioctl(struct uhid_softc *sc, u_l
 		*(int *)addr = sc-sc_hdev.sc_report_id;
 		break;
 
+	case USB_GET_DEVICE_DESC:
+		*(usb_device_descriptor_t *)addr =
+			*usbd_get_device_descriptor(sc-sc_hdev.sc_parent-sc_udev);
+		break;
+
 	case USB_GET_DEVICEINFO:
 		usbd_fill_deviceinfo(sc-sc_hdev.sc_parent-sc_udev,
 			 (struct usb_device_info *)addr, 0);



CVS commit: src

2012-05-13 Thread Eric Haszlakiewicz
Module Name:src
Committed By:   erh
Date:   Mon May 14 04:28:28 UTC 2012

Modified Files:
src/share/man/man4: uhid.4
src/sys/dev/usb: uhid.c

Log Message:
Implement USB_GET_DEVICE_DESC for uhid devices so there's a way to get the
product and vendor information.


To generate a diff of this commit:
cvs rdiff -u -r1.20 -r1.21 src/share/man/man4/uhid.4
cvs rdiff -u -r1.86 -r1.87 src/sys/dev/usb/uhid.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/dev/raidframe

2011-11-05 Thread Eric Haszlakiewicz
Module Name:src
Committed By:   erh
Date:   Sat Nov  5 16:40:36 UTC 2011

Modified Files:
src/sys/dev/raidframe: rf_netbsdkintf.c

Log Message:
Statically initialize the raidautoconfig variable when RAID_AUTOCONFIG is set,
instead of setting it in code, so it can easily be checked and changed in an
on-disk kernel with gdb.  Use a separate raidautoconfigdone variable to keep
track of whether raid configuration has actually occurred.


To generate a diff of this commit:
cvs rdiff -u -r1.294 -r1.295 src/sys/dev/raidframe/rf_netbsdkintf.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/dev/raidframe/rf_netbsdkintf.c
diff -u src/sys/dev/raidframe/rf_netbsdkintf.c:1.294 src/sys/dev/raidframe/rf_netbsdkintf.c:1.295
--- src/sys/dev/raidframe/rf_netbsdkintf.c:1.294	Wed Aug  3 14:44:38 2011
+++ src/sys/dev/raidframe/rf_netbsdkintf.c	Sat Nov  5 16:40:35 2011
@@ -1,7 +1,7 @@
-/*	$NetBSD: rf_netbsdkintf.c,v 1.294 2011/08/03 14:44:38 oster Exp $	*/
+/*	$NetBSD: rf_netbsdkintf.c,v 1.295 2011/11/05 16:40:35 erh Exp $	*/
 
 /*-
- * Copyright (c) 1996, 1997, 1998, 2008 The NetBSD Foundation, Inc.
+ * Copyright (c) 1996, 1997, 1998, 2008-2011 The NetBSD Foundation, Inc.
  * All rights reserved.
  *
  * This code is derived from software contributed to The NetBSD Foundation
@@ -101,7 +101,7 @@
  ***/
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: rf_netbsdkintf.c,v 1.294 2011/08/03 14:44:38 oster Exp $);
+__KERNEL_RCSID(0, $NetBSD: rf_netbsdkintf.c,v 1.295 2011/11/05 16:40:35 erh Exp $);
 
 #ifdef _KERNEL_OPT
 #include opt_compat_netbsd.h
@@ -307,11 +307,17 @@ int rf_have_enough_components(RF_ConfigS
 int rf_auto_config_set(RF_ConfigSet_t *, int *);
 static void rf_fix_old_label_size(RF_ComponentLabel_t *, uint64_t);
 
-static int raidautoconfig = 0; /* Debugging, mostly.  Set to 0 to not
-  allow autoconfig to take place.
-  Note that this is overridden by having
-  RAID_AUTOCONFIG as an option in the
-  kernel config file.  */
+/*
+ * Debugging, mostly.  Set to 0 to not allow autoconfig to take place.
+ * Note that this is overridden by having RAID_AUTOCONFIG as an option
+ * in the kernel config file.
+ */
+#ifdef RAID_AUTOCONFIG
+int raidautoconfig = 1;
+#else
+int raidautoconfig = 0;
+#endif
+static bool raidautoconfigdone = false;
 
 struct RF_Pools_s rf_pools;
 
@@ -385,9 +391,7 @@ raidattach(int num)
 		aprint_error(raidattach: config_cfattach_attach failed?\n);
 	}
 
-#ifdef RAID_AUTOCONFIG
-	raidautoconfig = 1;
-#endif
+	raidautoconfigdone = false;
 
 	/*
 	 * Register a finalizer which will be used to auto-config RAID
@@ -403,11 +407,11 @@ rf_autoconfig(device_t self)
 	RF_AutoConfig_t *ac_list;
 	RF_ConfigSet_t *config_sets;
 
-	if (raidautoconfig == 0)
+	if (!raidautoconfig || raidautoconfigdone == true)
 		return (0);
 
 	/* XXX This code can only be run once. */
-	raidautoconfig = 0;
+	raidautoconfigdone = true;
 
 	/* 1. locate all RAID components on the system */
 	aprint_debug(Searching for RAID components...\n);
@@ -510,7 +514,7 @@ rf_buildroothack(RF_ConfigSet_t *config_
 rootID = raidID;
 			}
 		}
- 
+
 		if (num_root == 1) {
 			booted_device = raid_softc[rootID].sc_dev;
 		} else {



CVS commit: src/sys/dev/raidframe

2011-11-05 Thread Eric Haszlakiewicz
Module Name:src
Committed By:   erh
Date:   Sat Nov  5 16:40:36 UTC 2011

Modified Files:
src/sys/dev/raidframe: rf_netbsdkintf.c

Log Message:
Statically initialize the raidautoconfig variable when RAID_AUTOCONFIG is set,
instead of setting it in code, so it can easily be checked and changed in an
on-disk kernel with gdb.  Use a separate raidautoconfigdone variable to keep
track of whether raid configuration has actually occurred.


To generate a diff of this commit:
cvs rdiff -u -r1.294 -r1.295 src/sys/dev/raidframe/rf_netbsdkintf.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/etc/root

2011-06-20 Thread Eric Haszlakiewicz
Module Name:src
Committed By:   erh
Date:   Tue Jun 21 05:31:29 UTC 2011

Modified Files:
src/etc/root: dot.cshrc dot.profile

Log Message:
There is no .../5.99 path to use for PKG_PATH, so change it to 5.1 instead.
Also refer the reader to pkg_install.conf as an alternative.


To generate a diff of this commit:
cvs rdiff -u -r1.21 -r1.22 src/etc/root/dot.cshrc
cvs rdiff -u -r1.24 -r1.25 src/etc/root/dot.profile

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/etc/root/dot.cshrc
diff -u src/etc/root/dot.cshrc:1.21 src/etc/root/dot.cshrc:1.22
--- src/etc/root/dot.cshrc:1.21	Wed Aug 26 11:15:25 2009
+++ src/etc/root/dot.cshrc	Tue Jun 21 05:31:29 2011
@@ -1,4 +1,4 @@
-#	$NetBSD: dot.cshrc,v 1.21 2009/08/26 11:15:25 tsutsui Exp $
+#	$NetBSD: dot.cshrc,v 1.22 2011/06/21 05:31:29 erh Exp $
 
 alias	h	history
 alias	j	jobs -l
@@ -21,9 +21,9 @@
 setenv BLOCKSIZE 1k
 
 # Uncomment the following line(s) to install binary packages
-# from ftp.NetBSD.org via pkg_add.
-#setenv PKG_PATH ftp://ftp.NetBSD.org/pub/pkgsrc/packages/NetBSD/`uname -m`/5.99/All
-#setenv PKG_PATH ${PKG_PATH};ftp://ftp.NetBSD.org/pub/pkgsrc/packages/NetBSD/`uname -m`/5.0/All
+# from ftp.NetBSD.org via pkg_add.  (See also pkg_install.conf)
+#setenv PKG_PATH ftp://ftp.NetBSD.org/pub/pkgsrc/packages/NetBSD/$(uname -m)/5.1/All
+#setenv PKG_PATH ${PKG_PATH};ftp://ftp.NetBSD.org/pub/pkgsrc/packages/NetBSD/$(uname -m)/5.0/All
 
 set history=1000
 set path=(/sbin /usr/sbin /bin /usr/bin /usr/pkg/sbin /usr/pkg/bin /usr/X11R7/bin /usr/X11R6/bin /usr/local/sbin /usr/local/bin)

Index: src/etc/root/dot.profile
diff -u src/etc/root/dot.profile:1.24 src/etc/root/dot.profile:1.25
--- src/etc/root/dot.profile:1.24	Mon Dec 27 03:38:53 2010
+++ src/etc/root/dot.profile	Tue Jun 21 05:31:29 2011
@@ -1,11 +1,11 @@
-#	$NetBSD: dot.profile,v 1.24 2010/12/27 03:38:53 christos Exp $
+#	$NetBSD: dot.profile,v 1.25 2011/06/21 05:31:29 erh Exp $
 
 export PATH=/sbin:/usr/sbin:/bin:/usr/bin:/usr/pkg/sbin:/usr/pkg/bin
 export PATH=${PATH}:/usr/X11R7/bin:/usr/X11R6/bin:/usr/local/sbin:/usr/local/bin
 
 # Uncomment the following line(s) to install binary packages
-# from ftp.NetBSD.org via pkg_add.
-#export PKG_PATH=ftp://ftp.NetBSD.org/pub/pkgsrc/packages/NetBSD/$(uname -m)/5.99/All
+# from ftp.NetBSD.org via pkg_add.  (See also pkg_install.conf)
+#export PKG_PATH=ftp://ftp.NetBSD.org/pub/pkgsrc/packages/NetBSD/$(uname -m)/5.1/All
 #export PKG_PATH=${PKG_PATH};ftp://ftp.NetBSD.org/pub/pkgsrc/packages/NetBSD/$(uname -m)/5.0/All
 
 export BLOCKSIZE=1k



CVS commit: src/etc/root

2011-06-20 Thread Eric Haszlakiewicz
Module Name:src
Committed By:   erh
Date:   Tue Jun 21 05:31:29 UTC 2011

Modified Files:
src/etc/root: dot.cshrc dot.profile

Log Message:
There is no .../5.99 path to use for PKG_PATH, so change it to 5.1 instead.
Also refer the reader to pkg_install.conf as an alternative.


To generate a diff of this commit:
cvs rdiff -u -r1.21 -r1.22 src/etc/root/dot.cshrc
cvs rdiff -u -r1.24 -r1.25 src/etc/root/dot.profile

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/lib/libc/gen

2011-03-15 Thread Eric Haszlakiewicz
Module Name:src
Committed By:   erh
Date:   Wed Mar 16 01:30:25 UTC 2011

Modified Files:
src/lib/libc/gen: Makefile.inc

Log Message:
Remove one last reference to commaize_number.3


To generate a diff of this commit:
cvs rdiff -u -r1.176 -r1.177 src/lib/libc/gen/Makefile.inc

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/lib/libc/gen/Makefile.inc
diff -u src/lib/libc/gen/Makefile.inc:1.176 src/lib/libc/gen/Makefile.inc:1.177
--- src/lib/libc/gen/Makefile.inc:1.176	Wed Mar 16 00:50:28 2011
+++ src/lib/libc/gen/Makefile.inc	Wed Mar 16 01:30:24 2011
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.inc,v 1.176 2011/03/16 00:50:28 christos Exp $
+#	$NetBSD: Makefile.inc,v 1.177 2011/03/16 01:30:24 erh Exp $
 #	from: @(#)Makefile.inc	8.6 (Berkeley) 5/4/95
 
 # gen sources
@@ -52,7 +52,7 @@
 .include ${ARCHDIR}/gen/Makefile.inc
 
 MAN+=	alarm.3 arc4random.3 basename.3 bswap.3 clock.3 closefrom.3 \
-	commaize_number.3 confstr.3 \
+	confstr.3 \
 	cpuset.3 ctermid.3 ctype.3 daemon.3 devname.3 directory.3 dirname.3 \
 	endutxent.3 err.3 exec.3 extattr.3 \
 	fmtcheck.3 fmtmsg.3 fnmatch.3 fpclassify.3 fpgetmask.3 \



CVS commit: src/lib/libc/gen

2011-03-15 Thread Eric Haszlakiewicz
Module Name:src
Committed By:   erh
Date:   Wed Mar 16 01:30:25 UTC 2011

Modified Files:
src/lib/libc/gen: Makefile.inc

Log Message:
Remove one last reference to commaize_number.3


To generate a diff of this commit:
cvs rdiff -u -r1.176 -r1.177 src/lib/libc/gen/Makefile.inc

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/lib/libc/gen

2011-03-14 Thread Eric Haszlakiewicz
Module Name:src
Committed By:   erh
Date:   Tue Mar 15 03:47:04 UTC 2011

Modified Files:
src/lib/libc/gen: Makefile.inc
Added Files:
src/lib/libc/gen: commaize_number.3 commaize_number.c

Log Message:
PR#7540, add a commaize_number function, which inserts comma into a string
 of digits to make it more readable.  This is soon to be used in /bin/ls.


To generate a diff of this commit:
cvs rdiff -u -r1.174 -r1.175 src/lib/libc/gen/Makefile.inc
cvs rdiff -u -r0 -r1.1 src/lib/libc/gen/commaize_number.3 \
src/lib/libc/gen/commaize_number.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/lib/libc/gen/Makefile.inc
diff -u src/lib/libc/gen/Makefile.inc:1.174 src/lib/libc/gen/Makefile.inc:1.175
--- src/lib/libc/gen/Makefile.inc:1.174	Sat Mar 12 19:52:48 2011
+++ src/lib/libc/gen/Makefile.inc	Tue Mar 15 03:47:04 2011
@@ -1,11 +1,12 @@
-#	$NetBSD: Makefile.inc,v 1.174 2011/03/12 19:52:48 christos Exp $
+#	$NetBSD: Makefile.inc,v 1.175 2011/03/15 03:47:04 erh Exp $
 #	from: @(#)Makefile.inc	8.6 (Berkeley) 5/4/95
 
 # gen sources
 .PATH: ${ARCHDIR}/gen ${.CURDIR}/gen
 
 SRCS+= 	_errno.c alarm.c alphasort.c arc4random.c assert.c basename.c clock.c \
-	closedir.c closefrom.c confstr.c ctermid.c ctype_.c daemon.c \
+	closedir.c closefrom.c commaize_number.c \
+	confstr.c ctermid.c ctype_.c daemon.c \
 	dehumanize_number.c devname.c dirname.c disklabel.c err.c errx.c \
 	errlist.c errno.c execl.c execle.c execlp.c execv.c execvp.c \
 	extattr.c fmtcheck.c fmtmsg.c fnmatch.c fstab.c ftok.c \
@@ -50,7 +51,8 @@
 
 .include ${ARCHDIR}/gen/Makefile.inc
 
-MAN+=	alarm.3 arc4random.3 basename.3 bswap.3 clock.3 closefrom.3 confstr.3 \
+MAN+=	alarm.3 arc4random.3 basename.3 bswap.3 clock.3 closefrom.3 \
+	commaize_number.3 confstr.3 \
 	cpuset.3 ctermid.3 ctype.3 daemon.3 devname.3 directory.3 dirname.3 \
 	endutxent.3 err.3 exec.3 extattr.3 \
 	fmtcheck.3 fmtmsg.3 fnmatch.3 fpclassify.3 fpgetmask.3 \

Added files:

Index: src/lib/libc/gen/commaize_number.3
diff -u /dev/null src/lib/libc/gen/commaize_number.3:1.1
--- /dev/null	Tue Mar 15 03:47:04 2011
+++ src/lib/libc/gen/commaize_number.3	Tue Mar 15 03:47:04 2011
@@ -0,0 +1,83 @@
+.\	$NetBSD: commaize_number.3,v 1.1 2011/03/15 03:47:04 erh Exp $
+.\
+.\ Copyright (c) 2011 The NetBSD Foundation, Inc.
+.\ All rights reserved.
+.\
+.\ This code is derived from software contributed to The NetBSD Foundation
+.\ by Eric Haszlakiewicz.
+.\
+.\ Redistribution and use in source and binary forms, with or without
+.\ modification, are permitted provided that the following conditions
+.\ are met:
+.\ 1. Redistributions of source code must retain the above copyright
+.\notice, this list of conditions and the following disclaimer.
+.\ 2. Redistributions in binary form must reproduce the above copyright
+.\notice, this list of conditions and the following disclaimer in the
+.\documentation and/or other materials provided with the distribution.
+.\
+.\ THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
+.\ ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+.\ TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+.\ PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
+.\ BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+.\ CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+.\ SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+.\ INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+.\ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+.\ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+.\ POSSIBILITY OF SUCH DAMAGE.
+.\
+.Dd March 12, 2011
+.Dt COMMAIZE_NUMBER 3
+.Os
+.Sh NAME
+.Nm commaize_number
+.Nd format a number into a human readable form by adding commas (actually, the locale specific thousands separator)
+.Sh SYNOPSIS
+.In stdlib.h
+.Ft int
+.Fn commaize_number char *buffer size_t len int64_t number
+.Sh DESCRIPTION
+The
+.Fn commaize_number
+function formats the signed 64 bit quantity given in
+.Fa number
+into
+.Fa buffer ,
+which 
+must be at least
+.Fa len
+bytes long.
+.Pp
+If the formatted number would be too long to fit into
+.Fa buffer ,
+then an error is returned.
+.Sh RETURN VALUES
+.Fn commaize_number
+returns the number of characters stored in
+.Fa buffer
+(excluding the terminating NUL) upon success, or \-1 upon failure with 
+.Va errno
+set to indicate the error.
+.Sh ERRORS
+.Fn commaize_number
+will fail and nothing will be written to
+.Fa buffer
+if:
+.Bl -tag -width Er
+.It Bq Er ENOMEM
+The formatted number, including commas and terminating NUL, is too long to fit in
+.Fa len
+bytes.
+.El
+.Sh SEE ALSO
+.Xr humanize_number 9 ,
+.Xr setlocale 3 ,
+.Xr ls 1 .
+.Sh HISTORY
+.Fn humanize_number
+first appeared in
+.Nx

CVS commit: src/bin/ls

2011-03-14 Thread Eric Haszlakiewicz
Module Name:src
Committed By:   erh
Date:   Tue Mar 15 03:52:38 UTC 2011

Modified Files:
src/bin/ls: ls.1 ls.c ls.h print.c

Log Message:
PR#7540, add a -M option to ls which causes sizes (and number of blocks) to be
displayed with comma separators (or a locale specific separator).


To generate a diff of this commit:
cvs rdiff -u -r1.66 -r1.67 src/bin/ls/ls.1
cvs rdiff -u -r1.67 -r1.68 src/bin/ls/ls.c
cvs rdiff -u -r1.17 -r1.18 src/bin/ls/ls.h
cvs rdiff -u -r1.48 -r1.49 src/bin/ls/print.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/bin/ls/ls.1
diff -u src/bin/ls/ls.1:1.66 src/bin/ls/ls.1:1.67
--- src/bin/ls/ls.1:1.66	Fri Dec 17 19:20:42 2010
+++ src/bin/ls/ls.1	Tue Mar 15 03:52:37 2011
@@ -1,4 +1,4 @@
-.\	$NetBSD: ls.1,v 1.66 2010/12/17 19:20:42 njoly Exp $
+.\	$NetBSD: ls.1,v 1.67 2011/03/15 03:52:37 erh Exp $
 .\
 .\ Copyright (c) 1980, 1990, 1991, 1993, 1994
 .\	The Regents of the University of California.  All rights reserved.
@@ -129,7 +129,9 @@
 options, causing the sizes to be reported in bytes displayed in a human
 readable format.
 Overrides
-.Fl k .
+.Fl k
+and
+.Fl M .
 .It Fl i
 For each file, print the file's file serial number (inode number).
 .It Fl k
@@ -142,7 +144,9 @@
 .Fl h
 flags overrides the previous flag.
 See also
-.Fl h .
+.Fl h 
+and
+.Fl M .
 .It Fl L
 For each file, if it's a link, evaluate file information and file type
 of the referenced file and not the link itself; however still print
@@ -156,6 +160,18 @@
 (See below.)
 A total sum for all the file sizes is output on a line before the long
 listing.
+.It Fl M
+Modifies the
+.Fl l
+and
+.Fl s
+options, causing the sizes or block counts reported to be separated with 
+commas (or a locale appropriate separator) resulting in a more readable
+output.
+Overrides 
+.Fl h .
+Does not override
+.Fl k .
 .It Fl m
 Stream output format; list files across the page, separated by commas.
 .It Fl n

Index: src/bin/ls/ls.c
diff -u src/bin/ls/ls.c:1.67 src/bin/ls/ls.c:1.68
--- src/bin/ls/ls.c:1.67	Thu Jul  8 20:43:34 2010
+++ src/bin/ls/ls.c	Tue Mar 15 03:52:37 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: ls.c,v 1.67 2010/07/08 20:43:34 rmind Exp $	*/
+/*	$NetBSD: ls.c,v 1.68 2011/03/15 03:52:37 erh Exp $	*/
 
 /*
  * Copyright (c) 1989, 1993, 1994
@@ -42,7 +42,7 @@
 #if 0
 static char sccsid[] = @(#)ls.c	8.7 (Berkeley) 8/5/94;
 #else
-__RCSID($NetBSD: ls.c,v 1.67 2010/07/08 20:43:34 rmind Exp $);
+__RCSID($NetBSD: ls.c,v 1.68 2011/03/15 03:52:37 erh Exp $);
 #endif
 #endif /* not lint */
 
@@ -91,6 +91,7 @@
 int f_flags;			/* show flags associated with a file */
 int f_grouponly;		/* long listing without owner */
 int f_humanize;			/* humanize the size field */
+int f_commas;   /* separate size field with comma */
 int f_inode;			/* print inode */
 int f_listdir;			/* list actual directory, not contents */
 int f_listdot;			/* list files beginning with . */
@@ -137,7 +138,7 @@
 		f_listdot = 1;
 
 	fts_options = FTS_PHYSICAL;
-	while ((ch = getopt(argc, argv, 1ABCFLRSTWabcdfghiklmnopqrstuwx)) != -1) {
+	while ((ch = getopt(argc, argv, 1ABCFLMRSTWabcdfghiklmnopqrstuwx)) != -1) {
 		switch (ch) {
 		/*
 		 * The -1, -C, -l, -m and -x options all override each other so
@@ -230,6 +231,11 @@
 		case 'h':
 			f_humanize = 1;
 			kflag = 0;
+			f_commas = 0;
+			break;
+		case 'M':
+			f_humanize = 0;
+			f_commas = 1;
 			break;
 		case 'n':
 			f_numericonly = 1;
@@ -603,6 +609,8 @@
 			(void)snprintf(buf, sizeof(buf), %llu,
 			(long long)howmany(maxblock, blocksize));
 			d.s_block = strlen(buf);
+			if (f_commas) /* allow for commas before every third digit */
+d.s_block += (d.s_block - 1) / 3;
 		}
 		d.s_flags = maxflags;
 		d.s_group = maxgroup;
@@ -617,6 +625,8 @@
 			(void)snprintf(buf, sizeof(buf), %llu,
 			(long long)maxsize);
 			d.s_size = strlen(buf);
+			if (f_commas) /* allow for commas before every third digit */
+d.s_size += (d.s_size - 1) / 3;
 		}
 		d.s_user = maxuser;
 		if (bcfile) {

Index: src/bin/ls/ls.h
diff -u src/bin/ls/ls.h:1.17 src/bin/ls/ls.h:1.18
--- src/bin/ls/ls.h:1.17	Sat Feb 14 08:02:04 2009
+++ src/bin/ls/ls.h	Tue Mar 15 03:52:38 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: ls.h,v 1.17 2009/02/14 08:02:04 lukem Exp $	*/
+/*	$NetBSD: ls.h,v 1.18 2011/03/15 03:52:38 erh Exp $	*/
 
 /*
  * Copyright (c) 1989, 1993
@@ -42,6 +42,7 @@
 extern int f_flags;		/* show flags associated with a file */
 extern int f_grouponly;		/* long listing without owner */
 extern int f_humanize;		/* humanize size field */
+extern int f_commas;/* separate size field with commas */
 extern int f_inode;		/* print inode */
 extern int f_longform;		/* long listing format */
 extern int f_octal;		/* print octal escapes for nongraphic characters */

Index: src/bin/ls/print.c
diff -u src/bin/ls/print.c:1.48 src/bin/ls/print.c:1.49
--- src/bin/ls/print.c:1.48	Wed Aug 18 02:53:54 2010
+++ src/bin/ls/print.c	Tue Mar 

CVS commit: src/lib/libc/gen

2011-03-14 Thread Eric Haszlakiewicz
Module Name:src
Committed By:   erh
Date:   Tue Mar 15 03:47:04 UTC 2011

Modified Files:
src/lib/libc/gen: Makefile.inc
Added Files:
src/lib/libc/gen: commaize_number.3 commaize_number.c

Log Message:
PR#7540, add a commaize_number function, which inserts comma into a string
 of digits to make it more readable.  This is soon to be used in /bin/ls.


To generate a diff of this commit:
cvs rdiff -u -r1.174 -r1.175 src/lib/libc/gen/Makefile.inc
cvs rdiff -u -r0 -r1.1 src/lib/libc/gen/commaize_number.3 \
src/lib/libc/gen/commaize_number.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/bin/ls

2011-03-14 Thread Eric Haszlakiewicz
Module Name:src
Committed By:   erh
Date:   Tue Mar 15 03:52:38 UTC 2011

Modified Files:
src/bin/ls: ls.1 ls.c ls.h print.c

Log Message:
PR#7540, add a -M option to ls which causes sizes (and number of blocks) to be
displayed with comma separators (or a locale specific separator).


To generate a diff of this commit:
cvs rdiff -u -r1.66 -r1.67 src/bin/ls/ls.1
cvs rdiff -u -r1.67 -r1.68 src/bin/ls/ls.c
cvs rdiff -u -r1.17 -r1.18 src/bin/ls/ls.h
cvs rdiff -u -r1.48 -r1.49 src/bin/ls/print.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/usr.sbin/postinstall

2011-03-12 Thread Eric Haszlakiewicz
Module Name:src
Committed By:   erh
Date:   Sat Mar 12 23:04:17 UTC 2011

Modified Files:
src/usr.sbin/postinstall: postinstall

Log Message:
Fix the usage of the -s option to mention using it multiple times, rather
than the deprecated colon separated syntax.


To generate a diff of this commit:
cvs rdiff -u -r1.114 -r1.115 src/usr.sbin/postinstall/postinstall

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/usr.sbin/postinstall/postinstall
diff -u src/usr.sbin/postinstall/postinstall:1.114 src/usr.sbin/postinstall/postinstall:1.115
--- src/usr.sbin/postinstall/postinstall:1.114	Sun Feb 13 20:25:35 2011
+++ src/usr.sbin/postinstall/postinstall	Sat Mar 12 23:04:16 2011
@@ -1,6 +1,6 @@
 #!/bin/sh
 #
-# $NetBSD: postinstall,v 1.114 2011/02/13 20:25:35 tron Exp $
+# $NetBSD: postinstall,v 1.115 2011/03/12 23:04:16 erh Exp $
 #
 # Copyright (c) 2002-2008 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -1513,8 +1513,8 @@
 			of the following:
 			* A directory that contains a NetBSD source tree;
 			* A distribution set file such as etc.tgz or
-			  xetc.tgz, or a colon-separated list of such
-			  files;
+			  xetc.tgz.  Pass multiple -s options to specify
+  multiple such files;
 			* A temporary directory in which one or both of
 			  etc.tgz and xetc.tgz have been extracted.
 			[${SRC_DIR:-/}]



CVS commit: src/usr.sbin/postinstall

2011-03-12 Thread Eric Haszlakiewicz
Module Name:src
Committed By:   erh
Date:   Sat Mar 12 23:04:17 UTC 2011

Modified Files:
src/usr.sbin/postinstall: postinstall

Log Message:
Fix the usage of the -s option to mention using it multiple times, rather
than the deprecated colon separated syntax.


To generate a diff of this commit:
cvs rdiff -u -r1.114 -r1.115 src/usr.sbin/postinstall/postinstall

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.