CVS commit: src/lib/libc/iconv

2010-05-05 Thread Jukka Ruohonen
Module Name:src
Committed By:   jruoho
Date:   Wed May  5 06:04:20 UTC 2010

Modified Files:
src/lib/libc/iconv: iconv.3

Log Message:
Properly enumerate the two special cases. Also some markup improvements.


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 src/lib/libc/iconv/iconv.3

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/iconv/iconv.3
diff -u src/lib/libc/iconv/iconv.3:1.12 src/lib/libc/iconv/iconv.3:1.13
--- src/lib/libc/iconv/iconv.3:1.12	Mon Aug  2 13:38:21 2004
+++ src/lib/libc/iconv/iconv.3	Wed May  5 06:04:19 2010
@@ -1,4 +1,4 @@
-.\ $NetBSD: iconv.3,v 1.12 2004/08/02 13:38:21 tshiozak Exp $
+.\ $NetBSD: iconv.3,v 1.13 2010/05/05 06:04:19 jruoho Exp $
 .\
 .\ Copyright (c)2003 Citrus Project,
 .\ All rights reserved.
@@ -24,7 +24,7 @@
 .\ OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 .\ SUCH DAMAGE.
 .\
-.Dd August 1, 2004
+.Dd May 5, 2010
 .Dt ICONV 3
 .Os
 .\ --
@@ -80,14 +80,14 @@
 and
 .Fa dstleft
 are updated as follows:
-.Bl -tag -width 01234567
-.It *src
+.Bl -tag -width 01234567 -offset indent
+.It Fa *src
 Pointer to the byte just after the last character fetched.
-.It *srcleft
+.It Fa *srcleft
 Number of remaining bytes in the source buffer.
-.It *dst
+.It Fa *dst
 Pointer to the byte just after the last character stored.
-.It *dstleft
+.It Fa *dstleft
 Number of remainder bytes in the destination buffer.
 .El
 .Pp
@@ -118,15 +118,13 @@
 returns the number of such
 .Dq invalid conversions .
 .Pp
-There are two special cases of
-.Fn iconv :
-.Bl -tag -width 0123
-.It src == NULL || *src == NULL
-.\
 If the source and/or destination codesets are stateful,
 .Fn iconv
 places these into their initial state.
-.Pp
+There are two special cases of
+.Fn iconv :
+.Bl -enum -offset indent
+.It
 If both
 .Fa dst
 and
@@ -142,7 +140,7 @@
 as above.
 .Fn iconv
 will fail if the buffer is too small to store the shift sequence.
-.Pp
+.It
 On the other hand,
 .Fa dst
 or
@@ -159,7 +157,9 @@
 it returns a conversion descriptor.
 Otherwise,
 .Fn iconv_open
-returns (iconv_t)\-1 and sets errno to indicate the error.
+returns (iconv_t)\-1 and sets
+.Va errno
+to indicate the error.
 .Pp
 Upon successful completion of
 .Fn iconv_close ,



CVS commit: src/lib/libutil

2010-05-05 Thread Jukka Ruohonen
Module Name:src
Committed By:   jruoho
Date:   Wed May  5 06:11:14 UTC 2010

Modified Files:
src/lib/libutil: util.3

Log Message:
Upon lukem@'s request, put the list of functions back.

XXX: Someone, please keep this up-to-date.


To generate a diff of this commit:
cvs rdiff -u -r1.20 -r1.21 src/lib/libutil/util.3

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

Modified files:

Index: src/lib/libutil/util.3
diff -u src/lib/libutil/util.3:1.20 src/lib/libutil/util.3:1.21
--- src/lib/libutil/util.3:1.20	Tue May  4 07:07:12 2010
+++ src/lib/libutil/util.3	Wed May  5 06:11:14 2010
@@ -1,4 +1,4 @@
-.\ $NetBSD: util.3,v 1.20 2010/05/04 07:07:12 jruoho Exp $
+.\ $NetBSD: util.3,v 1.21 2010/05/05 06:11:14 jruoho Exp $
 .\
 .\ Copyright (c) 2001 The NetBSD Foundation, Inc.
 .\ All rights reserved.
@@ -27,7 +27,7 @@
 .\ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 .\ POSSIBILITY OF SUCH DAMAGE.
 .\
-.Dd May 4, 2010
+.Dd May 5, 2010
 .Dt UTIL 3
 .Os
 .Sh NAME
@@ -54,6 +54,58 @@
 library and the associated functions are implemented within the
 .Pa /usr/src/lib/libutil
 directory.
+.Sh LIST OF FUNCTIONS
+.Bl -column .Xr sockaddr_snprintf 3 -compact
+.It Sy Name	Description
+.It Xr disklabel_dkcksum 3 Ta compute the checksum for a disklabel
+.It Xr disklabel_scan 3 Ta scan a buffer for a valid disklabel
+.It Xr forkpty 3 Ta tty utility function
+.It Xr getbootfile 3 Ta get the name of the booted kernel file
+.It Xr getlabeloffset 3 Ta get the sector number and offset of the disklabel
+.It Xr getlabelsector 3 Ta get the sector number and offset of the disklabel
+.It Xr getmaxpartitions 3 Ta get the maximum number of partitions allowed per disk
+.It Xr getrawpartition 3 Ta get the system ``raw'' partition
+.It Xr login 3 Ta login utility function
+.It Xr login_cap 3 Ta query login.conf database about a user class
+.It Xr login_close 3 Ta query login.conf database about a user class
+.It Xr login_getcapbool 3 Ta query login.conf database about a user class
+.It Xr login_getcapnum 3 Ta query login.conf database about a user class
+.It Xr login_getcapsize 3 Ta query login.conf database about a user class
+.It Xr login_getcapstr 3 Ta query login.conf database about a user class
+.It Xr login_getcaptime 3 Ta query login.conf database about a user class
+.It Xr login_getclass 3 Ta query login.conf database about a user class
+.It Xr login_tty 3 Ta tty utility function
+.It Xr loginx 3 Ta login utility function
+.It Xr logout 3 Ta login utility function
+.It Xr logoutx 3 Ta login utility function
+.It Xr logwtmp 3 Ta login utility function
+.It Xr logwtmpx 3 Ta login utility function
+.It Xr opendisk 3 Ta open a disk partition
+.It Xr openpty 3 Ta tty utility function
+.It Xr pidfile 3 Ta write a daemon pid file
+.It Xr pidlock 3 Ta locks based on files containing PIDs
+.It Xr pw_abort 3 Ta passwd file update function
+.It Xr pw_copy 3 Ta utility function for interactive passwd file updates
+.It Xr pw_edit 3 Ta utility function for interactive passwd file updates
+.It Xr pw_error 3 Ta utility function for interactive passwd file updates
+.It Xr pw_getconf 3 Ta password encryption configuration access function
+.It Xr pw_getprefix 3 Ta passwd file update function
+.It Xr pw_init 3 Ta utility function for interactive passwd file updates
+.It Xr pw_lock 3 Ta passwd file update function
+.It Xr pw_mkdb 3 Ta passwd file update function
+.It Xr pw_prompt 3 Ta utility function for interactive passwd file updates
+.It Xr pw_scan 3 Ta utility function for interactive passwd file updates
+.It Xr pw_setprefix 3 Ta passwd file update function
+.It Xr secure_path 3 Ta determine if a file appears to be ``secure''
+.It Xr setclasscontext 3 Ta query login.conf database about a user class
+.It Xr setusercontext 3 Ta query login.conf database about a user class
+.It Xr snprintb 3 Ta bitmask output conversion
+.It Xr sockaddr_snprintf 3 Ta socket address formatting function
+.It Xr ttyaction 3 Ta ttyaction utility function
+.It Xr ttylock 3 Ta locks based on files containing PIDs
+.It Xr ttymsg 3 Ta ttymsg utility function
+.It Xr ttyunlock 3 Ta locks based on files containing PIDs
+.El
 .Sh FILES
 .Bl -tag -width /usr/lib/libutil_p.a -compact
 .It Pa /usr/lib/libutil.a



