CVS commit: src/usr.bin/config

2012-03-11 Thread David A. Holland
Module Name:src
Committed By:   dholland
Date:   Sun Mar 11 08:21:54 UTC 2012

Modified Files:
src/usr.bin/config: defs.h files.c gram.y main.c mkmakefile.c sem.c
sem.h util.c

Log Message:
Create a struct condexpr type to hold condition expressions, instead
of abusing struct nvlist to make trees.

(These are the a|b and ab constructs.)


To generate a diff of this commit:
cvs rdiff -u -r1.38 -r1.39 src/usr.bin/config/defs.h
cvs rdiff -u -r1.10 -r1.11 src/usr.bin/config/files.c \
src/usr.bin/config/util.c
cvs rdiff -u -r1.33 -r1.34 src/usr.bin/config/gram.y
cvs rdiff -u -r1.44 -r1.45 src/usr.bin/config/main.c
cvs rdiff -u -r1.13 -r1.14 src/usr.bin/config/mkmakefile.c
cvs rdiff -u -r1.39 -r1.40 src/usr.bin/config/sem.c
cvs rdiff -u -r1.8 -r1.9 src/usr.bin/config/sem.h

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/config/defs.h
diff -u src/usr.bin/config/defs.h:1.38 src/usr.bin/config/defs.h:1.39
--- src/usr.bin/config/defs.h:1.38	Sun Mar 11 07:32:41 2012
+++ src/usr.bin/config/defs.h	Sun Mar 11 08:21:53 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: defs.h,v 1.38 2012/03/11 07:32:41 dholland Exp $	*/
+/*	$NetBSD: defs.h,v 1.39 2012/03/11 08:21:53 dholland Exp $	*/
 
 /*
  * Copyright (c) 1992, 1993
@@ -317,7 +317,7 @@ struct files {
 	TAILQ_ENTRY(files) fi_next;
 	const  char *fi_tail;	/* name, i.e., strrchr(fi_path, '/') + 1 */
 	const  char *fi_base;	/* tail minus .c (or whatever) */
-	struct nvlist *fi_optx; /* options expression */
+	struct condexpr *fi_optx; /* options expression */
 	struct nvlist *fi_optf; /* flattened version of above, if needed */
 	const  char *fi_mkrule;	/* special make rule, if any */
 };