CVS commit: src/share/man/man9

2010-05-05 Thread Jukka Ruohonen
Module Name:src
Committed By:   jruoho
Date:   Wed May  5 06:19:15 UTC 2010

Modified Files:
src/share/man/man9: byteorder.9

Log Message:
Clarify a sentence by removing a comma.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/share/man/man9/byteorder.9

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/man9/byteorder.9
diff -u src/share/man/man9/byteorder.9:1.5 src/share/man/man9/byteorder.9:1.6
--- src/share/man/man9/byteorder.9:1.5	Tue May  4 05:49:12 2010
+++ src/share/man/man9/byteorder.9	Wed May  5 06:19:15 2010
@@ -1,4 +1,4 @@
-.\	$NetBSD: byteorder.9,v 1.5 2010/05/04 05:49:12 jruoho Exp $
+.\	$NetBSD: byteorder.9,v 1.6 2010/05/05 06:19:15 jruoho Exp $
 .\
 .\ Copyright (c) 2002 Mike Barcroft m...@freebsd.org
 .\ All rights reserved.
@@ -26,7 +26,7 @@
 .\
 .\ $FreeBSD: src/share/man/man9/byteorder.9,v 1.6 2003/05/21 17:32:55 ru Exp $
 .\
-.Dd May 4, 2010
+.Dd May 5, 2010
 .Dt BYTEORDER 9
 .Os
 .Sh NAME
@@ -190,7 +190,7 @@
 .Fx 5.0 .
 The functions were originally introduced to handle
 .Tn PCI
-bus master devices, which assumed little endian byte order in
+bus master devices which assumed little endian byte order in
 .Tn DMA
 transfers, even on big endian systems.
 .Pp



CVS commit: src/share/man/man3

2010-05-05 Thread Jukka Ruohonen
Module Name:src
Committed By:   jruoho
Date:   Wed May  5 06:24:43 UTC 2010

Modified Files:
src/share/man/man3: tree.3

Log Message:
Add a note that rb(3) is preferred for new code.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/share/man/man3/tree.3

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/man3/tree.3
diff -u src/share/man/man3/tree.3:1.5 src/share/man/man3/tree.3:1.6
--- src/share/man/man3/tree.3:1.5	Sat Feb 14 22:07:04 2009
+++ src/share/man/man3/tree.3	Wed May  5 06:24:43 2010
@@ -1,4 +1,4 @@
-.\	$NetBSD: tree.3,v 1.5 2009/02/14 22:07:04 dholland Exp $
+.\	$NetBSD: tree.3,v 1.6 2010/05/05 06:24:43 jruoho Exp $
 .\	$OpenBSD: tree.3,v 1.9 2003/05/20 09:13:38 jmc Exp $
 .\/*
 .\ * Copyright 2002 Niels Provos pro...@citi.umich.edu
@@ -29,7 +29,7 @@
 .\ * (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 February 14, 2009
+.Dd May 5, 2010
 .Dt TREE 3
 .Os
 .Sh NAME
@@ -131,6 +131,12 @@
 .Ft struct TYPE *
 .Fn RB_REMOVE NAME RB_HEAD *head struct TYPE *elm
 .Sh DESCRIPTION
+.Bf -symbolic
+This is a legacy interface; for new code,
+.Xr rb 3
+is preferred.
+.Ef
+.Pp
 These macros define data structures for different types of trees:
 splay trees and red-black trees.
 .Pp



CVS commit: src/lib/libc/db/man

2010-05-05 Thread Jukka Ruohonen
Module Name:src
Committed By:   jruoho
Date:   Wed May  5 06:55:57 UTC 2010

Modified Files:
src/lib/libc/db/man: dbm_clearerr.3

Log Message:
Note the POSIX compliance (already since SUSv2, '97).


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/lib/libc/db/man/dbm_clearerr.3

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/db/man/dbm_clearerr.3
diff -u src/lib/libc/db/man/dbm_clearerr.3:1.4 src/lib/libc/db/man/dbm_clearerr.3:1.5
--- src/lib/libc/db/man/dbm_clearerr.3:1.4	Wed Apr 30 13:10:50 2008
+++ src/lib/libc/db/man/dbm_clearerr.3	Wed May  5 06:55:57 2010
@@ -1,4 +1,4 @@
-.\	$NetBSD: dbm_clearerr.3,v 1.4 2008/04/30 13:10:50 martin Exp $
+.\	$NetBSD: dbm_clearerr.3,v 1.5 2010/05/05 06:55:57 jruoho Exp $
 .\
 .\ Copyright (c) 2004 The NetBSD Foundation, Inc.
 .\ All rights reserved.
@@ -27,7 +27,7 @@
 .\ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 .\ POSSIBILITY OF SUCH DAMAGE.
 .\
-.Dd April 30, 2004
+.Dd May 5, 2010
 .Dt DBM_CLEARERR 3
 .Os
 .Sh NAME
@@ -298,7 +298,9 @@
 and
 .Fn dbm_store
 functions conform to
-.St -xpg4.2 .
+.St -xpg4.2
+and
+.St -susv2 .
 The
 .Fn dbm_dirfno
 function is an extension.



CVS commit: src/usr.bin/make

2010-05-05 Thread Simon J. Gerraty
Module Name:src
Committed By:   sjg
Date:   Wed May  5 07:05:33 UTC 2010

Modified Files:
src/usr.bin/make: util.c

Log Message:
gcc defines __svr4__
SunPro compiler defines __SVR4
We need to check both to ensure that on SunOS signal is hooked into
sigaction - otherwise we do not pass the unit-tests due to missing
a SIGCHLD


To generate a diff of this commit:
cvs rdiff -u -r1.48 -r1.49 src/usr.bin/make/util.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/make/util.c
diff -u src/usr.bin/make/util.c:1.48 src/usr.bin/make/util.c:1.49
--- src/usr.bin/make/util.c:1.48	Thu Jan 29 09:03:04 2009
+++ src/usr.bin/make/util.c	Wed May  5 07:05:33 2010
@@ -1,15 +1,15 @@
-/*	$NetBSD: util.c,v 1.48 2009/01/29 09:03:04 dholland Exp $	*/
+/*	$NetBSD: util.c,v 1.49 2010/05/05 07:05:33 sjg Exp $	*/
 
 /*
  * Missing stuff from OS's
  */
 
 #ifndef MAKE_NATIVE
-static char rcsid[] = $NetBSD: util.c,v 1.48 2009/01/29 09:03:04 dholland Exp $;
+static char rcsid[] = $NetBSD: util.c,v 1.49 2010/05/05 07:05:33 sjg Exp $;
 #else
 #include sys/cdefs.h
 #ifndef lint
-__RCSID($NetBSD: util.c,v 1.48 2009/01/29 09:03:04 dholland Exp $);
+__RCSID($NetBSD: util.c,v 1.49 2010/05/05 07:05:33 sjg Exp $);
 #endif
 #endif
 
@@ -370,7 +370,7 @@
 } /* end getwd */
 #endif /* __hpux */
 
-#if defined(sun)  defined(__svr4__)
+#if defined(sun)  (defined(__svr4__) || defined(__SVR4))
 #include signal.h
 
 /* turn into bsd signals */



CVS commit: src/usr.sbin/services_mkdb

2010-05-05 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Wed May  5 13:19:51 UTC 2010

Modified Files:
src/usr.sbin/services_mkdb: services_mkdb.8 services_mkdb.c

Log Message:
Add verbose flag -v and make -q the default behavior.


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/usr.sbin/services_mkdb/services_mkdb.8
cvs rdiff -u -r1.15 -r1.16 src/usr.sbin/services_mkdb/services_mkdb.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.sbin/services_mkdb/services_mkdb.8
diff -u src/usr.sbin/services_mkdb/services_mkdb.8:1.10 src/usr.sbin/services_mkdb/services_mkdb.8:1.11
--- src/usr.sbin/services_mkdb/services_mkdb.8:1.10	Sun Apr 25 00:54:46 2010
+++ src/usr.sbin/services_mkdb/services_mkdb.8	Wed May  5 13:19:51 2010
@@ -1,4 +1,4 @@
-.\	$NetBSD: services_mkdb.8,v 1.10 2010/04/25 00:54:46 joerg Exp $
+.\	$NetBSD: services_mkdb.8,v 1.11 2010/05/05 13:19:51 joerg Exp $
 .\
 .\ Copyright (c) 1999 The NetBSD Foundation, Inc.
 .\ All rights reserved.
@@ -27,7 +27,7 @@
 .\ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 .\ POSSIBILITY OF SUCH DAMAGE.
 .\
-.Dd March 19, 2010
+.Dd May 5, 2010
 .Dt SERVICES_MKDB 8
 .Os
 .Sh NAME
@@ -35,7 +35,7 @@
 .Nd generate the services databases
 .Sh SYNOPSIS
 .Nm
-.Op Fl q
+.Op Fl qv
 .Op Fl o Ar database
 .Op Fl V Ar style
 .Op Ar file
@@ -65,8 +65,11 @@
 Put the output databases in the named file.
 .It Fl q
 Don't warn about duplicate services.
+This is the default behavior.
 .It Fl u
 Print the services file to stdout, omitting duplicate entries and comments.
+.It Fl v
+Warn about duplicate services.
 .It Fl V
 Create a specific version of the database style.
 .Ar style

Index: src/usr.sbin/services_mkdb/services_mkdb.c
diff -u src/usr.sbin/services_mkdb/services_mkdb.c:1.15 src/usr.sbin/services_mkdb/services_mkdb.c:1.16
--- src/usr.sbin/services_mkdb/services_mkdb.c:1.15	Sun Apr 25 00:54:46 2010
+++ src/usr.sbin/services_mkdb/services_mkdb.c	Wed May  5 13:19:51 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: services_mkdb.c,v 1.15 2010/04/25 00:54:46 joerg Exp $	*/
+/*	$NetBSD: services_mkdb.c,v 1.16 2010/05/05 13:19:51 joerg Exp $	*/
 
 /*-
  * Copyright (c) 1999 The NetBSD Foundation, Inc.
@@ -31,7 +31,7 @@
 
 #include sys/cdefs.h
 #ifndef lint
-__RCSID($NetBSD: services_mkdb.c,v 1.15 2010/04/25 00:54:46 joerg Exp $);
+__RCSID($NetBSD: services_mkdb.c,v 1.16 2010/05/05 13:19:51 joerg Exp $);
 #endif /* not lint */
 
 #include sys/param.h
@@ -70,7 +70,7 @@
 	const char *fname = _PATH_SERVICES;
 	const char *dbname = NULL;
 	int	 use_db = 0;
-	int	 warndup = 1;
+	int	 warndup = 0;
 	int	 unique = 0;
 	int	 otherflag = 0;
 	size_t	 cnt = 0;
@@ -94,6 +94,10 @@
 		case 'u':
 			unique++;
 			break;
+		case 'v':
+			otherflag = 1;
+			warndup = 1;
+			break;
 		case 'V':
 			if (strcmp(optarg, db) == 0)
 use_db = 1;



CVS commit: src/etc

2010-05-05 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Wed May  5 13:27:17 UTC 2010