@@ -341,7 +341,7 @@ struct files {
 struct objects {
 	struct  filetype oi_fit;
 	TAILQ_ENTRY(objects) oi_next;
-	struct  nvlist *oi_optx;/* options expression */
+	struct condexpr *oi_optx;	/* condition expression */
 	struct  nvlist *oi_optf;/* flattened version of above, if needed */
 };
 
@@ -356,10 +356,31 @@ struct objects {
 #define	OI_SEL		0x01	/* selected */
 #define	OI_NEEDSFLAG	0x02	/* needs-flag */
 
-#define	FX_ATOM		0	/* atom (in nv_name) */
-#define	FX_NOT		1	/* NOT expr (subexpression in nv_next) */
-#define	FX_AND		2	/* AND expr (lhs in nv_ptr, rhs in nv_next) */
-#define	FX_OR		3	/* OR expr (lhs in nv_ptr, rhs in nv_next) */
+/*
+ * Condition expressions.
+ */
+
+enum condexpr_types {
+	CX_ATOM,
+	CX_NOT,
+	CX_AND,
+	CX_OR,
+};
+struct condexpr {
+	enum condexpr_types cx_type;
+	union {
+		const char *atom;
+		struct condexpr *not;
+		struct {
+			struct condexpr *left;
+			struct condexpr *right;
+		} and, or;
+	} cx_u;
+};
+#define cx_atom	cx_u.atom
+#define cx_not	cx_u.not
+#define cx_and	cx_u.and
+#define cx_or	cx_u.or
 
 /*
  * File/object prefixes.  These are arranged in a stack, and affect
@@ -380,7 +401,7 @@ struct devm {
 	const char	*dm_name;	/* [bc]devsw name */
 	devmajor_t	dm_cmajor;	/* character major */
 	devmajor_t	dm_bmajor;	/* block major */
-	struct nvlist	*dm_opts;	/* options */
+	struct condexpr	*dm_opts;	/* options */
 	struct nvlist	*dm_devnodes;	/* information on /dev nodes */
 };
 
@@ -477,10 +498,9 @@ void	checkfiles(void);
 int	fixfiles(void);		/* finalize */
 int	fixobjects(void);
 int	fixdevsw(void);
-void	addfile(const char *, struct nvlist *, int, const char *);
-void	addobject(const char *, struct nvlist *, int);
-int	expr_eval(struct nvlist *, int (*)(const char *, void *), void *);
-void	expr_free(struct nvlist *);
+void	addfile(const char *, struct condexpr *, int, const char *);
+void	addobject(const char *, struct condexpr *, int);
+int	expr_eval(struct condexpr *, int (*)(const char *, void *), void *);
 
 /* hash.c */
 struct	hashtab *ht_new(void);
@@ -505,7 +525,7 @@ void	addoption(const char *, const char 
 void	addfsoption(const char *);
 void	addmkoption(const char *, const char *);
 void	appendmkoption(const char *, const char *);
-void	appendcondmkoption(struct nvlist *, const char *, const char *);
+void	appendcondmkoption(struct condexpr *, const char *, const char *);
 void	deffilesystem(struct nvlist *, struct nvlist *);
 void	defoption(const char *, struct nvlist *, struct nvlist *);
 void	defflag(const char *, struct nvlist *, struct nvlist *, int);
@@ -584,6 +604,8 @@ struct attrlist *attrlist_create(void);
 struct attrlist *attrlist_cons(struct attrlist *, struct attr *);
 void attrlist_destroy(struct attrlist *);
 void attrlist_destroyall(struct attrlist *);
+struct condexpr *condexpr_create(enum condexpr_types);
+void condexpr_destroy(struct condexpr *);
 
 /* liby */
 void	yyerror(const char *);

Index: src/usr.bin/config/files.c
diff -u src/usr.bin/config/files.c:1.10 src/usr.bin/config/files.c:1.11
--- src/usr.bin/config/files.c:1.10	Fri Mar 13 18:24:41 2009
+++ src/usr.bin/config/files.c	Sun Mar 11 08:21:53 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: files.c,v 1.10 2009/03/13 18:24:41 cube Exp $	*/
+/*	

CVS commit: src/gnu/dist/groff/contrib/mm

2012-03-11 Thread Iain Hibbert
Module Name:src
Committed By:   plunky
Date:   Sun Mar 11 08:44:45 UTC 2012

Modified Files:
src/gnu/dist/groff/contrib/mm: groff_mmse.man

Log Message:
use character escapes for non-ASCII chars, according to mandoc_char(7)


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.1 -r1.2 src/gnu/dist/groff/contrib/mm/groff_mmse.man

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

Modified files:

Index: src/gnu/dist/groff/contrib/mm/groff_mmse.man
diff -u src/gnu/dist/groff/contrib/mm/groff_mmse.man:1.1.1.1 src/gnu/dist/groff/contrib/mm/groff_mmse.man:1.2
--- src/gnu/dist/groff/contrib/mm/groff_mmse.man:1.1.1.1	Mon Jun 30 17:51:43 2003
+++ src/gnu/dist/groff/contrib/mm/groff_mmse.man	Sun Mar 11 08:44:45 2012
@@ -4,7 +4,7 @@
 .\
 .TH GROFF_MMSE @MAN7EXT@ @MDATE@ Groff Version @VERSION@
 .SH NAMN
-groff_mmse \- svenska mm makro för groff
+groff_mmse \- svenska mm makro f\(:or groff
 .SH SYNTAX
 .B groff
 .B \-m@TMAC_M_PREFIX@mse
@@ -15,26 +15,26 @@ groff_mmse \- svenska mm makro för groff
 .IR filer .\|.\|.
 ]
 .SH BESKRIVNING
-\fBm@TMAC_M_PREFIX@mse\fP är en svensk variant av \fBm@TMAC_M_PREFIX@m\fP. Alla texter
-är översatta. En A4 sida får text som är 13 cm bred, 3.5 cm indragning
-samt är 28.5 cm hög.
-Det finns stöd för brevuppställning enligt svensk standard
-för vänster och högerjusterad text.
+\fBm@TMAC_M_PREFIX@mse\fP \(:ar en svensk variant av \fBm@TMAC_M_PREFIX@m\fP. Alla texter
+\(:ar \(:oversatta. En A4 sida f\(oar text som \(:ar 13 cm bred, 3.5 cm indragning
+samt \(:ar 28.5 cm h\(:og.
+Det finns st\(:od f\(:or brevuppst\(:allning enligt svensk standard
+f\(:or v\(:anster och h\(:ogerjusterad text.
 .LP
-\fBCOVER\fP kan använda \fIse_ms\fP som argument. Detta ger ett
-svenskt försättsblad.
-Se \fBgroff_mm(@MAN7EXT@)\fP för övriga detaljer.
+\fBCOVER\fP kan anv\(:anda \fIse_ms\fP som argument. Detta ger ett
+svenskt f\(:ors\(:attsblad.
+Se \fBgroff_mm(@MAN7EXT@)\fP f\(:or \(:ovriga detaljer.
 .SH BREV
-Tillgängliga brevtyper:
+Tillg\(:angliga brevtyper:
 .TP
 .B .LT SVV
-Vänsterställd löptext med adressat i position T0 (vänsterställt).
+V\(:ansterst\(:alld l\(:optext med adressat i position T0 (v\(:ansterst\(:allt).
 .TP
 .B .LT SVH
-Högerställd löptext med adressat i position T4 (passar
-fönsterkuvert).
+H\(:ogerst\(:alld l\(:optext med adressat i position T4 (passar
+f\(:onsterkuvert).
 .LP
-Följande extra LO-variabler används.
+F\(:oljande extra LO-variabler anv\(:ands.
 .TP
 .B .LO DNAMN\fI namn\fP
 Anger dokumentets namn.
@@ -44,8 +44,8 @@ Anger dokumentets namn.
 Mottagarens datum, anges under \fBErt datum:\fP (\fBLetMDAT\fP).
 .TP
 .br
-.B .LO BIL\fI sträng\fP
-Anger bilaga, nummer eller sträng med \fBBilaga\fP (\fBLetBIL\fP)
+.B .LO BIL\fI str\(:ang\fP
+Anger bilaga, nummer eller str\(:ang med \fBBilaga\fP (\fBLetBIL\fP)
 som prefix.
 .TP
 .br
@@ -58,21 +58,21 @@ Anger dokumentbeteckning eller dokumentn
 .TP
 .br
 .B .LO BET\fI beteckning\fP
-Anger beteckning (ärendebeteckning i form av diarienummer eller liknande).
+Anger beteckning (\(:arendebeteckning i form av diarienummer eller liknande).
 .TP
 .br
 .B .LO SIDOR\fI antal\fP
 Anger totala antalet sidor och skrivs ut efter sidnumret inom
 parenteser.
 .LP
-Om makrot \fB.TP\fP är definierat anropas det efter utskrift av brevhuvudet.
-Där lägger man lämpligen in postadress och annat som brevfot.
+Om makrot \fB.TP\fP \(:ar definierat anropas det efter utskrift av brevhuvudet.
+D\(:ar l\(:agger man l\(:ampligen in postadress och annat som brevfot.
 .SH SKRIVET AV
-Jörgen Hägg, Lund, Sweden jorgen.h...@axis.se
+J\(:orgen H\(:agg, Lund, Sweden jorgen.h...@axis.se
 .SH FILER
 .B @MACRODIR@/tmac.@TMAC_M_PREFIX@mse
 .B @TMAC_MDIR@/se_*.cov
-.SH SE OCKSÅ
+.SH SE OCKS\(oA
 .BR groff (@MAN1EXT@),
 .BR @g@troff (@MAN1EXT@),
 .BR @g@tbl (@MAN1EXT@),



CVS commit: src/gnu/dist/groff/contrib/mm

2012-03-11 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Sun Mar 11 10:21:25 UTC 2012

Modified Files:
src/gnu/dist/groff/contrib/mm: groff_mmse.man

Log Message:
Fix typo, now this has a NAME section.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/gnu/dist/groff/contrib/mm/groff_mmse.man

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

Modified files:

Index: src/gnu/dist/groff/contrib/mm/groff_mmse.man
diff -u src/gnu/dist/groff/contrib/mm/groff_mmse.man:1.2 src/gnu/dist/groff/contrib/mm/groff_mmse.man:1.3
--- src/gnu/dist/groff/contrib/mm/groff_mmse.man:1.2	Sun Mar 11 08:44:45 2012
+++ src/gnu/dist/groff/contrib/mm/groff_mmse.man	Sun Mar 11 10:21:25 2012
@@ -3,7 +3,7 @@
 .\ Skrivet av Jörgen Hägg, Lund, Sverige
 .\
 .TH GROFF_MMSE @MAN7EXT@ @MDATE@ Groff Version @VERSION@
-.SH NAMN
+.SH NAME
 groff_mmse \- svenska mm makro f\(:or groff
 .SH SYNTAX
 .B groff



CVS commit: src/usr.bin/du

2012-03-11 Thread Sergey Svishchev
Module Name:src
Committed By:   shattered
Date:   Sun Mar 11 11:23:20 UTC 2012

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

Log Message:
PR/22405 -- extend du(1) to report inode usage.  Patch provided by
Jonathan Perkin.

OK by wiz@


To generate a diff of this commit:
cvs rdiff -u -r1.21 -r1.22 src/usr.bin/du/du.1
cvs rdiff -u -r1.35 -r1.36 src/usr.bin/du/du.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/du/du.1
diff -u src/usr.bin/du/du.1:1.21 src/usr.bin/du/du.1:1.22
--- src/usr.bin/du/du.1:1.21	Sun Sep 24 07:19:16 2006
+++ src/usr.bin/du/du.1	Sun Mar 11 11:23:20 2012
@@ -1,4 +1,4 @@
-.\	$NetBSD: du.1,v 1.21 2006/09/24 07:19:16 wiz Exp $
+.\	$NetBSD: du.1,v 1.22 2012/03/11 11:23:20 shattered Exp $
 .\
 .\ Copyright (c) 1990, 1993
 .\	The Regents of the University of California.  All rights reserved.
@@ -29,7 +29,7 @@
 .\
 .\	@(#)du.1	8.2 (Berkeley) 4/1/94
 .\
-.Dd September 24, 2006
+.Dd March 4, 2012
 .Dt DU 1
 .Os
 .Sh NAME
@@ -39,12 +39,12 @@
 .Nm
 .Op Fl H | Fl L | Fl P
 .Op Fl a | Fl d Ar depth | Fl s
-.Op Fl cghkmnrx
+.Op Fl cghikmnrx
 .Op Ar file ...
 .Sh DESCRIPTION
 The
 .Nm
-utility displays the file system block usage for each file argument
+utility displays the file system usage for each file argument
 and for each directory in the file hierarchy rooted in each directory
 argument.
 If no file is specified, the block usage of the hierarchy rooted in
@@ -79,6 +79,9 @@ flag is specified, the numbers will be d
 format.
 Use unit suffixes: B (Byte), K (Kilobyte), M (Megabyte), G (Gigabyte),
 T (Terabyte) and P (Petabyte).
+.It Fl i
+Output inode usage instead of blocks.
+All human-readable options are ignored.
 .It Fl k
 By default,
 .Nm

Index: src/usr.bin/du/du.c
diff -u src/usr.bin/du/du.c:1.35 src/usr.bin/du/du.c:1.36
--- src/usr.bin/du/du.c:1.35	Thu Sep  1 13:37:33 2011
+++ src/usr.bin/du/du.c	Sun Mar 11 11:23:20 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: du.c,v 1.35 2011/09/01 13:37:33 joerg Exp $	*/
+/*	$NetBSD: du.c,v 1.36 2012/03/11 11:23:20 shattered Exp $	*/
 
 /*
  * Copyright (c) 1989, 1993, 1994
@@ -42,7 +42,7 @@ __COPYRIGHT(@(#) Copyright (c) 1989, 19
 #if 0
 static char sccsid[] = @(#)du.c	8.5 (Berkeley) 5/4/95;
 #else
-__RCSID($NetBSD: du.c,v 1.35 2011/09/01 13:37:33 joerg Exp $);
+__RCSID($NetBSD: du.c,v 1.36 2012/03/11 11:23:20 shattered Exp $);
 #endif
 #endif /* not lint */
 
@@ -54,6 +54,7 @@ __RCSID($NetBSD: du.c,v 1.35 2011/09/01
 #include err.h
 #include errno.h
 #include fts.h
+#include inttypes.h
 #include util.h
 #include stdio.h
 #include stdlib.h
@@ -61,11 +62,14 @@ __RCSID($NetBSD: du.c,v 1.35 2011/09/01
 #include unistd.h
 #include limits.h
 
+/* Count inodes or file size */
+#define	COUNT	(iflag ? 1 : p-fts_statp-st_blocks)
+
 static int	linkchk(dev_t, ino_t);
 static void	prstat(const char *, int64_t);
 __dead static void	usage(void);
 
-static int hflag;
+static int hflag, iflag;
 static long blocksize;
 
 int
@@ -83,7 +87,7 @@ main(int argc, char *argv[])
 	totalblocks = 0;
 	ftsoptions = FTS_PHYSICAL;
 	depth = INT_MAX;
-	while ((ch = getopt(argc, argv, HLPacd:ghkmnrsx)) != -1)
+	while ((ch = getopt(argc, argv, HLPacd:ghikmnrsx)) != -1)
 		switch (ch) {
 		case 'H':
 			Hflag = 1;
@@ -118,6 +122,9 @@ main(int argc, char *argv[])
 		case 'h':
 			hflag = 1;
 			break;
+		case 'i':
+			iflag = 1;
+			break;
 		case 'k':
 			blocksize = 1024;
 			gkmflag = 1;
@@ -206,9 +213,9 @@ main(int argc, char *argv[])
 			break;
 		case FTS_DP:
 			p-fts_parent-fts_number += 
-			p-fts_number += p-fts_statp-st_blocks;
+			p-fts_number += COUNT;
 			if (cflag)
-totalblocks += p-fts_statp-st_blocks;
+totalblocks += COUNT;
 			/*
 			 * If listing each directory, or not listing files
 			 * or directories and this is post-order of the
@@ -235,10 +242,10 @@ main(int argc, char *argv[])
 			 * the root of a traversal, display the total.
 			 */
 			if (listfiles || !p-fts_level)
-prstat(p-fts_path, p-fts_statp-st_blocks);
-			p-fts_parent-fts_number += p-fts_statp-st_blocks;
+prstat(p-fts_path, COUNT);
+			p-fts_parent-fts_number += COUNT;
 			if (cflag)
-totalblocks += p-fts_statp-st_blocks;
+totalblocks += COUNT;
 		}
 	}
 	if (errno)
@@ -251,6 +258,11 @@ main(int argc, char *argv[])
 static void
 prstat(const char *fname, int64_t blocks)
 {
+	if (iflag) {
+		(void)printf(% PRId64 \t%s\n, blocks, fname);
+		return;
+	}
+
 	if (hflag) {
 		char buf[5];
 		int64_t sz = blocks * 512;
@@ -260,8 +272,8 @@ prstat(const char *fname, int64_t blocks
 
 		(void)printf(%s\t%s\n, buf, fname);
 	} else
-		(void)printf(%lld\t%s\n,
-		(long long)howmany(blocks, (int64_t)blocksize),
+		(void)printf(% PRId64 \t%s\n,
+		howmany(blocks, (int64_t)blocksize),
 		fname);
 }
 
@@ -345,6 +357,6 @@ usage(void)
 {
 
 	(void)fprintf(stderr,
-		usage: du [-H | -L | -P] [-a | -d depth | -s] [-cghkmnrx] [file ...]\n);
+		usage: du [-H | -L | -P] [-a 

CVS commit: src/sys/rump/dev/lib/libpud

2012-03-11 Thread Andreas Gustafsson
Module Name:src
Committed By:   gson
Date:   Sun Mar 11 13:14:04 UTC 2012

Modified Files:
src/sys/rump/dev/lib/libpud: component.c

Log Message:
Fix obvious cut-and-paste-o in error message string


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/sys/rump/dev/lib/libpud/component.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/rump/dev/lib/libpud/component.c
diff -u src/sys/rump/dev/lib/libpud/component.c:1.1 src/sys/rump/dev/lib/libpud/component.c:1.2
--- src/sys/rump/dev/lib/libpud/component.c:1.1	Thu Mar 31 08:36:25 2011
+++ src/sys/rump/dev/lib/libpud/component.c	Sun Mar 11 13:14:04 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: component.c,v 1.1 2011/03/31 08:36:25 pooka Exp $	*/
+/*	$NetBSD: component.c,v 1.2 2012/03/11 13:14:04 gson Exp $	*/
 
 /*
  * Copyright (c) 2009 Antti Kantee.  All Rights Reserved.
@@ -26,7 +26,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: component.c,v 1.1 2011/03/31 08:36:25 pooka Exp $);
+__KERNEL_RCSID(0, $NetBSD: component.c,v 1.2 2012/03/11 13:14:04 gson Exp $);
 
 #include sys/param.h
 #include sys/conf.h
@@ -41,5 +41,5 @@ RUMP_COMPONENT(RUMP_COMPONENT_DEV)
 	int error;
 
 	if ((error = rump_vfs_makeonedevnode(S_IFCHR, /dev/pud, 178, 1)) != 0)
-		panic(cannot create raw cgd dev nodes: %d, error);
+		panic(cannot create /dev/pud: %d, error);
 }



CVS commit: src/sys/dev/pci

2012-03-11 Thread NONAKA Kimihiro
Module Name:src
Committed By:   nonaka
Date:   Sun Mar 11 13:57:31 UTC 2012

Modified Files:
src/sys/dev/pci: lynxfb.c

Log Message:
path correct device to wsdisplayio_busid_pci().


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/sys/dev/pci/lynxfb.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/pci/lynxfb.c
diff -u src/sys/dev/pci/lynxfb.c:1.1 src/sys/dev/pci/lynxfb.c:1.2
--- src/sys/dev/pci/lynxfb.c:1.1	Fri Mar  2 13:20:57 2012
+++ src/sys/dev/pci/lynxfb.c	Sun Mar 11 13:57:30 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: lynxfb.c,v 1.1 2012/03/02 13:20:57 nonaka Exp $	*/
+/*	$NetBSD: lynxfb.c,v 1.2 2012/03/11 13:57:30 nonaka Exp $	*/
 /*	$OpenBSD: smfb.c,v 1.13 2011/07/21 20:36:12 miod Exp $	*/
 
 /*
@@ -26,7 +26,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: lynxfb.c,v 1.1 2012/03/02 13:20:57 nonaka Exp $);
+__KERNEL_RCSID(0, $NetBSD: lynxfb.c,v 1.2 2012/03/11 13:57:30 nonaka Exp $);
 
 #include opt_wsemul.h
 
@@ -402,8 +402,8 @@ lynxfb_ioctl(void *v, void *vs, u_long c
 		cmd, data, flags, l);
 
 	case WSDISPLAYIO_GET_BUSID:
-		return wsdisplayio_busid_pci(device_parent(sc-sc_dev),
-		sc-sc_pc, sc-sc_pcitag, data);
+		return wsdisplayio_busid_pci(sc-sc_dev, sc-sc_pc,
+		sc-sc_pcitag, data);
 
 	case WSDISPLAYIO_GINFO:
 		if (ms == NULL)



CVS commit: src/sys/dev/pci

2012-03-11 Thread NONAKA Kimihiro
Module Name:src
Committed By:   nonaka
Date:   Sun Mar 11 15:58:56 UTC 2012

Modified Files:
src/sys/dev/pci: lynxfb.c lynxfbreg.h

Log Message:
fix mmaped offset.
X works on Yeeloong Notebook now.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/sys/dev/pci/lynxfb.c
cvs rdiff -u -r1.1 -r1.2 src/sys/dev/pci/lynxfbreg.h

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/pci/lynxfb.c
diff -u src/sys/dev/pci/lynxfb.c:1.2 src/sys/dev/pci/lynxfb.c:1.3
--- src/sys/dev/pci/lynxfb.c:1.2	Sun Mar 11 13:57:30 2012
+++ src/sys/dev/pci/lynxfb.c	Sun Mar 11 15:58:56 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: lynxfb.c,v 1.2 2012/03/11 13:57:30 nonaka Exp $	*/
+/*	$NetBSD: lynxfb.c,v 1.3 2012/03/11 15:58:56 nonaka Exp $	*/
 /*	$OpenBSD: smfb.c,v 1.13 2011/07/21 20:36:12 miod Exp $	*/
 
 /*
@@ -26,7 +26,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: lynxfb.c,v 1.2 2012/03/11 13:57:30 nonaka Exp $);
+__KERNEL_RCSID(0, $NetBSD: lynxfb.c,v 1.3 2012/03/11 15:58:56 nonaka Exp $);
 
 #include opt_wsemul.h
 
@@ -34,6 +34,7 @@ __KERNEL_RCSID(0, $NetBSD: lynxfb.c,v 1
 #include sys/systm.h
 #include sys/device.h
 #include sys/endian.h
+#include sys/kauth.h
 
 #include sys/bus.h
 
@@ -117,6 +118,8 @@ struct lynxfb_softc {
 
 	struct lynxfb		*sc_fb;
 	struct lynxfb		sc_fb_store;
+	bus_addr_t		sc_fbaddr;
+	bus_size_t		sc_fbsize;
 
 	struct vcons_data	sc_vd;
 	struct wsscreen_list	sc_screenlist;
@@ -168,6 +171,8 @@ static struct {
 	bus_space_tag_t memt;
 	bus_space_handle_t memh;
 	struct lynxfb fb;
+	bus_addr_t fbaddr;
+	bus_size_t fbsize;
 } lynxfb_console;
 
 int lynxfb_default_width = LYNXFB_DEFAULT_WIDTH;
@@ -229,6 +234,8 @@ lynxfb_cnattach(bus_space_tag_t memt, bu
 
 	lynxfb_console.is_console = true;
 	lynxfb_console.tag = tag;
+	lynxfb_console.fbaddr = base;
+	lynxfb_console.fbsize = size;
 	(*ri-ri_ops.allocattr)(ri, 0, 0, 0, defattr);
 	wsdisplay_preattach(fb-wsd, ri, 0, 0, defattr);
 
@@ -264,7 +271,6 @@ lynxfb_attach(device_t parent, device_t 
 	struct lynxfb *fb;
 	struct rasops_info *ri;
 	prop_dictionary_t dict;
-	bus_size_t size;
 	long defattr;
 	bool is_console;
 
@@ -280,9 +286,13 @@ lynxfb_attach(device_t parent, device_t 
 	sc-sc_fb = fb;
 	fb-sc = sc;
 
-	if (!is_console) {
+	if (is_console) {
+		sc-sc_fbaddr = lynxfb_console.fbaddr;
+		sc-sc_fbsize = lynxfb_console.fbsize;
+	} else {
 		if (pci_mapreg_map(pa, PCI_MAPREG_START, PCI_MAPREG_TYPE_MEM,
-		BUS_SPACE_MAP_LINEAR, fb-memt, fb-memh, NULL, size)) {
+		BUS_SPACE_MAP_LINEAR, fb-memt, fb-memh, sc-sc_fbaddr,
+		sc-sc_fbsize)) {
 			aprint_error_dev(self, can't map frame buffer\n);
 			return;
 		}
@@ -305,7 +315,7 @@ lynxfb_attach(device_t parent, device_t 
 
 		if (lynxfb_setup(fb)) {
 			aprint_error_dev(self, can't setup frame buffer\n);
-			bus_space_unmap(fb-memt, fb-memh, size);
+			bus_space_unmap(fb-memt, fb-memh, sc-sc_fbsize);
 			return;
 		}
 	}
@@ -458,14 +468,36 @@ lynxfb_mmap(void *v, void *vs, off_t off
 	struct lynxfb_softc *sc = vd-cookie;
 	struct rasops_info *ri = sc-sc_fb-vcs.scr_ri;
 
-	if ((offset  PAGE_MASK) != 0)
-		return (-1);
+	/* 'regular' framebuffer mmap()ing */
+	if (offset  ri-ri_stride * ri-ri_height) {
+		return bus_space_mmap(sc-sc_memt, sc-sc_fbaddr + offset, 0,
+		prot, BUS_SPACE_MAP_LINEAR | BUS_SPACE_MAP_PREFETCHABLE);
+	}
 
-	if (offset  0 || offset = ri-ri_stride * ri-ri_height)
+	/*
+	 * restrict all other mappings to processes with superuser privileges
+	 * or the kernel itself
+	 */
+	if (kauth_authorize_generic(kauth_cred_get(), KAUTH_GENERIC_ISSUSER,
+	NULL) != 0) {
+		aprint_normal_dev(sc-sc_dev, mmap() rejected.\n);
 		return (-1);
+	}
+
+	/* framebuffer mmap()ing */
+	if (offset = sc-sc_fbaddr 
+	offset  sc-sc_fbaddr + ri-ri_stride * ri-ri_height) {
+		return bus_space_mmap(sc-sc_memt, offset, 0, prot,
+		BUS_SPACE_MAP_LINEAR | BUS_SPACE_MAP_PREFETCHABLE);
+	}
+
+	/* register mmap()ing */
+	if (offset = sc-sc_fbaddr + SM7XX_REG_BASE 
+	offset  sc-sc_fbaddr + SM7XX_REG_BASE + SM7XX_REG_SIZE) {
+		return bus_space_mmap(sc-sc_memt, offset, 0, prot, 0);
+	}
 
-	return bus_space_mmap(sc-sc_memt, offset, 0, prot,
-	BUS_SPACE_MAP_LINEAR | BUS_SPACE_MAP_PREFETCHABLE);
+	return (-1);
 }
 
 static void

Index: src/sys/dev/pci/lynxfbreg.h
diff -u src/sys/dev/pci/lynxfbreg.h:1.1 src/sys/dev/pci/lynxfbreg.h:1.2
--- src/sys/dev/pci/lynxfbreg.h:1.1	Fri Mar  2 13:20:57 2012
+++ src/sys/dev/pci/lynxfbreg.h	Sun Mar 11 15:58:56 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: lynxfbreg.h,v 1.1 2012/03/02 13:20:57 nonaka Exp $	*/
+/*	$NetBSD: lynxfbreg.h,v 1.2 2012/03/11 15:58:56 nonaka Exp $	*/
 /*	$OpenBSD: smfbreg.h,v 1.5 2010/08/27 12:48:54 miod Exp $	*/
 
 /*
@@ -60,6 +60,10 @@
 #define	DE_CTRL_ROP_SHIFT			0
 #define	DE_CTRL_ROP_SRC0x0c
 
+
+#define	SM7XX_REG_BASE			0x0040
+#define	SM7XX_REG_SIZE			0x0040
+
 /*
  * VPR (Video Parameter Registers)
  */



CVS commit: src/sys/arch/xen/x86

2012-03-11 Thread Jean-Yves Migeon
Module Name:src
Committed By:   jym
Date:   Sun Mar 11 16:16:44 UTC 2012

Modified Files:
src/sys/arch/xen/x86: cpu.c

Log Message:
Typo fix.


To generate a diff of this commit:
cvs rdiff -u -r1.89 -r1.90 src/sys/arch/xen/x86/cpu.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/arch/xen/x86/cpu.c
diff -u src/sys/arch/xen/x86/cpu.c:1.89 src/sys/arch/xen/x86/cpu.c:1.90
--- src/sys/arch/xen/x86/cpu.c:1.89	Sat Feb 25 18:57:50 2012
+++ src/sys/arch/xen/x86/cpu.c	Sun Mar 11 16:16:44 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: cpu.c,v 1.89 2012/02/25 18:57:50 bouyer Exp $	*/
+/*	$NetBSD: cpu.c,v 1.90 2012/03/11 16:16:44 jym Exp $	*/
 /* NetBSD: cpu.c,v 1.18 2004/02/20 17:35:01 yamt Exp  */
 
 /*-
@@ -66,7 +66,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: cpu.c,v 1.89 2012/02/25 18:57:50 bouyer Exp $);
+__KERNEL_RCSID(0, $NetBSD: cpu.c,v 1.90 2012/03/11 16:16:44 jym Exp $);
 
 #include opt_ddb.h
 #include opt_multiprocessor.h
@@ -1196,7 +1196,7 @@ cpu_load_pmap(struct pmap *pmap, struct 
   * considered to be a canonical SHADOW PDIR with the following
   * properties: 
   * - Its recursive mapping points to itself
-  * - per-cpu recurseive mappings point to themselves on __x86_64__
+  * - per-cpu recursive mappings point to themselves on __x86_64__
   * - per-cpu L4 pages' kernel entries are expected to be in sync with
   *   the shadow
   */



CVS commit: src/sys/arch/x86/include

2012-03-11 Thread Jean-Yves Migeon
Module Name:src
Committed By:   jym
Date:   Sun Mar 11 16:28:02 UTC 2012

Modified Files:
src/sys/arch/x86/include: pmap.h

Log Message:
Alternate PTEs got killed a few weeks ago. Clean up unused prototypes.


To generate a diff of this commit:
cvs rdiff -u -r1.50 -r1.51 src/sys/arch/x86/include/pmap.h

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/x86/include/pmap.h
diff -u src/sys/arch/x86/include/pmap.h:1.50 src/sys/arch/x86/include/pmap.h:1.51
--- src/sys/arch/x86/include/pmap.h:1.50	Fri Feb 17 18:40:18 2012
+++ src/sys/arch/x86/include/pmap.h	Sun Mar 11 16:28:02 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: pmap.h,v 1.50 2012/02/17 18:40:18 bouyer Exp $	*/
+/*	$NetBSD: pmap.h,v 1.51 2012/03/11 16:28:02 jym Exp $	*/
 
 /*
  * Copyright (c) 1997 Charles D. Cranor and Washington University.
@@ -447,9 +447,6 @@ xpmap_ptetomach(pt_entry_t *pte)
 
 paddr_t	vtomach(vaddr_t);
 #define vtomfn(va) (vtomach(va)  PAGE_SHIFT)
-
-void	pmap_apte_flush(struct pmap *);
-void	pmap_unmap_apdp(void);
 #endif	/* XEN */
 
 /* pmap functions with machine addresses */



CVS commit: src/sys/arch/xen/x86

2012-03-11 Thread Jean-Yves Migeon
Module Name:src
Committed By:   jym
Date:   Sun Mar 11 17:14:30 UTC 2012

Modified Files:
src/sys/arch/xen/x86: xen_pmap.c

Log Message:
Split the map/unmap code from the sync/flush code: move xpq_flush_queue()
calls after pmap_{,un}map_recursive_entries() so that pmap's handlers
handle the flush themselves.

Now pmap_{,un}map_recursive_entries() do what their names imply, nothing more.

Fix pmap_xen_suspend()'s comment: APDPs are now gone.

pmap's handlers are called deep during kernel save/restore. We already
are at IPL_VM + kpreemption disabled. No need to wrap the xpq_flush_queue()
with splvm/splx.


To generate a diff of this commit:
cvs rdiff -u -r1.19 -r1.20 src/sys/arch/xen/x86/xen_pmap.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/arch/xen/x86/xen_pmap.c
diff -u src/sys/arch/xen/x86/xen_pmap.c:1.19 src/sys/arch/xen/x86/xen_pmap.c:1.20
--- src/sys/arch/xen/x86/xen_pmap.c:1.19	Fri Mar  2 16:38:14 2012
+++ src/sys/arch/xen/x86/xen_pmap.c	Sun Mar 11 17:14:30 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: xen_pmap.c,v 1.19 2012/03/02 16:38:14 bouyer Exp $	*/
+/*	$NetBSD: xen_pmap.c,v 1.20 2012/03/11 17:14:30 jym Exp $	*/
 
 /*
  * Copyright (c) 2007 Manuel Bouyer.
@@ -102,7 +102,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: xen_pmap.c,v 1.19 2012/03/02 16:38:14 bouyer Exp $);
+__KERNEL_RCSID(0, $NetBSD: xen_pmap.c,v 1.20 2012/03/11 17:14:30 jym Exp $);
 
 #include opt_user_ldt.h
 #include opt_lockdebug.h
@@ -236,22 +236,16 @@ pmap_extract_ma(struct pmap *pmap, vaddr
 }
 
 /*
- * Flush all APDP entries found in pmaps
- * Required during Xen save/restore operations, as Xen does not
- * handle alternative recursive mappings properly
+ * Xen pmap's handlers for save/restore
  */
 void
 pmap_xen_suspend(void)
 {
-	int s;
-
-	s = splvm();
-	xpq_flush_queue();
-	splx(s);
-
 #ifdef PAE
 	pmap_unmap_recursive_entries();
 #endif
+
+	xpq_flush_queue();
 }
 
 void
@@ -260,6 +254,8 @@ pmap_xen_resume(void)
 #ifdef PAE
 	pmap_map_recursive_entries();
 #endif
+
+	xpq_flush_queue();
 }
 
 #ifdef PAE
@@ -294,10 +290,13 @@ pmap_map_recursive_entries(void)
 		xpmap_ptom(pmap_pdirpa(pmap_kernel(), PDIR_SLOT_PTE + i)),
 		xpmap_ptom(pmap_kernel()-pm_pdirpa[i]) | PG_V);
 	}
-
-	xpq_flush_queue();
 }
 
+/*
+ * Unmap recursive entries found in pmaps. Required during Xen
+ * save/restore operations, as Xen does not handle recursive mappings
+ * properly.
+ */
 void
 pmap_unmap_recursive_entries(void)
 {
@@ -322,13 +321,11 @@ pmap_unmap_recursive_entries(void)
 	mutex_exit(pmaps_lock);
 
 	/* do it for pmap_kernel() too! */
-	for (i = 0; i  PDP_SIZE; i++)
+	for (i = 0; i  PDP_SIZE; i++) {
 		xpq_queue_pte_update(
 		xpmap_ptom(pmap_pdirpa(pmap_kernel(), PDIR_SLOT_PTE + i)),
 		0);
-
-	xpq_flush_queue();
-
+	}
 }
 #endif /* PAE */
 



CVS commit: src/etc/root

2012-03-11 Thread Havard Eidnes
Module Name:src
Committed By:   he
Date:   Sun Mar 11 17:23:55 UTC 2012

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

Log Message:
Can't use Bourne shell syntax here... (Even in comments, for PKG_PATH.)


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

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.22 src/etc/root/dot.cshrc:1.23
--- src/etc/root/dot.cshrc:1.22	Tue Jun 21 05:31:29 2011
+++ src/etc/root/dot.cshrc	Sun Mar 11 17:23:55 2012
@@ -1,4 +1,4 @@
-#	$NetBSD: dot.cshrc,v 1.22 2011/06/21 05:31:29 erh Exp $
+#	$NetBSD: dot.cshrc,v 1.23 2012/03/11 17:23:55 he Exp $
 
 alias	h	history
 alias	j	jobs -l
@@ -22,8 +22,8 @@ setenv BLOCKSIZE 1k
 
 # Uncomment the following line(s) to install binary packages
 # 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
+#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)



CVS commit: src/etc/root

2012-03-11 Thread Havard Eidnes
Module Name:src
Committed By:   he
Date:   Sun Mar 11 17:28:47 UTC 2012

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

Log Message:
Point first to 6.0 packages, then to packages for 5.1 or 5.0.
The latter have reduced usefullness in -current or netbsd-6 until
we have a compat50 package.


To generate a diff of this commit:
cvs rdiff -u -r1.23 -r1.24 src/etc/root/dot.cshrc
cvs rdiff -u -r1.25 -r1.26 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.23 src/etc/root/dot.cshrc:1.24
--- src/etc/root/dot.cshrc:1.23	Sun Mar 11 17:23:55 2012
+++ src/etc/root/dot.cshrc	Sun Mar 11 17:28:47 2012
@@ -1,4 +1,4 @@
-#	$NetBSD: dot.cshrc,v 1.23 2012/03/11 17:23:55 he Exp $
+#	$NetBSD: dot.cshrc,v 1.24 2012/03/11 17:28:47 he Exp $
 
 alias	h	history
 alias	j	jobs -l
@@ -22,7 +22,8 @@ setenv BLOCKSIZE 1k
 
 # Uncomment the following line(s) to install binary packages
 # 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 ftp://ftp.NetBSD.org/pub/pkgsrc/packages/NetBSD/`uname -m`/6.0/All
+#setenv PKG_PATH ${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

Index: src/etc/root/dot.profile
diff -u src/etc/root/dot.profile:1.25 src/etc/root/dot.profile:1.26
--- src/etc/root/dot.profile:1.25	Tue Jun 21 05:31:29 2011
+++ src/etc/root/dot.profile	Sun Mar 11 17:28:47 2012
@@ -1,11 +1,12 @@
-#	$NetBSD: dot.profile,v 1.25 2011/06/21 05:31:29 erh Exp $
+#	$NetBSD: dot.profile,v 1.26 2012/03/11 17:28:47 he 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.  (See also pkg_install.conf)
-#export PKG_PATH=ftp://ftp.NetBSD.org/pub/pkgsrc/packages/NetBSD/$(uname -m)/5.1/All
+#export PKG_PATH=ftp://ftp.NetBSD.org/pub/pkgsrc/packages/NetBSD/$(uname -m)/6.0/All
+#export PKG_PATH=${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/sys/net/npf

2012-03-11 Thread Mindaugas Rasiukevicius
Module Name:src
Committed By:   rmind
Date:   Sun Mar 11 18:27:59 UTC 2012

Modified Files:
src/sys/net/npf: npf.c npf.h npf_ctl.c npf_handler.c npf_impl.h
npf_nat.c npf_session.c

Log Message:
- Save active config in proplib dictionary; add GETCONF ioctl to retrieve.
- Few fixes.  Improve some comments.


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/sys/net/npf/npf.c
cvs rdiff -u -r1.14 -r1.15 src/sys/net/npf/npf.h \
src/sys/net/npf/npf_handler.c
cvs rdiff -u -r1.13 -r1.14 src/sys/net/npf/npf_ctl.c
cvs rdiff -u -r1.11 -r1.12 src/sys/net/npf/npf_impl.h \
src/sys/net/npf/npf_nat.c src/sys/net/npf/npf_session.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/npf/npf.c
diff -u src/sys/net/npf/npf.c:1.8 src/sys/net/npf/npf.c:1.9
--- src/sys/net/npf/npf.c:1.8	Mon Feb 20 00:18:19 2012
+++ src/sys/net/npf/npf.c	Sun Mar 11 18:27:59 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: npf.c,v 1.8 2012/02/20 00:18:19 rmind Exp $	*/
+/*	$NetBSD: npf.c,v 1.9 2012/03/11 18:27:59 rmind Exp $	*/
 
 /*-
  * Copyright (c) 2009-2010 The NetBSD Foundation, Inc.
@@ -34,7 +34,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: npf.c,v 1.8 2012/02/20 00:18:19 rmind Exp $);
+__KERNEL_RCSID(0, $NetBSD: npf.c,v 1.9 2012/03/11 18:27:59 rmind Exp $);
 
 #include sys/param.h
 #include sys/types.h
@@ -70,6 +70,7 @@ typedef struct {
 	npf_ruleset_t *		n_rules;
 	npf_tableset_t *	n_tables;
 	npf_ruleset_t *		n_nat_rules;
+	prop_dictionary_t	n_dict;
 	bool			n_default_pass;
 } npf_core_t;
 
@@ -93,6 +94,7 @@ npf_init(void)
 #endif
 	npf_ruleset_t *rset, *nset;
 	npf_tableset_t *tset;
+	prop_dictionary_t dict;
 	int error = 0;
 
 	rw_init(npf_lock);
@@ -104,10 +106,11 @@ npf_init(void)
 	npflogattach(1);
 
 	/* Load empty configuration. */
+	dict = prop_dictionary_create();
 	rset = npf_ruleset_create();
 	tset = npf_tableset_create();
 	nset = npf_ruleset_create();
-	npf_reload(rset, tset, nset, true);
+	npf_reload(dict, rset, tset, nset, true);
 	KASSERT(npf_core != NULL);
 
 #ifdef _MODULE
@@ -125,20 +128,20 @@ static int
 npf_fini(void)
 {
 
-	/*
-	 * At first, detach device, remove pfil hooks and unload existing
-	 * configuration, destroy structures.
-	 */
+	/* At first, detach device and remove pfil hooks. */
 #ifdef _MODULE
 	devsw_detach(NULL, npf_cdevsw);
 #endif
-	npf_unregister_pfil();
-	npf_core_destroy(npf_core);
 	npflogdetach();
+	npf_pfil_unregister();
 
-	/* Note: order is particular. */
-	npf_nat_sysfini();
+	/* Flush all sessions, destroy configuration (ruleset, etc). */
+	npf_session_tracking(false);
+	npf_core_destroy(npf_core);
+
+	/* Finally, safe to destroy the subsystems. */
 	npf_alg_sysfini();
+	npf_nat_sysfini();
 	npf_session_sysfini();
 	npf_tableset_sysfini();
 	percpu_free(npf_stats_percpu, NPF_STATS_SIZE);
@@ -211,6 +214,9 @@ npf_dev_ioctl(dev_t dev, u_long cmd, voi
 	case IOC_NPF_RELOAD:
 		error = npfctl_reload(cmd, data);
 		break;
+	case IOC_NPF_GETCONF:
+		error = npfctl_getconf(cmd, data);
+		break;
 	case IOC_NPF_TABLE:
 		error = npfctl_table(data);
 		break;
@@ -255,6 +261,7 @@ static void
 npf_core_destroy(npf_core_t *nc)
 {
 
+	prop_object_release(nc-n_dict);
 	npf_ruleset_destroy(nc-n_rules);
 	npf_ruleset_destroy(nc-n_nat_rules);
 	npf_tableset_destroy(nc-n_tables);
@@ -266,17 +273,18 @@ npf_core_destroy(npf_core_t *nc)
  * Then destroy old (unloaded) structures.
  */
 void
-npf_reload(npf_ruleset_t *rset, npf_tableset_t *tset, npf_ruleset_t *nset,
-bool flush)
+npf_reload(prop_dictionary_t dict, npf_ruleset_t *rset,
+npf_tableset_t *tset, npf_ruleset_t *nset, bool flush)
 {
 	npf_core_t *nc, *onc;
 
 	/* Setup a new core structure. */
 	nc = kmem_zalloc(sizeof(npf_core_t), KM_SLEEP);
-	nc-n_default_pass = flush;
 	nc-n_rules = rset;
 	nc-n_tables = tset;
 	nc-n_nat_rules = nset;
+	nc-n_dict = dict;
+	nc-n_default_pass = flush;
 
 	/* Lock and load the core structure. */
 	rw_enter(npf_lock, RW_WRITER);
@@ -333,6 +341,13 @@ npf_core_locked(void)
 	return rw_lock_held(npf_lock);
 }
 
+prop_dictionary_t
+npf_core_dict(void)
+{
+	KASSERT(rw_lock_held(npf_lock));
+	return npf_core-n_dict;
+}
+
 bool
 npf_default_pass(void)
 {

Index: src/sys/net/npf/npf.h
diff -u src/sys/net/npf/npf.h:1.14 src/sys/net/npf/npf.h:1.15
--- src/sys/net/npf/npf.h:1.14	Mon Feb  6 23:30:14 2012
+++ src/sys/net/npf/npf.h	Sun Mar 11 18:27:59 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: npf.h,v 1.14 2012/02/06 23:30:14 rmind Exp $	*/
+/*	$NetBSD: npf.h,v 1.15 2012/03/11 18:27:59 rmind Exp $	*/
 
 /*-
  * Copyright (c) 2009-2011 The NetBSD Foundation, Inc.
@@ -306,5 +306,6 @@ typedef enum {
 #define	IOC_NPF_SESSIONS_SAVE	_IOR('N', 105, struct plistref)
 #define	IOC_NPF_SESSIONS_LOAD	_IOW('N', 106, struct plistref)
 #define	IOC_NPF_UPDATE_RULE	_IOWR('N', 107, struct plistref)
+#define	IOC_NPF_GETCONF		_IOR('N', 108, struct plistref)
 
 #endif	/* _NPF_NET_H_ */
Index: 

CVS commit: src/tests/usr.bin/awk

2012-03-11 Thread Jukka Ruohonen
Module Name:src
Committed By:   jruoho
Date:   Sun Mar 11 18:36:01 UTC 2012

Modified Files:
src/tests/usr.bin/awk: Makefile t_awk.sh
Added Files:
src/tests/usr.bin/awk: d_assign_NF.awk d_assign_NF.in d_assign_NF.out
d_big_regexp.awk d_big_regexp.in d_big_regexp.out d_end1.awk
d_end1.in d_end1.out d_end2.awk d_end2.in d_end2.out d_period.awk
d_period.in d_period.out d_string1.awk d_string1.out d_tolower.awk
d_tolower.in d_tolower.out d_toupper.awk d_toupper.in d_toupper.out

Log Message:
Move the existing tests from util/awk to usr.bin/awk.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/tests/usr.bin/awk/Makefile
cvs rdiff -u -r0 -r1.1 src/tests/usr.bin/awk/d_assign_NF.awk \
src/tests/usr.bin/awk/d_assign_NF.in \
src/tests/usr.bin/awk/d_assign_NF.out \
src/tests/usr.bin/awk/d_big_regexp.awk \
src/tests/usr.bin/awk/d_big_regexp.in \
src/tests/usr.bin/awk/d_big_regexp.out src/tests/usr.bin/awk/d_end1.awk \
src/tests/usr.bin/awk/d_end1.in src/tests/usr.bin/awk/d_end1.out \
src/tests/usr.bin/awk/d_end2.awk src/tests/usr.bin/awk/d_end2.in \
src/tests/usr.bin/awk/d_end2.out src/tests/usr.bin/awk/d_period.awk \
src/tests/usr.bin/awk/d_period.in src/tests/usr.bin/awk/d_period.out \
src/tests/usr.bin/awk/d_string1.awk src/tests/usr.bin/awk/d_string1.out \
src/tests/usr.bin/awk/d_tolower.awk src/tests/usr.bin/awk/d_tolower.in \
src/tests/usr.bin/awk/d_tolower.out src/tests/usr.bin/awk/d_toupper.awk \
src/tests/usr.bin/awk/d_toupper.in src/tests/usr.bin/awk/d_toupper.out
cvs rdiff -u -r1.2 -r1.3 src/tests/usr.bin/awk/t_awk.sh

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

Modified files:

Index: src/tests/usr.bin/awk/Makefile
diff -u src/tests/usr.bin/awk/Makefile:1.1 src/tests/usr.bin/awk/Makefile:1.2
--- src/tests/usr.bin/awk/Makefile:1.1	Sat Mar 10 19:08:56 2012
+++ src/tests/usr.bin/awk/Makefile	Sun Mar 11 18:35:59 2012
@@ -1,9 +1,34 @@
-# $NetBSD: Makefile,v 1.1 2012/03/10 19:08:56 christos Exp $
+# $NetBSD: Makefile,v 1.2 2012/03/11 18:35:59 jruoho Exp $
 
 .include bsd.own.mk
 
 TESTSDIR=	${TESTSBASE}/usr.bin/awk
-
 TESTS_SH=	t_awk
+NOMAN=		# defined
+
+FILESDIR=	${TESTSDIR}
+FILES=		d_big_regexp.awk
+FILES+=		d_big_regexp.in
+FILES+=		d_big_regexp.out
+FILES+=		d_end1.awk
+FILES+=		d_end1.in
+FILES+=		d_end1.out
+FILES+=		d_end2.awk
+FILES+=		d_end2.in
+FILES+=		d_end2.out
+FILES+=		d_period.awk
+FILES+=		d_period.in
+FILES+=		d_period.out
+FILES+=		d_string1.awk
+FILES+=		d_string1.out
+FILES+=		d_tolower.awk
+FILES+=		d_tolower.in
+FILES+=		d_tolower.out
+FILES+=		d_toupper.awk
+FILES+=		d_toupper.in
+FILES+=		d_toupper.out
+FILES+=		d_assign_NF.awk
+FILES+=		d_assign_NF.in
+FILES+=		d_assign_NF.out
 
-.include bsd.test.mk
+.include bsd.test.mk
\ No newline at end of file

Index: src/tests/usr.bin/awk/t_awk.sh
diff -u src/tests/usr.bin/awk/t_awk.sh:1.2 src/tests/usr.bin/awk/t_awk.sh:1.3
--- src/tests/usr.bin/awk/t_awk.sh:1.2	Sat Mar 10 19:19:24 2012
+++ src/tests/usr.bin/awk/t_awk.sh	Sun Mar 11 18:36:01 2012
@@ -1,4 +1,4 @@
-# $NetBSD: t_awk.sh,v 1.2 2012/03/10 19:19:24 christos Exp $
+# $NetBSD: t_awk.sh,v 1.3 2012/03/11 18:36:01 jruoho Exp $
 #
 # Copyright (c) 2012 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -30,6 +30,89 @@
 
 awk=awk
 
+h_check()
+{
+	local fname=d_$1
+	for sfx in in out awk; do
+		cp -r $(atf_get_srcdir)/$fname.$sfx .
+	done
+	shift 1
+	atf_check -o file:$fname.out -x awk $@ -f $fname.awk  $fname.in
+}
+
+atf_test_case big_regexp
+
+big_regexp_head() {
+	atf_set descr Checks matching long regular expressions (PR/33392)
+}
+
+big_regexp_body() {
+	h_check big_regexp
+}
+
+atf_test_case end
+
+end_head() {
+	atf_set descr Checks that the last line of the input \
+	is available under END pattern (PR/29659)
+}
+
+end_body() {
+	h_check end1
+	h_check end2
+}
+
+atf_test_case string1
+
+string1_head() {
+	atf_set descr Checks escaping newlines in string literals
+}
+
+string1_body() {
+	for sfx in out awk; do
+		cp -r $(atf_get_srcdir)/d_string1.$sfx .
+	done
+	atf_check -o file:d_string1.out awk -f d_string1.awk
+}
+
+atf_test_case multibyte
+
+multibyte_head() {
+	atf_set descr Checks multibyte charsets support \
+	in tolower and toupper (PR/36394)
+}
+
+multibyte_body() {
+	export LANG=en_US.UTF-8
+
+	h_check tolower
+	h_check toupper
+}
+
+atf_test_case period
+
+period_head() {
+	atf_set descr Checks that the period character is recognised \
+	in awk program regardless of locale (bin/42320)
+}
+
+period_body() {
+	export LANG=ru_RU.KOI8-R
+
+	atf_expect_fail PR bin/42320
+	h_check period -v x=0.5
+}
+
+atf_test_case assign_NF
+
+assign_NF_head() {
+	atf_set descr 'Checks that assign to NF changes $0 and $n (PR/44063)'
+}
+
+assign_NF_body() {
+	h_check assign_NF
+}
+
 atf_test_case single_char_rs
 
 

CVS commit: src/tests/util/awk

2012-03-11 Thread Jukka Ruohonen
Module Name:src
Committed By:   jruoho
Date:   Sun Mar 11 18:38:18 UTC 2012

Removed Files:
src/tests/util/awk: Makefile d_assign_NF.awk d_assign_NF.in
d_assign_NF.out d_big_regexp.awk d_big_regexp.in d_big_regexp.out
d_end1.awk d_end1.in d_end1.out d_end2.awk d_end2.in d_end2.out
d_period.awk d_period.in d_period.out d_string1.awk d_string1.out
d_tolower.awk d_tolower.in d_tolower.out d_toupper.awk d_toupper.in
d_toupper.out t_awk.sh

Log Message:
Deprecate tests/util/awk.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r0 src/tests/util/awk/Makefile
cvs rdiff -u -r1.1 -r0 src/tests/util/awk/d_assign_NF.awk \
src/tests/util/awk/d_assign_NF.in src/tests/util/awk/d_assign_NF.out \
src/tests/util/awk/d_big_regexp.awk src/tests/util/awk/d_big_regexp.in \
src/tests/util/awk/d_big_regexp.out src/tests/util/awk/d_end1.awk \
src/tests/util/awk/d_end1.in src/tests/util/awk/d_end1.out \
src/tests/util/awk/d_end2.awk src/tests/util/awk/d_end2.in \
src/tests/util/awk/d_end2.out src/tests/util/awk/d_period.awk \
src/tests/util/awk/d_period.in src/tests/util/awk/d_period.out \
src/tests/util/awk/d_string1.awk src/tests/util/awk/d_string1.out \
src/tests/util/awk/d_tolower.awk src/tests/util/awk/d_tolower.in \
src/tests/util/awk/d_tolower.out src/tests/util/awk/d_toupper.awk \
src/tests/util/awk/d_toupper.in src/tests/util/awk/d_toupper.out
cvs rdiff -u -r1.7 -r0 src/tests/util/awk/t_awk.sh

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



CVS commit: src

2012-03-11 Thread Jukka Ruohonen
Module Name:src
Committed By:   jruoho
Date:   Sun Mar 11 18:45:19 UTC 2012

Modified Files:
src/distrib/sets/lists/tests: mi
src/etc/mtree: NetBSD.dist.tests

Log Message:
Adjust set lists and mtree.


To generate a diff of this commit:
cvs rdiff -u -r1.440 -r1.441 src/distrib/sets/lists/tests/mi
cvs rdiff -u -r1.61 -r1.62 src/etc/mtree/NetBSD.dist.tests

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

Modified files:

Index: src/distrib/sets/lists/tests/mi
diff -u src/distrib/sets/lists/tests/mi:1.440 src/distrib/sets/lists/tests/mi:1.441
--- src/distrib/sets/lists/tests/mi:1.440	Sat Mar 10 19:10:06 2012
+++ src/distrib/sets/lists/tests/mi	Sun Mar 11 18:45:19 2012
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.440 2012/03/10 19:10:06 christos Exp $
+# $NetBSD: mi,v 1.441 2012/03/11 18:45:19 jruoho Exp $
 #
 # Note: don't delete entries from here - mark them as obsolete instead.
 #
@@ -2724,6 +2724,29 @@
 ./usr/tests/usr.bin/awktests-util-tests
 ./usr/tests/usr.bin/awk/Atffile			tests-util-tests	atf
 ./usr/tests/usr.bin/awk/t_awk			tests-util-tests	atf
+./usr/tests/usr.bin/awk/d_assign_NF.awk		tests-util-tests
+./usr/tests/usr.bin/awk/d_assign_NF.in		tests-util-tests
+./usr/tests/usr.bin/awk/d_assign_NF.out		tests-util-tests
+./usr/tests/usr.bin/awk/d_big_regexp.awk	tests-util-tests
+./usr/tests/usr.bin/awk/d_big_regexp.in		tests-util-tests
+./usr/tests/usr.bin/awk/d_big_regexp.out	tests-util-tests
+./usr/tests/usr.bin/awk/d_end1.awk		tests-util-tests
+./usr/tests/usr.bin/awk/d_end1.in		tests-util-tests
+./usr/tests/usr.bin/awk/d_end1.out		tests-util-tests
+./usr/tests/usr.bin/awk/d_end2.awk		tests-util-tests
+./usr/tests/usr.bin/awk/d_end2.in		tests-util-tests
+./usr/tests/usr.bin/awk/d_end2.out		tests-util-tests
+./usr/tests/usr.bin/awk/d_period.awk		tests-util-tests
+./usr/tests/usr.bin/awk/d_period.in		tests-util-tests
+./usr/tests/usr.bin/awk/d_period.out		tests-util-tests
+./usr/tests/usr.bin/awk/d_string1.awk		tests-util-tests
+./usr/tests/usr.bin/awk/d_string1.out		tests-util-tests
+./usr/tests/usr.bin/awk/d_tolower.awk		tests-util-tests
+./usr/tests/usr.bin/awk/d_tolower.in		tests-util-tests
+./usr/tests/urs.bin/awk/d_tolower.out		tests-util-tests
+./usr/tests/usr.bin/awk/d_toupper.awk		tests-util-tests
+./usr/tests/usr.bin/awk/d_toupper.in		tests-util-tests
+./usr/tests/usr.bin/awk/d_toupper.out		tests-util-tests
 ./usr/tests/usr.bin/diff			tests-util-tests
 ./usr/tests/usr.bin/diff/Atffile		tests-util-tests	atf
 ./usr/tests/usr.bin/diff/d_mallocv1.in		tests-util-tests	atf
@@ -2760,32 +2783,32 @@
 ./usr/tests/usr.sbin/traceroute/t_traceroute	tests-util-tests	atf
 ./usr/tests/utiltests-util-tests
 ./usr/tests/util/Atffile			tests-util-tests
-./usr/tests/util/awktests-util-tests
-./usr/tests/util/awk/Atffile			tests-util-tests
-./usr/tests/util/awk/d_assign_NF.awk		tests-util-tests
-./usr/tests/util/awk/d_assign_NF.in		tests-util-tests
-./usr/tests/util/awk/d_assign_NF.out		tests-util-tests
-./usr/tests/util/awk/d_big_regexp.awk		tests-util-tests
-./usr/tests/util/awk/d_big_regexp.in		tests-util-tests
-./usr/tests/util/awk/d_big_regexp.out		tests-util-tests
-./usr/tests/util/awk/d_end1.awk			tests-util-tests
-./usr/tests/util/awk/d_end1.in			tests-util-tests
-./usr/tests/util/awk/d_end1.out			tests-util-tests
-./usr/tests/util/awk/d_end2.awk			tests-util-tests
-./usr/tests/util/awk/d_end2.in			tests-util-tests
-./usr/tests/util/awk/d_end2.out			tests-util-tests
-./usr/tests/util/awk/d_period.awk		tests-util-tests
-./usr/tests/util/awk/d_period.in		tests-util-tests
-./usr/tests/util/awk/d_period.out		tests-util-tests
-./usr/tests/util/awk/d_string1.awk		tests-util-tests
-./usr/tests/util/awk/d_string1.out		tests-util-tests
-./usr/tests/util/awk/d_tolower.awk		tests-util-tests
-./usr/tests/util/awk/d_tolower.in		tests-util-tests
-./usr/tests/util/awk/d_tolower.out		tests-util-tests
-./usr/tests/util/awk/d_toupper.awk		tests-util-tests
-./usr/tests/util/awk/d_toupper.in		tests-util-tests
-./usr/tests/util/awk/d_toupper.out		tests-util-tests
-./usr/tests/util/awk/t_awk			tests-util-tests
+./usr/tests/util/awktests-obsolete		obsolete
+./usr/tests/util/awk/Atffile			tests-obsolete		obsolete
+./usr/tests/util/awk/d_assign_NF.awk		tests-obsolete		obsolete
+./usr/tests/util/awk/d_assign_NF.in		tests-obsolete		obsolete
+./usr/tests/util/awk/d_assign_NF.out		tests-obsolete		obsolete
+./usr/tests/util/awk/d_big_regexp.awk		tests-obsolete		obsolete
+./usr/tests/util/awk/d_big_regexp.in		tests-obsolete		obsolete
+./usr/tests/util/awk/d_big_regexp.out		tests-obsolete		obsolete
+./usr/tests/util/awk/d_end1.awk			tests-obsolete		obsolete
+./usr/tests/util/awk/d_end1.in			tests-obsolete		obsolete
+./usr/tests/util/awk/d_end1.out			tests-obsolete		obsolete
+./usr/tests/util/awk/d_end2.awk			tests-obsolete		obsolete
+./usr/tests/util/awk/d_end2.in			tests-obsolete		obsolete
+./usr/tests/util/awk/d_end2.out			

CVS commit: src/external/bsd/libevent/dist/test

2012-03-11 Thread Jukka Ruohonen
Module Name:src
Committed By:   jruoho
Date:   Sun Mar 11 19:03:34 UTC 2012

Modified Files:
src/external/bsd/libevent/dist/test: regress.c

Log Message:
Skip the simple timeout test. This test case is known to fail rather
consistently when run in emulated environments such as Qemu.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/external/bsd/libevent/dist/test/regress.c

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

Modified files:

Index: src/external/bsd/libevent/dist/test/regress.c
diff -u src/external/bsd/libevent/dist/test/regress.c:1.2 src/external/bsd/libevent/dist/test/regress.c:1.3
--- src/external/bsd/libevent/dist/test/regress.c:1.2	Thu Nov 11 14:11:26 2010
+++ src/external/bsd/libevent/dist/test/regress.c	Sun Mar 11 19:03:33 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: regress.c,v 1.2 2010/11/11 14:11:26 pgoyette Exp $	*/
+/*	$NetBSD: regress.c,v 1.3 2012/03/11 19:03:33 jruoho Exp $	*/
 /*
  * Copyright (c) 2003, 2004 Niels Provos pro...@citi.umich.edu
  * All rights reserved.
@@ -1699,7 +1699,10 @@ main (int argc, char **argv)
 
 	test_combined();
 
+#if 0
 	test_simpletimeout();
+#endif
+
 #ifndef WIN32
 	test_simplesignal();
 	test_multiplesignal();



CVS commit: src/usr.bin/config

2012-03-11 Thread David A. Holland
Module Name:src
Committed By:   dholland
Date:   Sun Mar 11 19:27:27 UTC 2012

Modified Files:
src/usr.bin/config: gram.y

Log Message:
More naming improvements.


To generate a diff of this commit:
cvs rdiff -u -r1.34 -r1.35 src/usr.bin/config/gram.y

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/config/gram.y
diff -u src/usr.bin/config/gram.y:1.34 src/usr.bin/config/gram.y:1.35
--- src/usr.bin/config/gram.y:1.34	Sun Mar 11 08:21:53 2012
+++ src/usr.bin/config/gram.y	Sun Mar 11 19:27:26 2012
@@ -1,5 +1,5 @@
 %{
-/*	$NetBSD: gram.y,v 1.34 2012/03/11 08:21:53 dholland Exp $	*/
+/*	$NetBSD: gram.y,v 1.35 2012/03/11 19:27:26 dholland Exp $	*/
 
 /*
  * Copyright (c) 1992, 1993
@@ -175,7 +175,7 @@ static	struct nvlist *mk_ns(const char *
 %type	condexpr	cond_or_expr cond_and_expr cond_prefix_expr
 %type	condexpr	 cond_base_expr
 %type	str	fs_spec
-%type	val	fflgs fflag oflgs oflag
+%type	val	fflags fflag oflags oflag
 %type	str	rule
 %type	attr	depend
 %type	devb	devbase
@@ -198,9 +198,9 @@ static	struct nvlist *mk_ns(const char *
 %type	list	deffses
 %type	list	defopt
 %type	list	defopts
-%type	str	optdep
-%type	list	optdeps
-%type	list	defoptdeps
+%type	str	optdepend
+%type	list	optdepends
+%type	list	optdepend_list
 %type	str	optfile_opt
 %type	list	subarches
 %type	str	filename stringvalue locname mkvarname
@@ -299,16 +299,16 @@ definition:
 	| device_major			{ do_devsw = 1; }
 	| prefix
 	| DEVCLASS WORD			{ (void)defattr($2, NULL, NULL, 1); }
-	| DEFFS deffses defoptdeps	{ deffilesystem($2, $3); }
+	| DEFFS deffses optdepend_list	{ deffilesystem($2, $3); }
 	| DEFINE WORD interface_opt depend_list
 	{ (void)defattr($2, $3, $4, 0); }
-	| DEFOPT optfile_opt defopts defoptdeps
+	| DEFOPT optfile_opt defopts optdepend_list
 	{ defoption($2, $3, $4); }
-	| DEFFLAG optfile_opt defopts defoptdeps
+	| DEFFLAG optfile_opt defopts optdepend_list
 	{ defflag($2, $3, $4, 0); }
 	| OBSOLETE DEFFLAG optfile_opt defopts
 	{ defflag($3, $4, NULL, 1); }
-	| DEFPARAM optfile_opt defopts defoptdeps
+	| DEFPARAM optfile_opt defopts optdepend_list
 	{ defparam($2, $3, $4, 0); }
 	| OBSOLETE DEFPARAM optfile_opt defopts
 	{ defparam($3, $4, NULL, 1); }
@@ -331,7 +331,7 @@ definition:
 
 /* source file: file foo/bar.c bar|baz needs-flag compile-with blah */
 file:
-	XFILE filename fopts fflgs rule	{ addfile($2, $3, $4, $5); }
+	XFILE filename fopts fflags rule	{ addfile($2, $3, $4, $5); }
 ;
 
 /* file options: optional expression of conditions */
@@ -341,9 +341,9 @@ fopts:
 ;
 
 /* zero or more flags for a file */
-fflgs:
+fflags:
 	  /* empty */			{ $$ = 0; }
-	| fflgs fflag			{ $$ = $1 | $2; }
+	| fflags fflag			{ $$ = $1 | $2; }
 ;
 
 /* one flag for a file */
@@ -360,13 +360,13 @@ rule:
 
 /* object file: object zot.o foo|zot needs-flag */
 object:
-	XOBJECT filename fopts oflgs	{ addobject($2, $3, $4); }
+	XOBJECT filename fopts oflags	{ addobject($2, $3, $4); }
 ;
 
 /* zero or more flags for an object file */
-oflgs:
+oflags:
 	  /* empty */			{ $$ = 0; }
-	| oflgs oflag			{ $$ = $1 | $2; }
+	| oflags oflag			{ $$ = $1 | $2; }
 ;
 
 /* a single flag for an object file */
@@ -506,6 +506,24 @@ depend:
 	WORD{ $$ = getattr($1); }
 ;
 
+/* list of option depends, may be empty */
+optdepend_list:
+	  /* empty */			{ $$ = NULL; }
+	| ':' optdepends		{ $$ = $2; }
+;
+
+/* a list of option dependencies */
+optdepends:
+	  optdepend			{ $$ = new_n($1); }
+	| optdepends ',' optdepend	{ $$ = new_nx($3, $1); }
+;
+
+/* one option depend, which is an option name */
+optdepend:
+	WORD{ $$ = $1; }
+;
+
+
 /* list of places to attach: attach blah at ... */
 atlist:
 	  atname			{ $$ = new_n($1); }
@@ -540,23 +558,6 @@ defopt:
 	  }
 ;
 
-/* option dependencies (read as defopt deps) which are optional */
-defoptdeps:
-	  /* empty */			{ $$ = NULL; }
-	| ':' optdeps			{ $$ = $2; }
-;
-
-/* a list of option dependencies */
-optdeps:
-	  optdep			{ $$ = new_n($1); }
-	| optdeps ',' optdep		{ $$ = new_nx($3, $1); }
-;
-
-/* one option dependence */
-optdep:
-	WORD{ $$ = $1; }
-;
-
 /* list of conditional makeoptions */
 condmkopt_list:
 	  condmkoption



CVS commit: src/tests/modules

2012-03-11 Thread Jukka Ruohonen
Module Name:src
Committed By:   jruoho
Date:   Sun Mar 11 19:33:17 UTC 2012

Modified Files:
src/tests/modules: t_modctl.c

Log Message:
Skip the tests even if modctl(2) does not fail specifically with ENOSYS.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/tests/modules/t_modctl.c

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

Modified files:

Index: src/tests/modules/t_modctl.c
diff -u src/tests/modules/t_modctl.c:1.5 src/tests/modules/t_modctl.c:1.6
--- src/tests/modules/t_modctl.c:1.5	Wed Nov  3 16:10:23 2010
+++ src/tests/modules/t_modctl.c	Sun Mar 11 19:33:17 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: t_modctl.c,v 1.5 2010/11/03 16:10:23 christos Exp $	*/
+/*	$NetBSD: t_modctl.c,v 1.6 2012/03/11 19:33:17 jruoho Exp $	*/
 /*
  * Copyright (c) 2008 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -27,7 +27,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: t_modctl.c,v 1.5 2010/11/03 16:10:23 christos Exp $);
+__KERNEL_RCSID(0, $NetBSD: t_modctl.c,v 1.6 2012/03/11 19:33:17 jruoho Exp $);
 
 #include sys/module.h
 #include sys/sysctl.h
@@ -62,7 +62,7 @@ static
 bool
 check_modular(void)
 {
-	bool res;
+	bool res = false;
 	struct iovec iov;
 
 	iov.iov_base = NULL;
@@ -70,8 +70,6 @@ check_modular(void)
 
 	if (modctl(MODCTL_STAT, iov) == 0)
 		res = true;
-	else
-		res = (errno != ENOSYS);
 
 	return res;
 }



CVS commit: src/sys/dev/pci/hdaudio

2012-03-11 Thread Lars Heidieker
Module Name:src
Committed By:   para
Date:   Sun Mar 11 19:39:36 UTC 2012

Modified Files:
src/sys/dev/pci/hdaudio: hdafg.c

Log Message:
call kmem_free with the right address in hdafg_detach for sc_widgets
the former code let to memory corruption


To generate a diff of this commit:
cvs rdiff -u -r1.15 -r1.16 src/sys/dev/pci/hdaudio/hdafg.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/pci/hdaudio/hdafg.c
diff -u src/sys/dev/pci/hdaudio/hdafg.c:1.15 src/sys/dev/pci/hdaudio/hdafg.c:1.16
--- src/sys/dev/pci/hdaudio/hdafg.c:1.15	Wed Dec 21 02:16:57 2011
+++ src/sys/dev/pci/hdaudio/hdafg.c	Sun Mar 11 19:39:36 2012
@@ -1,4 +1,4 @@
-/* $NetBSD: hdafg.c,v 1.15 2011/12/21 02:16:57 jmcneill Exp $ */
+/* $NetBSD: hdafg.c,v 1.16 2012/03/11 19:39:36 para Exp $ */
 
 /*
  * Copyright (c) 2009 Precedence Technologies Ltd supp...@precedence.co.uk
@@ -60,7 +60,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: hdafg.c,v 1.15 2011/12/21 02:16:57 jmcneill Exp $);
+__KERNEL_RCSID(0, $NetBSD: hdafg.c,v 1.16 2012/03/11 19:39:36 para Exp $);
 
 #include sys/types.h
 #include sys/param.h
@@ -3733,7 +3733,7 @@ static int
 hdafg_detach(device_t self, int flags)
 {
 	struct hdafg_softc *sc = device_private(self);
-	struct hdaudio_widget *w = sc-sc_widgets;
+	struct hdaudio_widget *wl, *w = sc-sc_widgets;
 	struct hdaudio_assoc *as = sc-sc_assocs;
 	struct hdaudio_control *ctl = sc-sc_ctls;
 	struct hdaudio_mixer *mx = sc-sc_mixers;
@@ -3755,10 +3755,10 @@ hdafg_detach(device_t self, int flags)
 
 	/* restore bios pin widget configuration */
 	for (nid = sc-sc_startnode; nid  sc-sc_endnode; nid++) {
-		w = hdafg_widget_lookup(sc, nid);		
-		if (w == NULL || w-w_type != COP_AWCAP_TYPE_PIN_COMPLEX)
+		wl = hdafg_widget_lookup(sc, nid);		
+		if (wl == NULL || wl-w_type != COP_AWCAP_TYPE_PIN_COMPLEX)
 			continue;
-		hdafg_widget_setconfig(w, w-w_pin.biosconfig);
+		hdafg_widget_setconfig(wl, wl-w_pin.biosconfig);
 	}
 
 	if (w)



CVS commit: src/usr.bin/config

2012-03-11 Thread David A. Holland
Module Name:src
Committed By:   dholland
Date:   Sun Mar 11 20:02:55 UTC 2012

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

Log Message:
Add some organizational comments


To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.12 src/usr.bin/config/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/config/util.c
diff -u src/usr.bin/config/util.c:1.11 src/usr.bin/config/util.c:1.12
--- src/usr.bin/config/util.c:1.11	Sun Mar 11 08:21:53 2012
+++ src/usr.bin/config/util.c	Sun Mar 11 20:02:55 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: util.c,v 1.11 2012/03/11 08:21:53 dholland Exp $	*/
+/*	$NetBSD: util.c,v 1.12 2012/03/11 20:02:55 dholland Exp $	*/
 
 /*
  * Copyright (c) 1992, 1993
@@ -62,6 +62,12 @@ static void cfgvxwarn(const char *, int,
 static void cfgvxmsg(const char *, int, const char *, const char *, va_list)
  __printflike(4, 0);
 
+//
+
+/*
+ * Prefix stack
+ */
+
 /*
  * Push a prefix onto the prefix stack.
  */
@@ -136,6 +142,16 @@ sourcepath(const char *file)
 	return (cp);
 }
 
+//
+
+/*
+ * Data structures
+ */
+
+/*
+ * nvlist
+ */
+
 struct nvlist *
 newnv(const char *name, const char *str, void *ptr, long long i, struct nvlist *next)
 {
@@ -188,6 +204,10 @@ nvcat(struct nvlist *nv1, struct nvlist 
 	return nv1;
 }
 
+/*
+ * Attribute lists
+ */
+
 struct attrlist *
 attrlist_create(void)
 {
@@ -234,6 +254,10 @@ attrlist_destroyall(struct attrlist *al)
 }
 
 /*
+ * Condition expressions
+ */
+
+/*
  * Create an expression node.
  */
 struct condexpr *
@@ -302,6 +326,12 @@ condexpr_destroy(struct condexpr *expr)
 	free(expr);
 }
 
+//
+
+/*
+ * Diagnostic messages
+ */
+
 void
 cfgwarn(const char *fmt, ...)
 {



CVS commit: src/lib/libedit

2012-03-11 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Mar 11 21:14:56 UTC 2012

Modified Files:
src/lib/libedit: el.c

Log Message:
use arraycount


To generate a diff of this commit:
cvs rdiff -u -r1.69 -r1.70 src/lib/libedit/el.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/libedit/el.c
diff -u src/lib/libedit/el.c:1.69 src/lib/libedit/el.c:1.70
--- src/lib/libedit/el.c:1.69	Fri Nov 18 15:22:03 2011
+++ src/lib/libedit/el.c	Sun Mar 11 17:14:56 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: el.c,v 1.69 2011/11/18 20:22:03 christos Exp $	*/
+/*	$NetBSD: el.c,v 1.70 2012/03/11 21:14:56 christos Exp $	*/
 
 /*-
  * Copyright (c) 1992, 1993
@@ -37,7 +37,7 @@
 #if 0
 static char sccsid[] = @(#)el.c	8.2 (Berkeley) 1/3/94;
 #else
-__RCSID($NetBSD: el.c,v 1.69 2011/11/18 20:22:03 christos Exp $);
+__RCSID($NetBSD: el.c,v 1.70 2012/03/11 21:14:56 christos Exp $);
 #endif
 #endif /* not lint  not SCCSID */
 
@@ -219,7 +219,7 @@ FUN(el,set)(EditLine *el, int op, ...)
 		const Char *argv[20];
 		int i;
 
-		for (i = 1; i  20; i++)
+		for (i = 1; i  (int)__arraycount(argv); i++)
 			if ((argv[i] = va_arg(ap, Char *)) == NULL)
 break;
 
@@ -419,7 +419,7 @@ FUN(el,get)(EditLine *el, int op, ...)
 		char *argv[20];
 		int i;
 
- 		for (i = 1; i  (int)(sizeof(argv) / sizeof(argv[0])); i++)
+ 		for (i = 1; i  (int)__arraycount(argv); i++)
 			if ((argv[i] = va_arg(ap, char *)) == NULL)
 break;
 



CVS commit: src/lib/libedit

2012-03-11 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Mar 11 21:15:25 UTC 2012

Modified Files:
src/lib/libedit: eln.c

Log Message:
include the NULL in the argv conversion


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 src/lib/libedit/eln.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/libedit/eln.c
diff -u src/lib/libedit/eln.c:1.13 src/lib/libedit/eln.c:1.14
--- src/lib/libedit/eln.c:1.13	Tue Aug 16 12:25:15 2011
+++ src/lib/libedit/eln.c	Sun Mar 11 17:15:25 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: eln.c,v 1.13 2011/08/16 16:25:15 christos Exp $	*/
+/*	$NetBSD: eln.c,v 1.14 2012/03/11 21:15:25 christos Exp $	*/
 
 /*-
  * Copyright (c) 2009 The NetBSD Foundation, Inc.
@@ -34,7 +34,7 @@
  */
 #include config.h
 #if !defined(lint)  !defined(SCCSID)
-__RCSID($NetBSD: eln.c,v 1.13 2011/08/16 16:25:15 christos Exp $);
+__RCSID($NetBSD: eln.c,v 1.14 2012/03/11 21:15:25 christos Exp $);
 #endif /* not lint  not SCCSID */
 
 #include histedit.h
@@ -154,7 +154,7 @@ el_set(EditLine *el, int op, ...)
 			break;
 		argv[0] = NULL;
 		wargv = (const wchar_t **)
-		ct_decode_argv(i, argv, el-el_lgcyconv);
+		ct_decode_argv(i + 1, argv, el-el_lgcyconv);
 		if (!wargv) {
 		ret = -1;
 		goto out;



CVS commit: src/usr.bin/config

2012-03-11 Thread David A. Holland
Module Name:src
Committed By:   dholland
Date:   Sun Mar 11 21:16:08 UTC 2012

Modified Files:
src/usr.bin/config: defs.h gram.y lint.c mkheaders.c mkioconf.c sem.c
sem.h util.c

Log Message:
Move locator lists to their own data structure. This can use more tidying;
it is not clear to me at the moment what the string and num values
pushed around in locator lists are supposed to actually mean.


To generate a diff of this commit:
cvs rdiff -u -r1.39 -r1.40 src/usr.bin/config/defs.h
cvs rdiff -u -r1.35 -r1.36 src/usr.bin/config/gram.y
cvs rdiff -u -r1.9 -r1.10 src/usr.bin/config/lint.c src/usr.bin/config/sem.h
cvs rdiff -u -r1.18 -r1.19 src/usr.bin/config/mkheaders.c
cvs rdiff -u -r1.20 -r1.21 src/usr.bin/config/mkioconf.c
cvs rdiff -u -r1.40 -r1.41 src/usr.bin/config/sem.c
cvs rdiff -u -r1.12 -r1.13 src/usr.bin/config/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/config/defs.h
diff -u src/usr.bin/config/defs.h:1.39 src/usr.bin/config/defs.h:1.40
--- src/usr.bin/config/defs.h:1.39	Sun Mar 11 08:21:53 2012
+++ src/usr.bin/config/defs.h	Sun Mar 11 21:16:07 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: defs.h,v 1.39 2012/03/11 08:21:53 dholland Exp $	*/
+/*	$NetBSD: defs.h,v 1.40 2012/03/11 21:16:07 dholland Exp $	*/
 
 /*
  * Copyright (c) 1992, 1993
@@ -157,7 +157,7 @@ struct attr {
 	const char *a_name;		/* name of this attribute */
 	int	a_iattr;		/* true = allows children */
 	const char *a_devclass;		/* device class described */
-	struct	nvlist *a_locs;		/* locators required */
+	struct	loclist *a_locs;	/* locators required */
 	int	a_loclen;		/* length of above list */
 	struct	nvlist *a_devs;		/* children */
 	struct	nvlist *a_refs;		/* parents */
@@ -174,6 +174,20 @@ struct attrlist {
 };
 
 /*
+ * List of locators. (Either definitions or uses...)
+ *
+ * XXX it would be nice if someone could clarify wtf ll_string and ll_num
+ * are actually holding. (This stuff was previously stored in a very ad
+ * hoc fashion, and the code is far from clear.)
+ */
+struct loclist {
+	const char *ll_name;
+	const char *ll_string;
+	long long ll_num;
+	struct loclist *ll_next;
+};
+
+/*
  * Parent specification.  Multiple device instances may share a
  * given parent spec.  Parent specs are emitted only if there are
  * device instances which actually reference it.
@@ -604,6 +618,8 @@ struct attrlist *attrlist_create(void);
 struct attrlist *attrlist_cons(struct attrlist *, struct attr *);
 void attrlist_destroy(struct attrlist *);
 void attrlist_destroyall(struct attrlist *);
+struct loclist *loclist_create(const char *, const char *, long long);
+void loclist_destroy(struct loclist *);
 struct condexpr *condexpr_create(enum condexpr_types);
 void condexpr_destroy(struct condexpr *);
 

Index: src/usr.bin/config/gram.y
diff -u src/usr.bin/config/gram.y:1.35 src/usr.bin/config/gram.y:1.36
--- src/usr.bin/config/gram.y:1.35	Sun Mar 11 19:27:26 2012
+++ src/usr.bin/config/gram.y	Sun Mar 11 21:16:08 2012
@@ -1,5 +1,5 @@
 %{
-/*	$NetBSD: gram.y,v 1.35 2012/03/11 19:27:26 dholland Exp $	*/
+/*	$NetBSD: gram.y,v 1.36 2012/03/11 21:16:08 dholland Exp $	*/
 
 /*
  * Copyright (c) 1992, 1993
@@ -70,8 +70,9 @@ static void wrap_cleanup(void);
  * Allocation wrapper type codes
  */
 #define WRAP_CODE_nvlist	1
-#define WRAP_CODE_attrlist	2
-#define WRAP_CODE_condexpr	3
+#define WRAP_CODE_loclist	2
+#define WRAP_CODE_attrlist	3
+#define WRAP_CODE_condexpr	4
 
 /*
  * The allocation wrappers themselves
@@ -79,10 +80,12 @@ static void wrap_cleanup(void);
 #define DECL_ALLOCWRAP(t)	static struct t *wrap_mk_##t(struct t *arg)
 
 DECL_ALLOCWRAP(nvlist);
+DECL_ALLOCWRAP(loclist);
 DECL_ALLOCWRAP(attrlist);
 DECL_ALLOCWRAP(condexpr);
 
 /* allow shorter names */
+#define wrap_mk_loc(p) wrap_mk_loclist(p)
 #define wrap_mk_cx(p) wrap_mk_condexpr(p)
 
 /*
@@ -108,6 +111,7 @@ DECL_ALLOCWRAP(condexpr);
 #define MK0(t)		wrap_mk_##t(mk_##t())
 #define MK1(t, a0)	wrap_mk_##t(mk_##t(a0))
 #define MK2(t, a0, a1)	wrap_mk_##t(mk_##t(a0, a1))
+#define MK3(t, a0, a1, a2)	wrap_mk_##t(mk_##t(a0, a1, a2))
 
 #define MKF0(t, f)		wrap_mk_##t(mk_##t##_##f())
 #define MKF1(t, f, a0)		wrap_mk_##t(mk_##t##_##f(a0))
@@ -117,6 +121,8 @@ DECL_ALLOCWRAP(condexpr);
  * Data constructors
  */
 
+static struct loclist *mk_loc(const char *, const char *, long long);
+static struct loclist *mk_loc_val(const char *, struct loclist *);
 static struct attrlist *mk_attrlist(struct attrlist *, struct attr *);
 static struct condexpr *mk_cx_atom(const char *);
 static struct condexpr *mk_cx_not(struct condexpr *);
@@ -130,10 +136,10 @@ static struct condexpr *mk_cx_or(struct 
 static	void	setmachine(const char *, const char *, struct nvlist *, int);
 static	void	check_maxpart(void);
 
-static	void	app(struct nvlist *, struct nvlist *);
-
-static	struct nvlist *mk_nsis(const char *, int, struct nvlist *, int);
-static	struct nvlist *mk_ns(const 

CVS commit: src/tests/util

2012-03-11 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sun Mar 11 22:19:53 UTC 2012

Modified Files:
src/tests/util: Makefile

Log Message:
Temporarily remove awk subdir, untill jruoho sorts out the recent commits
to the proper dir.


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/tests/util/Makefile

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

Modified files:

Index: src/tests/util/Makefile
diff -u src/tests/util/Makefile:1.10 src/tests/util/Makefile:1.11
--- src/tests/util/Makefile:1.10	Sun Aug  1 16:42:58 2010
+++ src/tests/util/Makefile	Sun Mar 11 22:19:53 2012
@@ -1,10 +1,10 @@
-# $NetBSD: Makefile,v 1.10 2010/08/01 16:42:58 jmmv Exp $
+# $NetBSD: Makefile,v 1.11 2012/03/11 22:19:53 martin Exp $
 
 .include bsd.own.mk
 
 TESTSDIR=	${TESTSBASE}/util
 
-TESTS_SUBDIRS=	awk bzip2 config cut df grep id m4 make mtree ps sdiff sh sort \
+TESTS_SUBDIRS=	bzip2 config cut df grep id m4 make mtree ps sdiff sh sort \
 		xlint
 
 TESTS_SH=	t_basename



CVS commit: src/sys/dev/pci

2012-03-11 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Sun Mar 11 22:46:22 UTC 2012

Modified Files:
src/sys/dev/pci: alipm.c

Log Message:
Since there are no RW_READERs for the device's rw_lock, convert it to a
mutex and reduce the overhead.

Also, even if we're polling, we need to use the lock to control access to
the bus, otherwise we get anomolous results.

(These same changes were made several weeks ago to other drivers;  I
missed this one.)


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/sys/dev/pci/alipm.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/pci/alipm.c
diff -u src/sys/dev/pci/alipm.c:1.8 src/sys/dev/pci/alipm.c:1.9
--- src/sys/dev/pci/alipm.c:1.8	Thu Feb 10 13:52:36 2011
+++ src/sys/dev/pci/alipm.c	Sun Mar 11 22:46:22 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: alipm.c,v 1.8 2011/02/10 13:52:36 hannken Exp $ */
+/*	$NetBSD: alipm.c,v 1.9 2012/03/11 22:46:22 pgoyette Exp $ */
 /*	$OpenBSD: alipm.c,v 1.13 2007/05/03 12:19:01 dlg Exp $	*/
 
 /*
@@ -18,12 +18,12 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: alipm.c,v 1.8 2011/02/10 13:52:36 hannken Exp $);
+__KERNEL_RCSID(0, $NetBSD: alipm.c,v 1.9 2012/03/11 22:46:22 pgoyette Exp $);
 
 #include sys/param.h
 #include sys/device.h
 #include sys/kernel.h
-#include sys/rwlock.h
+#include sys/mutex.h
 #include sys/proc.h
 #include sys/systm.h
 
@@ -104,7 +104,7 @@ struct alipm_softc {
 	bus_space_handle_t sc_ioh;
 
 	struct i2c_controller sc_smb_tag;
-	krwlock_t sc_smb_lock;
+	kmutex_t sc_smb_mutex;
 };
 
 static int	alipm_match(device_t, cfdata_t, void *);
@@ -203,7 +203,7 @@ alipm_attach(device_t parent, device_t s
 	aprint_naive(\n);
 
 	/* Attach I2C bus */
-	rw_init(sc-sc_smb_lock);
+	mutex_init(sc-sc_smb_mutex, MUTEX_DEFAULT, IPL_NONE);
 	sc-sc_smb_tag.ic_cookie = sc;
 	sc-sc_smb_tag.ic_acquire_bus = alipm_smb_acquire_bus;
 	sc-sc_smb_tag.ic_release_bus = alipm_smb_release_bus;
@@ -224,10 +224,7 @@ alipm_smb_acquire_bus(void *cookie, int 
 {
 	struct alipm_softc *sc = cookie;
 
-	if (flags  I2C_F_POLL)
-		return (0);
-
-	rw_enter(sc-sc_smb_lock, RW_WRITER);
+	mutex_enter(sc-sc_smb_mutex);
 	return 0;
 }
 
@@ -236,10 +233,7 @@ alipm_smb_release_bus(void *cookie, int 
 {
 	struct alipm_softc *sc = cookie;
 
-	if (flags  I2C_F_POLL)
-		return;
-
-	rw_exit(sc-sc_smb_lock);
+	mutex_exit(sc-sc_smb_mutex);
 }
 
 int



CVS commit: src/distrib/sets/lists/tests

2012-03-11 Thread Nicolas Joly
Module Name:src
Committed By:   njoly
Date:   Sun Mar 11 23:10:44 UTC 2012

Modified Files:
src/distrib/sets/lists/tests: mi

Log Message:
Small typo.


To generate a diff of this commit:
cvs rdiff -u -r1.441 -r1.442 src/distrib/sets/lists/tests/mi

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

Modified files:

Index: src/distrib/sets/lists/tests/mi
diff -u src/distrib/sets/lists/tests/mi:1.441 src/distrib/sets/lists/tests/mi:1.442
--- src/distrib/sets/lists/tests/mi:1.441	Sun Mar 11 18:45:19 2012
+++ src/distrib/sets/lists/tests/mi	Sun Mar 11 23:10:43 2012
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.441 2012/03/11 18:45:19 jruoho Exp $
+# $NetBSD: mi,v 1.442 2012/03/11 23:10:43 njoly Exp $
 #
 # Note: don't delete entries from here - mark them as obsolete instead.
 #
@@ -2743,7 +2743,7 @@
 ./usr/tests/usr.bin/awk/d_string1.out		tests-util-tests
 ./usr/tests/usr.bin/awk/d_tolower.awk		tests-util-tests
 ./usr/tests/usr.bin/awk/d_tolower.in		tests-util-tests
-./usr/tests/urs.bin/awk/d_tolower.out		tests-util-tests
+./usr/tests/usr.bin/awk/d_tolower.out		tests-util-tests
 ./usr/tests/usr.bin/awk/d_toupper.awk		tests-util-tests
 ./usr/tests/usr.bin/awk/d_toupper.in		tests-util-tests
 ./usr/tests/usr.bin/awk/d_toupper.out		tests-util-tests



CVS commit: src/tests/lib/libc/sys

2012-03-11 Thread Nicolas Joly
Module Name:src
Committed By:   njoly
Date:   Sun Mar 11 23:26:22 UTC 2012

Modified Files:
src/tests/lib/libc/sys: t_setrlimit.c

Log Message:
Use ATF_CHECK_ERRNO in setrlimit_perm().


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/tests/lib/libc/sys/t_setrlimit.c

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

Modified files:

Index: src/tests/lib/libc/sys/t_setrlimit.c
diff -u src/tests/lib/libc/sys/t_setrlimit.c:1.2 src/tests/lib/libc/sys/t_setrlimit.c:1.3
--- src/tests/lib/libc/sys/t_setrlimit.c:1.2	Mon Aug 22 00:33:16 2011
+++ src/tests/lib/libc/sys/t_setrlimit.c	Sun Mar 11 23:26:22 2012
@@ -1,4 +1,4 @@
-/* $NetBSD: t_setrlimit.c,v 1.2 2011/08/22 00:33:16 dholland Exp $ */
+/* $NetBSD: t_setrlimit.c,v 1.3 2012/03/11 23:26:22 njoly Exp $ */
 
 /*-
  * Copyright (c) 2011 The NetBSD Foundation, Inc.
@@ -29,7 +29,7 @@
  * POSSIBILITY OF SUCH DAMAGE.
  */
 #include sys/cdefs.h
-__RCSID($NetBSD: t_setrlimit.c,v 1.2 2011/08/22 00:33:16 dholland Exp $);
+__RCSID($NetBSD: t_setrlimit.c,v 1.3 2012/03/11 23:26:22 njoly Exp $);
 
 #include sys/resource.h
 #include sys/mman.h
@@ -460,8 +460,7 @@ ATF_TC_BODY(setrlimit_perm, tc)
 		errno = 0;
 		res.rlim_max = res.rlim_max + 1;
 
-		ATF_REQUIRE(setrlimit(rlimit[i], res) != 0);
-		ATF_REQUIRE(errno == EPERM);
+		ATF_CHECK_ERRNO(EPERM, setrlimit(rlimit[i], res) != 0);
 	}
 }
 



CVS commit: src/sbin/sysctl

2012-03-11 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Mar 11 23:33:00 UTC 2012

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

Log Message:
PR/44961: Jukka Ruohonen: for sysctl's with built-in handlers, return OPNOTSUPP
if we don't have handlers instead of using the handler we have and silently
failing on attempts to write a node that cannot be written.


To generate a diff of this commit:
cvs rdiff -u -r1.140 -r1.141 src/sbin/sysctl/sysctl.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/sysctl/sysctl.c
diff -u src/sbin/sysctl/sysctl.c:1.140 src/sbin/sysctl/sysctl.c:1.141
--- src/sbin/sysctl/sysctl.c:1.140	Sun Feb 12 15:54:07 2012
+++ src/sbin/sysctl/sysctl.c	Sun Mar 11 19:33:00 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: sysctl.c,v 1.140 2012/02/12 20:54:07 christos Exp $ */
+/*	$NetBSD: sysctl.c,v 1.141 2012/03/11 23:33:00 christos Exp $ */
 
 /*-
  * Copyright (c) 2003 The NetBSD Foundation, Inc.
@@ -68,7 +68,7 @@ __COPYRIGHT(@(#) Copyright (c) 1993\
 #if 0
 static char sccsid[] = @(#)sysctl.c	8.1 (Berkeley) 6/6/93;
 #else
-__RCSID($NetBSD: sysctl.c,v 1.140 2012/02/12 20:54:07 christos Exp $);
+__RCSID($NetBSD: sysctl.c,v 1.141 2012/03/11 23:33:00 christos Exp $);
 #endif
 #endif /* not lint */
 
@@ -122,8 +122,7 @@ __RCSID($NetBSD: sysctl.c,v 1.140 2012/
 /*
  * generic routines
  */
-static const struct handlespec *findhandler(const char *, int, regex_t *,
-size_t *);
+static const struct handlespec *findhandler(const char *, regex_t *, size_t *);
 static void canonicalize(const char *, char *);
 static void purge_tree(struct sysctlnode *);
 static void print_tree(int *, u_int, struct sysctlnode *, u_int, int, regex_t *,
@@ -385,7 +384,7 @@ main(int argc, char *argv[])
  * 
  */
 static const struct handlespec *
-findhandler(const char *s, int w, regex_t *re, size_t *lastcompiled)
+findhandler(const char *s, regex_t *re, size_t *lastcompiled)
 {
 	const struct handlespec *p;
 	size_t i, l;
@@ -406,8 +405,7 @@ findhandler(const char *s, int w, regex_
 		}
 		j = regexec(re[i], s, 1, match, 0);
 		if (j == 0) {
-			if (match.rm_so == 0  match.rm_eo == (int)l 
-			(w ? p[i].ps_w : p[i].ps_p) != NULL)
+			if (match.rm_so == 0  match.rm_eo == (int)l)
 return p[i];
 		}
 		else if (j != REG_NOMATCH) {
@@ -670,8 +668,13 @@ print_tree(int *name, u_int namelen, str
 	}
 
 	canonicalize(gsname, canonname);
-	p = findhandler(canonname, 0, re, lastcompiled);
+	p = findhandler(canonname, re, lastcompiled);
 	if (type != CTLTYPE_NODE  p != NULL) {
+		if (p-ps_p == NULL) {
+			sysctlperror(Cannot print `%s': %s\n, gsname, 
+			strerror(EOPNOTSUPP));
+			exit(1);
+		}
 		(*p-ps_p)(gsname, gdname, NULL, name, namelen, pnode, type,
 			   __UNCONST(p-ps_d));
 		*sp = *dp = '\0';
@@ -905,8 +908,13 @@ parse(char *l, regex_t *re, size_t *last
 	}
 
 	canonicalize(gsname, canonname);
-	if (type != CTLTYPE_NODE  (w = findhandler(canonname, 1, re,
+	if (type != CTLTYPE_NODE  (w = findhandler(canonname, re,
 	lastcompiled)) != NULL) {
+		if (w-ps_w == NULL) {
+			sysctlperror(Cannot write `%s': %s\n, gsname, 
+			strerror(EOPNOTSUPP));
+			exit(1);
+		}
 		(*w-ps_w)(gsname, gdname, value, name, namelen, node, type,
 			   __UNCONST(w-ps_d));
 		gsname[0] = '\0';



CVS commit: src/share/man

2012-03-11 Thread Nicolas Joly
Module Name:src
Committed By:   njoly
Date:   Sun Mar 11 23:42:07 UTC 2012

Modified Files:
src/share/man/man5: mk.conf.5
src/share/man/man7: tests.7
src/share/man/man8: afterboot.8 diskless.8
src/share/man/man8/man8.macppc: ofwboot.8
src/share/man/man8/man8.sparc64: boot.8
src/share/man/man9: kauth.9

Log Message:
Use Lk macro instead of Pa when dealing with URLs, to produce links
with HTML output. And while here update some dead URL links.
First part of PR/29238.


To generate a diff of this commit:
cvs rdiff -u -r1.58 -r1.59 src/share/man/man5/mk.conf.5
cvs rdiff -u -r1.8 -r1.9 src/share/man/man7/tests.7
cvs rdiff -u -r1.47 -r1.48 src/share/man/man8/afterboot.8
cvs rdiff -u -r1.29 -r1.30 src/share/man/man8/diskless.8
cvs rdiff -u -r1.9 -r1.10 src/share/man/man8/man8.macppc/ofwboot.8
cvs rdiff -u -r1.16 -r1.17 src/share/man/man8/man8.sparc64/boot.8
cvs rdiff -u -r1.96 -r1.97 src/share/man/man9/kauth.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/man5/mk.conf.5
diff -u src/share/man/man5/mk.conf.5:1.58 src/share/man/man5/mk.conf.5:1.59
--- src/share/man/man5/mk.conf.5:1.58	Sun Nov  6 22:34:47 2011
+++ src/share/man/man5/mk.conf.5	Sun Mar 11 23:42:06 2012
@@ -1,4 +1,4 @@
-.\	$NetBSD: mk.conf.5,v 1.58 2011/11/06 22:34:47 tron Exp $
+.\	$NetBSD: mk.conf.5,v 1.59 2012/03/11 23:42:06 njoly Exp $
 .\
 .\  Copyright (c) 1999-2003 The NetBSD Foundation, Inc.
 .\  All rights reserved.
@@ -915,7 +915,7 @@ on everything else.
 .Ss pkgsrc system variables
 .
 Please see the pkgsrc guide at
-.Pa http://www.netbsd.org/Documentation/pkgsrc/
+.Lk http://www.netbsd.org/Documentation/pkgsrc/
 or
 .Pa pkgsrc/doc/pkgsrc.txt
 for more variables used internally by the package system and
@@ -936,7 +936,7 @@ Examples for settings regarding the pkgs
 .Xr make 1 ,
 .Pa /usr/share/mk/bsd.README ,
 .Pa pkgsrc/doc/pkgsrc.txt ,
-.Pa http://www.netbsd.org/Documentation/pkgsrc/
+.Lk http://www.netbsd.org/Documentation/pkgsrc/
 .Sh HISTORY
 The
 .Nm

Index: src/share/man/man7/tests.7
diff -u src/share/man/man7/tests.7:1.8 src/share/man/man7/tests.7:1.9
--- src/share/man/man7/tests.7:1.8	Fri Aug  5 14:43:41 2011
+++ src/share/man/man7/tests.7	Sun Mar 11 23:42:07 2012
@@ -1,4 +1,4 @@
-.\	$NetBSD: tests.7,v 1.8 2011/08/05 14:43:41 jmmv Exp $
+.\	$NetBSD: tests.7,v 1.9 2012/03/11 23:42:07 njoly Exp $
 .\
 .\ Copyright (c) 2010 The NetBSD Foundation, Inc.
 .\ All rights reserved.
@@ -189,9 +189,9 @@ problem report.
 For more details please refer to:
 .Bl -bullet -offset indent -compact
 .It
-.Pa http://www.netbsd.org/mailinglists/
+.Lk http://www.netbsd.org/mailinglists/ NetBSD mailing lists
 .It
-.Pa http://www.netbsd.org/support/send-pr.html
+.Lk http://www.netbsd.org/support/send-pr.html NetBSD Problem Reports
 .El
 .Sh FILES
 .Bl -tag -compact -width etcXatfXNetBSDXconfXX

Index: src/share/man/man8/afterboot.8
diff -u src/share/man/man8/afterboot.8:1.47 src/share/man/man8/afterboot.8:1.48
--- src/share/man/man8/afterboot.8:1.47	Sat Jun 26 11:26:17 2010
+++ src/share/man/man8/afterboot.8	Sun Mar 11 23:42:07 2012
@@ -1,4 +1,4 @@
-.\	$NetBSD: afterboot.8,v 1.47 2010/06/26 11:26:17 jmmv Exp $
+.\	$NetBSD: afterboot.8,v 1.48 2012/03/11 23:42:07 njoly Exp $
 .\	$OpenBSD: afterboot.8,v 1.72 2002/02/22 02:02:33 miod Exp $
 .\
 .\ Originally created by Marshall M. Midden -- 1997-10-20, m...@umn.edu
@@ -92,7 +92,7 @@ if they get used to using the manual pag
 By the time that you have installed your system, it is quite likely that
 bugs in the release have been found.
 All significant and easily fixed problems will be reported at
-.Pa http://www.NetBSD.org/support/security/ .
+.Lk http://www.NetBSD.org/support/security/ .
 It is recommended that you check this page regularly.
 .Pp
 Additionally, you should set
@@ -853,11 +853,11 @@ The
 .Nx
 packages collection, pkgsrc, includes a large set of third-party software.
 A lot of it is available as binary packages that you can download from
-.Pa ftp://ftp.NetBSD.org/pub/NetBSD/packages/
+.Lk ftp://ftp.NetBSD.org/pub/NetBSD/packages/
 or a mirror, and install using
 .Xr pkg_add 1 .
 See
-.Pa http://www.NetBSD.org/docs/pkgsrc/
+.Lk http://www.NetBSD.org/docs/pkgsrc/
 and
 .Pa pkgsrc/doc/pkgsrc.txt
 for more details.

Index: src/share/man/man8/diskless.8
diff -u src/share/man/man8/diskless.8:1.29 src/share/man/man8/diskless.8:1.30
--- src/share/man/man8/diskless.8:1.29	Sat Oct  7 22:23:45 2006
+++ src/share/man/man8/diskless.8	Sun Mar 11 23:42:07 2012
@@ -1,4 +1,4 @@
-.\	$NetBSD: diskless.8,v 1.29 2006/10/07 22:23:45 elad Exp $
+.\	$NetBSD: diskless.8,v 1.30 2012/03/11 23:42:07 njoly Exp $
 .\
 .\ Copyright (c) 1994 Gordon W. Ross, Theo de Raadt
 .\ All rights reserved.
@@ -471,8 +471,7 @@ The
 server
 .Xr dhcpd 8
 was developed by the Internet Software Consortium
-.Pq ISC ;
-.Pa http://www.isc.org/
+.Pq Lk http://www.isc.org/ ISC .
 .Pp
 .Tn 

CVS commit: src/usr.bin/config

2012-03-11 Thread David A. Holland
Module Name:src
Committed By:   dholland
Date:   Mon Mar 12 00:20:30 UTC 2012

Modified Files:
src/usr.bin/config: defs.h hash.c lint.c main.c mkheaders.c

Log Message:
Introduce type-safe wrappers around the hash tables. Use them for a
selected set of tables affected by the next nvlist cleanup in the
works.


To generate a diff of this commit:
cvs rdiff -u -r1.40 -r1.41 src/usr.bin/config/defs.h
cvs rdiff -u -r1.6 -r1.7 src/usr.bin/config/hash.c
cvs rdiff -u -r1.10 -r1.11 src/usr.bin/config/lint.c
cvs rdiff -u -r1.45 -r1.46 src/usr.bin/config/main.c
cvs rdiff -u -r1.19 -r1.20 src/usr.bin/config/mkheaders.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/config/defs.h
diff -u src/usr.bin/config/defs.h:1.40 src/usr.bin/config/defs.h:1.41
--- src/usr.bin/config/defs.h:1.40	Sun Mar 11 21:16:07 2012
+++ src/usr.bin/config/defs.h	Mon Mar 12 00:20:30 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: defs.h,v 1.40 2012/03/11 21:16:07 dholland Exp $	*/
+/*	$NetBSD: defs.h,v 1.41 2012/03/12 00:20:30 dholland Exp $	*/
 
 /*
  * Copyright (c) 1992, 1993
@@ -460,12 +460,12 @@ struct	hashtab *selecttab;	/* selects th
 struct	hashtab *needcnttab;	/* retains names marked needs-count */
 struct	hashtab *opttab;	/* table of configured options */
 struct	hashtab *fsopttab;	/* table of configured file systems */
-struct	hashtab *defopttab;	/* options that have been defopt'd */
-struct	hashtab *defflagtab;	/* options that have been defflag'd */
-struct	hashtab *defparamtab;	/* options that have been defparam'd */
-struct	hashtab *defoptlint;	/* lint values for options */
-struct	hashtab *deffstab;	/* defined file systems */
-struct	hashtab *optfiletab;	/* defopt'd option .h files */
+struct	nvhash *defopttab;	/* options that have been defopt'd */
+struct	nvhash *defflagtab;	/* options that have been defflag'd */
+struct	nvhash *defparamtab;	/* options that have been defparam'd */
+struct	nvhash *defoptlint;	/* lint values for options */
+struct	nvhash *deffstab;	/* defined file systems */
+struct	nvhash *optfiletab;	/* defopt'd option .h files */
 struct	hashtab *attrtab;	/* attributes (locators, etc.) */
 struct	hashtab *bdevmtab;	/* block devm lookup */
 struct	hashtab *cdevmtab;	/* character devm lookup */
@@ -529,6 +529,19 @@ const char *intern(const char *);
 typedef int (*ht_callback)(const char *, void *, void *);
 int	ht_enumerate(struct hashtab *, ht_callback, void *);
 
+/* typed hash, named struct HT, whose type is string - struct VT */
+#define DECLHASH(HT, VT) \
+	struct HT;			\
+	struct HT *HT##_create(void);	\
+	int HT##_insert(struct HT *, const char *, struct VT *);	\
+	int HT##_replace(struct HT *, const char *, struct VT *);	\
+	int HT##_remove(struct HT *, const char *);			\
+	struct VT *HT##_lookup(struct HT *, const char *);		\
+	int HT##_enumerate(struct HT *,	\
+			int (*)(const char *, struct VT *, void *),	\
+			void *)
+DECLHASH(nvhash, nvlist);
+
 /* lint.c */
 void	emit_instances(void);
 void	emit_options(void);
@@ -554,11 +567,11 @@ void	setupdirs(void);
 const char *strtolower(const char *);
 
 /* tests on option types */
-#define OPT_FSOPT(n)	(ht_lookup(deffstab, (n)) != NULL)
-#define OPT_DEFOPT(n)	(ht_lookup(defopttab, (n)) != NULL)
-#define OPT_DEFFLAG(n)	(ht_lookup(defflagtab, (n)) != NULL)
-#define OPT_DEFPARAM(n)	(ht_lookup(defparamtab, (n)) != NULL)
-#define OPT_OBSOLETE(n)	(ht_lookup(obsopttab, (n)) != NULL)
+#define OPT_FSOPT(n)	(nvhash_lookup(deffstab, (n)) != NULL)
+#define OPT_DEFOPT(n)	(nvhash_lookup(defopttab, (n)) != NULL)
+#define OPT_DEFFLAG(n)	(nvhash_lookup(defflagtab, (n)) != NULL)
+#define OPT_DEFPARAM(n)	(nvhash_lookup(defparamtab, (n)) != NULL)
+#define OPT_OBSOLETE(n)	(nvhash_lookup(obsopttab, (n)) != NULL)
 #define DEFINED_OPTION(n) (find_declared_option((n)) != NULL)
 
 /* main.c */

Index: src/usr.bin/config/hash.c
diff -u src/usr.bin/config/hash.c:1.6 src/usr.bin/config/hash.c:1.7
--- src/usr.bin/config/hash.c:1.6	Sat Apr 11 12:41:10 2009
+++ src/usr.bin/config/hash.c	Mon Mar 12 00:20:30 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: hash.c,v 1.6 2009/04/11 12:41:10 lukem Exp $	*/
+/*	$NetBSD: hash.c,v 1.7 2012/03/12 00:20:30 dholland Exp $	*/
 
 /*
  * Copyright (c) 1992, 1993
@@ -315,3 +315,75 @@ ht_enumerate(struct hashtab *ht, ht_call
 	}
 	return rval;
 }
+
+//
+
+/*
+ * Type-safe wrappers.
+ */
+
+#define DEFHASH(HT, VT) \
+	struct HT {		\
+		struct hashtab imp;\
+	};			\
+\
+	struct HT *		\
+	HT##_create(void)	\
+	{			\
+		struct HT *tbl;	\
+\
+		tbl = ecalloc(1, sizeof(*tbl));			\
+		ht_init(tbl-imp, 8);\
+		return tbl;	\
+	}			\
+\
+	int			\
+	HT##_insert(struct HT *tbl, const char *name, struct VT *val) \
+	{			\
+		return ht_insert(tbl-imp, name, val);		\
+	}			\
+\
+	int			\
+	HT##_replace(struct HT *tbl, 

CVS commit: src/external/bsd/libevent/dist/test

2012-03-11 Thread John Nemeth
Module Name:src
Committed By:   jnemeth
Date:   Mon Mar 12 02:18:50 UTC 2012

Modified Files:
src/external/bsd/libevent/dist/test: regress.c

Log Message:
Fix build failure caused by previous change.  Hi jruoho!


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/external/bsd/libevent/dist/test/regress.c

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

Modified files:

Index: src/external/bsd/libevent/dist/test/regress.c
diff -u src/external/bsd/libevent/dist/test/regress.c:1.3 src/external/bsd/libevent/dist/test/regress.c:1.4
--- src/external/bsd/libevent/dist/test/regress.c:1.3	Sun Mar 11 19:03:33 2012
+++ src/external/bsd/libevent/dist/test/regress.c	Mon Mar 12 02:18:49 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: regress.c,v 1.3 2012/03/11 19:03:33 jruoho Exp $	*/
+/*	$NetBSD: regress.c,v 1.4 2012/03/12 02:18:49 jnemeth Exp $	*/
 /*
  * Copyright (c) 2003, 2004 Niels Provos pro...@citi.umich.edu
  * All rights reserved.
@@ -514,6 +514,7 @@ test_combined(void)
 	cleanup_test();
 }
 
+#if 0
 static void
 test_simpletimeout(void)
 {
@@ -532,6 +533,7 @@ test_simpletimeout(void)
 
 	cleanup_test();
 }
+#endif
 
 #ifndef WIN32
 extern struct event_base *current_base;



CVS commit: src/sys/dev

2012-03-11 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Mon Mar 12 02:44:17 UTC 2012

Modified Files:
src/sys/dev/scsipi: scsiconf.c
src/sys/dev/usb: uhub.c

Log Message:
take the kernel lock a few more places when doing detach, to avoid
triggering KERNEL_LOCK_P() asserts in both scsi and usb code.

with this and other recent fixes i can now drvctl -d ehci0.


To generate a diff of this commit:
cvs rdiff -u -r1.263 -r1.264 src/sys/dev/scsipi/scsiconf.c
cvs rdiff -u -r1.116 -r1.117 src/sys/dev/usb/uhub.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/scsipi/scsiconf.c
diff -u src/sys/dev/scsipi/scsiconf.c:1.263 src/sys/dev/scsipi/scsiconf.c:1.264
--- src/sys/dev/scsipi/scsiconf.c:1.263	Sun Mar 11 02:16:55 2012
+++ src/sys/dev/scsipi/scsiconf.c	Mon Mar 12 02:44:16 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: scsiconf.c,v 1.263 2012/03/11 02:16:55 mrg Exp $	*/
+/*	$NetBSD: scsiconf.c,v 1.264 2012/03/12 02:44:16 mrg Exp $	*/
 
 /*-
  * Copyright (c) 1998, 1999, 2004 The NetBSD Foundation, Inc.
@@ -48,7 +48,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: scsiconf.c,v 1.263 2012/03/11 02:16:55 mrg Exp $);
+__KERNEL_RCSID(0, $NetBSD: scsiconf.c,v 1.264 2012/03/12 02:44:16 mrg Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -256,11 +256,18 @@ scsibusdetach(device_t self, int flags)
 	struct scsipi_xfer *xs;
 	int error;
 
+	/* XXXSMP scsipi */
+	KERNEL_LOCK(1, curlwp);
+
 	/*
 	 * Detach all of the periphs.
 	 */
-	if ((error = scsipi_target_detach(chan, -1, -1, flags)) != 0)
+	if ((error = scsipi_target_detach(chan, -1, -1, flags)) != 0) {
+		/* XXXSMP scsipi */
+		KERNEL_UNLOCK_ONE(curlwp);
+
 		return error;
+	}
 
 	pmf_device_deregister(self);
 
@@ -290,6 +297,10 @@ scsibusdetach(device_t self, int flags)
 	 * Now shut down the channel.
 	 */
 	scsipi_channel_shutdown(chan);
+
+	/* XXXSMP scsipi */
+	KERNEL_UNLOCK_ONE(curlwp);
+
 	return 0;
 }
 

Index: src/sys/dev/usb/uhub.c
diff -u src/sys/dev/usb/uhub.c:1.116 src/sys/dev/usb/uhub.c:1.117
--- src/sys/dev/usb/uhub.c:1.116	Fri Mar  9 00:12:10 2012
+++ src/sys/dev/usb/uhub.c	Mon Mar 12 02:44:17 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: uhub.c,v 1.116 2012/03/09 00:12:10 jakllsch Exp $	*/
+/*	$NetBSD: uhub.c,v 1.117 2012/03/12 02:44:17 mrg Exp $	*/
 /*	$FreeBSD: src/sys/dev/usb/uhub.c,v 1.18 1999/11/17 22:33:43 n_hibma Exp $	*/
 
 /*
@@ -36,7 +36,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: uhub.c,v 1.116 2012/03/09 00:12:10 jakllsch Exp $);
+__KERNEL_RCSID(0, $NetBSD: uhub.c,v 1.117 2012/03/12 02:44:17 mrg Exp $);
 
 #include opt_usb.h
 
@@ -597,13 +597,20 @@ uhub_detach(device_t self, int flags)
 	if (hub == NULL)		/* Must be partially working */
 		return (0);
 
+	/* XXXSMP usb */
+	KERNEL_LOCK(1, curlwp);
+
 	nports = hub-hubdesc.bNbrPorts;
 	for(port = 0; port  nports; port++) {
 		rup = hub-ports[port];
 		if (rup-device == NULL)
 			continue;
-		if ((rc = usb_disconnect_port(rup, self, flags)) != 0)
+		if ((rc = usb_disconnect_port(rup, self, flags)) != 0) {
+			/* XXXSMP usb */
+			KERNEL_UNLOCK_ONE(curlwp);
+
 			return rc;
+		}
 	}
 
 	pmf_device_deregister(self);
@@ -623,6 +630,9 @@ uhub_detach(device_t self, int flags)
 	if (sc-sc_statusbuf)
 		free(sc-sc_statusbuf, M_USBDEV);
 
+	/* XXXSMP usb */
+	KERNEL_UNLOCK_ONE(curlwp);
+
 	return (0);
 }
 



CVS commit: src/usr.bin/config

2012-03-11 Thread David A. Holland
Module Name:src
Committed By:   dholland
Date:   Mon Mar 12 02:58:55 UTC 2012

Modified Files:
src/usr.bin/config: defs.h gram.y hash.c lint.c main.c mkheaders.c
util.c

Log Message:
Give option definitions their own data structure instead of using nvlists.
(and using messy hacks to make up for nvlists not holding quite the right
things)


To generate a diff of this commit:
cvs rdiff -u -r1.41 -r1.42 src/usr.bin/config/defs.h
cvs rdiff -u -r1.36 -r1.37 src/usr.bin/config/gram.y
cvs rdiff -u -r1.7 -r1.8 src/usr.bin/config/hash.c
cvs rdiff -u -r1.11 -r1.12 src/usr.bin/config/lint.c
cvs rdiff -u -r1.46 -r1.47 src/usr.bin/config/main.c
cvs rdiff -u -r1.20 -r1.21 src/usr.bin/config/mkheaders.c
cvs rdiff -u -r1.13 -r1.14 src/usr.bin/config/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/config/defs.h
diff -u src/usr.bin/config/defs.h:1.41 src/usr.bin/config/defs.h:1.42
--- src/usr.bin/config/defs.h:1.41	Mon Mar 12 00:20:30 2012
+++ src/usr.bin/config/defs.h	Mon Mar 12 02:58:55 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: defs.h,v 1.41 2012/03/12 00:20:30 dholland Exp $	*/
+/*	$NetBSD: defs.h,v 1.42 2012/03/12 02:58:55 dholland Exp $	*/
 
 /*
  * Copyright (c) 1992, 1993
@@ -139,6 +139,18 @@ struct config {
 };
 
 /*
+ * Option definition list
+ */
+struct defoptlist {
+	struct defoptlist *dl_next;
+	const char *dl_name;
+	const char *dl_value;
+	const char *dl_lintvalue;
+	int dl_obsolete;
+	struct nvlist *dl_depends;
+};
+
+/*
  * Attributes.  These come in three flavors: plain, device class,
  * and interface.  Plain attributes (e.g., ether) simply serve
  * to pull in files.  Device class attributes are like plain
@@ -460,12 +472,12 @@ struct	hashtab *selecttab;	/* selects th
 struct	hashtab *needcnttab;	/* retains names marked needs-count */
 struct	hashtab *opttab;	/* table of configured options */
 struct	hashtab *fsopttab;	/* table of configured file systems */
-struct	nvhash *defopttab;	/* options that have been defopt'd */
-struct	nvhash *defflagtab;	/* options that have been defflag'd */
-struct	nvhash *defparamtab;	/* options that have been defparam'd */
-struct	nvhash *defoptlint;	/* lint values for options */
+struct	dlhash *defopttab;	/* options that have been defopt'd */
+struct	dlhash *defflagtab;	/* options that have been defflag'd */
+struct	dlhash *defparamtab;	/* options that have been defparam'd */
+struct	dlhash *defoptlint;	/* lint values for options */
 struct	nvhash *deffstab;	/* defined file systems */
-struct	nvhash *optfiletab;	/* defopt'd option .h files */
+struct	dlhash *optfiletab;	/* defopt'd option .h files */
 struct	hashtab *attrtab;	/* attributes (locators, etc.) */
 struct	hashtab *bdevmtab;	/* block devm lookup */
 struct	hashtab *cdevmtab;	/* character devm lookup */
@@ -541,6 +553,7 @@ int	ht_enumerate(struct hashtab *, ht_ca
 			int (*)(const char *, struct VT *, void *),	\
 			void *)
 DECLHASH(nvhash, nvlist);
+DECLHASH(dlhash, defoptlist);
 
 /* lint.c */
 void	emit_instances(void);
@@ -554,25 +567,25 @@ void	addmkoption(const char *, const cha
 void	appendmkoption(const char *, const char *);
 void	appendcondmkoption(struct condexpr *, const char *, const char *);
 void	deffilesystem(struct nvlist *, struct nvlist *);
-void	defoption(const char *, struct nvlist *, struct nvlist *);
-void	defflag(const char *, struct nvlist *, struct nvlist *, int);
-void	defparam(const char *, struct nvlist *, struct nvlist *, int);
+void	defoption(const char *, struct defoptlist *, struct nvlist *);
+void	defflag(const char *, struct defoptlist *, struct nvlist *, int);
+void	defparam(const char *, struct defoptlist *, struct nvlist *, int);
 void	deloption(const char *);
 void	delfsoption(const char *);
 void	delmkoption(const char *);
 int	devbase_has_instances(struct devbase *, int);
-struct nvlist * find_declared_option(const char *);
+int	is_declared_option(const char *);
 int	deva_has_instances(struct deva *, int);
 void	setupdirs(void);
 const char *strtolower(const char *);
 
 /* tests on option types */
 #define OPT_FSOPT(n)	(nvhash_lookup(deffstab, (n)) != NULL)
-#define OPT_DEFOPT(n)	(nvhash_lookup(defopttab, (n)) != NULL)
-#define OPT_DEFFLAG(n)	(nvhash_lookup(defflagtab, (n)) != NULL)
-#define OPT_DEFPARAM(n)	(nvhash_lookup(defparamtab, (n)) != NULL)
-#define OPT_OBSOLETE(n)	(nvhash_lookup(obsopttab, (n)) != NULL)
-#define DEFINED_OPTION(n) (find_declared_option((n)) != NULL)
+#define OPT_DEFOPT(n)	(dlhash_lookup(defopttab, (n)) != NULL)
+#define OPT_DEFFLAG(n)	(dlhash_lookup(defflagtab, (n)) != NULL)
+#define OPT_DEFPARAM(n)	(dlhash_lookup(defparamtab, (n)) != NULL)
+#define OPT_OBSOLETE(n)	(dlhash_lookup(obsopttab, (n)) != NULL)
+#define DEFINED_OPTION(n) (is_declared_option((n)))
 
 /* main.c */
 void	logconfig_include(FILE *, const char *);
@@ -627,6 +640,9 @@ void	nvfree(struct nvlist *);
 void	nvfreel(struct nvlist *);
 struct nvlist 

CVS commit: src/usr.bin/config

2012-03-11 Thread David A. Holland
Module Name:src
Committed By:   dholland
Date:   Mon Mar 12 03:04:56 UTC 2012

Modified Files:
src/usr.bin/config: defs.h lint.c

Log Message:
Remove the NV_OBSOLETE flag, which is no longer needed. While here,
update an outdated comment about condition expressions.


To generate a diff of this commit:
cvs rdiff -u -r1.42 -r1.43 src/usr.bin/config/defs.h
cvs rdiff -u -r1.12 -r1.13 src/usr.bin/config/lint.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/config/defs.h
diff -u src/usr.bin/config/defs.h:1.42 src/usr.bin/config/defs.h:1.43
--- src/usr.bin/config/defs.h:1.42	Mon Mar 12 02:58:55 2012
+++ src/usr.bin/config/defs.h	Mon Mar 12 03:04:56 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: defs.h,v 1.42 2012/03/12 02:58:55 dholland Exp $	*/
+/*	$NetBSD: defs.h,v 1.43 2012/03/12 03:04:56 dholland Exp $	*/
 
 /*
  * Copyright (c) 1992, 1993
@@ -123,7 +123,6 @@ struct nvlist {
 	int		nv_ifunit;		/* XXX XXX XXX */
 	int		nv_flags;
 #define	NV_DEPENDED	1
-#define	NV_OBSOLETE	2
 };
 
 /*
@@ -328,11 +327,9 @@ struct filetype
 /*
  * Files.  Each file is either standard (always included) or optional,
  * depending on whether it has names on which to *be* optional.  The
- * options field (fi_optx) is actually an expression tree, with nodes
- * for OR, AND, and NOT, as well as atoms (words) representing some   
- * particular option.  The node type is stored in the nv_num field.
- * Subexpressions appear in the `next' field; for the binary operators
- * AND and OR, the left subexpression is first stored in the nv_ptr field.
+ * options field (fi_optx) is an expression tree of type struct
+ * condexpr, with nodes for OR, AND, and NOT, as well as atoms (words)
+ * representing some particular option.
  * 
  * For any file marked as needs-count or needs-flag, fixfiles() will
  * build fi_optf, a `flat list' of the options with nv_num fields that

Index: src/usr.bin/config/lint.c
diff -u src/usr.bin/config/lint.c:1.12 src/usr.bin/config/lint.c:1.13
--- src/usr.bin/config/lint.c:1.12	Mon Mar 12 02:58:55 2012
+++ src/usr.bin/config/lint.c	Mon Mar 12 03:04:56 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: lint.c,v 1.12 2012/03/12 02:58:55 dholland Exp $	*/
+/*	$NetBSD: lint.c,v 1.13 2012/03/12 03:04:56 dholland Exp $	*/
 
 /*
  *  Copyright (c) 2007 The NetBSD Foundation.
@@ -99,8 +99,6 @@ do_emit_fs(const char *name, struct nvli
 {
 	const struct opt_type *ot = v;
 
-	assert((nv-nv_flags  NV_OBSOLETE) == 0);
-
 	if (ht_lookup(*(ot-ot_ht), name))
 		return 0;
 



CVS commit: [jmcneill-usbmp] src/sys/dev/ic

2012-03-11 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Mon Mar 12 04:11:34 UTC 2012

Modified Files:
src/sys/dev/ic [jmcneill-usbmp]: sl811hs.c

Log Message:
fix a comment


To generate a diff of this commit:
cvs rdiff -u -r1.31.2.3 -r1.31.2.4 src/sys/dev/ic/sl811hs.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/ic/sl811hs.c
diff -u src/sys/dev/ic/sl811hs.c:1.31.2.3 src/sys/dev/ic/sl811hs.c:1.31.2.4
--- src/sys/dev/ic/sl811hs.c:1.31.2.3	Sun Mar 11 01:52:27 2012
+++ src/sys/dev/ic/sl811hs.c	Mon Mar 12 04:11:34 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: sl811hs.c,v 1.31.2.3 2012/03/11 01:52:27 mrg Exp $	*/
+/*	$NetBSD: sl811hs.c,v 1.31.2.4 2012/03/12 04:11:34 mrg Exp $	*/
 
 /*
  * Not (c) 2007 Matthew Orgass
@@ -84,7 +84,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: sl811hs.c,v 1.31.2.3 2012/03/11 01:52:27 mrg Exp $);
+__KERNEL_RCSID(0, $NetBSD: sl811hs.c,v 1.31.2.4 2012/03/12 04:11:34 mrg Exp $);
 
 #include opt_slhci.h
 
@@ -694,7 +694,7 @@ const struct usbd_bus_methods slhci_bus_
 	slhci_freem,
 	slhci_allocx,
 	slhci_freex,
-	NULL, /* slhci_get_locks */
+	NULL, /* slhci_get_lock */
 };
 
 const struct usbd_pipe_methods slhci_pipe_methods = {



CVS commit: [jmcneill-usbmp] src/sys/dev/scsipi

2012-03-11 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Mon Mar 12 04:11:56 UTC 2012

Modified Files:
src/sys/dev/scsipi [jmcneill-usbmp]: scsiconf.c

Log Message:
merge scsiconf.c 1.264.


To generate a diff of this commit:
cvs rdiff -u -r1.262 -r1.262.8.1 src/sys/dev/scsipi/scsiconf.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/scsipi/scsiconf.c
diff -u src/sys/dev/scsipi/scsiconf.c:1.262 src/sys/dev/scsipi/scsiconf.c:1.262.8.1
--- src/sys/dev/scsipi/scsiconf.c:1.262	Tue Apr 26 07:41:18 2011
+++ src/sys/dev/scsipi/scsiconf.c	Mon Mar 12 04:11:56 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: scsiconf.c,v 1.262 2011/04/26 07:41:18 hannken Exp $	*/
+/*	$NetBSD: scsiconf.c,v 1.262.8.1 2012/03/12 04:11:56 mrg Exp $	*/
 
 /*-
  * Copyright (c) 1998, 1999, 2004 The NetBSD Foundation, Inc.
@@ -48,7 +48,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: scsiconf.c,v 1.262 2011/04/26 07:41:18 hannken Exp $);
+__KERNEL_RCSID(0, $NetBSD: scsiconf.c,v 1.262.8.1 2012/03/12 04:11:56 mrg Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -256,11 +256,18 @@ scsibusdetach(device_t self, int flags)
 	struct scsipi_xfer *xs;
 	int error;
 
+	/* XXXSMP scsipi */
+	KERNEL_LOCK(1, curlwp);
+
 	/*
 	 * Detach all of the periphs.
 	 */
-	if ((error = scsipi_target_detach(chan, -1, -1, flags)) != 0)
+	if ((error = scsipi_target_detach(chan, -1, -1, flags)) != 0) {
+		/* XXXSMP scsipi */
+		KERNEL_UNLOCK_ONE(curlwp);
+
 		return error;
+	}
 
 	pmf_device_deregister(self);
 
@@ -290,6 +297,10 @@ scsibusdetach(device_t self, int flags)
 	 * Now shut down the channel.
 	 */
 	scsipi_channel_shutdown(chan);
+
+	/* XXXSMP scsipi */
+	KERNEL_UNLOCK_ONE(curlwp);
+
 	return 0;
 }
 
@@ -378,11 +389,17 @@ scsidevdetached(device_t self, device_t 
 	target = device_locator(child, SCSIBUSCF_TARGET);
 	lun = device_locator(child, SCSIBUSCF_LUN);
 
+	/* XXXSMP scsipi */
+	KERNEL_LOCK(1, curlwp);
+
 	periph = scsipi_lookup_periph(chan, target, lun);
 	KASSERT(periph-periph_dev == child);
 
 	scsipi_remove_periph(chan, periph);
 	free(periph, M_DEVBUF);
+
+	/* XXXSMP scsipi */
+	KERNEL_UNLOCK_ONE(curlwp);
 }
 
 /*



CVS commit: src/usr.bin/config

2012-03-11 Thread David A. Holland
Module Name:src
Committed By:   dholland
Date:   Sun Mar 11 08:21:54 UTC 2012

Modified Files:
src/usr.bin/config: defs.h files.c gram.y main.c mkmakefile.c sem.c
sem.h util.c

Log Message:
Create a struct condexpr type to hold condition expressions, instead
of abusing struct nvlist to make trees.

(These are the a|b and ab constructs.)


To generate a diff of this commit:
cvs rdiff -u -r1.38 -r1.39 src/usr.bin/config/defs.h
cvs rdiff -u -r1.10 -r1.11 src/usr.bin/config/files.c \
src/usr.bin/config/util.c
cvs rdiff -u -r1.33 -r1.34 src/usr.bin/config/gram.y
cvs rdiff -u -r1.44 -r1.45 src/usr.bin/config/main.c
cvs rdiff -u -r1.13 -r1.14 src/usr.bin/config/mkmakefile.c
cvs rdiff -u -r1.39 -r1.40 src/usr.bin/config/sem.c
cvs rdiff -u -r1.8 -r1.9 src/usr.bin/config/sem.h

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



CVS commit: src/gnu/dist/groff/contrib/mm

2012-03-11 Thread Iain Hibbert
Module Name:src
Committed By:   plunky
Date:   Sun Mar 11 08:44:45 UTC 2012

Modified Files:
src/gnu/dist/groff/contrib/mm: groff_mmse.man

Log Message:
use character escapes for non-ASCII chars, according to mandoc_char(7)


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.1 -r1.2 src/gnu/dist/groff/contrib/mm/groff_mmse.man

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



CVS commit: src/gnu/dist/groff/contrib/mm

2012-03-11 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Sun Mar 11 10:21:25 UTC 2012

Modified Files:
src/gnu/dist/groff/contrib/mm: groff_mmse.man

Log Message:
Fix typo, now this has a NAME section.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/gnu/dist/groff/contrib/mm/groff_mmse.man

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



CVS commit: src/usr.bin/du

2012-03-11 Thread Sergey Svishchev
Module Name:src
Committed By:   shattered
Date:   Sun Mar 11 11:23:20 UTC 2012

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

Log Message:
PR/22405 -- extend du(1) to report inode usage.  Patch provided by
Jonathan Perkin.

OK by wiz@


To generate a diff of this commit:
cvs rdiff -u -r1.21 -r1.22 src/usr.bin/du/du.1
cvs rdiff -u -r1.35 -r1.36 src/usr.bin/du/du.c

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



CVS commit: src/sys/rump/dev/lib/libpud

2012-03-11 Thread Andreas Gustafsson
Module Name:src
Committed By:   gson
Date:   Sun Mar 11 13:14:04 UTC 2012

Modified Files:
src/sys/rump/dev/lib/libpud: component.c

Log Message:
Fix obvious cut-and-paste-o in error message string


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/sys/rump/dev/lib/libpud/component.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/pci

2012-03-11 Thread NONAKA Kimihiro
Module Name:src
Committed By:   nonaka
Date:   Sun Mar 11 13:57:31 UTC 2012

Modified Files:
src/sys/dev/pci: lynxfb.c

Log Message:
path correct device to wsdisplayio_busid_pci().


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/sys/dev/pci/lynxfb.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/pci

2012-03-11 Thread NONAKA Kimihiro
Module Name:src
Committed By:   nonaka
Date:   Sun Mar 11 15:58:56 UTC 2012

Modified Files:
src/sys/dev/pci: lynxfb.c lynxfbreg.h

Log Message:
fix mmaped offset.
X works on Yeeloong Notebook now.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/sys/dev/pci/lynxfb.c
cvs rdiff -u -r1.1 -r1.2 src/sys/dev/pci/lynxfbreg.h

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



CVS commit: src/sys/arch/xen/x86

2012-03-11 Thread Jean-Yves Migeon
Module Name:src
Committed By:   jym
Date:   Sun Mar 11 16:16:44 UTC 2012

Modified Files:
src/sys/arch/xen/x86: cpu.c

Log Message:
Typo fix.


To generate a diff of this commit:
cvs rdiff -u -r1.89 -r1.90 src/sys/arch/xen/x86/cpu.c

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



CVS commit: src/sys/arch/x86/include

2012-03-11 Thread Jean-Yves Migeon
Module Name:src
Committed By:   jym
Date:   Sun Mar 11 16:28:02 UTC 2012

Modified Files:
src/sys/arch/x86/include: pmap.h

Log Message:
Alternate PTEs got killed a few weeks ago. Clean up unused prototypes.


To generate a diff of this commit:
cvs rdiff -u -r1.50 -r1.51 src/sys/arch/x86/include/pmap.h

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



CVS commit: src/sys/arch/xen/x86

2012-03-11 Thread Jean-Yves Migeon
Module Name:src
Committed By:   jym
Date:   Sun Mar 11 17:14:30 UTC 2012

Modified Files:
src/sys/arch/xen/x86: xen_pmap.c

Log Message:
Split the map/unmap code from the sync/flush code: move xpq_flush_queue()
calls after pmap_{,un}map_recursive_entries() so that pmap's handlers
handle the flush themselves.

Now pmap_{,un}map_recursive_entries() do what their names imply, nothing more.

Fix pmap_xen_suspend()'s comment: APDPs are now gone.

pmap's handlers are called deep during kernel save/restore. We already
are at IPL_VM + kpreemption disabled. No need to wrap the xpq_flush_queue()
with splvm/splx.


To generate a diff of this commit:
cvs rdiff -u -r1.19 -r1.20 src/sys/arch/xen/x86/xen_pmap.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

2012-03-11 Thread Havard Eidnes
Module Name:src
Committed By:   he
Date:   Sun Mar 11 17:23:55 UTC 2012

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

Log Message:
Can't use Bourne shell syntax here... (Even in comments, for PKG_PATH.)


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

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



CVS commit: src/etc/root

2012-03-11 Thread Havard Eidnes
Module Name:src
Committed By:   he
Date:   Sun Mar 11 17:28:47 UTC 2012

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

Log Message:
Point first to 6.0 packages, then to packages for 5.1 or 5.0.
The latter have reduced usefullness in -current or netbsd-6 until
we have a compat50 package.


To generate a diff of this commit:
cvs rdiff -u -r1.23 -r1.24 src/etc/root/dot.cshrc
cvs rdiff -u -r1.25 -r1.26 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/sys/net/npf

2012-03-11 Thread Mindaugas Rasiukevicius
Module Name:src
Committed By:   rmind
Date:   Sun Mar 11 18:27:59 UTC 2012

Modified Files:
src/sys/net/npf: npf.c npf.h npf_ctl.c npf_handler.c npf_impl.h
npf_nat.c npf_session.c

Log Message:
- Save active config in proplib dictionary; add GETCONF ioctl to retrieve.
- Few fixes.  Improve some comments.


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/sys/net/npf/npf.c
cvs rdiff -u -r1.14 -r1.15 src/sys/net/npf/npf.h \
src/sys/net/npf/npf_handler.c
cvs rdiff -u -r1.13 -r1.14 src/sys/net/npf/npf_ctl.c
cvs rdiff -u -r1.11 -r1.12 src/sys/net/npf/npf_impl.h \
src/sys/net/npf/npf_nat.c src/sys/net/npf/npf_session.c

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



CVS commit: src/tests/usr.bin/awk

2012-03-11 Thread Jukka Ruohonen
Module Name:src
Committed By:   jruoho
Date:   Sun Mar 11 18:36:01 UTC 2012

Modified Files:
src/tests/usr.bin/awk: Makefile t_awk.sh
Added Files:
src/tests/usr.bin/awk: d_assign_NF.awk d_assign_NF.in d_assign_NF.out
d_big_regexp.awk d_big_regexp.in d_big_regexp.out d_end1.awk
d_end1.in d_end1.out d_end2.awk d_end2.in d_end2.out d_period.awk
d_period.in d_period.out d_string1.awk d_string1.out d_tolower.awk
d_tolower.in d_tolower.out d_toupper.awk d_toupper.in d_toupper.out

Log Message:
Move the existing tests from util/awk to usr.bin/awk.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/tests/usr.bin/awk/Makefile
cvs rdiff -u -r0 -r1.1 src/tests/usr.bin/awk/d_assign_NF.awk \
src/tests/usr.bin/awk/d_assign_NF.in \
src/tests/usr.bin/awk/d_assign_NF.out \
src/tests/usr.bin/awk/d_big_regexp.awk \
src/tests/usr.bin/awk/d_big_regexp.in \
src/tests/usr.bin/awk/d_big_regexp.out src/tests/usr.bin/awk/d_end1.awk \
src/tests/usr.bin/awk/d_end1.in src/tests/usr.bin/awk/d_end1.out \
src/tests/usr.bin/awk/d_end2.awk src/tests/usr.bin/awk/d_end2.in \
src/tests/usr.bin/awk/d_end2.out src/tests/usr.bin/awk/d_period.awk \
src/tests/usr.bin/awk/d_period.in src/tests/usr.bin/awk/d_period.out \
src/tests/usr.bin/awk/d_string1.awk src/tests/usr.bin/awk/d_string1.out \
src/tests/usr.bin/awk/d_tolower.awk src/tests/usr.bin/awk/d_tolower.in \
src/tests/usr.bin/awk/d_tolower.out src/tests/usr.bin/awk/d_toupper.awk \
src/tests/usr.bin/awk/d_toupper.in src/tests/usr.bin/awk/d_toupper.out
cvs rdiff -u -r1.2 -r1.3 src/tests/usr.bin/awk/t_awk.sh

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



CVS commit: src/tests/util/awk

2012-03-11 Thread Jukka Ruohonen
Module Name:src
Committed By:   jruoho
Date:   Sun Mar 11 18:38:18 UTC 2012

Removed Files:
src/tests/util/awk: Makefile d_assign_NF.awk d_assign_NF.in
d_assign_NF.out d_big_regexp.awk d_big_regexp.in d_big_regexp.out
d_end1.awk d_end1.in d_end1.out d_end2.awk d_end2.in d_end2.out
d_period.awk d_period.in d_period.out d_string1.awk d_string1.out
d_tolower.awk d_tolower.in d_tolower.out d_toupper.awk d_toupper.in
d_toupper.out t_awk.sh

Log Message:
Deprecate tests/util/awk.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r0 src/tests/util/awk/Makefile
cvs rdiff -u -r1.1 -r0 src/tests/util/awk/d_assign_NF.awk \
src/tests/util/awk/d_assign_NF.in src/tests/util/awk/d_assign_NF.out \
src/tests/util/awk/d_big_regexp.awk src/tests/util/awk/d_big_regexp.in \
src/tests/util/awk/d_big_regexp.out src/tests/util/awk/d_end1.awk \
src/tests/util/awk/d_end1.in src/tests/util/awk/d_end1.out \
src/tests/util/awk/d_end2.awk src/tests/util/awk/d_end2.in \
src/tests/util/awk/d_end2.out src/tests/util/awk/d_period.awk \
src/tests/util/awk/d_period.in src/tests/util/awk/d_period.out \
src/tests/util/awk/d_string1.awk src/tests/util/awk/d_string1.out \
src/tests/util/awk/d_tolower.awk src/tests/util/awk/d_tolower.in \
src/tests/util/awk/d_tolower.out src/tests/util/awk/d_toupper.awk \
src/tests/util/awk/d_toupper.in src/tests/util/awk/d_toupper.out
cvs rdiff -u -r1.7 -r0 src/tests/util/awk/t_awk.sh

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



CVS commit: src

2012-03-11 Thread Jukka Ruohonen
Module Name:src
Committed By:   jruoho
Date:   Sun Mar 11 18:45:19 UTC 2012

Modified Files:
src/distrib/sets/lists/tests: mi
src/etc/mtree: NetBSD.dist.tests

Log Message:
Adjust set lists and mtree.


To generate a diff of this commit:
cvs rdiff -u -r1.440 -r1.441 src/distrib/sets/lists/tests/mi
cvs rdiff -u -r1.61 -r1.62 src/etc/mtree/NetBSD.dist.tests

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



CVS commit: src/external/bsd/libevent/dist/test

2012-03-11 Thread Jukka Ruohonen
Module Name:src
Committed By:   jruoho
Date:   Sun Mar 11 19:03:34 UTC 2012

Modified Files:
src/external/bsd/libevent/dist/test: regress.c

Log Message:
Skip the simple timeout test. This test case is known to fail rather
consistently when run in emulated environments such as Qemu.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/external/bsd/libevent/dist/test/regress.c

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



CVS commit: src/usr.bin/config

2012-03-11 Thread David A. Holland
Module Name:src
Committed By:   dholland
Date:   Sun Mar 11 19:27:27 UTC 2012

Modified Files:
src/usr.bin/config: gram.y

Log Message:
More naming improvements.


To generate a diff of this commit:
cvs rdiff -u -r1.34 -r1.35 src/usr.bin/config/gram.y

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



CVS commit: src/tests/modules

2012-03-11 Thread Jukka Ruohonen
Module Name:src
Committed By:   jruoho
Date:   Sun Mar 11 19:33:17 UTC 2012

Modified Files:
src/tests/modules: t_modctl.c

Log Message:
Skip the tests even if modctl(2) does not fail specifically with ENOSYS.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/tests/modules/t_modctl.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/pci/hdaudio

2012-03-11 Thread Lars Heidieker
Module Name:src
Committed By:   para
Date:   Sun Mar 11 19:39:36 UTC 2012

Modified Files:
src/sys/dev/pci/hdaudio: hdafg.c

Log Message:
call kmem_free with the right address in hdafg_detach for sc_widgets
the former code let to memory corruption


To generate a diff of this commit:
cvs rdiff -u -r1.15 -r1.16 src/sys/dev/pci/hdaudio/hdafg.c

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



CVS commit: src/usr.bin/config

2012-03-11 Thread David A. Holland
Module Name:src
Committed By:   dholland
Date:   Sun Mar 11 20:02:55 UTC 2012

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

Log Message:
Add some organizational comments


To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.12 src/usr.bin/config/util.c

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



CVS commit: src/lib/libedit

2012-03-11 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Mar 11 21:14:56 UTC 2012

Modified Files:
src/lib/libedit: el.c

Log Message:
use arraycount


To generate a diff of this commit:
cvs rdiff -u -r1.69 -r1.70 src/lib/libedit/el.c

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



CVS commit: src/lib/libedit

2012-03-11 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Mar 11 21:15:25 UTC 2012

Modified Files:
src/lib/libedit: eln.c

Log Message:
include the NULL in the argv conversion


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 src/lib/libedit/eln.c

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



CVS commit: src/usr.bin/config

2012-03-11 Thread David A. Holland
Module Name:src
Committed By:   dholland
Date:   Sun Mar 11 21:16:08 UTC 2012

Modified Files:
src/usr.bin/config: defs.h gram.y lint.c mkheaders.c mkioconf.c sem.c
sem.h util.c

Log Message:
Move locator lists to their own data structure. This can use more tidying;
it is not clear to me at the moment what the string and num values
pushed around in locator lists are supposed to actually mean.


To generate a diff of this commit:
cvs rdiff -u -r1.39 -r1.40 src/usr.bin/config/defs.h
cvs rdiff -u -r1.35 -r1.36 src/usr.bin/config/gram.y
cvs rdiff -u -r1.9 -r1.10 src/usr.bin/config/lint.c src/usr.bin/config/sem.h
cvs rdiff -u -r1.18 -r1.19 src/usr.bin/config/mkheaders.c
cvs rdiff -u -r1.20 -r1.21 src/usr.bin/config/mkioconf.c
cvs rdiff -u -r1.40 -r1.41 src/usr.bin/config/sem.c
cvs rdiff -u -r1.12 -r1.13 src/usr.bin/config/util.c

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



CVS commit: src/tests/util

2012-03-11 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sun Mar 11 22:19:53 UTC 2012

Modified Files:
src/tests/util: Makefile

Log Message:
Temporarily remove awk subdir, untill jruoho sorts out the recent commits
to the proper dir.


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/tests/util/Makefile

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



CVS commit: src/sys/dev/pci

2012-03-11 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Sun Mar 11 22:46:22 UTC 2012

Modified Files:
src/sys/dev/pci: alipm.c

Log Message:
Since there are no RW_READERs for the device's rw_lock, convert it to a
mutex and reduce the overhead.

Also, even if we're polling, we need to use the lock to control access to
the bus, otherwise we get anomolous results.

(These same changes were made several weeks ago to other drivers;  I
missed this one.)


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/sys/dev/pci/alipm.c

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



CVS commit: src/distrib/sets/lists/tests

2012-03-11 Thread Nicolas Joly
Module Name:src
Committed By:   njoly
Date:   Sun Mar 11 23:10:44 UTC 2012

Modified Files:
src/distrib/sets/lists/tests: mi

Log Message:
Small typo.


To generate a diff of this commit:
cvs rdiff -u -r1.441 -r1.442 src/distrib/sets/lists/tests/mi

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



CVS commit: src/tests/lib/libc/sys

2012-03-11 Thread Nicolas Joly
Module Name:src
Committed By:   njoly
Date:   Sun Mar 11 23:26:22 UTC 2012

Modified Files:
src/tests/lib/libc/sys: t_setrlimit.c

Log Message:
Use ATF_CHECK_ERRNO in setrlimit_perm().


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/tests/lib/libc/sys/t_setrlimit.c

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



CVS commit: src/sbin/sysctl

2012-03-11 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Mar 11 23:33:00 UTC 2012

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

Log Message:
PR/44961: Jukka Ruohonen: for sysctl's with built-in handlers, return OPNOTSUPP
if we don't have handlers instead of using the handler we have and silently
failing on attempts to write a node that cannot be written.


To generate a diff of this commit:
cvs rdiff -u -r1.140 -r1.141 src/sbin/sysctl/sysctl.c

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



CVS commit: src/share/man

2012-03-11 Thread Nicolas Joly
Module Name:src
Committed By:   njoly
Date:   Sun Mar 11 23:42:07 UTC 2012

Modified Files:
src/share/man/man5: mk.conf.5
src/share/man/man7: tests.7
src/share/man/man8: afterboot.8 diskless.8
src/share/man/man8/man8.macppc: ofwboot.8
src/share/man/man8/man8.sparc64: boot.8
src/share/man/man9: kauth.9

Log Message:
Use Lk macro instead of Pa when dealing with URLs, to produce links
with HTML output. And while here update some dead URL links.
First part of PR/29238.


To generate a diff of this commit:
cvs rdiff -u -r1.58 -r1.59 src/share/man/man5/mk.conf.5
cvs rdiff -u -r1.8 -r1.9 src/share/man/man7/tests.7
cvs rdiff -u -r1.47 -r1.48 src/share/man/man8/afterboot.8
cvs rdiff -u -r1.29 -r1.30 src/share/man/man8/diskless.8
cvs rdiff -u -r1.9 -r1.10 src/share/man/man8/man8.macppc/ofwboot.8
cvs rdiff -u -r1.16 -r1.17 src/share/man/man8/man8.sparc64/boot.8
cvs rdiff -u -r1.96 -r1.97 src/share/man/man9/kauth.9

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



CVS commit: src/usr.bin/config

2012-03-11 Thread David A. Holland
Module Name:src
Committed By:   dholland
Date:   Mon Mar 12 00:20:30 UTC 2012

Modified Files:
src/usr.bin/config: defs.h hash.c lint.c main.c mkheaders.c

Log Message:
Introduce type-safe wrappers around the hash tables. Use them for a
selected set of tables affected by the next nvlist cleanup in the
works.


To generate a diff of this commit:
cvs rdiff -u -r1.40 -r1.41 src/usr.bin/config/defs.h
cvs rdiff -u -r1.6 -r1.7 src/usr.bin/config/hash.c
cvs rdiff -u -r1.10 -r1.11 src/usr.bin/config/lint.c
cvs rdiff -u -r1.45 -r1.46 src/usr.bin/config/main.c
cvs rdiff -u -r1.19 -r1.20 src/usr.bin/config/mkheaders.c

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



CVS commit: src/external/bsd/libevent/dist/test

2012-03-11 Thread John Nemeth
Module Name:src
Committed By:   jnemeth
Date:   Mon Mar 12 02:18:50 UTC 2012

Modified Files:
src/external/bsd/libevent/dist/test: regress.c

Log Message:
Fix build failure caused by previous change.  Hi jruoho!


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/external/bsd/libevent/dist/test/regress.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

2012-03-11 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Mon Mar 12 02:44:17 UTC 2012

Modified Files:
src/sys/dev/scsipi: scsiconf.c
src/sys/dev/usb: uhub.c

Log Message:
take the kernel lock a few more places when doing detach, to avoid
triggering KERNEL_LOCK_P() asserts in both scsi and usb code.

with this and other recent fixes i can now drvctl -d ehci0.


To generate a diff of this commit:
cvs rdiff -u -r1.263 -r1.264 src/sys/dev/scsipi/scsiconf.c
cvs rdiff -u -r1.116 -r1.117 src/sys/dev/usb/uhub.c

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



CVS commit: src/usr.bin/config

2012-03-11 Thread David A. Holland
Module Name:src
Committed By:   dholland
Date:   Mon Mar 12 02:58:55 UTC 2012

Modified Files:
src/usr.bin/config: defs.h gram.y hash.c lint.c main.c mkheaders.c
util.c

Log Message:
Give option definitions their own data structure instead of using nvlists.
(and using messy hacks to make up for nvlists not holding quite the right
things)


To generate a diff of this commit:
cvs rdiff -u -r1.41 -r1.42 src/usr.bin/config/defs.h
cvs rdiff -u -r1.36 -r1.37 src/usr.bin/config/gram.y
cvs rdiff -u -r1.7 -r1.8 src/usr.bin/config/hash.c
cvs rdiff -u -r1.11 -r1.12 src/usr.bin/config/lint.c
cvs rdiff -u -r1.46 -r1.47 src/usr.bin/config/main.c
cvs rdiff -u -r1.20 -r1.21 src/usr.bin/config/mkheaders.c
cvs rdiff -u -r1.13 -r1.14 src/usr.bin/config/util.c

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



CVS commit: src/usr.bin/config

2012-03-11 Thread David A. Holland
Module Name:src
Committed By:   dholland
Date:   Mon Mar 12 03:04:56 UTC 2012

Modified Files:
src/usr.bin/config: defs.h lint.c

Log Message:
Remove the NV_OBSOLETE flag, which is no longer needed. While here,
update an outdated comment about condition expressions.


To generate a diff of this commit:
cvs rdiff -u -r1.42 -r1.43 src/usr.bin/config/defs.h
cvs rdiff -u -r1.12 -r1.13 src/usr.bin/config/lint.c

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



CVS commit: [jmcneill-usbmp] src/sys/dev/ic

2012-03-11 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Mon Mar 12 04:11:34 UTC 2012

Modified Files:
src/sys/dev/ic [jmcneill-usbmp]: sl811hs.c

Log Message:
fix a comment


To generate a diff of this commit:
cvs rdiff -u -r1.31.2.3 -r1.31.2.4 src/sys/dev/ic/sl811hs.c

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



CVS commit: [jmcneill-usbmp] src/sys/dev/scsipi

2012-03-11 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Mon Mar 12 04:11:56 UTC 2012

Modified Files:
src/sys/dev/scsipi [jmcneill-usbmp]: scsiconf.c

Log Message:
merge scsiconf.c 1.264.


To generate a diff of this commit:
cvs rdiff -u -r1.262 -r1.262.8.1 src/sys/dev/scsipi/scsiconf.c

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