Modified Files:
src/etc: services

Log Message:
Add a note to run services_mkdb after modifications.


To generate a diff of this commit:
cvs rdiff -u -r1.91 -r1.92 src/etc/services

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

Modified files:

Index: src/etc/services
diff -u src/etc/services:1.91 src/etc/services:1.92
--- src/etc/services:1.91	Sat Jun 23 18:15:28 2007
+++ src/etc/services	Wed May  5 13:27:17 2010
@@ -1,5 +1,11 @@
-# $NetBSD: services,v 1.91 2007/06/23 18:15:28 christos Exp $
+# $NetBSD: services,v 1.92 2010/05/05 13:27:17 joerg Exp $
+#
+
+# NOTE
+# If you modify this file, don't forget to run services_mkdb.
+#
 # See also: services(5), http://www.sethwklein.net/projects/iana-etc/
+
 #
 # PORT NUMBERS
 # 



CVS commit: src/usr.bin/make

2010-05-05 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed May  5 14:10:39 UTC 2010

Modified Files:
src/usr.bin/make: main.c

Log Message:
Revert bogus patch that attempted to canonicalize a non absolute argv[0] using
realpath(3). Consider: touch Makefile; mkdir make; make. This will set $MAKE
to $PWD/make so further attempts to use ${MAKE} will try to execute the
directory. This needs $ORIGIN to be fixed properly, or alternatively one
can duplicate the logic for execvp(3) and search the path for the make
executable. Not worth it. It was working just fine before!


To generate a diff of this commit:
cvs rdiff -u -r1.184 -r1.185 src/usr.bin/make/main.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/make/main.c
diff -u src/usr.bin/make/main.c:1.184 src/usr.bin/make/main.c:1.185
--- src/usr.bin/make/main.c:1.184	Thu Apr 29 19:12:21 2010
+++ src/usr.bin/make/main.c	Wed May  5 10:10:39 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: main.c,v 1.184 2010/04/29 23:12:21 sjg Exp $	*/
+/*	$NetBSD: main.c,v 1.185 2010/05/05 14:10:39 christos Exp $	*/
 
 /*
  * Copyright (c) 1988, 1989, 1990, 1993
@@ -69,7 +69,7 @@
  */
 
 #ifndef MAKE_NATIVE
-static char rcsid[] = $NetBSD: main.c,v 1.184 2010/04/29 23:12:21 sjg Exp $;
+static char rcsid[] = $NetBSD: main.c,v 1.185 2010/05/05 14:10:39 christos Exp $;
 #else
 #include sys/cdefs.h
 #ifndef lint
@@ -81,7 +81,7 @@
 #if 0
 static char sccsid[] = @(#)main.c	8.3 (Berkeley) 3/19/94;
 #else
-__RCSID($NetBSD: main.c,v 1.184 2010/04/29 23:12:21 sjg Exp $);
+__RCSID($NetBSD: main.c,v 1.185 2010/05/05 14:10:39 christos Exp $);
 #endif
 #endif /* not lint */
 #endif
@@ -900,14 +900,7 @@
 	 *	MFLAGS also gets initialized empty, for compatibility.
 	 */
 	Parse_Init();
-	if (argv[0][0] == '/') {
-	p1 = argv[0];
-	} else {
-	p1 = realpath(argv[0], mdpath);
-	if (!p1 || *p1 != '/' || stat(p1, sb)  0) {
-		p1 = argv[0];		/* realpath failed */
-	}
-	}
+	p1 = argv[0];
 	Var_Set(MAKE, p1, VAR_GLOBAL, 0);
 	Var_Set(.MAKE, p1, VAR_GLOBAL, 0);
 	Var_Set(MAKEFLAGS, , VAR_GLOBAL, 0);



CVS commit: src/sys/arch/amd64/amd64

2010-05-05 Thread David Young
Module Name:src
Committed By:   dyoung
Date:   Wed May  5 16:53:58 UTC 2010

Modified Files:
src/sys/arch/amd64/amd64: busfunc.S

Log Message:
As Andrew Doran points out, _ALIGN_TEXT is unused, and to test that
X86_BUS_SPACE_IO equals 0 is no longer necessary.  Get rid of the
_ALIGN_TEXT definition, and do not assert that X86_BUS_SPACE_IO == 0.


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/sys/arch/amd64/amd64/busfunc.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/amd64/amd64/busfunc.S
diff -u src/sys/arch/amd64/amd64/busfunc.S:1.8 src/sys/arch/amd64/amd64/busfunc.S:1.9
--- src/sys/arch/amd64/amd64/busfunc.S:1.8	Wed Apr 28 19:17:03 2010
+++ src/sys/arch/amd64/amd64/busfunc.S	Wed May  5 16:53:57 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: busfunc.S,v 1.8 2010/04/28 19:17:03 dyoung Exp $	*/
+/*	$NetBSD: busfunc.S,v 1.9 2010/05/05 16:53:57 dyoung Exp $	*/
 
 /*-
  * Copyright (c) 2007, 2008 The NetBSD Foundation, Inc.
@@ -33,14 +33,6 @@
 
 #include assym.h
 
-/* XXX */
-#undef	_ALIGN_TEXT
-#define	_ALIGN_TEXT	.align 16
-
-#if X86_BUS_SPACE_IO != 0
-#error depends on X86_BUS_SPACE_IO == 0
-#endif
-
 .Ldopanic:
 	movq	$.Lpstr, %rdi
 	call	_C_LABEL(panic)



CVS commit: src/include

2010-05-05 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed May  5 17:12:29 UTC 2010

Modified Files:
src/include: netdb.h

Log Message:
PR/43258: Hauke Fath: remove duplicate setservent declaration


To generate a diff of this commit:
cvs rdiff -u -r1.63 -r1.64 src/include/netdb.h

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

Modified files:

Index: src/include/netdb.h
diff -u src/include/netdb.h:1.63 src/include/netdb.h:1.64
--- src/include/netdb.h:1.63	Sat Apr 24 20:54:45 2010
+++ src/include/netdb.h	Wed May  5 13:12:29 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: netdb.h,v 1.63 2010/04/25 00:54:45 joerg Exp $	*/
+/*	$NetBSD: netdb.h,v 1.64 2010/05/05 17:12:29 christos Exp $	*/
 
 /*
  * ++Copyright++ 1980, 1983, 1988, 1993
@@ -337,9 +337,9 @@
 #endif
 void		setnetent(int);
 void		setprotoent(int);
+void		setservent(int);
 #if (_POSIX_C_SOURCE - 0) = 200112L || (_XOPEN_SOURCE - 0) = 520 || \
 defined(_NETBSD_SOURCE)
-void		setservent(int);
 int		getaddrinfo(const char * __restrict, const char * __restrict,
  const struct addrinfo * __restrict,
  struct addrinfo ** __restrict);
@@ -350,7 +350,6 @@
 void		freeaddrinfo(struct addrinfo *);
 const char	*gai_strerror(int);
 #endif
-void		setservent(int);
 __END_DECLS
 
 #endif /* !_NETDB_H_ */



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

2010-05-05 Thread David Young
Module Name:src
Committed By:   dyoung
Date:   Wed May  5 17:42:19 UTC 2010

Modified Files:
src/sys/arch/i386/i386: busfunc.S

Log Message:
Andrew Doran points out that _ALIGN_TEXT is unused, and the processor
may be able to pair or pipeline instructions if I load the
bus_space_tag pointer nearer the top of the functions.  Get rid of the
_ALIGN_TEXT definition, and load the pointer earlier.


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/sys/arch/i386/i386/busfunc.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/i386/busfunc.S
diff -u src/sys/arch/i386/i386/busfunc.S:1.6 src/sys/arch/i386/i386/busfunc.S:1.7
--- src/sys/arch/i386/i386/busfunc.S:1.6	Wed Apr 28 19:17:03 2010
+++ src/sys/arch/i386/i386/busfunc.S	Wed May  5 17:42:19 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: busfunc.S,v 1.6 2010/04/28 19:17:03 dyoung Exp $	*/
+/*	$NetBSD: busfunc.S,v 1.7 2010/05/05 17:42:19 dyoung Exp $	*/
 
 /*-
  * Copyright (c) 2007 The NetBSD Foundation, Inc.
@@ -30,22 +30,18 @@
  */
 
 #include machine/asm.h
-__KERNEL_RCSID(0, $NetBSD: busfunc.S,v 1.6 2010/04/28 19:17:03 dyoung Exp $);
+__KERNEL_RCSID(0, $NetBSD: busfunc.S,v 1.7 2010/05/05 17:42:19 dyoung Exp $);
 
 #include assym.h
 
-/* XXX */
-#undef	_ALIGN_TEXT
-#define	_ALIGN_TEXT	.align 16
-
 /*
  * uint8_t bus_space_read_1(bus_space_tag_t tag, bus_space_handle_t bsh,
  *bus_size_t offset);
  */
 ENTRY(bus_space_read_1)
+	movl	4(%esp), %eax
 	movl	8(%esp), %edx
 	addl	12(%esp), %edx
-	movl	4(%esp), %eax
 	cmpl	$X86_BUS_SPACE_IO, BST_TYPE(%eax)
 	je	1f
 	movzbl	(%edx), %eax
@@ -60,9 +56,9 @@
  *bus_size_t offset);
  */
 ENTRY(bus_space_read_2)
+	movl	4(%esp), %eax
 	movl	8(%esp), %edx
 	addl	12(%esp), %edx
-	movl	4(%esp), %eax
 	cmpl	$X86_BUS_SPACE_IO, BST_TYPE(%eax)
 	je	1f
 	movzwl	(%edx), %eax
@@ -77,9 +73,9 @@
  *bus_size_t offset);
  */
 ENTRY(bus_space_read_4)
+	movl	4(%esp), %eax
 	movl	8(%esp), %edx
 	addl	12(%esp), %edx
-	movl	4(%esp), %eax
 	cmpl	$X86_BUS_SPACE_IO, BST_TYPE(%eax)
 	je	1f
 	movl	(%edx), %eax
@@ -97,9 +93,9 @@
  *bus_size_t offset, uint8_t value);
  */
 ENTRY(bus_space_write_1)
+	movl	4(%esp), %eax
 	movl	8(%esp), %edx
 	addl	12(%esp), %edx
-	movl	4(%esp), %eax
 	cmpl	$X86_BUS_SPACE_IO, BST_TYPE(%eax)
 	movl	16(%esp), %eax
 	je	1f
@@ -114,9 +110,9 @@
  *bus_size_t offset, uint16_t value);
  */
 ENTRY(bus_space_write_2)
+	movl	4(%esp), %eax
 	movl	8(%esp), %edx
 	addl	12(%esp), %edx
-	movl	4(%esp), %eax
 	cmpl	$X86_BUS_SPACE_IO, BST_TYPE(%eax)
 	movl	16(%esp), %eax
 	je	1f
@@ -131,9 +127,9 @@
  * bus_size_t offset, uint32_t value);
  */
 ENTRY(bus_space_write_4)
+	movl	4(%esp), %eax
 	movl	8(%esp), %edx
 	addl	12(%esp), %edx
-	movl	4(%esp), %eax
 	cmpl	$X86_BUS_SPACE_IO, BST_TYPE(%eax)
 	movl	16(%esp), %eax
 	je	1f
@@ -153,9 +149,9 @@
  */
 ENTRY(bus_space_read_multi_1)
 	pushl	%edi
+	movl	8(%esp), %eax
 	movl	12(%esp), %edx
 	addl	16(%esp), %edx
-	movl	8(%esp), %eax
 	cmpl	$X86_BUS_SPACE_IO, BST_TYPE(%eax)
 	movl	20(%esp), %edi
 	movl	24(%esp), %ecx
@@ -180,9 +176,9 @@
  */
 ENTRY(bus_space_read_multi_2)
 	pushl	%edi
+	movl	8(%esp), %eax
 	movl	12(%esp), %edx
 	addl	16(%esp), %edx
-	movl	8(%esp), %eax
 	cmpl	$X86_BUS_SPACE_IO, BST_TYPE(%eax)
 	movl	20(%esp), %edi
 	movl	24(%esp), %ecx
@@ -207,9 +203,9 @@
  */
 ENTRY(bus_space_read_multi_4)
 	pushl	%edi
+	movl	8(%esp), %eax
 	movl	12(%esp), %edx
 	addl	16(%esp), %edx
-	movl	8(%esp), %eax
 	cmpl	$X86_BUS_SPACE_IO, BST_TYPE(%eax)
 	movl	20(%esp), %edi
 	movl	24(%esp), %ecx
@@ -238,9 +234,9 @@
  */
 ENTRY(bus_space_write_multi_1)
 	pushl	%esi
+	movl	8(%esp), %eax
 	movl	12(%esp), %edx
 	addl	16(%esp), %edx
-	movl	8(%esp), %eax
 	cmpl	$X86_BUS_SPACE_IO, BST_TYPE(%eax)
 	movl	20(%esp), %esi
 	movl	24(%esp), %ecx
@@ -265,9 +261,9 @@
  */
 ENTRY(bus_space_write_multi_2)
 	pushl	%esi
+	movl	8(%esp), %eax
 	movl	12(%esp), %edx
 	addl	16(%esp), %edx
-	movl	8(%esp), %eax
 	cmpl	$X86_BUS_SPACE_IO, BST_TYPE(%eax)
 	movl	20(%esp), %esi
 	movl	24(%esp), %ecx
@@ -292,9 +288,9 @@
  */
 ENTRY(bus_space_write_multi_4)
 	pushl	%esi
+	movl	8(%esp), %eax
 	movl	12(%esp), %edx
 	addl	16(%esp), %edx
-	movl	8(%esp), %eax
 	cmpl	$X86_BUS_SPACE_IO, BST_TYPE(%eax)
 	movl	20(%esp), %esi
 	movl	24(%esp), %ecx
@@ -323,9 +319,9 @@
  */
 ENTRY(bus_space_read_region_1)
 	pushl	%edi
+	movl	8(%esp), %eax
 	movl	12(%esp), %edx
 	addl	16(%esp), %edx
-	movl	8(%esp), %eax
 	cmpl	$X86_BUS_SPACE_IO, BST_TYPE(%eax)
 	movl	20(%esp), %edi
 	movl	24(%esp), %ecx
@@ -353,9 +349,9 @@
  */
 ENTRY(bus_space_read_region_2)
 	pushl	%edi
+	movl	8(%esp), %eax
 	movl	12(%esp), %edx
 	addl	16(%esp), %edx
-	movl	8(%esp), %eax
 	cmpl	$X86_BUS_SPACE_IO, BST_TYPE(%eax)
 	movl	20(%esp), %edi
 	movl	24(%esp), %ecx
@@ -383,9 +379,9 @@
  */
 ENTRY(bus_space_read_region_4)
 	pushl	%edi
+	movl	8(%esp), %eax
 	movl	12(%esp), %edx
 	addl	16(%esp), %edx
-	movl	8(%esp), %eax
 	cmpl	$X86_BUS_SPACE_IO, 

CVS commit: src/sys/net

2010-05-05 Thread David Young
Module Name:src
Committed By:   dyoung
Date:   Wed May  5 18:12:24 UTC 2010

Modified Files:
src/sys/net: if_ethersubr.c

Log Message:
Constify some ether_output() arguments so that it's clear that they
can never be re-assigned.


To generate a diff of this commit:
cvs rdiff -u -r1.177 -r1.178 src/sys/net/if_ethersubr.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/net/if_ethersubr.c
diff -u src/sys/net/if_ethersubr.c:1.177 src/sys/net/if_ethersubr.c:1.178
--- src/sys/net/if_ethersubr.c:1.177	Mon Apr  5 07:22:23 2010
+++ src/sys/net/if_ethersubr.c	Wed May  5 18:12:24 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_ethersubr.c,v 1.177 2010/04/05 07:22:23 joerg Exp $	*/
+/*	$NetBSD: if_ethersubr.c,v 1.178 2010/05/05 18:12:24 dyoung Exp $	*/
 
 /*
  * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@@ -61,7 +61,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: if_ethersubr.c,v 1.177 2010/04/05 07:22:23 joerg Exp $);
+__KERNEL_RCSID(0, $NetBSD: if_ethersubr.c,v 1.178 2010/05/05 18:12:24 dyoung Exp $);
 
 #include opt_inet.h
 #include opt_atalk.h
@@ -198,7 +198,8 @@
  * Assumes that ifp is actually pointer to ethercom structure.
  */
 static int
-ether_output(struct ifnet *ifp0, struct mbuf *m0, const struct sockaddr *dst,
+ether_output(struct ifnet * const ifp0, struct mbuf * const m0,
+	const struct sockaddr * const dst,
 	struct rtentry *rt0)
 {
 	uint16_t etype = 0;



CVS commit: src/share/man/man9/man9.i386

2010-05-05 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Wed May  5 22:01:10 UTC 2010

Modified Files:
src/share/man/man9/man9.i386: return_address.9

Log Message:
Add function to make sentences easier to read.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/share/man/man9/man9.i386/return_address.9

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/man9/man9.i386/return_address.9
diff -u src/share/man/man9/man9.i386/return_address.9:1.3 src/share/man/man9/man9.i386/return_address.9:1.4
--- src/share/man/man9/man9.i386/return_address.9:1.3	Wed May  5 05:43:19 2010
+++ src/share/man/man9/man9.i386/return_address.9	Wed May  5 22:01:10 2010
@@ -1,4 +1,4 @@
-.\	$NetBSD: return_address.9,v 1.3 2010/05/05 05:43:19 jruoho Exp $
+.\	$NetBSD: return_address.9,v 1.4 2010/05/05 22:01:10 wiz Exp $
 .\
 .\ Copyright (c) 2009 The NetBSD Foundation, Inc.
 .\ All rights reserved.
@@ -74,7 +74,7 @@
 .Sh RETURN VALUES
 The
 .Fn return_address
-returns the requested return address, or
+function returns the requested return address, or
 .Dv NULL
 if it cannot dissect the call stack.
 .Sh CODE REFERENCES
@@ -85,7 +85,7 @@
 .Sh HISTORY
 The
 .Fn return_address
-first appeared in
+function first appeared in
 .Nx 6.0 .
 .Sh AUTHORS
 .An David Young Aq dyo...@netbsd.org



CVS commit: src/share/man/man1

2010-05-05 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Wed May  5 22:03:19 UTC 2010

Modified Files:
src/share/man/man1: intro.1

Log Message:
New sentence, new line.


To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.12 src/share/man/man1/intro.1

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/man1/intro.1
diff -u src/share/man/man1/intro.1:1.11 src/share/man/man1/intro.1:1.12
--- src/share/man/man1/intro.1:1.11	Wed May  5 05:36:21 2010
+++ src/share/man/man1/intro.1	Wed May  5 22:03:19 2010
@@ -1,4 +1,4 @@
-.\	$NetBSD: intro.1,v 1.11 2010/05/05 05:36:21 jruoho Exp $
+.\	$NetBSD: intro.1,v 1.12 2010/05/05 22:03:19 wiz Exp $
 .\
 .\ Copyright (c) 1991, 1993
 .\	The Regents of the University of California.  All rights reserved.
@@ -53,8 +53,8 @@
 All commands set a status value upon exit which may be tested
 to see if the command completed normally.
 The exit values and their meanings are explained in the individual
-manuals.  Traditionally, the value 0 signifies successful
-completion of the command.
+manuals.
+Traditionally, the value 0 signifies successful completion of the command.
 .Sh SEE ALSO
 .Xr man 1 ,
 .Xr intro 2 ,



CVS commit: src/lib/libutil

2010-05-05 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Wed May  5 22:05:32 UTC 2010

Modified Files:
src/lib/libutil: login_cap.3 pidfile.3 pw_init.3 pw_lock.3

Log Message:
Mark up NULL with Dv.


To generate a diff of this commit:
cvs rdiff -u -r1.17 -r1.18 src/lib/libutil/login_cap.3
cvs rdiff -u -r1.11 -r1.12 src/lib/libutil/pidfile.3
cvs rdiff -u -r1.14 -r1.15 src/lib/libutil/pw_init.3
cvs rdiff -u -r1.13 -r1.14 src/lib/libutil/pw_lock.3

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

Modified files:

Index: src/lib/libutil/login_cap.3
diff -u src/lib/libutil/login_cap.3:1.17 src/lib/libutil/login_cap.3:1.18
--- src/lib/libutil/login_cap.3:1.17	Wed May 13 23:02:52 2009
+++ src/lib/libutil/login_cap.3	Wed May  5 22:05:31 2010
@@ -1,4 +1,4 @@
-.\ $NetBSD: login_cap.3,v 1.17 2009/05/13 23:02:52 wiz Exp $
+.\ $NetBSD: login_cap.3,v 1.18 2010/05/05 22:05:31 wiz Exp $
 .\
 .\ Copyright (c) 1996,1997 Berkeley Software Design, Inc. All rights reserved.
 .\
@@ -78,7 +78,9 @@
 .Li default
 if
 .Ar class
-is NULL or the empty string)
+is
+.Dv NULL
+or the empty string)
 from
 .Pa /etc/login.conf
 (see
@@ -86,7 +88,8 @@
 If the entry is found, a
 .Li login_cap_t
 pointer is returned.
-NULL is returned if the user class is not found.
+.Dv NULL
+is returned if the user class is not found.
 When the
 .Li login_cap_t
 structure is no longer needed, it should be freed by the
@@ -159,16 +162,21 @@
 .Ar flags .
 The
 .Ar lc
-argument, if not NULL, contains the class information that should
+argument, if not
+.Dv NULL ,
+contains the class information that should
 be used.
 The
 .Ar pwd
-argument, if not NULL, provides information about the user.
+argument, if not
+.Dv NULL ,
+provides information about the user.
 Both
 .Ar lc
 and
 .Ar pwd
-cannot be NULL.
+cannot be
+.Dv NULL .
 The
 .Ar uid
 argument is used in place of the user id contained in the
@@ -256,8 +264,9 @@
 .Fa def
 or
 .Fa err
-(whichever is relevant) are non-NULL the returned value is simply what
-was passed in to
+(whichever is relevant) are
+.Pf non- Dv NULL
+the returned value is simply what was passed in to
 .Fn login_getcapstr .
 Therefore it is not possible to blindly
 .Fn free

Index: src/lib/libutil/pidfile.3
diff -u src/lib/libutil/pidfile.3:1.11 src/lib/libutil/pidfile.3:1.12
--- src/lib/libutil/pidfile.3:1.11	Tue May  4 06:41:27 2010
+++ src/lib/libutil/pidfile.3	Wed May  5 22:05:31 2010
@@ -1,4 +1,4 @@
-.\	$NetBSD: pidfile.3,v 1.11 2010/05/04 06:41:27 jruoho Exp $
+.\	$NetBSD: pidfile.3,v 1.12 2010/05/05 22:05:31 wiz Exp $
 .\
 .\ Copyright (c) 1999 The NetBSD Foundation, Inc.
 .\ All rights reserved.
@@ -48,7 +48,8 @@
 .Pa /var/run/basename.pid .
 If the
 .Ar basename
-argument is NULL,
+argument is
+.Dv NULL ,
 .Fn pidfile
 will determine the program name and use that instead.
 .Pp

Index: src/lib/libutil/pw_init.3
diff -u src/lib/libutil/pw_init.3:1.14 src/lib/libutil/pw_init.3:1.15
--- src/lib/libutil/pw_init.3:1.14	Wed Aug  4 15:07:37 2004
+++ src/lib/libutil/pw_init.3	Wed May  5 22:05:31 2010
@@ -1,4 +1,4 @@
-.\	$NetBSD: pw_init.3,v 1.14 2004/08/04 15:07:37 wiz Exp $
+.\	$NetBSD: pw_init.3,v 1.15 2010/05/05 22:05:31 wiz Exp $
 .\
 .\ Copyright (c) 1995
 .\	The Regents of the University of California.  All rights reserved.
@@ -86,7 +86,8 @@
 .Pa /etc/ptmp
 if
 .Fa filename
-is NULL).
+is
+.Dv NULL ) .
 If
 .Fa notsetuid
 is nonzero,
@@ -112,7 +113,9 @@
 .Fa pw .
 If
 .Fa old_pw
-is not NULL, it checks to make sure the old entry is the same as
+is not
+.Dv NULL ,
+it checks to make sure the old entry is the same as
 the one described in
 .Fa old_pw
 or the process is aborted.

Index: src/lib/libutil/pw_lock.3
diff -u src/lib/libutil/pw_lock.3:1.13 src/lib/libutil/pw_lock.3:1.14
--- src/lib/libutil/pw_lock.3:1.13	Sat Feb 17 09:37:55 2007
+++ src/lib/libutil/pw_lock.3	Wed May  5 22:05:31 2010
@@ -1,4 +1,4 @@
-.\	$NetBSD: pw_lock.3,v 1.13 2007/02/17 09:37:55 wiz Exp $
+.\	$NetBSD: pw_lock.3,v 1.14 2010/05/05 22:05:31 wiz Exp $
 .\
 .\ Copyright (c) 1995
 .\	The Regents of the University of California.  All rights reserved.
@@ -94,7 +94,9 @@
 to clean up the lock file.
 If the
 .Ar username
-argument is not NULL, only database entries pertaining to the specified user
+argument is not
+.Dv NULL ,
+only database entries pertaining to the specified user
 will be modified.
 If the
 .Ar secureonly



CVS commit: src/lib/libc/iconv

2010-05-05 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Wed May  5 22:07:58 UTC 2010

Modified Files:
src/lib/libc/iconv: iconv.3

Log Message:
Sort errors.


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 src/lib/libc/iconv/iconv.3

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/iconv/iconv.3
diff -u src/lib/libc/iconv/iconv.3:1.13 src/lib/libc/iconv/iconv.3:1.14
--- src/lib/libc/iconv/iconv.3:1.13	Wed May  5 06:04:19 2010
+++ src/lib/libc/iconv/iconv.3	Wed May  5 22:07:58 2010
@@ -1,4 +1,4 @@
-.\ $NetBSD: iconv.3,v 1.13 2010/05/05 06:04:19 jruoho Exp $
+.\ $NetBSD: iconv.3,v 1.14 2010/05/05 22:07:58 wiz Exp $
 .\
 .\ Copyright (c)2003 Citrus Project,
 .\ All rights reserved.
@@ -182,13 +182,13 @@
 .Fn iconv_open
 function may cause an error in the following cases:
 .Bl -tag -width Er
-.It Bq Er ENOMEM
-Memory is exhausted.
 .It Bq Er EINVAL
 There is no converter specified by
 .Fa srcname
 and
 .Fa dstname .
+.It Bq Er ENOMEM
+Memory is exhausted.
 .El
 .Pp
 The
@@ -205,6 +205,10 @@
 .Fn iconv
 function may cause an error in the following cases:
 .Bl -tag -width Er
+.It Bq Er E2BIG
+The output buffer pointed to by
+.Fa *dst
+is too small to store the result string.
 .It Bq Er EBADF
 The conversion descriptor specified by
 .Fa cd
@@ -214,10 +218,6 @@
 .Fa *src
 contains a byte sequence which does not describe a valid character of
 the source codeset.
-.It Bq Er E2BIG
-The output buffer pointed to by
-.Fa *dst
-is too small to store the result string.
 .It Bq Er EINVAL
 The string pointed to by
 .Fa *src



CVS commit: src/usr.sbin/services_mkdb

2010-05-05 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Wed May  5 22:10:50 UTC 2010

Modified Files:
src/usr.sbin/services_mkdb: services_mkdb.c

Log Message:
Accept -v in getopt(); sort flag cases.


To generate a diff of this commit:
cvs rdiff -u -r1.16 -r1.17 src/usr.sbin/services_mkdb/services_mkdb.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.sbin/services_mkdb/services_mkdb.c
diff -u src/usr.sbin/services_mkdb/services_mkdb.c:1.16 src/usr.sbin/services_mkdb/services_mkdb.c:1.17
--- src/usr.sbin/services_mkdb/services_mkdb.c:1.16	Wed May  5 13:19:51 2010
+++ src/usr.sbin/services_mkdb/services_mkdb.c	Wed May  5 22:10:50 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: services_mkdb.c,v 1.16 2010/05/05 13:19:51 joerg Exp $	*/
+/*	$NetBSD: services_mkdb.c,v 1.17 2010/05/05 22:10:50 wiz Exp $	*/
 
 /*-
  * Copyright (c) 1999 The NetBSD Foundation, Inc.
@@ -31,7 +31,7 @@
 
 #include sys/cdefs.h
 #ifndef lint
-__RCSID($NetBSD: services_mkdb.c,v 1.16 2010/05/05 13:19:51 joerg Exp $);
+__RCSID($NetBSD: services_mkdb.c,v 1.17 2010/05/05 22:10:50 wiz Exp $);
 #endif /* not lint */
 
 #include sys/param.h
@@ -81,23 +81,19 @@
 
 	setprogname(argv[0]);
 
-	while ((ch = getopt(argc, argv, qo:uV:)) != -1)
+	while ((ch = getopt(argc, argv, o:quV:v)) != -1)
 		switch (ch) {
-		case 'q':
-			otherflag = 1;
-			warndup = 0;
-			break;
 		case 'o':
 			otherflag = 1;
 			dbname = optarg;
 			break;
+		case 'q':
+			otherflag = 1;
+			warndup = 0;
+			break;
 		case 'u':
 			unique++;
 			break;
-		case 'v':
-			otherflag = 1;
-			warndup = 1;
-			break;
 		case 'V':
 			if (strcmp(optarg, db) == 0)
 use_db = 1;
@@ -106,6 +102,10 @@
 			else
 usage();
 			break;
+		case 'v':
+			otherflag = 1;
+			warndup = 1;
+			break;
 		default:
 			usage();
 		}



CVS commit: src/usr.sbin/services_mkdb

2010-05-05 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Wed May  5 22:11:19 UTC 2010

Modified Files:
src/usr.sbin/services_mkdb: services_mkdb.8

Log Message:
Sort option descriptions.


To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.12 src/usr.sbin/services_mkdb/services_mkdb.8

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/services_mkdb/services_mkdb.8
diff -u src/usr.sbin/services_mkdb/services_mkdb.8:1.11 src/usr.sbin/services_mkdb/services_mkdb.8:1.12
--- src/usr.sbin/services_mkdb/services_mkdb.8:1.11	Wed May  5 13:19:51 2010
+++ src/usr.sbin/services_mkdb/services_mkdb.8	Wed May  5 22:11:19 2010
@@ -1,4 +1,4 @@
-.\	$NetBSD: services_mkdb.8,v 1.11 2010/05/05 13:19:51 joerg Exp $
+.\	$NetBSD: services_mkdb.8,v 1.12 2010/05/05 22:11:19 wiz Exp $
 .\
 .\ Copyright (c) 1999 The NetBSD Foundation, Inc.
 .\ All rights reserved.
@@ -68,8 +68,6 @@
 This is the default behavior.
 .It Fl u
 Print the services file to stdout, omitting duplicate entries and comments.
-.It Fl v
-Warn about duplicate services.
 .It Fl V
 Create a specific version of the database style.
 .Ar style
@@ -80,6 +78,8 @@
 to request the DB format.
 The DB format is useful for compatibility with old statically
 linked binaries.
+.It Fl v
+Warn about duplicate services.
 .El
 .Pp
 The databases are used by the C library services routines (see