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

2010-12-15 Thread Christoph Egger
Module Name:src
Committed By:   cegger
Date:   Thu Dec 16 07:59:10 UTC 2010

Modified Files:
src/sys/arch/i386/xbox: xboxfb.c

Log Message:
ioctl: KNF switch-case


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 src/sys/arch/i386/xbox/xboxfb.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/i386/xbox/xboxfb.c
diff -u src/sys/arch/i386/xbox/xboxfb.c:1.13 src/sys/arch/i386/xbox/xboxfb.c:1.14
--- src/sys/arch/i386/xbox/xboxfb.c:1.13	Wed Apr 28 19:17:04 2010
+++ src/sys/arch/i386/xbox/xboxfb.c	Thu Dec 16 07:59:10 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: xboxfb.c,v 1.13 2010/04/28 19:17:04 dyoung Exp $	*/
+/*	$NetBSD: xboxfb.c,v 1.14 2010/12/16 07:59:10 cegger Exp $	*/
 
 /*
  * Copyright (c) 2007 Jared D. McNeill 
@@ -33,7 +33,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: xboxfb.c,v 1.13 2010/04/28 19:17:04 dyoung Exp $");
+__KERNEL_RCSID(0, "$NetBSD: xboxfb.c,v 1.14 2010/12/16 07:59:10 cegger Exp $");
 
 #include 
 #include 
@@ -244,40 +244,39 @@
 	struct vcons_screen *ms = vd->active;
 
 	switch (cmd) {
-		case WSDISPLAYIO_GTYPE:
-			*(u_int *)data = WSDISPLAY_TYPE_PCIMISC;
-			return 0;
-
-		case WSDISPLAYIO_GINFO:
-			wdf = (void *)data;
-			wdf->height = xboxfb_console_height;
-			wdf->width = xboxfb_console_width;
-			wdf->depth = ms->scr_ri.ri_depth;
-			wdf->cmsize = 256;
-			return 0;
-
-		case WSDISPLAYIO_GETCMAP:
-			return EINVAL;
-
-		case WSDISPLAYIO_PUTCMAP:
-			return EINVAL;
-
-		case WSDISPLAYIO_LINEBYTES:
-			*(u_int *)data = ms->scr_ri.ri_stride;
-			return 0;
-
-		case WSDISPLAYIO_SMODE:
-			{
-int new_mode = *(int *)data;
-if (new_mode != sc->sc_mode) {
-	sc->sc_mode = new_mode;
-	if (new_mode == WSDISPLAYIO_MODE_EMUL) {
-		xboxfb_clear_fb(sc);
-		vcons_redraw_screen(vd->active);
-	}
+	case WSDISPLAYIO_GTYPE:
+		*(u_int *)data = WSDISPLAY_TYPE_PCIMISC;
+		return 0;
+
+	case WSDISPLAYIO_GINFO:
+		wdf = (void *)data;
+		wdf->height = xboxfb_console_height;
+		wdf->width = xboxfb_console_width;
+		wdf->depth = ms->scr_ri.ri_depth;
+		wdf->cmsize = 256;
+		return 0;
+
+	case WSDISPLAYIO_GETCMAP:
+		return EINVAL;
+
+	case WSDISPLAYIO_PUTCMAP:
+		return EINVAL;
+
+	case WSDISPLAYIO_LINEBYTES:
+		*(u_int *)data = ms->scr_ri.ri_stride;
+		return 0;
+
+	case WSDISPLAYIO_SMODE: {
+			int new_mode = *(int *)data;
+			if (new_mode != sc->sc_mode) {
+sc->sc_mode = new_mode;
+if (new_mode == WSDISPLAYIO_MODE_EMUL) {
+	xboxfb_clear_fb(sc);
+	vcons_redraw_screen(vd->active);
 }
 			}
-			return 0;
+		}
+		return 0;
 	}
 	return EPASSTHROUGH;
 }



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

2010-12-15 Thread Christoph Egger
Module Name:src
Committed By:   cegger
Date:   Thu Dec 16 07:51:22 UTC 2010

Modified Files:
src/sys/arch/i386/conf: ALL

Log Message:
add PCI VGA drivers


To generate a diff of this commit:
cvs rdiff -u -r1.280 -r1.281 src/sys/arch/i386/conf/ALL

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

Modified files:

Index: src/sys/arch/i386/conf/ALL
diff -u src/sys/arch/i386/conf/ALL:1.280 src/sys/arch/i386/conf/ALL:1.281
--- src/sys/arch/i386/conf/ALL:1.280	Sat Nov 27 20:18:46 2010
+++ src/sys/arch/i386/conf/ALL	Thu Dec 16 07:51:21 2010
@@ -1,4 +1,4 @@
-# $NetBSD: ALL,v 1.280 2010/11/27 20:18:46 christos Exp $
+# $NetBSD: ALL,v 1.281 2010/12/16 07:51:21 cegger Exp $
 # From NetBSD: GENERIC,v 1.787 2006/10/01 18:37:54 bouyer Exp
 #
 # ALL machine description file
@@ -17,7 +17,7 @@
 
 options 	INCLUDE_CONFIG_FILE	# embed config file in kernel binary
 
-#ident 		"ALL-$Revision: 1.280 $"
+#ident 		"ALL-$Revision: 1.281 $"
 
 maxusers	64		# estimated number of users
 
@@ -576,8 +576,16 @@
 wskbd*		at pckbd? console ?
 wsmouse*	at pms? mux 0
 
-# VIA Unichrome framebuffer console
-unichromefb*	at pci? dev ? function ?
+chipsfb*	at pci? dev ? function ?
+genfb*		at pci? dev ? function ?
+machfb*		at pci? dev ? function ?
+pm2fb*		at pci? dev ? function ?
+r128fb*		at pci? dev ? function ?
+radeonfb*	at pci? dev ? function ?
+unichromefb*	at pci? dev ? function ?  # VIA Unichrome framebuffer console
+voodoofb*	at pci? dev ? function ?
+voyagerfb*	at pci? dev ? function ?
+wcfb*	at pci? dev ? function ?
 wsdisplay*	at unichromefb?
 
 # XBOX framebuffer console



CVS commit: src/sys/dev/pci

2010-12-15 Thread Christoph Egger
Module Name:src
Committed By:   cegger
Date:   Thu Dec 16 07:02:07 UTC 2010

Modified Files:
src/sys/dev/pci: pcidevs

Log Message:
Brdige -> Bridge


To generate a diff of this commit:
cvs rdiff -u -r1.1053 -r1.1054 src/sys/dev/pci/pcidevs

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/pcidevs
diff -u src/sys/dev/pci/pcidevs:1.1053 src/sys/dev/pci/pcidevs:1.1054
--- src/sys/dev/pci/pcidevs:1.1053	Sat Dec 11 17:45:38 2010
+++ src/sys/dev/pci/pcidevs	Thu Dec 16 07:02:07 2010
@@ -1,4 +1,4 @@
-$NetBSD: pcidevs,v 1.1053 2010/12/11 17:45:38 matt Exp $
+$NetBSD: pcidevs,v 1.1054 2010/12/16 07:02:07 cegger Exp $
 
 /*
  * Copyright (c) 1995, 1996 Christopher G. Demetriou
@@ -990,7 +990,7 @@
 product AMD RS780_PPB_GFX	0x9602	RS780 PCI-PCI Bridge (int gfx)
 product AMD RS780_PPB_GFX0	0x9603	RS780 PCI-PCI Bridge (ext gfx port 0)
 product AMD RS780_PPB0		0x9604	RS780 PCI-PCIE Bridge (port 0)
-product AMD RS780_PPB1		0x9605	RS780 PCI-PCIE Brdige (port 1)
+product AMD RS780_PPB1		0x9605	RS780 PCI-PCIE Bridge (port 1)
 product AMD RS780_PPB2		0x9606	RS780 PCI-PCIE Bridge (port 2)
 
 /* American Megatrends products */



CVS commit: src/sys/dev/pci

2010-12-15 Thread Christoph Egger
Module Name:src
Committed By:   cegger
Date:   Thu Dec 16 06:45:51 UTC 2010

Modified Files:
src/sys/dev/pci: genfb_pci.c machfb.c pm2fb.c r128fb.c radeonfb.c
unichromefb.c vga_pci.c voodoofb.c voyagerfb.c wcfb.c

Log Message:
ioctl: KNF switch-case, remove useless brackets


To generate a diff of this commit:
cvs rdiff -u -r1.25 -r1.26 src/sys/dev/pci/genfb_pci.c
cvs rdiff -u -r1.61 -r1.62 src/sys/dev/pci/machfb.c
cvs rdiff -u -r1.5 -r1.6 src/sys/dev/pci/pm2fb.c
cvs rdiff -u -r1.16 -r1.17 src/sys/dev/pci/r128fb.c \
src/sys/dev/pci/unichromefb.c
cvs rdiff -u -r1.39 -r1.40 src/sys/dev/pci/radeonfb.c
cvs rdiff -u -r1.51 -r1.52 src/sys/dev/pci/vga_pci.c
cvs rdiff -u -r1.24 -r1.25 src/sys/dev/pci/voodoofb.c
cvs rdiff -u -r1.4 -r1.5 src/sys/dev/pci/voyagerfb.c
cvs rdiff -u -r1.6 -r1.7 src/sys/dev/pci/wcfb.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/genfb_pci.c
diff -u src/sys/dev/pci/genfb_pci.c:1.25 src/sys/dev/pci/genfb_pci.c:1.26
--- src/sys/dev/pci/genfb_pci.c:1.25	Thu Oct  7 07:53:54 2010
+++ src/sys/dev/pci/genfb_pci.c	Thu Dec 16 06:45:50 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: genfb_pci.c,v 1.25 2010/10/07 07:53:54 macallan Exp $ */
+/*	$NetBSD: genfb_pci.c,v 1.26 2010/12/16 06:45:50 cegger Exp $ */
 
 /*-
  * Copyright (c) 2007 Michael Lorenz
@@ -27,7 +27,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: genfb_pci.c,v 1.25 2010/10/07 07:53:54 macallan Exp $");
+__KERNEL_RCSID(0, "$NetBSD: genfb_pci.c,v 1.26 2010/12/16 06:45:50 cegger Exp $");
 
 #include 
 #include 
@@ -188,27 +188,26 @@
 	struct pci_genfb_softc *sc = v;
 
 	switch (cmd) {
-		case WSDISPLAYIO_GTYPE:
-			*(u_int *)data = WSDISPLAY_TYPE_PCIMISC;
-			return 0;
-
-		/* PCI config read/write passthrough. */
-		case PCI_IOC_CFGREAD:
-		case PCI_IOC_CFGWRITE:
-			return (pci_devioctl(sc->sc_pc, sc->sc_pcitag,
-			cmd, data, flag, l));
-		case WSDISPLAYIO_SMODE:
-			{
-int new_mode = *(int*)data, i;
-if (new_mode == WSDISPLAYIO_MODE_EMUL) {
-	for (i = 0; i < 9; i++)
-		pci_conf_write(sc->sc_pc,
-		 sc->sc_pcitag,
-		 0x10 + (i << 2),
-		 sc->sc_bars[i]);
-}
-			}
-			return 0;
+	case WSDISPLAYIO_GTYPE:
+		*(u_int *)data = WSDISPLAY_TYPE_PCIMISC;
+		return 0;
+
+	/* PCI config read/write passthrough. */
+	case PCI_IOC_CFGREAD:
+	case PCI_IOC_CFGWRITE:
+		return pci_devioctl(sc->sc_pc, sc->sc_pcitag,
+		cmd, data, flag, l);
+	case WSDISPLAYIO_SMODE: {
+		int new_mode = *(int*)data, i;
+		if (new_mode == WSDISPLAYIO_MODE_EMUL) {
+			for (i = 0; i < 9; i++)
+pci_conf_write(sc->sc_pc,
+ sc->sc_pcitag,
+ 0x10 + (i << 2),
+ sc->sc_bars[i]);
+		}
+		}
+		return 0;
 	}
 
 	return EPASSTHROUGH;

Index: src/sys/dev/pci/machfb.c
diff -u src/sys/dev/pci/machfb.c:1.61 src/sys/dev/pci/machfb.c:1.62
--- src/sys/dev/pci/machfb.c:1.61	Sat Oct  2 23:54:03 2010
+++ src/sys/dev/pci/machfb.c	Thu Dec 16 06:45:50 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: machfb.c,v 1.61 2010/10/02 23:54:03 macallan Exp $	*/
+/*	$NetBSD: machfb.c,v 1.62 2010/12/16 06:45:50 cegger Exp $	*/
 
 /*
  * Copyright (c) 2002 Bang Jun-Young
@@ -34,7 +34,7 @@
 
 #include 
 __KERNEL_RCSID(0, 
-	"$NetBSD: machfb.c,v 1.61 2010/10/02 23:54:03 macallan Exp $");
+	"$NetBSD: machfb.c,v 1.62 2010/12/16 06:45:50 cegger Exp $");
 
 #include 
 #include 
@@ -1679,58 +1679,55 @@
 	struct vcons_screen *ms = vd->active;
 	
 	switch (cmd) {
-		case WSDISPLAYIO_GTYPE:
-			/* XXX is this the right type to return? */
-			*(u_int *)data = WSDISPLAY_TYPE_PCIMISC;	
-			return 0;
-
-		case WSDISPLAYIO_LINEBYTES:
-			*(u_int *)data = sc->virt_x * sc->bits_per_pixel / 8;
-			return 0;
-
-		case WSDISPLAYIO_GINFO:
-			wdf = (void *)data;
-			wdf->height = sc->virt_y;
-			wdf->width = sc->virt_x;
-			wdf->depth = sc->bits_per_pixel;
-			wdf->cmsize = 256;
-			return 0;
-			
-		case WSDISPLAYIO_GETCMAP:
-			return mach64_getcmap(sc, 
-			(struct wsdisplay_cmap *)data);
-
-		case WSDISPLAYIO_PUTCMAP:
-			return mach64_putcmap(sc, 
-			(struct wsdisplay_cmap *)data);
-			
-		/* PCI config read/write passthrough. */
-		case PCI_IOC_CFGREAD:
-		case PCI_IOC_CFGWRITE:
-			return (pci_devioctl(sc->sc_pc, sc->sc_pcitag,
-			cmd, data, flag, l));
-			
-		case WSDISPLAYIO_SMODE:
-			{
-int new_mode = *(int*)data;
+	case WSDISPLAYIO_GTYPE:
+		/* XXX is this the right type to return? */
+		*(u_int *)data = WSDISPLAY_TYPE_PCIMISC;	
+		return 0;
 
-if (new_mode != sc->sc_mode)
-{
-	sc->sc_mode = new_mode;
-	if ((new_mode == WSDISPLAYIO_MODE_EMUL)
-	&& (ms != NULL))
-	{
-		/* restore initial video mode */
-		mach64_init(sc);
-		mach64_init_engine(sc);
-		mach64_init_lut(sc);
-		mach64_modeswitch(sc, sc->sc_my_mode);
-		vcons_redraw_screen(ms);
-	}
-}
+	case WSDISPLAYIO_LINEBYTES:
+		*(u_int *)data = sc->virt_x * sc->bits_per_pixel / 8;
+		retu

CVS commit: src/sys/dev/pci

2010-12-15 Thread Christoph Egger
Module Name:src
Committed By:   cegger
Date:   Thu Dec 16 06:19:01 UTC 2010

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

Log Message:
ioctl: KNF switch-case


To generate a diff of this commit:
cvs rdiff -u -r1.22 -r1.23 src/sys/dev/pci/chipsfb.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/chipsfb.c
diff -u src/sys/dev/pci/chipsfb.c:1.22 src/sys/dev/pci/chipsfb.c:1.23
--- src/sys/dev/pci/chipsfb.c:1.22	Sat Nov 13 13:52:05 2010
+++ src/sys/dev/pci/chipsfb.c	Thu Dec 16 06:19:01 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: chipsfb.c,v 1.22 2010/11/13 13:52:05 uebayasi Exp $	*/
+/*	$NetBSD: chipsfb.c,v 1.23 2010/12/16 06:19:01 cegger Exp $	*/
 
 /*
  * Copyright (c) 2006 Michael Lorenz
@@ -31,7 +31,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: chipsfb.c,v 1.22 2010/11/13 13:52:05 uebayasi Exp $");
+__KERNEL_RCSID(0, "$NetBSD: chipsfb.c,v 1.23 2010/12/16 06:19:01 cegger Exp $");
 
 #include 
 #include 
@@ -820,44 +820,43 @@
 	struct vcons_screen *ms = vd->active;
 
 	switch (cmd) {
-		case WSDISPLAYIO_GTYPE:
-			*(u_int *)data = WSDISPLAY_TYPE_PCIMISC;
-			return 0;
-
-		case WSDISPLAYIO_GINFO:
-			wdf = (void *)data;
-			wdf->height = ms->scr_ri.ri_height;
-			wdf->width = ms->scr_ri.ri_width;
-			wdf->depth = ms->scr_ri.ri_depth;
-			wdf->cmsize = 256;
-			return 0;
-
-		case WSDISPLAYIO_GETCMAP:
-			return chipsfb_getcmap(sc,
-			(struct wsdisplay_cmap *)data);
-
-		case WSDISPLAYIO_PUTCMAP:
-			return chipsfb_putcmap(sc,
-			(struct wsdisplay_cmap *)data);
-
-		/* PCI config read/write passthrough. */
-		case PCI_IOC_CFGREAD:
-		case PCI_IOC_CFGWRITE:
-			return (pci_devioctl(sc->sc_pc, sc->sc_pcitag,
-			cmd, data, flag, l));
-
-		case WSDISPLAYIO_SMODE:
-			{
-int new_mode = *(int*)data;
-if (new_mode != sc->sc_mode) {
-	sc->sc_mode = new_mode;
-	if(new_mode == WSDISPLAYIO_MODE_EMUL) {
-		chipsfb_restore_palette(sc);
-		vcons_redraw_screen(ms);
-	}
-}
+	case WSDISPLAYIO_GTYPE:
+		*(u_int *)data = WSDISPLAY_TYPE_PCIMISC;
+		return 0;
+
+	case WSDISPLAYIO_GINFO:
+		wdf = (void *)data;
+		wdf->height = ms->scr_ri.ri_height;
+		wdf->width = ms->scr_ri.ri_width;
+		wdf->depth = ms->scr_ri.ri_depth;
+		wdf->cmsize = 256;
+		return 0;
+
+	case WSDISPLAYIO_GETCMAP:
+		return chipsfb_getcmap(sc,
+		(struct wsdisplay_cmap *)data);
+
+	case WSDISPLAYIO_PUTCMAP:
+		return chipsfb_putcmap(sc,
+		(struct wsdisplay_cmap *)data);
+
+	/* PCI config read/write passthrough. */
+	case PCI_IOC_CFGREAD:
+	case PCI_IOC_CFGWRITE:
+		return pci_devioctl(sc->sc_pc, sc->sc_pcitag,
+		cmd, data, flag, l);
+
+	case WSDISPLAYIO_SMODE: {
+		int new_mode = *(int*)data;
+		if (new_mode != sc->sc_mode) {
+			sc->sc_mode = new_mode;
+			if(new_mode == WSDISPLAYIO_MODE_EMUL) {
+chipsfb_restore_palette(sc);
+vcons_redraw_screen(ms);
 			}
-			return 0;
+		}
+		}
+		return 0;
 	}
 	return EPASSTHROUGH;
 }



CVS commit: src/usr.bin/stat

2010-12-15 Thread David A. Holland
Module Name:src
Committed By:   dholland
Date:   Thu Dec 16 05:42:15 UTC 2010

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

Log Message:
Don't pass unused argument. From Doug Barton.


To generate a diff of this commit:
cvs rdiff -u -r1.31 -r1.32 src/usr.bin/stat/stat.c

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

Modified files:

Index: src/usr.bin/stat/stat.c
diff -u src/usr.bin/stat/stat.c:1.31 src/usr.bin/stat/stat.c:1.32
--- src/usr.bin/stat/stat.c:1.31	Thu Dec 16 05:30:16 2010
+++ src/usr.bin/stat/stat.c	Thu Dec 16 05:42:14 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: stat.c,v 1.31 2010/12/16 05:30:16 dholland Exp $ */
+/*	$NetBSD: stat.c,v 1.32 2010/12/16 05:42:14 dholland Exp $ */
 
 /*
  * Copyright (c) 2002 The NetBSD Foundation, Inc.
@@ -35,7 +35,7 @@
 
 #include 
 #if !defined(lint)
-__RCSID("$NetBSD: stat.c,v 1.31 2010/12/16 05:30:16 dholland Exp $");
+__RCSID("$NetBSD: stat.c,v 1.32 2010/12/16 05:42:14 dholland Exp $");
 #endif
 
 #if ! HAVE_NBTOOL_CONFIG_H
@@ -176,7 +176,7 @@
 
 void	usage(const char *);
 void	output(const struct stat *, const char *,
-	const char *, int, int, int);
+	const char *, int, int);
 int	format1(const struct stat *,	/* stat info */
 	const char *,		/* the file name */
 	const char *, int,		/* the format string itself */
@@ -329,7 +329,7 @@
 usestat ? "stat" : "lstat");
 		}
 		else
-			output(&st, argv[0], statfmt, fn, nonl, quiet);
+			output(&st, argv[0], statfmt, fn, nonl);
 
 		argv++;
 		argc--;
@@ -352,7 +352,7 @@
  */
 void
 output(const struct stat *st, const char *file,
-const char *statfmt, int fn, int nonl, int quiet)
+const char *statfmt, int fn, int nonl)
 {
 	int flags, size, prec, ofmt, hilo, what;
 	char buf[PATH_MAX + 4 + 1];



CVS commit: src/usr.bin/stat

2010-12-15 Thread David A. Holland
Module Name:src
Committed By:   dholland
Date:   Thu Dec 16 05:30:16 UTC 2010

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

Log Message:
Use strlcpy, not strncpy, when the desired semantics are strlcpy's
rather than strncpy's.


To generate a diff of this commit:
cvs rdiff -u -r1.30 -r1.31 src/usr.bin/stat/stat.c

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

Modified files:

Index: src/usr.bin/stat/stat.c
diff -u src/usr.bin/stat/stat.c:1.30 src/usr.bin/stat/stat.c:1.31
--- src/usr.bin/stat/stat.c:1.30	Thu Nov 25 04:33:30 2010
+++ src/usr.bin/stat/stat.c	Thu Dec 16 05:30:16 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: stat.c,v 1.30 2010/11/25 04:33:30 dholland Exp $ */
+/*	$NetBSD: stat.c,v 1.31 2010/12/16 05:30:16 dholland Exp $ */
 
 /*
  * Copyright (c) 2002 The NetBSD Foundation, Inc.
@@ -35,7 +35,7 @@
 
 #include 
 #if !defined(lint)
-__RCSID("$NetBSD: stat.c,v 1.30 2010/11/25 04:33:30 dholland Exp $");
+__RCSID("$NetBSD: stat.c,v 1.31 2010/12/16 05:30:16 dholland Exp $");
 #endif
 
 #if ! HAVE_NBTOOL_CONFIG_H
@@ -788,7 +788,7 @@
 		small = 0;
 		data = 0;
 		if (file == NULL) {
-			(void)strncpy(path, "(stdin)", sizeof(path));
+			(void)strlcpy(path, "(stdin)", sizeof(path));
 			sdata = path;
 		} else {
 			snprintf(path, sizeof(path), " -> ");
@@ -881,15 +881,15 @@
 		small = 0;
 		data = 0;
 		if (file == NULL) {
-			(void)strncpy(path, "(stdin)", sizeof(path));
+			(void)strlcpy(path, "(stdin)", sizeof(path));
 			if (hilo == HIGH_PIECE || hilo == LOW_PIECE)
 hilo = 0;
 		}
 		else if (hilo == 0)
-			(void)strncpy(path, file, sizeof(path));
+			(void)strlcpy(path, file, sizeof(path));
 		else {
 			char *s;
-			(void)strncpy(path, file, sizeof(path));
+			(void)strlcpy(path, file, sizeof(path));
 			s = strrchr(path, '/');
 			if (s != NULL) {
 /* trim off trailing /'s */
@@ -900,7 +900,7 @@
 			}
 			if (hilo == HIGH_PIECE) {
 if (s == NULL)
-	(void)strncpy(path, ".", sizeof(path));
+	(void)strlcpy(path, ".", sizeof(path));
 else {
 	while (s != path && s[0] == '/')
 		*s-- = '\0';
@@ -909,7 +909,7 @@
 			}
 			else if (hilo == LOW_PIECE) {
 if (s != NULL && s[1] != '\0')
-	(void)strncpy(path, s + 1,
+	(void)strlcpy(path, s + 1,
 		  sizeof(path));
 hilo = 0;
 			}



CVS commit: src/doc

2010-12-15 Thread Masao Uebayashi
Module Name:src
Committed By:   uebayasi
Date:   Thu Dec 16 02:01:37 UTC 2010

Modified Files:
src/doc: BRANCHES

Log Message:
uebayasi-xip: Add a few files.


To generate a diff of this commit:
cvs rdiff -u -r1.300 -r1.301 src/doc/BRANCHES

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

Modified files:

Index: src/doc/BRANCHES
diff -u src/doc/BRANCHES:1.300 src/doc/BRANCHES:1.301
--- src/doc/BRANCHES:1.300	Mon Nov 15 14:40:36 2010
+++ src/doc/BRANCHES	Thu Dec 16 02:01:37 2010
@@ -1,4 +1,4 @@
-#	$NetBSD: BRANCHES,v 1.300 2010/11/15 14:40:36 uebayasi Exp $
+#	$NetBSD: BRANCHES,v 1.301 2010/12/16 02:01:37 uebayasi Exp $
 #
 # This file contains a list of branches that exist in the NetBSD CVS
 # tree and their current state.
@@ -1219,6 +1219,9 @@
 		src/sys/conf
 		src/sys/dev/flash.c
 		src/sys/dev/flashvar.h
+		src/sys/dev/md.c
+		src/sys/dev/md.h
+		src/sys/dev/md_root.c
 		src/sys/dev/xmd.c
 		src/sys/kern/vfs_syscalls.c
 		src/sys/miscfs/genfs/genfs_io.c



CVS commit: src/sys/arch/macppc/dev

2010-12-15 Thread Michael Lorenz
Module Name:src
Committed By:   macallan
Date:   Thu Dec 16 01:56:21 UTC 2010

Modified Files:
src/sys/arch/macppc/dev: if_wi_obio.c

Log Message:
finish device_t-ification, now it works again


To generate a diff of this commit:
cvs rdiff -u -r1.20 -r1.21 src/sys/arch/macppc/dev/if_wi_obio.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/macppc/dev/if_wi_obio.c
diff -u src/sys/arch/macppc/dev/if_wi_obio.c:1.20 src/sys/arch/macppc/dev/if_wi_obio.c:1.21
--- src/sys/arch/macppc/dev/if_wi_obio.c:1.20	Wed Dec  1 09:52:28 2010
+++ src/sys/arch/macppc/dev/if_wi_obio.c	Thu Dec 16 01:56:21 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_wi_obio.c,v 1.20 2010/12/01 09:52:28 he Exp $	*/
+/*	$NetBSD: if_wi_obio.c,v 1.21 2010/12/16 01:56:21 macallan Exp $	*/
 
 /*-
  * Copyright (c) 2001 Tsubai Masanari.  All rights reserved.
@@ -27,7 +27,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: if_wi_obio.c,v 1.20 2010/12/01 09:52:28 he Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_wi_obio.c,v 1.21 2010/12/16 01:56:21 macallan Exp $");
 
 #include "opt_inet.h"
 
@@ -63,11 +63,11 @@
 	bus_space_tag_t sc_tag;
 };
 
-CFATTACH_DECL(wi_obio, sizeof(struct wi_obio_softc),
+CFATTACH_DECL_NEW(wi_obio, sizeof(struct wi_obio_softc),
 wi_obio_match, wi_obio_attach, NULL, NULL);
 
 int
-wi_obio_match(struct device *parent, struct cfdata *match, void *aux)
+wi_obio_match(device_t parent, struct cfdata *match, void *aux)
 {
 	struct confargs *ca = aux;
 
@@ -85,15 +85,16 @@
 #define OBIO_WI_EXTINT	0x58
 
 void
-wi_obio_attach(struct device *parent, struct device *self, void *aux)
+wi_obio_attach(device_t parent, device_t self, void *aux)
 {
-	struct wi_obio_softc * const sc = (void *)self;
+	struct wi_obio_softc * const sc = device_private(self);
 	struct wi_softc * const wisc = &sc->sc_wi;
 	struct confargs * const ca = aux;
 
 	aprint_normal(" irq %d:", ca->ca_intr[0]);
 	intr_establish(ca->ca_intr[0], IST_LEVEL, IPL_NET, wi_intr, sc);
 
+	wisc->sc_dev = self;
 	sc->sc_tag = wisc->sc_iot = ca->ca_tag;
 
 	if (bus_space_map(wisc->sc_iot, ca->ca_baseaddr + ca->ca_reg[0],



CVS commit: src/sys/kern

2010-12-15 Thread Eduardo Horvath
Module Name:src
Committed By:   eeh
Date:   Thu Dec 16 00:42:22 UTC 2010

Modified Files:
src/sys/kern: init_main.c

Log Message:
ubc_init needs to run while we're still cold or uvmhist breaks.


To generate a diff of this commit:
cvs rdiff -u -r1.423 -r1.424 src/sys/kern/init_main.c

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

Modified files:

Index: src/sys/kern/init_main.c
diff -u src/sys/kern/init_main.c:1.423 src/sys/kern/init_main.c:1.424
--- src/sys/kern/init_main.c:1.423	Sat Aug 21 13:17:31 2010
+++ src/sys/kern/init_main.c	Thu Dec 16 00:42:22 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: init_main.c,v 1.423 2010/08/21 13:17:31 pgoyette Exp $	*/
+/*	$NetBSD: init_main.c,v 1.424 2010/12/16 00:42:22 eeh Exp $	*/
 
 /*-
  * Copyright (c) 2008, 2009 The NetBSD Foundation, Inc.
@@ -97,7 +97,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: init_main.c,v 1.423 2010/08/21 13:17:31 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: init_main.c,v 1.424 2010/12/16 00:42:22 eeh Exp $");
 
 #include "opt_ddb.h"
 #include "opt_ipsec.h"
@@ -502,12 +502,12 @@
 
 	ssp_init();
 
+	ubc_init();		/* must be after autoconfig */
+
 	configure2();
 	/* Now timer is working.  Enable preemption. */
 	kpreempt_enable();
 
-	ubc_init();		/* must be after autoconfig */
-
 #ifdef SYSVSHM
 	/* Initialize System V style shared memory. */
 	shminit();



CVS commit: src/sys/dev/usb

2010-12-15 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Wed Dec 15 23:48:15 UTC 2010

Modified Files:
src/sys/dev/usb: ohci.c

Log Message:
Slighty tweak the interrupt debug printfs.


To generate a diff of this commit:
cvs rdiff -u -r1.210 -r1.211 src/sys/dev/usb/ohci.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/usb/ohci.c
diff -u src/sys/dev/usb/ohci.c:1.210 src/sys/dev/usb/ohci.c:1.211
--- src/sys/dev/usb/ohci.c:1.210	Sat Nov 13 13:52:12 2010
+++ src/sys/dev/usb/ohci.c	Wed Dec 15 23:48:15 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: ohci.c,v 1.210 2010/11/13 13:52:12 uebayasi Exp $	*/
+/*	$NetBSD: ohci.c,v 1.211 2010/12/15 23:48:15 matt Exp $	*/
 /*	$FreeBSD: src/sys/dev/usb/ohci.c,v 1.22 1999/11/17 22:33:40 n_hibma Exp $	*/
 
 /*
@@ -41,7 +41,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: ohci.c,v 1.210 2010/11/13 13:52:12 uebayasi Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ohci.c,v 1.211 2010/12/15 23:48:15 matt Exp $");
 
 #include 
 #include 
@@ -897,7 +897,7 @@
 	sc->sc_control = sc->sc_intre = 0;
 
 	/* Finally, turn on interrupts. */
-	DPRINTFN(1,("ohci_init: enabling\n"));
+	DPRINTFN(1,("ohci_init: enabling %#x\n", sc->sc_eintrs | OHCI_MIE));
 	OWRITE4(sc, OHCI_INTERRUPT_ENABLE, sc->sc_eintrs | OHCI_MIE);
 
 	return (USBD_NORMAL_COMPLETION);
@@ -1145,15 +1145,17 @@
 
 	OWRITE4(sc, OHCI_INTERRUPT_STATUS, intrs & ~(OHCI_MIE|OHCI_WDH)); /* Acknowledge */
 	eintrs = intrs & sc->sc_eintrs;
-	if (!eintrs)
+	DPRINTFN(7, ("ohci_intr: sc=%p intrs=%#x(%#x) eintrs=%#x(%#x)\n",
+		 sc, (u_int)intrs, OREAD4(sc, OHCI_INTERRUPT_STATUS),
+		 (u_int)eintrs, sc->sc_eintrs));
+
+	if (!eintrs) {
+		OWRITE4(sc, OHCI_INTERRUPT_DISABLE, OHCI_MIE); /* Disable */
 		return (0);
+	}
 
 	sc->sc_bus.intr_context++;
 	sc->sc_bus.no_intrs++;
-	DPRINTFN(7, ("ohci_intr: sc=%p intrs=0x%x(0x%x) eintrs=0x%x\n",
-		 sc, (u_int)intrs, OREAD4(sc, OHCI_INTERRUPT_STATUS),
-		 (u_int)eintrs));
-
 	if (eintrs & OHCI_SO) {
 		sc->sc_overrun_cnt++;
 		if (usbd_ratecheck(&sc->sc_overrun_ntc)) {



CVS commit: src/sys/dev/usb

2010-12-15 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Wed Dec 15 23:43:02 UTC 2010

Modified Files:
src/sys/dev/usb: usb_mem.c

Log Message:
Fix typo (damn :q! in vi allow the commit to proceed).


To generate a diff of this commit:
cvs rdiff -u -r1.41 -r1.42 src/sys/dev/usb/usb_mem.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/usb/usb_mem.c
diff -u src/sys/dev/usb/usb_mem.c:1.41 src/sys/dev/usb/usb_mem.c:1.42
--- src/sys/dev/usb/usb_mem.c:1.41	Wed Dec 15 23:38:15 2010
+++ src/sys/dev/usb/usb_mem.c	Wed Dec 15 23:43:02 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: usb_mem.c,v 1.41 2010/12/15 23:38:15 matt Exp $	*/
+/*	$NetBSD: usb_mem.c,v 1.42 2010/12/15 23:43:02 matt Exp $	*/
 
 /*
  * Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -38,7 +38,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: usb_mem.c,v 1.41 2010/12/15 23:38:15 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: usb_mem.c,v 1.42 2010/12/15 23:43:02 matt Exp $");
 
 #include "opt_usb.h"
 
@@ -297,7 +297,7 @@
 #endif
 	f->block = p->block;
 	f->offs = p->offs;
-#if def USB_FRAG_DMA_WORKAROUND
+#ifdef USB_FRAG_DMA_WORKAROUND
 	f->offs -= USB_MEM_SMALL;
 #endif
 	s = splusb();



CVS commit: src/sys/dev/usb

2010-12-15 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Wed Dec 15 23:38:15 UTC 2010

Modified Files:
src/sys/dev/usb: files.usb usb_mem.c

Log Message:
Add a workaround (hopefully temporary) for corrupted usb fragments on powerpc.
With this in effect, USB is now usable on some powerpc platforms again.
Basically this prevents the DMA portion of the fragment ever overlapping the
usb_frag_hdr which is enough to solve the problem.  To enable this, add

options USB_FRAG_DMA_WORKAROUND

to your config file.
Switch from malloc to kmem.


To generate a diff of this commit:
cvs rdiff -u -r1.102 -r1.103 src/sys/dev/usb/files.usb
cvs rdiff -u -r1.40 -r1.41 src/sys/dev/usb/usb_mem.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/usb/files.usb
diff -u src/sys/dev/usb/files.usb:1.102 src/sys/dev/usb/files.usb:1.103
--- src/sys/dev/usb/files.usb:1.102	Wed Nov  3 19:59:34 2010
+++ src/sys/dev/usb/files.usb	Wed Dec 15 23:38:15 2010
@@ -1,10 +1,11 @@
-#	$NetBSD: files.usb,v 1.102 2010/11/03 19:59:34 christos Exp $
+#	$NetBSD: files.usb,v 1.103 2010/12/15 23:38:15 matt Exp $
 #
 # Config file and device description for machine-independent USB code.
 # Included by ports that need it.  Ports that use it must provide
 # their own "major" declarations for the appropriate devices.
 
 defflag	USBVERBOSE
+defflag	opt_usb.h	USB_FRAG_DMA_WORKAROUND
 
 defflag	opt_uvideo.h	UVIDEO_DEBUG
 

Index: src/sys/dev/usb/usb_mem.c
diff -u src/sys/dev/usb/usb_mem.c:1.40 src/sys/dev/usb/usb_mem.c:1.41
--- src/sys/dev/usb/usb_mem.c:1.40	Sat Nov 13 13:52:12 2010
+++ src/sys/dev/usb/usb_mem.c	Wed Dec 15 23:38:15 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: usb_mem.c,v 1.40 2010/11/13 13:52:12 uebayasi Exp $	*/
+/*	$NetBSD: usb_mem.c,v 1.41 2010/12/15 23:38:15 matt Exp $	*/
 
 /*
  * Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -38,15 +38,18 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: usb_mem.c,v 1.40 2010/11/13 13:52:12 uebayasi Exp $");
+__KERNEL_RCSID(0, "$NetBSD: usb_mem.c,v 1.41 2010/12/15 23:38:15 matt Exp $");
+
+#include "opt_usb.h"
 
 #include 
 #include 
 #include 
-#include 
+#include 
 #include 
 #include 		/* for usbdivar.h */
 #include 
+#include 
 
 #ifdef __NetBSD__
 #include 
@@ -108,7 +111,7 @@
 		 (u_long)size, (u_long)align));
 
 #ifdef DIAGNOSTIC
-	if (!curproc) {
+	if (cpu_intr_p()) {
 		printf("usb_block_allocmem: in interrupt context, size=%lu\n",
 		(unsigned long) size);
 	}
@@ -130,14 +133,14 @@
 	splx(s);
 
 #ifdef DIAGNOSTIC
-	if (!curproc) {
+	if (cpu_intr_p()) {
 		printf("usb_block_allocmem: in interrupt context, failed\n");
 		return (USBD_NOMEM);
 	}
 #endif
 
 	DPRINTFN(6, ("usb_block_allocmem: no free\n"));
-	p = malloc(sizeof *p, M_USB, M_NOWAIT);
+	p = kmem_zalloc(sizeof *p, KM_NOSLEEP);
 	if (p == NULL)
 		return (USBD_NOMEM);
 
@@ -166,6 +169,9 @@
 		goto destroy;
 
 	*dmap = p;
+#ifdef USB_FRAG_DMA_WORKAROUND
+	memset(p->kaddr, 0, p->size);
+#endif
 	return (USBD_NORMAL_COMPLETION);
 
  destroy:
@@ -175,7 +181,7 @@
  free1:
 	bus_dmamem_free(tag, p->segs, p->nsegs);
  free0:
-	free(p, M_USB);
+	kmem_free(p, sizeof(*p));
 	return (USBD_NOMEM);
 }
 
@@ -184,7 +190,7 @@
 usb_block_real_freemem(usb_dma_block_t *p)
 {
 #ifdef DIAGNOSTIC
-	if (!curproc) {
+	if (cpu_intr_p()) {
 		printf("usb_block_real_freemem: in interrupt context\n");
 		return;
 	}
@@ -193,7 +199,7 @@
 	bus_dmamap_destroy(p->tag, p->map);
 	bus_dmamem_unmap(p->tag, p->kaddr, p->size);
 	bus_dmamem_free(p->tag, p->segs, p->nsegs);
-	free(p, M_USB);
+	kmem_free(p, sizeof(*p));
 }
 #endif
 
@@ -238,9 +244,10 @@
 
 	s = splusb();
 	/* Check for free fragments. */
-	for (f = LIST_FIRST(&usb_frag_freelist); f; f = LIST_NEXT(f, next))
+	for (f = LIST_FIRST(&usb_frag_freelist); f; f = LIST_NEXT(f, next)) {
 		if (f->block->tag == tag)
 			break;
+	}
 	if (f == NULL) {
 		DPRINTFN(1, ("usb_allocmem: adding fragments\n"));
 		err = usb_block_allocmem(tag, USB_MEM_BLOCK, USB_MEM_SMALL,&b);
@@ -254,11 +261,17 @@
 			f->block = b;
 			f->offs = i;
 			LIST_INSERT_HEAD(&usb_frag_freelist, f, next);
+#ifdef USB_FRAG_DMA_WORKAROUND
+			i += 1 * USB_MEM_SMALL;
+#endif
 		}
 		f = LIST_FIRST(&usb_frag_freelist);
 	}
 	p->block = f->block;
 	p->offs = f->offs;
+#ifdef USB_FRAG_DMA_WORKAROUND
+	p->offs += USB_MEM_SMALL;
+#endif
 	p->block->flags &= ~USB_DMA_RESERVE;
 	LIST_REMOVE(f, next);
 	splx(s);
@@ -277,9 +290,16 @@
 		usb_block_freemem(p->block);
 		return;
 	}
+	//usb_syncmem(p, 0, USB_MEM_SMALL, BUS_DMASYNC_POSTREAD);
 	f = KERNADDR(p, 0);
+#ifdef USB_FRAG_DMA_WORKAROUND
+	f = (void *)((uintptr_t)f - USB_MEM_SMALL);
+#endif
 	f->block = p->block;
 	f->offs = p->offs;
+#if def USB_FRAG_DMA_WORKAROUND
+	f->offs -= USB_MEM_SMALL;
+#endif
 	s = splusb();
 	LIST_INSERT_HEAD(&usb_frag_freelist, f, next);
 	splx(s);
@@ -305,7 +325,7 @@
 	if (rs->vaddr == 0 || size > USB_MEM_RESERVE)
 		return USBD_NOMEM;
 
-	dma->block = malloc(sizeof *dma

CVS commit: src/usr.bin/make

2010-12-15 Thread Simon J. Gerraty
Module Name:src
Committed By:   sjg
Date:   Wed Dec 15 23:03:36 UTC 2010

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

Log Message:
Invalidate meta_fname when we finish a job, so that in compat
mode, we do not report a previous .meta file as being involved
in an error.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/usr.bin/make/meta.c

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

Modified files:

Index: src/usr.bin/make/meta.c
diff -u src/usr.bin/make/meta.c:1.5 src/usr.bin/make/meta.c:1.6
--- src/usr.bin/make/meta.c:1.5	Thu Dec  9 22:30:17 2010
+++ src/usr.bin/make/meta.c	Wed Dec 15 23:03:35 2010
@@ -574,7 +574,7 @@
 }
 getcwd(cwd, sizeof(cwd));
 Var_Set(".ERROR_CWD", cwd, VAR_GLOBAL, 0);
-if (pbm) {
+if (pbm && pbm->meta_fname[0]) {
 	Var_Set(".ERROR_META_FILE", pbm->meta_fname, VAR_GLOBAL, 0);
 }
 }
@@ -644,6 +644,7 @@
 	meta_cmd_finish(pbm);
 	fclose(pbm->mfp);
 	pbm->mfp = NULL;
+	pbm->meta_fname[0] = '\0';
 }
 }
 



CVS commit: src/external/cddl/osnet/dist/lib/libzpool/common

2010-12-15 Thread Adam Hamsik
Module Name:src
Committed By:   haad
Date:   Wed Dec 15 22:49:42 UTC 2010

Modified Files:
src/external/cddl/osnet/dist/lib/libzpool/common: taskq.c

Log Message:
Whitespace police.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 \
src/external/cddl/osnet/dist/lib/libzpool/common/taskq.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/cddl/osnet/dist/lib/libzpool/common/taskq.c
diff -u src/external/cddl/osnet/dist/lib/libzpool/common/taskq.c:1.2 src/external/cddl/osnet/dist/lib/libzpool/common/taskq.c:1.3
--- src/external/cddl/osnet/dist/lib/libzpool/common/taskq.c:1.2	Wed Dec 15 22:09:14 2010
+++ src/external/cddl/osnet/dist/lib/libzpool/common/taskq.c	Wed Dec 15 22:49:42 2010
@@ -76,7 +76,7 @@
 			 */
 			delay(hz);
 		}
-		
+
 		/* Clean up TQ_FRONT from tqflags before passing it to kmem */
 		t = kmem_alloc(sizeof (task_t),
 		tqflags & (KM_SLEEP | KM_NOSLEEP));



CVS commit: src/external/cddl/osnet/dist/lib/libzpool/common

2010-12-15 Thread Adam Hamsik
Module Name:src
Committed By:   haad
Date:   Wed Dec 15 22:09:14 UTC 2010

Modified Files:
src/external/cddl/osnet/dist/lib/libzpool/common: taskq.c

Log Message:
Only KM_SLEEP | KM_NOSLEEP can be passed down to kmem layer, clean up
tqflags from internal taskq flags (TQ_FRONT) before calling kmem_alloc.


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.2 -r1.2 \
src/external/cddl/osnet/dist/lib/libzpool/common/taskq.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/cddl/osnet/dist/lib/libzpool/common/taskq.c
diff -u src/external/cddl/osnet/dist/lib/libzpool/common/taskq.c:1.1.1.2 src/external/cddl/osnet/dist/lib/libzpool/common/taskq.c:1.2
--- src/external/cddl/osnet/dist/lib/libzpool/common/taskq.c:1.1.1.2	Sat Feb 27 22:30:30 2010
+++ src/external/cddl/osnet/dist/lib/libzpool/common/taskq.c	Wed Dec 15 22:09:14 2010
@@ -76,7 +76,10 @@
 			 */
 			delay(hz);
 		}
-		t = kmem_alloc(sizeof (task_t), tqflags);
+		
+		/* Clean up TQ_FRONT from tqflags before passing it to kmem */
+		t = kmem_alloc(sizeof (task_t),
+		tqflags & (KM_SLEEP | KM_NOSLEEP));
 		mutex_enter(&tq->tq_lock);
 		if (t != NULL)
 			tq->tq_nalloc++;



CVS commit: src/tests/dev/raidframe

2010-12-15 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Wed Dec 15 21:33:10 UTC 2010

Modified Files:
src/tests/dev/raidframe: Makefile

Log Message:
fix post-move testsdir.  duh


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/tests/dev/raidframe/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/dev/raidframe/Makefile
diff -u src/tests/dev/raidframe/Makefile:1.1 src/tests/dev/raidframe/Makefile:1.2
--- src/tests/dev/raidframe/Makefile:1.1	Wed Dec 15 20:40:18 2010
+++ src/tests/dev/raidframe/Makefile	Wed Dec 15 21:33:10 2010
@@ -1,7 +1,7 @@
-#	$NetBSD: Makefile,v 1.1 2010/12/15 20:40:18 pooka Exp $
+#	$NetBSD: Makefile,v 1.2 2010/12/15 21:33:10 pooka Exp $
 #
 
-TESTSDIR=	${TESTSBASE}/dev/raid
+TESTSDIR=	${TESTSBASE}/dev/raidframe
 
 TESTS_SH=	t_raid
 



CVS commit: src

2010-12-15 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Wed Dec 15 20:42:24 UTC 2010

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

Log Message:
goop for initial raidframe test


To generate a diff of this commit:
cvs rdiff -u -r1.178 -r1.179 src/distrib/sets/lists/tests/mi
cvs rdiff -u -r1.4 -r1.5 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.178 src/distrib/sets/lists/tests/mi:1.179
--- src/distrib/sets/lists/tests/mi:1.178	Wed Dec 15 10:42:56 2010
+++ src/distrib/sets/lists/tests/mi	Wed Dec 15 20:42:24 2010
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.178 2010/12/15 10:42:56 haad Exp $
+# $NetBSD: mi,v 1.179 2010/12/15 20:42:24 pooka Exp $
 #
 # Note: don't delete entries from here - mark them as "obsolete" instead.
 #
@@ -1047,6 +1047,9 @@
 ./usr/tests/dev/md/Atffile			tests-fs-tests		atf
 ./usr/tests/dev/md/h_mdserv			tests-fs-tests		atf
 ./usr/tests/dev/md/t_md			tests-fs-tests		atf
+./usr/tests/dev/raidframetests-fs-tests
+./usr/tests/dev/raidframe/Atffile			tests-fs-tests		atf
+./usr/tests/dev/raidframe/t_raid			tests-fs-tests		atf
 ./usr/tests/dev/scsipitests-fs-tests
 ./usr/tests/dev/scsipi/Atffile			tests-fs-tests		atf
 ./usr/tests/dev/scsipi/t_cd			tests-fs-tests		atf

Index: src/etc/mtree/NetBSD.dist.tests
diff -u src/etc/mtree/NetBSD.dist.tests:1.4 src/etc/mtree/NetBSD.dist.tests:1.5
--- src/etc/mtree/NetBSD.dist.tests:1.4	Wed Dec 15 00:19:05 2010
+++ src/etc/mtree/NetBSD.dist.tests	Wed Dec 15 20:42:23 2010
@@ -1,4 +1,4 @@
-#	$NetBSD: NetBSD.dist.tests,v 1.4 2010/12/15 00:19:05 pooka Exp $
+#	$NetBSD: NetBSD.dist.tests,v 1.5 2010/12/15 20:42:23 pooka Exp $
 
 ./usr/libdata/debug/usr/tests
 ./usr/libdata/debug/usr/tests/atf
@@ -102,6 +102,7 @@
 ./usr/tests/dev/audio
 ./usr/tests/dev/cgd
 ./usr/tests/dev/md
+./usr/tests/dev/raidframe
 ./usr/tests/dev/scsipi
 ./usr/tests/dev/sysmon
 ./usr/tests/fs



CVS commit: src/tests/dev

2010-12-15 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Wed Dec 15 20:40:18 UTC 2010

Modified Files:
src/tests/dev: Makefile
Added Files:
src/tests/dev/raidframe: Makefile t_raid.sh
Removed Files:
src/tests/dev/raid: Makefile t_raid.sh

Log Message:
"A few seconds later" I realized the kernel directory is dev/raidframe,
not dev/raid, so reflect this in the test dir.  Affects location
for test of PR kern/44239.


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/tests/dev/Makefile
cvs rdiff -u -r1.1 -r0 src/tests/dev/raid/Makefile \
src/tests/dev/raid/t_raid.sh
cvs rdiff -u -r0 -r1.1 src/tests/dev/raidframe/Makefile \
src/tests/dev/raidframe/t_raid.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/dev/Makefile
diff -u src/tests/dev/Makefile:1.6 src/tests/dev/Makefile:1.7
--- src/tests/dev/Makefile:1.6	Wed Dec 15 20:37:52 2010
+++ src/tests/dev/Makefile	Wed Dec 15 20:40:17 2010
@@ -1,10 +1,10 @@
-#	$NetBSD: Makefile,v 1.6 2010/12/15 20:37:52 pooka Exp $
+#	$NetBSD: Makefile,v 1.7 2010/12/15 20:40:17 pooka Exp $
 #
 
 .include 
 
 TESTSDIR=	${TESTSBASE}/dev
 
-TESTS_SUBDIRS+=	audio cgd md raid scsipi sysmon
+TESTS_SUBDIRS+=	audio cgd md raidframe scsipi sysmon
 
 .include 

Added files:

Index: src/tests/dev/raidframe/Makefile
diff -u /dev/null src/tests/dev/raidframe/Makefile:1.1
--- /dev/null	Wed Dec 15 20:40:18 2010
+++ src/tests/dev/raidframe/Makefile	Wed Dec 15 20:40:18 2010
@@ -0,0 +1,8 @@
+#	$NetBSD: Makefile,v 1.1 2010/12/15 20:40:18 pooka Exp $
+#
+
+TESTSDIR=	${TESTSBASE}/dev/raid
+
+TESTS_SH=	t_raid
+
+.include 
Index: src/tests/dev/raidframe/t_raid.sh
diff -u /dev/null src/tests/dev/raidframe/t_raid.sh:1.1
--- /dev/null	Wed Dec 15 20:40:18 2010
+++ src/tests/dev/raidframe/t_raid.sh	Wed Dec 15 20:40:18 2010
@@ -0,0 +1,77 @@
+#	$NetBSD: t_raid.sh,v 1.1 2010/12/15 20:40:18 pooka Exp $
+#
+# Copyright (c) 2010 The NetBSD Foundation, Inc.
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+# 1. Redistributions of source code must retain the above copyright
+#notice, this list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the above copyright
+#notice, this list of conditions and the following disclaimer in the
+#documentation and/or other materials provided with the distribution.
+#
+# THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
+# ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+# TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+# PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
+# BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+# POSSIBILITY OF SUCH DAMAGE.
+#
+
+makecfg()
+{
+	level=${1}
+	ncol=${2}
+
+	printf "START array\n1 ${ncol} 0\nSTART disks\n" > raid.conf
+	diskn=0
+	while [ ${ncol} -gt ${diskn} ] ; do
+		echo "/disk${diskn}" >> raid.conf
+		diskn=$((diskn+1))
+	done
+
+	printf "START layout\n32 1 1 ${level}\nSTART queue\nfifo 100\n" \
+	>> raid.conf
+}
+
+atf_test_case smalldisk cleanup
+raid1fail_head()
+{
+
+	atf_set "descr" "Checks the raidframe works on small disks"
+}
+
+smalldisk_body()
+{
+
+	makecfg 1 2
+	export RUMP_SERVER=unix://sock
+	atf_check -s exit:0 rump_allserver			\
+	-d key=/disk0,hostpath=disk0.img,size=1m		\
+	-d key=/disk1,hostpath=disk1.img,size=1m		\
+	${RUMP_SERVER}
+
+	atf_expect_fail "PR kern/44239" # ADJUST CLEANUP WHEN THIS IS FIXED!
+	atf_check -s exit:0 rump.raidctl -C raid.conf raid0
+}
+
+smalldisk_cleanup()
+{
+
+	export RUMP_SERVER=unix://sock
+	rump.halt
+	: server dumps currently, so reset error.  remove this line when fixed
+}
+
+atf_init_test_cases()
+{
+
+	atf_add_test_case smalldisk
+}



CVS commit: src/tests/dev

2010-12-15 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Wed Dec 15 20:37:52 UTC 2010

Modified Files:
src/tests/dev: Makefile
Added Files:
src/tests/dev/raid: Makefile t_raid.sh

Log Message:
Add first raidframe tests.  This is the test for the kernel fault
described in PR kern/44239


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/tests/dev/Makefile
cvs rdiff -u -r0 -r1.1 src/tests/dev/raid/Makefile \
src/tests/dev/raid/t_raid.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/dev/Makefile
diff -u src/tests/dev/Makefile:1.5 src/tests/dev/Makefile:1.6
--- src/tests/dev/Makefile:1.5	Tue Nov 23 15:38:54 2010
+++ src/tests/dev/Makefile	Wed Dec 15 20:37:52 2010
@@ -1,10 +1,10 @@
-#	$NetBSD: Makefile,v 1.5 2010/11/23 15:38:54 pooka Exp $
+#	$NetBSD: Makefile,v 1.6 2010/12/15 20:37:52 pooka Exp $
 #
 
 .include 
 
 TESTSDIR=	${TESTSBASE}/dev
 
-TESTS_SUBDIRS+=	audio cgd md scsipi sysmon
+TESTS_SUBDIRS+=	audio cgd md raid scsipi sysmon
 
 .include 

Added files:

Index: src/tests/dev/raid/Makefile
diff -u /dev/null src/tests/dev/raid/Makefile:1.1
--- /dev/null	Wed Dec 15 20:37:52 2010
+++ src/tests/dev/raid/Makefile	Wed Dec 15 20:37:52 2010
@@ -0,0 +1,8 @@
+#	$NetBSD: Makefile,v 1.1 2010/12/15 20:37:52 pooka Exp $
+#
+
+TESTSDIR=	${TESTSBASE}/dev/raid
+
+TESTS_SH=	t_raid
+
+.include 
Index: src/tests/dev/raid/t_raid.sh
diff -u /dev/null src/tests/dev/raid/t_raid.sh:1.1
--- /dev/null	Wed Dec 15 20:37:52 2010
+++ src/tests/dev/raid/t_raid.sh	Wed Dec 15 20:37:52 2010
@@ -0,0 +1,77 @@
+#	$NetBSD: t_raid.sh,v 1.1 2010/12/15 20:37:52 pooka Exp $
+#
+# Copyright (c) 2010 The NetBSD Foundation, Inc.
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+# 1. Redistributions of source code must retain the above copyright
+#notice, this list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the above copyright
+#notice, this list of conditions and the following disclaimer in the
+#documentation and/or other materials provided with the distribution.
+#
+# THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
+# ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+# TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+# PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
+# BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+# POSSIBILITY OF SUCH DAMAGE.
+#
+
+makecfg()
+{
+	level=${1}
+	ncol=${2}
+
+	printf "START array\n1 ${ncol} 0\nSTART disks\n" > raid.conf
+	diskn=0
+	while [ ${ncol} -gt ${diskn} ] ; do
+		echo "/disk${diskn}" >> raid.conf
+		diskn=$((diskn+1))
+	done
+
+	printf "START layout\n32 1 1 ${level}\nSTART queue\nfifo 100\n" \
+	>> raid.conf
+}
+
+atf_test_case smalldisk cleanup
+raid1fail_head()
+{
+
+	atf_set "descr" "Checks the raidframe works on small disks"
+}
+
+smalldisk_body()
+{
+
+	makecfg 1 2
+	export RUMP_SERVER=unix://sock
+	atf_check -s exit:0 rump_allserver			\
+	-d key=/disk0,hostpath=disk0.img,size=1m		\
+	-d key=/disk1,hostpath=disk1.img,size=1m		\
+	${RUMP_SERVER}
+
+	atf_expect_fail "PR kern/44239" # ADJUST CLEANUP WHEN THIS IS FIXED!
+	atf_check -s exit:0 rump.raidctl -C raid.conf raid0
+}
+
+smalldisk_cleanup()
+{
+
+	export RUMP_SERVER=unix://sock
+	rump.halt
+	: server dumps currently, so reset error.  remove this line when fixed
+}
+
+atf_init_test_cases()
+{
+
+	atf_add_test_case smalldisk
+}



CVS commit: src/tests/dev/cgd

2010-12-15 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Wed Dec 15 19:14:37 UTC 2010

Modified Files:
src/tests/dev/cgd: t_cgd.sh

Log Message:
Use proper cleanup.

XXX: the atf sh "compiler" should check for errors.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/tests/dev/cgd/t_cgd.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/dev/cgd/t_cgd.sh
diff -u src/tests/dev/cgd/t_cgd.sh:1.2 src/tests/dev/cgd/t_cgd.sh:1.3
--- src/tests/dev/cgd/t_cgd.sh:1.2	Tue Dec 14 17:48:31 2010
+++ src/tests/dev/cgd/t_cgd.sh	Wed Dec 15 19:14:37 2010
@@ -1,4 +1,4 @@
-#	$NetBSD: t_cgd.sh,v 1.2 2010/12/14 17:48:31 pooka Exp $
+#	$NetBSD: t_cgd.sh,v 1.3 2010/12/15 19:14:37 pooka Exp $
 #
 # Copyright (c) 2010 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -25,7 +25,7 @@
 # POSSIBILITY OF SUCH DAMAGE.
 #
 
-atf_test_case basic
+atf_test_case basic cleanup
 basic_head()
 {
 
@@ -54,7 +54,7 @@
 	env RUMP_SERVER=unix://csock rump.halt
 }
 
-atf_test_case wrongpass
+atf_test_case wrongpass cleanup
 wrongpass_head()
 {
 
@@ -84,6 +84,12 @@
 	dd rif=/dev/rcgd0d count=2
 }
 
+wrongpass_cleanup()
+{
+
+	env RUMP_SERVER=unix://csock rump.halt
+}
+
 atf_init_test_cases()
 {
 



CVS commit: src/usr.bin/rump_allserver

2010-12-15 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Wed Dec 15 19:07:44 UTC 2010

Modified Files:
src/usr.bin/rump_allserver: rump_allserver.c

Log Message:
Guard against supplying the same parameter multiple times in one -d argument.


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/usr.bin/rump_allserver/rump_allserver.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/rump_allserver/rump_allserver.c
diff -u src/usr.bin/rump_allserver/rump_allserver.c:1.10 src/usr.bin/rump_allserver/rump_allserver.c:1.11
--- src/usr.bin/rump_allserver/rump_allserver.c:1.10	Wed Dec 15 09:40:21 2010
+++ src/usr.bin/rump_allserver/rump_allserver.c	Wed Dec 15 19:07:43 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: rump_allserver.c,v 1.10 2010/12/15 09:40:21 wiz Exp $	*/
+/*	$NetBSD: rump_allserver.c,v 1.11 2010/12/15 19:07:43 pooka Exp $	*/
 
 /*-
  * Copyright (c) 2010 Antti Kantee.  All Rights Reserved.
@@ -27,7 +27,7 @@
 
 #include 
 #ifndef lint
-__RCSID("$NetBSD: rump_allserver.c,v 1.10 2010/12/15 09:40:21 wiz Exp $");
+__RCSID("$NetBSD: rump_allserver.c,v 1.11 2010/12/15 19:07:43 pooka Exp $");
 #endif /* !lint */
 
 #include 
@@ -119,12 +119,27 @@
 switch (getsubopt(&options,
 __UNCONST(disktokens), &value)) {
 case DKEY:
+	if (key != NULL) {
+		fprintf(stderr,
+		"key already given\n");
+		usage();
+	}
 	key = value;
 	break;
 case DFILE:
+	if (hostpath != NULL) {
+		fprintf(stderr,
+		"hostpath already given\n");
+		usage();
+	}
 	hostpath = value;
 	break;
 case DSIZE:
+	if (flen != 0) {
+		fprintf(stderr,
+		"size already given\n");
+		usage();
+	}
 	/* XXX: off_t max? */
 	flen = strsuftoll("-d size", value,
 	0, LLONG_MAX);



CVS commit: src/usr.bin/rump_allserver

2010-12-15 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Wed Dec 15 18:42:59 UTC 2010

Modified Files:
src/usr.bin/rump_allserver: rump_allserver.1

Log Message:
language fix.  sniped by wizd


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/usr.bin/rump_allserver/rump_allserver.1

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/rump_allserver/rump_allserver.1
diff -u src/usr.bin/rump_allserver/rump_allserver.1:1.5 src/usr.bin/rump_allserver/rump_allserver.1:1.6
--- src/usr.bin/rump_allserver/rump_allserver.1:1.5	Wed Dec 15 16:23:55 2010
+++ src/usr.bin/rump_allserver/rump_allserver.1	Wed Dec 15 18:42:59 2010
@@ -1,4 +1,4 @@
-.\"	$NetBSD: rump_allserver.1,v 1.5 2010/12/15 16:23:55 pooka Exp $
+.\"	$NetBSD: rump_allserver.1,v 1.6 2010/12/15 18:42:59 pooka Exp $
 .\"
 .\" Copyright (c) 2010 Antti Kantee.  All rights reserved.
 .\"
@@ -150,7 +150,7 @@
 .Fl l
 does not update the kernel syscall vector when using
 .Nm .
-This should be fixed very shortly, but if it's an immediately showstopper,
+This should be fixed very shortly, but if it's a showstopper,
 use
 .Nm rump_allserver
 as a workaround.



CVS commit: src/distrib/sets/lists

2010-12-15 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Wed Dec 15 18:39:28 UTC 2010

Modified Files:
src/distrib/sets/lists/base: mi
src/distrib/sets/lists/comp: mi

Log Message:
+rump.raidctl


To generate a diff of this commit:
cvs rdiff -u -r1.906 -r1.907 src/distrib/sets/lists/base/mi
cvs rdiff -u -r1.1544 -r1.1545 src/distrib/sets/lists/comp/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/base/mi
diff -u src/distrib/sets/lists/base/mi:1.906 src/distrib/sets/lists/base/mi:1.907
--- src/distrib/sets/lists/base/mi:1.906	Wed Dec 15 00:11:59 2010
+++ src/distrib/sets/lists/base/mi	Wed Dec 15 18:39:27 2010
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.906 2010/12/15 00:11:59 pooka Exp $
+# $NetBSD: mi,v 1.907 2010/12/15 18:39:27 pooka Exp $
 #
 # Note:	Don't delete entries from here - mark them as "obsolete" instead,
 #	unless otherwise stated below.
@@ -301,6 +301,7 @@
 ./sbin/pppoectl	base-netutil-root
 ./sbin/quotacheckbase-obsolete		obsolete
 ./sbin/raidctl	base-sysutil-root
+./sbin/rump.raidctl	base-sysutil-root
 ./sbin/rcorder	base-sysutil-root
 ./sbin/rdump	base-sysutil-root
 ./sbin/rdump_lfsbase-sysutil-root

Index: src/distrib/sets/lists/comp/mi
diff -u src/distrib/sets/lists/comp/mi:1.1544 src/distrib/sets/lists/comp/mi:1.1545
--- src/distrib/sets/lists/comp/mi:1.1544	Wed Dec 15 00:12:00 2010
+++ src/distrib/sets/lists/comp/mi	Wed Dec 15 18:39:28 2010
@@ -1,4 +1,4 @@
-#	$NetBSD: mi,v 1.1544 2010/12/15 00:12:00 pooka Exp $
+#	$NetBSD: mi,v 1.1545 2010/12/15 18:39:28 pooka Exp $
 #
 # Note: don't delete entries from here - mark them as "obsolete" instead.
 #
@@ -3029,6 +3029,7 @@
 ./usr/libdata/debug/sbin/ping6.debug		comp-netutil-debug	use_inet6,debug
 ./usr/libdata/debug/sbin/pppoectl.debug		comp-netutil-debug	debug
 ./usr/libdata/debug/sbin/raidctl.debug		comp-sysutil-debug	debug
+./usr/libdata/debug/sbin/rump.raidctl.debug		comp-sysutil-debug	debug
 ./usr/libdata/debug/sbin/rcorder.debug		comp-sysutil-debug	debug
 ./usr/libdata/debug/sbin/reboot.debug		comp-sysutil-debug	debug
 ./usr/libdata/debug/sbin/resize_ffs.debug	comp-sysutil-debug	debug



CVS commit: src/sbin/raidctl

2010-12-15 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Wed Dec 15 18:37:55 UTC 2010

Modified Files:
src/sbin/raidctl: Makefile raidctl.c
Added Files:
src/sbin/raidctl: prog_ops.h raidctl_hostops.c raidctl_rumpops.c

Log Message:
Use RUMPPRG.

ok Greg Oster


To generate a diff of this commit:
cvs rdiff -u -r1.15 -r1.16 src/sbin/raidctl/Makefile
cvs rdiff -u -r0 -r1.1 src/sbin/raidctl/prog_ops.h \
src/sbin/raidctl/raidctl_hostops.c src/sbin/raidctl/raidctl_rumpops.c
cvs rdiff -u -r1.49 -r1.50 src/sbin/raidctl/raidctl.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/raidctl/Makefile
diff -u src/sbin/raidctl/Makefile:1.15 src/sbin/raidctl/Makefile:1.16
--- src/sbin/raidctl/Makefile:1.15	Mon Nov  8 12:42:35 2010
+++ src/sbin/raidctl/Makefile	Wed Dec 15 18:37:55 2010
@@ -1,16 +1,10 @@
-#	$NetBSD: Makefile,v 1.15 2010/11/08 12:42:35 pooka Exp $
+#	$NetBSD: Makefile,v 1.16 2010/12/15 18:37:55 pooka Exp $
 
-PROG=	raidctl 
+RUMPPRG=raidctl 
 SRCS=	rf_configure.c raidctl.c
 MAN=	raidctl.8
 
 DPADD=  ${LIBUTIL}
 LDADD=  -lutil
 
-.ifdef RUMP_ACTION
-CPPFLAGS+=	-DRUMP_ACTION -DRUMP_SYS_IOCTL -DRUMP_SYS_CLOSE
-LDADD+=		-lrumpclient
-DBG=		-g
-.endif
-
 .include 

Index: src/sbin/raidctl/raidctl.c
diff -u src/sbin/raidctl/raidctl.c:1.49 src/sbin/raidctl/raidctl.c:1.50
--- src/sbin/raidctl/raidctl.c:1.49	Mon Nov  8 12:42:35 2010
+++ src/sbin/raidctl/raidctl.c	Wed Dec 15 18:37:55 2010
@@ -1,4 +1,4 @@
-/*  $NetBSD: raidctl.c,v 1.49 2010/11/08 12:42:35 pooka Exp $   */
+/*  $NetBSD: raidctl.c,v 1.50 2010/12/15 18:37:55 pooka Exp $   */
 
 /*-
  * Copyright (c) 1996, 1997, 1998 The NetBSD Foundation, Inc.
@@ -39,7 +39,7 @@
 #include 
 
 #ifndef lint
-__RCSID("$NetBSD: raidctl.c,v 1.49 2010/11/08 12:42:35 pooka Exp $");
+__RCSID("$NetBSD: raidctl.c,v 1.50 2010/12/15 18:37:55 pooka Exp $");
 #endif
 
 
@@ -58,15 +58,10 @@
 #include 
 #include 
 
-#ifdef RUMP_ACTION
-#include 
-#include 
-#include 
-#endif
-
 #include 
 #include 
 #include "rf_configure.h"
+#include "prog_ops.h"
 
 void	do_ioctl(int, u_long, void *, const char *);
 static  void rf_configure(int, char*, int);
@@ -127,11 +122,6 @@
 	force = 0;
 	openmode = O_RDWR;	/* default to read/write */
 
-#ifdef RUMP_ACTION
-	if (rumpclient_init() == -1)
-		err(1, "rump client init failed");
-#endif
-
 	while ((ch = getopt(argc, argv, "a:A:Bc:C:f:F:g:GiI:l:mM:r:R:sSpPuv")) 
 	   != -1)
 		switch(ch) {
@@ -267,13 +257,12 @@
 	if ((num_options > 1) || (argc == 0)) 
 		usage();
 
+	if (prog_init && prog_init() == -1)
+		err(1, "init failed");
+
 	strlcpy(name, argv[0], sizeof(name));
-#ifdef RUMP_ACTION
 	fd = opendisk1(name, openmode, dev_name, sizeof(dev_name), 0,
-	rump_sys_open);
-#else
-	fd = opendisk(name, openmode, dev_name, sizeof(dev_name), 0);
-#endif
+	prog_open);
 	if (fd == -1)
 		err(1, "Unable to open device file: %s", name);
 	if (fstat(fd, &st) == -1)
@@ -355,14 +344,14 @@
 		break;
 	}
 
-	close(fd);
+	prog_close(fd);
 	exit(0);
 }
 
 void
 do_ioctl(int fd, unsigned long command, void *arg, const char *ioctl_name)
 {
-	if (ioctl(fd, command, arg) == -1)
+	if (prog_ioctl(fd, command, arg) == -1)
 		err(1, "ioctl (%s) failed", ioctl_name);
 }
 
@@ -491,7 +480,7 @@
 	int dis, dr;
 	struct rf_pmstat st;
 
-	if (ioctl(fd, RAIDFRAME_PARITYMAP_STATUS, &st) == -1) {
+	if (prog_ioctl(fd, RAIDFRAME_PARITYMAP_STATUS, &st) == -1) {
 		if (errno == EINVAL) {
 			printf("raid%d: has no parity; parity map disabled\n",
 raidID);

Added files:

Index: src/sbin/raidctl/prog_ops.h
diff -u /dev/null src/sbin/raidctl/prog_ops.h:1.1
--- /dev/null	Wed Dec 15 18:37:55 2010
+++ src/sbin/raidctl/prog_ops.h	Wed Dec 15 18:37:55 2010
@@ -0,0 +1,55 @@
+/*  $NetBSD: prog_ops.h,v 1.1 2010/12/15 18:37:55 pooka Exp $	*/
+
+/*
+ * Copyright (c) 2010 The NetBSD Foundation, Inc.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *notice, this list of conditions and the following disclaimer in the
+ *documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
+ * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+ * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINE

CVS commit: src/usr.sbin/powerd

2010-12-15 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Wed Dec 15 18:11:01 UTC 2010

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

Log Message:
Merge single-letter options in SYNOPSIS.


To generate a diff of this commit:
cvs rdiff -u -r1.23 -r1.24 src/usr.sbin/powerd/powerd.8

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

Modified files:

Index: src/usr.sbin/powerd/powerd.8
diff -u src/usr.sbin/powerd/powerd.8:1.23 src/usr.sbin/powerd/powerd.8:1.24
--- src/usr.sbin/powerd/powerd.8:1.23	Wed Dec 15 17:12:40 2010
+++ src/usr.sbin/powerd/powerd.8	Wed Dec 15 18:11:01 2010
@@ -1,4 +1,4 @@
-.\"	$NetBSD: powerd.8,v 1.23 2010/12/15 17:12:40 pgoyette Exp $
+.\"	$NetBSD: powerd.8,v 1.24 2010/12/15 18:11:01 wiz Exp $
 .\"
 .\" Copyright (c) 2003 Wasabi Systems, Inc.
 .\" All rights reserved.
@@ -41,8 +41,7 @@
 .Nd power management daemon for sysmon
 .Sh SYNOPSIS
 .Nm
-.Op Fl d
-.Op Fl n
+.Op Fl dn
 .Sh DESCRIPTION
 .Nm
 acts upon power management events posted by the kernel's power management



CVS commit: src/sys/dev/sysmon

2010-12-15 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Wed Dec 15 17:17:17 UTC 2010

Modified Files:
src/sys/dev/sysmon: sysmon_envsys.c sysmon_envsys_events.c
sysmon_envsys_tables.c sysmon_envsysvar.h

Log Message:
Extract searching of description tables into a single function, rather
than duplicating the code every time.  Minor reduction in code size
(about 1200 bytes on amd64), no change in functionality.


To generate a diff of this commit:
cvs rdiff -u -r1.109 -r1.110 src/sys/dev/sysmon/sysmon_envsys.c
cvs rdiff -u -r1.95 -r1.96 src/sys/dev/sysmon/sysmon_envsys_events.c
cvs rdiff -u -r1.5 -r1.6 src/sys/dev/sysmon/sysmon_envsys_tables.c
cvs rdiff -u -r1.36 -r1.37 src/sys/dev/sysmon/sysmon_envsysvar.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/sysmon/sysmon_envsys.c
diff -u src/sys/dev/sysmon/sysmon_envsys.c:1.109 src/sys/dev/sysmon/sysmon_envsys.c:1.110
--- src/sys/dev/sysmon/sysmon_envsys.c:1.109	Sat Dec 11 15:17:15 2010
+++ src/sys/dev/sysmon/sysmon_envsys.c	Wed Dec 15 17:17:16 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: sysmon_envsys.c,v 1.109 2010/12/11 15:17:15 pgoyette Exp $	*/
+/*	$NetBSD: sysmon_envsys.c,v 1.110 2010/12/15 17:17:16 pgoyette Exp $	*/
 
 /*-
  * Copyright (c) 2007, 2008 Juan Romero Pardines.
@@ -64,7 +64,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: sysmon_envsys.c,v 1.109 2010/12/11 15:17:15 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sysmon_envsys.c,v 1.110 2010/12/15 17:17:16 pgoyette Exp $");
 
 #include 
 #include 
@@ -520,21 +520,16 @@
 int
 sysmon_envsys_sensor_attach(struct sysmon_envsys *sme, envsys_data_t *edata)
 {
-	const struct sme_description_table *sdt_units;
+	const struct sme_descr_entry *sdt_units;
 	envsys_data_t *oedata;
-	int i;
 
 	KASSERT(sme != NULL || edata != NULL);
 
 	/* 
 	 * Find the correct units for this sensor.
 	 */
-	sdt_units = sme_get_description_table(SME_DESC_UNITS);
-	for (i = 0; sdt_units[i].type != -1; i++)
-		if (sdt_units[i].type == edata->units)
-			break;
-
-	if (strcmp(sdt_units[i].desc, "unknown") == 0)
+	sdt_units = sme_find_table_entry(SME_DESC_UNITS, edata->units);
+	if (sdt_units->type == -1)
 		return EINVAL;
 
 	/*
@@ -567,7 +562,7 @@
 
 	DPRINTF(("%s: attached #%d (%s), units=%d (%s)\n",
 	__func__, edata->sensor, edata->desc,
-	sdt_units[i].type, sdt_units[i].desc));
+	sdt_units->type, sdt_units->desc));
 
 	return 0;
 }
@@ -1054,9 +1049,9 @@
 	envsys_data_t *edata = NULL;
 	char tmp[ENVSYS_DESCLEN];
 	sysmon_envsys_lim_t lims;
-	const struct sme_description_table *sdt_units;
+	const struct sme_descr_entry *sdt_units;
 	uint32_t props;
-	int ptype, i;
+	int ptype;
 
 	mutex_enter(&sme_global_mtx);
 	LIST_FOREACH(sme, &sysmon_envsys_list, sme_list) {
@@ -1166,15 +1161,12 @@
 /*
  * Find the correct units for this sensor.
  */
-sdt_units =
-sme_get_description_table(SME_DESC_UNITS);
-for (i = 0; sdt_units[i].type != -1; i++)
-	if (sdt_units[i].type == edata->units)
-		break;
+sdt_units = sme_find_table_entry(SME_DESC_UNITS,
+edata->units);
 
 sme_event_register(sdict, edata, sme,
 &lims, props, PENVSYS_EVENT_LIMITS,
-sdt_units[i].crittype);
+sdt_units->crittype);
 			}
 		}
 
@@ -1267,18 +1259,15 @@
 sme_add_sensor_dictionary(struct sysmon_envsys *sme, prop_array_t array,
 			  prop_dictionary_t dict, envsys_data_t *edata)
 {
-	const struct sme_description_table *sdt, *sdt_units;
+	const struct sme_descr_entry *sdt_state, *sdt_units, *sdt_battcap;
+	const struct sme_descr_entry *sdt_drive;
 	sme_event_drv_t *sme_evdrv_t = NULL;
-	int i, j;
 	char indexstr[ENVSYS_DESCLEN];
 
 	/* 
 	 * Find the correct units for this sensor.
 	 */
-	sdt_units = sme_get_description_table(SME_DESC_UNITS);
-	for (i = 0; sdt_units[i].type != -1; i++)
-		if (sdt_units[i].type == edata->units)
-			break;
+	sdt_units = sme_find_table_entry(SME_DESC_UNITS, edata->units);
 
 	/*
 	 * Add the index sensor string.
@@ -1300,7 +1289,7 @@
 	 * 		blah blah
 	 * 		...
 	 */
-	if (sme_sensor_upstring(dict, "type", sdt_units[i].desc))
+	if (sme_sensor_upstring(dict, "type", sdt_units->desc))
 		goto bad;
 
 	if (sme_sensor_upstring(dict, "description", edata->desc))
@@ -1314,15 +1303,12 @@
 	 * 		valid
 	 * 		...
 	 */
-	sdt = sme_get_description_table(SME_DESC_STATES);
-	for (j = 0; sdt[j].type != -1; j++)
-		if (sdt[j].type == edata->state) 
-			break;
+	sdt_state = sme_find_table_entry(SME_DESC_STATES, edata->state);
 
 	DPRINTF(("%s: sensor desc=%s type=%d state=%d\n",
 	__func__, edata->desc, edata->units, edata->state));
 
-	if (sme_sensor_upstring(dict, "state", sdt[j].desc))
+	if (sme_sensor_upstring(dict, "state", sdt_state->desc))
 		goto bad;
 
 	/*
@@ -1391,12 +1377,10 @@
 	 * 		...
 	 */
 	if (edata->units == ENVSYS_BATTERY_CAPACITY) {
-		sdt = sme_get_description_table(SME_DESC_BATTERY_CAPACITY);
-		for (j = 0; sdt[j].type !=

CVS commit: src/usr.sbin/powerd

2010-12-15 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Wed Dec 15 17:12:40 UTC 2010

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

Log Message:
Add an option to not actually run the power management scripts, and
when in debug mode send all error messages to stderr rather than to
syslog(8).


To generate a diff of this commit:
cvs rdiff -u -r1.22 -r1.23 src/usr.sbin/powerd/powerd.8
cvs rdiff -u -r1.14 -r1.15 src/usr.sbin/powerd/powerd.c

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

Modified files:

Index: src/usr.sbin/powerd/powerd.8
diff -u src/usr.sbin/powerd/powerd.8:1.22 src/usr.sbin/powerd/powerd.8:1.23
--- src/usr.sbin/powerd/powerd.8:1.22	Wed Jan 27 06:52:24 2010
+++ src/usr.sbin/powerd/powerd.8	Wed Dec 15 17:12:40 2010
@@ -1,4 +1,4 @@
-.\"	$NetBSD: powerd.8,v 1.22 2010/01/27 06:52:24 wiz Exp $
+.\"	$NetBSD: powerd.8,v 1.23 2010/12/15 17:12:40 pgoyette Exp $
 .\"
 .\" Copyright (c) 2003 Wasabi Systems, Inc.
 .\" All rights reserved.
@@ -33,7 +33,7 @@
 .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 .\" POSSIBILITY OF SUCH DAMAGE.
 .\"
-.Dd January 26, 2010
+.Dd December 15, 2010
 .Dt POWERD 8
 .Os
 .Sh NAME
@@ -42,6 +42,7 @@
 .Sh SYNOPSIS
 .Nm
 .Op Fl d
+.Op Fl n
 .Sh DESCRIPTION
 .Nm
 acts upon power management events posted by the kernel's power management
@@ -58,9 +59,13 @@
 .Bl -tag -width 
 .It Fl d
 Enable debugging mode.
-Verbose messages will be sent to stderr and
+Verbose messages and all messages intended for
+.Xr syslog 8
+will be sent to stderr, and
 .Nm
 will stay in the foreground of the controlling terminal.
+.It Fl n
+Prevent execution of power management scripts.
 .El
 .Sh CONFIGURATION SCRIPTS
 All configuration of

Index: src/usr.sbin/powerd/powerd.c
diff -u src/usr.sbin/powerd/powerd.c:1.14 src/usr.sbin/powerd/powerd.c:1.15
--- src/usr.sbin/powerd/powerd.c:1.14	Sat Apr 24 20:44:33 2010
+++ src/usr.sbin/powerd/powerd.c	Wed Dec 15 17:12:40 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: powerd.c,v 1.14 2010/04/24 20:44:33 jruoho Exp $	*/
+/*	$NetBSD: powerd.c,v 1.15 2010/12/15 17:12:40 pgoyette Exp $	*/
 
 /*
  * Copyright (c) 2003 Wasabi Systems, Inc.
@@ -39,6 +39,8 @@
  * Power management daemon for sysmon.
  */
 
+#define SYSLOG_NAMES
+
 #include 
 #include 
 #include 
@@ -54,8 +56,10 @@
 #include 
 #include 
 #include 
+#include 
+#include 
 
-int	debug;
+int	debug, no_scripts;
 
 static int kq;
 
@@ -67,6 +71,7 @@
 static int wait_for_events(struct kevent *, size_t);
 static void dispatch_dev_power(struct kevent *);
 static void dispatch_power_event_state_change(int, power_event_t *);
+static void powerd_log(int, const char *, ...);
 
 static const char *script_paths[] = {
 	NULL,
@@ -83,12 +88,16 @@
 
 	setprogname(*argv);
 
-	while ((ch = getopt(argc, argv, "d")) != -1) {
+	while ((ch = getopt(argc, argv, "dn")) != -1) {
 		switch (ch) {
 		case 'd':
 			debug = 1;
 			break;
 
+		case 'n':
+			no_scripts = 1;
+			break;
+
 		default:
 			usage();
 		}
@@ -99,36 +108,40 @@
 	if (argc)
 		usage();
 
-	if (debug == 0)
+	if (debug == 0) {
 		(void)daemon(0, 0);
 
-	openlog("powerd", LOG_PID | LOG_NOWAIT, LOG_DAEMON);
-	(void)pidfile(NULL);
+		openlog("powerd", LOG_PID | LOG_NOWAIT, LOG_DAEMON);
+		(void)pidfile(NULL);
+	}
 
 	if ((kq = kqueue()) == -1) {
-		syslog(LOG_ERR, "kqueue: %m");
+		powerd_log(LOG_ERR, "kqueue: %s", strerror(errno));
 		exit(EX_OSERR);
 	}
 
 	if ((fd = open(_PATH_POWER, O_RDONLY|O_NONBLOCK, 0600)) == -1) {
-		syslog(LOG_ERR, "open %s: %m", _PATH_POWER);
+		powerd_log(LOG_ERR, "open %s: %s", _PATH_POWER,
+		strerror(errno));
 		exit(EX_OSERR);
 	}
 
 	if (fcntl(fd, F_SETFD, FD_CLOEXEC) == -1) {
-		syslog(LOG_ERR, "Cannot set close on exec in power fd: %m");
+		powerd_log(LOG_ERR, "Cannot set close on exec in power fd: %s",
+		strerror(errno));
 		exit(EX_OSERR);
 	}
 
 	if (ioctl(fd, POWER_IOC_GET_TYPE, &power_type) == -1) {
-		syslog(LOG_ERR, "POWER_IOC_GET_TYPE: %m");
+		powerd_log(LOG_ERR, "POWER_IOC_GET_TYPE: %s", strerror(errno));
 		exit(EX_OSERR);
 	}
 
 	(void)asprintf(&cp, "%s/%s", _PATH_POWERD_SCRIPTS,
 	power_type.power_type);
 	if (cp == NULL) {
-		syslog(LOG_ERR, "allocating script path: %m");
+		powerd_log(LOG_ERR, "allocating script path: %s",
+		strerror(errno));
 		exit(EX_OSERR);
 	}
 	script_paths[0] = cp;
@@ -153,7 +166,7 @@
 usage(void)
 {
 
-	(void)fprintf(stderr, "usage: %s [-d]\n", getprogname());
+	(void)fprintf(stderr, "usage: %s [-dn]\n", getprogname());
 	exit(EX_USAGE);
 }
 
@@ -173,16 +186,19 @@
 			argv[0] = path;
 
 			if (debug) {
-(void)fprintf(stderr, "running script: %s",
-argv[0]);
+(void)fprintf(stderr, "%srunning script: %s",
+no_scripts?"not ":"", argv[0]);
 for (j = 1; argv[j] != NULL; j++)
 	(void)fprintf(stderr, " %s", argv[j]);
 (void)fprintf(stderr, "\n");
 			}
+			if (no_scripts != 0)
+return;
 
 			switch ((pid = vfork())) {
 			case -1:
-		

CVS commit: src/usr.sbin/cpuctl/arch

2010-12-15 Thread Christoph Egger
Module Name:src
Committed By:   cegger
Date:   Wed Dec 15 17:09:07 UTC 2010

Modified Files:
src/usr.sbin/cpuctl/arch: i386.c

Log Message:
beautify printing of SVM features across multiple lines


To generate a diff of this commit:
cvs rdiff -u -r1.22 -r1.23 src/usr.sbin/cpuctl/arch/i386.c

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

Modified files:

Index: src/usr.sbin/cpuctl/arch/i386.c
diff -u src/usr.sbin/cpuctl/arch/i386.c:1.22 src/usr.sbin/cpuctl/arch/i386.c:1.23
--- src/usr.sbin/cpuctl/arch/i386.c:1.22	Tue Feb 23 08:46:33 2010
+++ src/usr.sbin/cpuctl/arch/i386.c	Wed Dec 15 17:09:07 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: i386.c,v 1.22 2010/02/23 08:46:33 cegger Exp $	*/
+/*	$NetBSD: i386.c,v 1.23 2010/12/15 17:09:07 cegger Exp $	*/
 
 /*-
  * Copyright (c) 1999, 2000, 2001, 2006, 2007, 2008 The NetBSD Foundation, Inc.
@@ -57,7 +57,7 @@
 
 #include 
 #ifndef lint
-__RCSID("$NetBSD: i386.c,v 1.22 2010/02/23 08:46:33 cegger Exp $");
+__RCSID("$NetBSD: i386.c,v 1.23 2010/12/15 17:09:07 cegger Exp $");
 #endif /* not lint */
 
 #include 
@@ -1491,9 +1491,14 @@
 			aprint_verbose("%s: SVM Rev. %d\n", cpuname,
 			data[0] & 0xf);
 			aprint_verbose("%s: SVM NASID %d\n", cpuname, data[1]);
-			snprintb(buf, sizeof(buf), CPUID_AMD_SVM_FLAGS,
-			data[3]);
-			aprint_verbose("%s: SVM features %s\n", cpuname, buf);
+			snprintb_m(buf, sizeof(buf), CPUID_AMD_SVM_FLAGS,
+   data[3], MAX_FEATURE_LEN);
+			bp = buf;
+			while (*bp != '\0') {
+aprint_verbose("%s: SVM features %s\n",
+cpuname, bp);
+bp += strlen(bp) + 1;
+			}
 		}
 	}
 



CVS commit: src/usr.bin/rump_allserver

2010-12-15 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Wed Dec 15 16:23:56 UTC 2010

Modified Files:
src/usr.bin/rump_allserver: rump_allserver.1

Log Message:
document the current syscall bug with rump_server and -l


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/usr.bin/rump_allserver/rump_allserver.1

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/rump_allserver/rump_allserver.1
diff -u src/usr.bin/rump_allserver/rump_allserver.1:1.4 src/usr.bin/rump_allserver/rump_allserver.1:1.5
--- src/usr.bin/rump_allserver/rump_allserver.1:1.4	Tue Dec 14 19:52:14 2010
+++ src/usr.bin/rump_allserver/rump_allserver.1	Wed Dec 15 16:23:55 2010
@@ -1,4 +1,4 @@
-.\"	$NetBSD: rump_allserver.1,v 1.4 2010/12/14 19:52:14 pooka Exp $
+.\"	$NetBSD: rump_allserver.1,v 1.5 2010/12/15 16:23:55 pooka Exp $
 .\"
 .\" Copyright (c) 2010 Antti Kantee.  All rights reserved.
 .\"
@@ -145,3 +145,12 @@
 .Xr rump.halt 1 ,
 .Xr dlopen 3 ,
 .Xr rump 3
+.Sh BUGS
+Using
+.Fl l
+does not update the kernel syscall vector when using
+.Nm .
+This should be fixed very shortly, but if it's an immediately showstopper,
+use
+.Nm rump_allserver
+as a workaround.



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

2010-12-15 Thread Hiroyuki Bessho
Module Name:src
Committed By:   bsh
Date:   Wed Dec 15 15:43:13 UTC 2010

Modified Files:
src/sys/arch/arm/include: armreg.h

Log Message:
fix XP bit and U bit definitions of CP15 control register.
These constants are not used in our source tree for now,
so this won't change any kernel bianries.


To generate a diff of this commit:
cvs rdiff -u -r1.45 -r1.46 src/sys/arch/arm/include/armreg.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/arm/include/armreg.h
diff -u src/sys/arch/arm/include/armreg.h:1.45 src/sys/arch/arm/include/armreg.h:1.46
--- src/sys/arch/arm/include/armreg.h:1.45	Sat Oct  2 05:37:58 2010
+++ src/sys/arch/arm/include/armreg.h	Wed Dec 15 15:43:13 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: armreg.h,v 1.45 2010/10/02 05:37:58 kiyohara Exp $	*/
+/*	$NetBSD: armreg.h,v 1.46 2010/12/15 15:43:13 bsh Exp $	*/
 
 /*
  * Copyright (c) 1998, 2001 Ben Harris
@@ -296,9 +296,9 @@
 #define CPU_CONTROL_VECRELOC	0x2000 /* V: Vector relocation */
 #define CPU_CONTROL_ROUNDROBIN	0x4000 /* RR: Predictable replacement */
 #define CPU_CONTROL_V4COMPAT	0x8000 /* L4: ARMv4 compat LDR R15 etc */
-#define CPU_CONTROL_UNAL_ENABLE	0x0004 /* U: unaligned data access */
-#define CPU_CONTROL_XP_ENABLE	0x0008 /* XP: extended page table */
 #define CPU_CONTROL_FI_ENABLE	0x0020 /* FI: Low interrupt latency */
+#define CPU_CONTROL_UNAL_ENABLE	0x0040 /* U: unaligned data access */
+#define CPU_CONTROL_XP_ENABLE	0x0080 /* XP: extended page table */
 
 #define CPU_CONTROL_IDC_ENABLE	CPU_CONTROL_DC_ENABLE
 



CVS commit: src/usr.sbin/inetd

2010-12-15 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Wed Dec 15 15:36:16 UTC 2010

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

Log Message:
RLIMIT_NOFILE stabilized in NetBSD 17 years ago, so it's safe now
to remove the #ifdef's from around code which uses it.


To generate a diff of this commit:
cvs rdiff -u -r1.117 -r1.118 src/usr.sbin/inetd/inetd.c

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

Modified files:

Index: src/usr.sbin/inetd/inetd.c
diff -u src/usr.sbin/inetd/inetd.c:1.117 src/usr.sbin/inetd/inetd.c:1.118
--- src/usr.sbin/inetd/inetd.c:1.117	Wed Dec 15 13:13:28 2010
+++ src/usr.sbin/inetd/inetd.c	Wed Dec 15 15:36:15 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: inetd.c,v 1.117 2010/12/15 13:13:28 pooka Exp $	*/
+/*	$NetBSD: inetd.c,v 1.118 2010/12/15 15:36:15 pooka Exp $	*/
 
 /*-
  * Copyright (c) 1998, 2003 The NetBSD Foundation, Inc.
@@ -66,7 +66,7 @@
 #if 0
 static char sccsid[] = "@(#)inetd.c	8.4 (Berkeley) 4/13/94";
 #else
-__RCSID("$NetBSD: inetd.c,v 1.117 2010/12/15 13:13:28 pooka Exp $");
+__RCSID("$NetBSD: inetd.c,v 1.118 2010/12/15 15:36:15 pooka Exp $");
 #endif
 #endif /* not lint */
 
@@ -194,10 +194,6 @@
 #include 
 #include 
 
-#ifndef RLIMIT_NOFILE
-#define RLIMIT_NOFILE	RLIMIT_OFILE
-#endif
-
 #ifndef NO_RPC
 #define RPC
 #endif
@@ -279,9 +275,7 @@
 #define FD_MARGIN	(8)
 rlim_t		rlim_ofile_cur = OPEN_MAX;
 
-#ifdef RLIMIT_NOFILE
 struct rlimit	rlim_ofile;
-#endif
 
 struct kevent	changebuf[64];
 size_t		changes;
@@ -470,7 +464,6 @@
 		return (EXIT_FAILURE);
 	}
 
-#ifdef RLIMIT_NOFILE
 	if (getrlimit(RLIMIT_NOFILE, &rlim_ofile) < 0) {
 		syslog(LOG_ERR, "getrlimit: %m");
 	} else {
@@ -478,7 +471,6 @@
 		if (rlim_ofile_cur == RLIM_INFINITY)	/* ! */
 			rlim_ofile_cur = OPEN_MAX;
 	}
-#endif
 
 	for (n = 0; n < (int)A_CNT(my_signals); n++) {
 		int	signum;
@@ -738,11 +730,9 @@
 		}
 		dup2(0, 1);
 		dup2(0, 2);
-#ifdef RLIMIT_NOFILE
 		if (rlim_ofile.rlim_cur != rlim_ofile_cur &&
 		setrlimit(RLIMIT_NOFILE, &rlim_ofile) < 0)
 			syslog(LOG_ERR, "setrlimit: %m");
-#endif
 		execv(sep->se_server, sep->se_argv);
 		syslog(LOG_ERR, "cannot execute %s: %m", sep->se_server);
 	reject:
@@ -1776,10 +1766,7 @@
 static void
 bump_nofile(void)
 {
-#ifdef RLIMIT_NOFILE
-
 #define FD_CHUNK	32
-
 	struct rlimit rl;
 
 	if (getrlimit(RLIMIT_NOFILE, &rl) < 0) {
@@ -1801,11 +1788,6 @@
 
 	rlim_ofile_cur = rl.rlim_cur;
 	return;
-
-#else
-	syslog(LOG_ERR, "bump_nofile: cannot extend file limit");
-	return;
-#endif
 }
 
 /*



CVS commit: src/usr.sbin/envstat

2010-12-15 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Wed Dec 15 15:07:54 UTC 2010

Modified Files:
src/usr.sbin/envstat: envstat_hostops.c envstat_rumpops.c prog_ops.h

Log Message:
Don't need prog_ioctl here, it's a leftover of the previous approach.

pointed out by Paul Goyette


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/usr.sbin/envstat/envstat_hostops.c \
src/usr.sbin/envstat/envstat_rumpops.c src/usr.sbin/envstat/prog_ops.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.sbin/envstat/envstat_hostops.c
diff -u src/usr.sbin/envstat/envstat_hostops.c:1.1 src/usr.sbin/envstat/envstat_hostops.c:1.2
--- src/usr.sbin/envstat/envstat_hostops.c:1.1	Mon Dec 13 18:00:38 2010
+++ src/usr.sbin/envstat/envstat_hostops.c	Wed Dec 15 15:07:54 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: envstat_hostops.c,v 1.1 2010/12/13 18:00:38 pooka Exp $	*/
+/*	$NetBSD: envstat_hostops.c,v 1.2 2010/12/15 15:07:54 pooka Exp $	*/
 
 /*
  * Copyright (c) 2010 The NetBSD Foundation, Inc.
@@ -28,7 +28,7 @@
 
 #include 
 #ifndef lint
-__RCSID("$NetBSD: envstat_hostops.c,v 1.1 2010/12/13 18:00:38 pooka Exp $");
+__RCSID("$NetBSD: envstat_hostops.c,v 1.2 2010/12/15 15:07:54 pooka Exp $");
 #endif /* !lint */
 
 #include 
@@ -42,5 +42,4 @@
 const struct prog_ops prog_ops = {
 	.op_open = open,
 	.op_close = close,
-	.op_ioctl = ioctl,
 };
Index: src/usr.sbin/envstat/envstat_rumpops.c
diff -u src/usr.sbin/envstat/envstat_rumpops.c:1.1 src/usr.sbin/envstat/envstat_rumpops.c:1.2
--- src/usr.sbin/envstat/envstat_rumpops.c:1.1	Mon Dec 13 18:00:38 2010
+++ src/usr.sbin/envstat/envstat_rumpops.c	Wed Dec 15 15:07:54 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: envstat_rumpops.c,v 1.1 2010/12/13 18:00:38 pooka Exp $	*/
+/*	$NetBSD: envstat_rumpops.c,v 1.2 2010/12/15 15:07:54 pooka Exp $	*/
 
 /*
  * Copyright (c) 2010 The NetBSD Foundation, Inc.
@@ -28,7 +28,7 @@
 
 #include 
 #ifndef lint
-__RCSID("$NetBSD: envstat_rumpops.c,v 1.1 2010/12/13 18:00:38 pooka Exp $");
+__RCSID("$NetBSD: envstat_rumpops.c,v 1.2 2010/12/15 15:07:54 pooka Exp $");
 #endif /* !lint */
 
 #include 
@@ -44,5 +44,4 @@
 
 	.op_open =	rump_sys_open,
 	.op_close =	rump_sys_close,
-	.op_ioctl =	rump_sys_ioctl,
 };
Index: src/usr.sbin/envstat/prog_ops.h
diff -u src/usr.sbin/envstat/prog_ops.h:1.1 src/usr.sbin/envstat/prog_ops.h:1.2
--- src/usr.sbin/envstat/prog_ops.h:1.1	Mon Dec 13 18:00:38 2010
+++ src/usr.sbin/envstat/prog_ops.h	Wed Dec 15 15:07:54 2010
@@ -1,4 +1,4 @@
-/*  $NetBSD: prog_ops.h,v 1.1 2010/12/13 18:00:38 pooka Exp $	*/
+/*  $NetBSD: prog_ops.h,v 1.2 2010/12/15 15:07:54 pooka Exp $	*/
 
 /*
  * Copyright (c) 2010 The NetBSD Foundation, Inc.
@@ -36,13 +36,11 @@
 
 	int (*op_open)(const char *, int, ...);
 	int (*op_close)(int);
-	int (*op_ioctl)(int, unsigned long, ...);
 };
 extern const struct prog_ops prog_ops;
 
 #define prog_init prog_ops.op_init
 #define prog_open prog_ops.op_open
 #define prog_close prog_ops.op_close
-#define prog_ioctl prog_ops.op_ioctl
 
 #endif /* _PROG_OPS_H_ */



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

2010-12-15 Thread Christoph Egger
Module Name:src
Committed By:   cegger
Date:   Wed Dec 15 14:45:47 UTC 2010

Modified Files:
src/sys/arch/xen/include: xenio.h

Log Message:
add privcmd ioctl that got introduced with Xen 4


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/sys/arch/xen/include/xenio.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/xen/include/xenio.h
diff -u src/sys/arch/xen/include/xenio.h:1.7 src/sys/arch/xen/include/xenio.h:1.8
--- src/sys/arch/xen/include/xenio.h:1.7	Fri Sep  3 06:07:24 2010
+++ src/sys/arch/xen/include/xenio.h	Wed Dec 15 14:45:47 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: xenio.h,v 1.7 2010/09/03 06:07:24 cegger Exp $	*/
+/*	$NetBSD: xenio.h,v 1.8 2010/12/15 14:45:47 cegger Exp $	*/
 
 /**
  * privcmd.h
@@ -58,6 +58,14 @@
 unsigned long *arr; /* array of mfns - top nibble set on err */
 } privcmd_mmapbatch_t; 
 
+typedef struct privcmd_mmapbatch_v2 {
+int num; /* number of pages to populate */
+domid_t dom; /* target domain */
+uint64_t addr;  /* virtual address */
+const xen_pfn_t *arr; /* array of mfns */
+int *err; /* array of error codes */
+} privcmd_mmapbatch_v2_t; 
+
 typedef struct privcmd_blkmsg
 {
 unsigned long op;
@@ -103,6 +111,8 @@
  */
 #define IOCTL_PRIVCMD_INITDOMAIN_EVTCHN \
 _IOR('P', 5, int)
+#define IOCTL_PRIVCMD_MMAPBATCH_V2  \
+_IOW('P", 6, privcmd_mmapbatch_v2_t)
 
 /* Interface to /dev/xenevt */
 /* EVTCHN_RESET: Clear and reinit the event buffer. Clear error condition. */



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

2010-12-15 Thread Christoph Egger
Module Name:src
Committed By:   cegger
Date:   Wed Dec 15 14:28:22 UTC 2010

Added Files:
src/sys/arch/xen/include: xenio_gntdev.h

Log Message:
add gnttab ioctl definitions to implement


To generate a diff of this commit:
cvs rdiff -u -r0 -r1.1 src/sys/arch/xen/include/xenio_gntdev.h

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

Added files:

Index: src/sys/arch/xen/include/xenio_gntdev.h
diff -u /dev/null src/sys/arch/xen/include/xenio_gntdev.h:1.1
--- /dev/null	Wed Dec 15 14:28:22 2010
+++ src/sys/arch/xen/include/xenio_gntdev.h	Wed Dec 15 14:28:22 2010
@@ -0,0 +1,119 @@
+/**
+ * gntdev.h
+ * 
+ * Interface to /dev/xen/gntdev.
+ * 
+ * Copyright (c) 2007, D G Murray
+ * 
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License version 2
+ * as published by the Free Software Foundation; or, when distributed
+ * separately from the Linux kernel or incorporated into other
+ * software packages, subject to the following license:
+ * 
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this source file (the "Software"), to deal in the Software without
+ * restriction, including without limitation the rights to use, copy, modify,
+ * merge, publish, distribute, sublicense, and/or sell copies of the Software,
+ * and to permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ * 
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ * 
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
+ * IN THE SOFTWARE.
+ */
+
+#ifndef __XEN_GNTDEV_H__
+#define __XEN_GNTDEV_H__
+
+struct ioctl_gntdev_grant_ref {
+	/* The domain ID of the grant to be mapped. */
+	uint32_t domid;
+	/* The grant reference of the grant to be mapped. */
+	uint32_t ref;
+};
+
+/*
+ * Inserts the grant references into the mapping table of an instance
+ * of gntdev. N.B. This does not perform the mapping, which is deferred
+ * until mmap() is called with @index as the offset.
+ */
+#define IOCTL_GNTDEV_MAP_GRANT_REF\
+	_IOWR('G', 0, sizeof(struct ioctl_gntdev_map_grant_ref))
+struct ioctl_gntdev_map_grant_ref {
+	/* IN parameters */
+	/* The number of grants to be mapped. */
+	uint32_t count;
+	uint32_t pad;
+	/* OUT parameters */
+	/* The offset to be used on a subsequent call to mmap(). */
+	uint64_t index;
+	/* Variable IN parameter. */
+	/* Array of grant references, of size @count. */
+	struct ioctl_gntdev_grant_ref refs[1];
+};
+
+/*
+ * Removes the grant references from the mapping table of an instance of
+ * of gntdev. N.B. munmap() must be called on the relevant virtual address(es)
+ * before this ioctl is called, or an error will result.
+ */
+#define IOCTL_GNTDEV_UNMAP_GRANT_REF\
+	_IOW('G', 1, sizeof(struct ioctl_gntdev_unmap_grant_ref))   
+struct ioctl_gntdev_unmap_grant_ref {
+	/* IN parameters */
+	/* The offset was returned by the corresponding map operation. */
+	uint64_t index;
+	/* The number of pages to be unmapped. */
+	uint32_t count;
+	uint32_t pad;
+};
+
+/*
+ * Returns the offset in the driver's address space that corresponds
+ * to @vaddr. This can be used to perform a munmap(), followed by an
+ * UNMAP_GRANT_REF ioctl, where no state about the offset is retained by
+ * the caller. The number of pages that were allocated at the same time as
+ * @vaddr is returned in @count.
+ *
+ * N.B. Where more than one page has been mapped into a contiguous range, the
+ *  supplied @vaddr must correspond to the start of the range; otherwise
+ *  an error will result. It is only possible to munmap() the entire
+ *  contiguously-allocated range at once, and not any subrange thereof.
+ */
+#define IOCTL_GNTDEV_GET_OFFSET_FOR_VADDR			\
+	_IOWR('G', 2, sizeof(struct ioctl_gntdev_get_offset_for_vaddr))
+struct ioctl_gntdev_get_offset_for_vaddr {
+	/* IN parameters */
+	/* The virtual address of the first mapped page in a range. */
+	uint64_t vaddr;
+	/* OUT parameters */
+	/* The offset that was used in the initial mmap() operation. */
+	uint64_t offset;
+	/* The number of pages mapped in the VM area that begins at @vaddr. */
+	uint32_t count;
+	uint32_t pad;
+};
+
+/*
+ * Sets the maximum number of grants that may mapped at once by this gntdev
+ * instance.
+ *
+ * N.B. This must be called before any other ioctl is

CVS commit: src/sys/uvm

2010-12-15 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Wed Dec 15 13:44:17 UTC 2010

Modified Files:
src/sys/uvm: uvm_fault.c

Log Message:
Remove duplicate asserts from when uvm_fault_lower1() was merged
into uvm_fault_lower() (the duplicates were there already before,
just in different functions).

reported by Alexander Nasonov on tech-kern


To generate a diff of this commit:
cvs rdiff -u -r1.175 -r1.176 src/sys/uvm/uvm_fault.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/uvm/uvm_fault.c
diff -u src/sys/uvm/uvm_fault.c:1.175 src/sys/uvm/uvm_fault.c:1.176
--- src/sys/uvm/uvm_fault.c:1.175	Tue Jun 22 18:34:50 2010
+++ src/sys/uvm/uvm_fault.c	Wed Dec 15 13:44:17 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: uvm_fault.c,v 1.175 2010/06/22 18:34:50 rmind Exp $	*/
+/*	$NetBSD: uvm_fault.c,v 1.176 2010/12/15 13:44:17 pooka Exp $	*/
 
 /*
  *
@@ -39,7 +39,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: uvm_fault.c,v 1.175 2010/06/22 18:34:50 rmind Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uvm_fault.c,v 1.176 2010/12/15 13:44:17 pooka Exp $");
 
 #include "opt_uvmhist.h"
 
@@ -1588,11 +1588,6 @@
 		uobjpage = pages[flt->centeridx];
 	}
 
-	/* locked: maps(read), amap(if there), uobj(if !null), uobjpage(if !null) */
-	KASSERT(amap == NULL || mutex_owned(&amap->am_l));
-	KASSERT(uobj == NULL || mutex_owned(&uobj->vmobjlock));
-	KASSERT(uobjpage == NULL || (uobjpage->flags & PG_BUSY) != 0);
-
 	/*
 	 * note that at this point we are done with any front or back pages.
 	 * we are now going to focus on the center page (i.e. the one we've



CVS commit: src/usr.sbin/inetd

2010-12-15 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Wed Dec 15 13:13:28 UTC 2010

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

Log Message:
Nuke conditionally compiled MULOG stuff.  Itojun wanted to do it
already 8 years ago when he fixed the compilation last time, and
again it hasn't been buildable in years.


To generate a diff of this commit:
cvs rdiff -u -r1.116 -r1.117 src/usr.sbin/inetd/inetd.c

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

Modified files:

Index: src/usr.sbin/inetd/inetd.c
diff -u src/usr.sbin/inetd/inetd.c:1.116 src/usr.sbin/inetd/inetd.c:1.117
--- src/usr.sbin/inetd/inetd.c:1.116	Thu Mar 25 16:36:00 2010
+++ src/usr.sbin/inetd/inetd.c	Wed Dec 15 13:13:28 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: inetd.c,v 1.116 2010/03/25 16:36:00 dholland Exp $	*/
+/*	$NetBSD: inetd.c,v 1.117 2010/12/15 13:13:28 pooka Exp $	*/
 
 /*-
  * Copyright (c) 1998, 2003 The NetBSD Foundation, Inc.
@@ -66,7 +66,7 @@
 #if 0
 static char sccsid[] = "@(#)inetd.c	8.4 (Berkeley) 4/13/94";
 #else
-__RCSID("$NetBSD: inetd.c,v 1.116 2010/03/25 16:36:00 dholland Exp $");
+__RCSID("$NetBSD: inetd.c,v 1.117 2010/12/15 13:13:28 pooka Exp $");
 #endif
 #endif /* not lint */
 
@@ -325,10 +325,6 @@
 	int	se_max;			/* max # of instances of this service */
 	int	se_count;		/* number started since se_time */
 	struct	timeval se_time;	/* start of se_count */
-#ifdef MULOG
-	int	se_log;
-#define MULOG_RFC931	0x4000
-#endif
 	struct	servtab *se_next;
 } *servtab;
 
@@ -383,11 +379,6 @@
 static struct kevent *	allocchange(void);
 static int	get_line(int, char *, int);
 static void	spawn(struct servtab *, int);
-#ifdef MULOG
-static void	dolog(struct servtab *, int);
-static void	timeout(int);
-static char*rfc931_name(struct sockaddr *, int);
-#endif
 
 struct biltin {
 	const char *bi_service;		/* internally provided service name */
@@ -736,10 +727,6 @@
 		if (debug)
 			fprintf(stderr, "%d execl %s\n",
 			getpid(), sep->se_server);
-#ifdef MULOG
-		if (sep->se_log)
-			dolog(sep, ctrl);
-#endif
 		/* Set our control descriptor to not close-on-exec... */
 		if (fcntl(ctrl, F_SETFD, 0) < 0)
 			syslog(LOG_ERR, "fcntl (%d, F_SETFD, 0): %m", ctrl);
@@ -1332,33 +1319,6 @@
 #endif
 		if (*cp == '#' || *cp == '\0')
 			continue;
-#ifdef MULOG
-		/* Avoid use of `skip' if there is a danger of it looking
-		 * at continuation lines.
-		 */
-		do {
-			cp++;
-		} while (*cp == ' ' || *cp == '\t');
-		if (*cp == '\0')
-			continue;
-		if ((arg = skip(&cp)) == NULL)
-			continue;
-		if (strcmp(arg, "DOMAIN"))
-			continue;
-		if (curdom)
-			free(curdom);
-		curdom = NULL;
-		while (*cp == ' ' || *cp == '\t')
-			cp++;
-		if (*cp == '\0')
-			continue;
-		arg = cp;
-		while (*cp && *cp != ' ' && *cp != '\t')
-			cp++;
-		if (*cp != '\0')
-			*cp++ = '\0';
-		curdom = newstr(arg);
-#endif
 		break;
 	}
 	if (cp == NULL)
@@ -1667,36 +1627,6 @@
 		sep->se_bi = NULL;
 	argc = 0;
 	for (arg = skip(&cp); cp; arg = skip(&cp)) {
-#if MULOG
-		char *colon;
-
-		if (argc == 0 && (colon = strrchr(arg, ':'))) {
-			while (arg < colon) {
-int	x;
-char	*ccp;
-
-switch (*arg++) {
-case 'l':
-	x = 1;
-	if (isdigit(*arg)) {
-		x = strtol(arg, &ccp, 0);
-		if (ccp == arg)
-			break;
-		arg = ccp;
-	}
-	sep->se_log &= ~MULOG_RFC931;
-	sep->se_log |= x;
-	break;
-case 'a':
-	sep->se_log |= MULOG_RFC931;
-	break;
-default:
-	break;
-}
-			}
-			arg = colon + 1;
-		}
-#endif
 		if (argc < MAXARGV)
 			sep->se_argv[argc++] = newstr(arg);
 	}
@@ -2243,246 +2173,6 @@
 	_exit(1);
 }
 
-#ifdef MULOG
-void
-dolog(struct servtab *sep, int ctrl)
-{
-	struct sockaddr_storage	ss;
-	struct sockaddr		*sa = (struct sockaddr *)&ss;
-	socklen_t		len = sizeof(ss);
-	char			*host, *dp, buf[BUFSIZ], abuf[BUFSIZ];
-	int			connected = 1;
-
-	switch (sep->se_family) {
-	case AF_INET:
-#ifdef INET6
-	case AF_INET6:
-#endif
-		break;
-	default:
-		return;
-	}
-
-	if (getpeername(ctrl, sa, &len) < 0) {
-		if (errno != ENOTCONN) {
-			syslog(LOG_ERR, "getpeername: %m");
-			return;
-		}
-		if (recvfrom(ctrl, buf, sizeof(buf), MSG_PEEK, sa, &len) < 0) {
-			syslog(LOG_ERR, "recvfrom: %m");
-			return;
-		}
-		connected = 0;
-	}
-	switch (sa->sa_family) {
-	case AF_INET:
-#ifdef INET6
-	case AF_INET6:
-#endif
-		break;
-	default:
-		syslog(LOG_ERR, "unexpected address family %u", sa->sa_family);
-		return;
-	}
-
-	if (getnameinfo(sa, len, buf, sizeof(buf), NULL, 0, 0) != 0)
-		strlcpy(buf, "?", sizeof(buf));
-	host = buf;
-
-	switch (sep->se_log & ~MULOG_RFC931) {
-	case 0:
-		return;
-	case 1:
-		if (curdom == NULL || *curdom == '\0')
-			break;
-		dp = host + strlen(host) - strlen(curdom);
-		if (dp < host)
-			break;
-		if (debug)
-			fprintf(stderr, "check \"%s\" against curdom \"%s\"\n",
-			host, curdom);
-		if (strcasecmp(dp, curdom) == 0)
-			return;
-		break;
-	case 2:
-	default:
-		break;
-	}
-
-	openlog("", L

CVS commit: src/sys/netsmb

2010-12-15 Thread Adam Hoka
Module Name:src
Committed By:   ahoka
Date:   Wed Dec 15 12:58:13 UTC 2010

Modified Files:
src/sys/netsmb: smb_dev.c smb_iod.c

Log Message:
take two on module support
XXX this wont work as a builtin module


To generate a diff of this commit:
cvs rdiff -u -r1.35 -r1.36 src/sys/netsmb/smb_dev.c
cvs rdiff -u -r1.37 -r1.38 src/sys/netsmb/smb_iod.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/netsmb/smb_dev.c
diff -u src/sys/netsmb/smb_dev.c:1.35 src/sys/netsmb/smb_dev.c:1.36
--- src/sys/netsmb/smb_dev.c:1.35	Sat Dec 11 04:21:17 2010
+++ src/sys/netsmb/smb_dev.c	Wed Dec 15 12:58:13 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: smb_dev.c,v 1.35 2010/12/11 04:21:17 christos Exp $	*/
+/*	$NetBSD: smb_dev.c,v 1.36 2010/12/15 12:58:13 ahoka Exp $	*/
 
 /*
  * Copyright (c) 2000-2001 Boris Popov
@@ -35,7 +35,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: smb_dev.c,v 1.35 2010/12/11 04:21:17 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: smb_dev.c,v 1.36 2010/12/15 12:58:13 ahoka Exp $");
 
 #include 
 #include 
@@ -462,6 +462,46 @@
 }
 
 DEV_MODULE (dev_netsmb, nsmb_dev_load, 0);
+#else
+
+#ifdef _MODULE
+
+#include 
+
+MODULE(MODULE_CLASS_MISC, nsmb, NULL);
+
+static int
+nsmb_modcmd(modcmd_t cmd, void *arg)
+{
+	devmajor_t cmajor = NODEVMAJOR, bmajor = NODEVMAJOR;
+	int error = 0;
+
+	switch (cmd) {
+	case MODULE_CMD_INIT:
+		nsmbattach(1);
+		error =
+		devsw_attach("nsmb", NULL, &bmajor, &nsmb_cdevsw, &cmajor);
+		if (error)
+			return error;
+
+		break;
+	case MODULE_CMD_FINI:
+		smb_iod_done();
+		smb_sm_done();
+		smb_rqpool_fini();
+		error = devsw_detach(NULL, &nsmb_cdevsw);
+		free(smb_devtbl, M_NSMBDEV);
+		break;
+	default:
+		error = ENOTTY;
+		break;
+	}
+	return error;
+	return 0;
+
+}
+#endif /* _MODULE */
+
 #endif /* !__NetBSD__ */
 
 /*

Index: src/sys/netsmb/smb_iod.c
diff -u src/sys/netsmb/smb_iod.c:1.37 src/sys/netsmb/smb_iod.c:1.38
--- src/sys/netsmb/smb_iod.c:1.37	Sat Dec 11 04:21:17 2010
+++ src/sys/netsmb/smb_iod.c	Wed Dec 15 12:58:13 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: smb_iod.c,v 1.37 2010/12/11 04:21:17 christos Exp $	*/
+/*	$NetBSD: smb_iod.c,v 1.38 2010/12/15 12:58:13 ahoka Exp $	*/
 
 /*
  * Copyright (c) 2000-2001 Boris Popov
@@ -35,7 +35,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: smb_iod.c,v 1.37 2010/12/11 04:21:17 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: smb_iod.c,v 1.38 2010/12/15 12:58:13 ahoka Exp $");
 
 #include 
 #include 
@@ -744,10 +744,8 @@
 	return 0;
 }
 
-#ifndef __NetBSD__
 int
 smb_iod_done(void)
 {
 	return 0;
 }
-#endif



CVS commit: src

2010-12-15 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Wed Dec 15 11:22:42 UTC 2010

Modified Files:
src/distrib/utils/x_netstat: Makefile
src/usr.bin/netstat: Makefile prog_ops.h

Log Message:
Deal with crunch the standard way.


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/distrib/utils/x_netstat/Makefile
cvs rdiff -u -r1.31 -r1.32 src/usr.bin/netstat/Makefile
cvs rdiff -u -r1.1 -r1.2 src/usr.bin/netstat/prog_ops.h

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

Modified files:

Index: src/distrib/utils/x_netstat/Makefile
diff -u src/distrib/utils/x_netstat/Makefile:1.10 src/distrib/utils/x_netstat/Makefile:1.11
--- src/distrib/utils/x_netstat/Makefile:1.10	Wed Dec 12 00:05:13 2001
+++ src/distrib/utils/x_netstat/Makefile	Wed Dec 15 11:22:42 2010
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.10 2001/12/12 00:05:13 tv Exp $
+#	$NetBSD: Makefile,v 1.11 2010/12/15 11:22:42 pooka Exp $
 
 SRCDIR=		${.CURDIR}/../../../usr.bin/netstat
 
@@ -7,7 +7,7 @@
 
 SRCS=		if.c inet.c main.c mbuf.c route.c
 
-CPPFLAGS+=	-DSMALL -I${SRCDIR}
+CPPFLAGS+=	-DSMALL -I${SRCDIR} -DCRUNCHOPS
 DPADD=		${LIBKVM}
 LDADD=		-lkvm
 

Index: src/usr.bin/netstat/Makefile
diff -u src/usr.bin/netstat/Makefile:1.31 src/usr.bin/netstat/Makefile:1.32
--- src/usr.bin/netstat/Makefile:1.31	Wed Dec 15 09:15:05 2010
+++ src/usr.bin/netstat/Makefile	Wed Dec 15 11:22:41 2010
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.31 2010/12/15 09:15:05 he Exp $
+#	$NetBSD: Makefile,v 1.32 2010/12/15 11:22:41 pooka Exp $
 #	from: @(#)Makefile	8.1 (Berkeley) 6/12/93
 
 .include 
@@ -23,10 +23,6 @@
 RUMPSRCS+= sysctlbyname.c sysctlgetmibinfo.c sysctlnametomib.c
 RUMPSRCS+= if_indextoname.c getifaddrs.c
 
-.if defined(CRUNCHEDPROG)
-SRCS+=	netstat_hostops.c
-.endif
-
 .if (${USE_INET6} != "no")
 CPPFLAGS+= -DINET6
 .endif

Index: src/usr.bin/netstat/prog_ops.h
diff -u src/usr.bin/netstat/prog_ops.h:1.1 src/usr.bin/netstat/prog_ops.h:1.2
--- src/usr.bin/netstat/prog_ops.h:1.1	Mon Dec 13 21:15:30 2010
+++ src/usr.bin/netstat/prog_ops.h	Wed Dec 15 11:22:41 2010
@@ -1,4 +1,4 @@
-/*  $NetBSD: prog_ops.h,v 1.1 2010/12/13 21:15:30 pooka Exp $	*/
+/*  $NetBSD: prog_ops.h,v 1.2 2010/12/15 11:22:41 pooka Exp $	*/
 
 /*
  * Copyright (c) 2010 The NetBSD Foundation, Inc.
@@ -31,6 +31,7 @@
 
 #include 
 
+#ifndef CRUNCHOPS
 struct prog_ops {
 	int (*op_init)(void);
 
@@ -41,5 +42,9 @@
 
 #define prog_init prog_ops.op_init
 #define prog_sysctl prog_ops.op_sysctl
+#else
+#define prog_init ((int (*)(void))NULL)
+#define prog_sysctl sysctl
+#endif
 
 #endif /* _PROG_OPS_H_ */



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

2010-12-15 Thread Adam Hamsik
Module Name:src
Committed By:   haad
Date:   Wed Dec 15 10:42:57 UTC 2010

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

Log Message:
Add usr.sbin/Attfile to test list.


To generate a diff of this commit:
cvs rdiff -u -r1.177 -r1.178 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.177 src/distrib/sets/lists/tests/mi:1.178
--- src/distrib/sets/lists/tests/mi:1.177	Wed Dec 15 00:17:34 2010
+++ src/distrib/sets/lists/tests/mi	Wed Dec 15 10:42:56 2010
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.177 2010/12/15 00:17:34 pooka Exp $
+# $NetBSD: mi,v 1.178 2010/12/15 10:42:56 haad Exp $
 #
 # Note: don't delete entries from here - mark them as "obsolete" instead.
 #
@@ -1687,6 +1687,7 @@
 ./usr/tests/syscall/t_cmsg			tests-syscall-tests	atf
 ./usr/tests/syscall/t_timer			tests-syscall-tests	atf
 ./usr/tests/usr.sbintests-util-tests
+./usr/tests/usr.sbin/Atffile			tests-sbin-tests	atf
 ./usr/tests/usr.sbin/traceroute			tests-util-tests
 ./usr/tests/usr.sbin/traceroute/Atffile		tests-util-tests	atf
 ./usr/tests/usr.sbin/traceroute/t_traceroute	tests-util-tests	atf



CVS commit: src/tests

2010-12-15 Thread Adam Hamsik
Module Name:src
Committed By:   haad
Date:   Wed Dec 15 10:36:50 UTC 2010

Modified Files:
src/tests: Makefile
Added Files:
src/tests/usr.sbin: Makefile

Log Message:
Hook traceroute test case to build. it was added to lists so unbreak build now.


To generate a diff of this commit:
cvs rdiff -u -r1.25 -r1.26 src/tests/Makefile
cvs rdiff -u -r0 -r1.1 src/tests/usr.sbin/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/Makefile
diff -u src/tests/Makefile:1.25 src/tests/Makefile:1.26
--- src/tests/Makefile:1.25	Wed Dec  8 23:56:02 2010
+++ src/tests/Makefile	Wed Dec 15 10:36:50 2010
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.25 2010/12/08 23:56:02 njoly Exp $
+# $NetBSD: Makefile,v 1.26 2010/12/15 10:36:50 haad Exp $
 
 .include 
 
@@ -8,7 +8,7 @@
 ATFFILE=	yes
 
 SUBDIR=		crypto dev fs games include ipf kernel lib libexec net
-SUBDIR+=	rump sbin sys syscall util
+SUBDIR+=	rump sbin sys syscall util usr.sbin
 
 . if ${MACHINE} != "evbppc" && ${MKKMOD} != "no"
 SUBDIR+= modules

Added files:

Index: src/tests/usr.sbin/Makefile
diff -u /dev/null src/tests/usr.sbin/Makefile:1.1
--- /dev/null	Wed Dec 15 10:36:50 2010
+++ src/tests/usr.sbin/Makefile	Wed Dec 15 10:36:49 2010
@@ -0,0 +1,8 @@
+# $NetBSD: Makefile,v 1.1 2010/12/15 10:36:49 haad Exp $
+.include 
+
+TESTSDIR=   ${TESTSBASE}/usr.sbin
+
+TESTS_SUBDIRS+= traceroute
+
+.include 



CVS commit: src/usr.bin/rump_allserver

2010-12-15 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Wed Dec 15 09:40:22 UTC 2010

Modified Files:
src/usr.bin/rump_allserver: rump_allserver.c

Log Message:
Sort options in usage same as in man page.
While here, replace \xa0 with ' '. Where do you get these from?


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/usr.bin/rump_allserver/rump_allserver.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/rump_allserver/rump_allserver.c
diff -u src/usr.bin/rump_allserver/rump_allserver.c:1.9 src/usr.bin/rump_allserver/rump_allserver.c:1.10
--- src/usr.bin/rump_allserver/rump_allserver.c:1.9	Tue Dec 14 16:40:05 2010
+++ src/usr.bin/rump_allserver/rump_allserver.c	Wed Dec 15 09:40:21 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: rump_allserver.c,v 1.9 2010/12/14 16:40:05 pooka Exp $	*/
+/*	$NetBSD: rump_allserver.c,v 1.10 2010/12/15 09:40:21 wiz Exp $	*/
 
 /*-
  * Copyright (c) 2010 Antti Kantee.  All Rights Reserved.
@@ -27,7 +27,7 @@
 
 #include 
 #ifndef lint
-__RCSID("$NetBSD: rump_allserver.c,v 1.9 2010/12/14 16:40:05 pooka Exp $");
+__RCSID("$NetBSD: rump_allserver.c,v 1.10 2010/12/15 09:40:21 wiz Exp $");
 #endif /* !lint */
 
 #include 
@@ -51,7 +51,7 @@
 usage(void)
 {
 
-	fprintf(stderr, "usage: %s [-d drivespec] [-l libs] [-m modules] [-s] "
+	fprintf(stderr, "usage: %s [-s] [-d drivespec] [-l libs] [-m modules] "
 	"bindurl\n", getprogname());
 	exit(1);
 }



CVS commit: src/usr.bin/netstat

2010-12-15 Thread Havard Eidnes
Module Name:src
Committed By:   he
Date:   Wed Dec 15 09:15:05 UTC 2010

Modified Files:
src/usr.bin/netstat: Makefile

Log Message:
Make this build with CRUNCHEDPROG defined, and default to the sysctl()
method of fetching information.  Apparently we can't simply not define
the prog_ops struct in this program.


To generate a diff of this commit:
cvs rdiff -u -r1.30 -r1.31 src/usr.bin/netstat/Makefile

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/netstat/Makefile
diff -u src/usr.bin/netstat/Makefile:1.30 src/usr.bin/netstat/Makefile:1.31
--- src/usr.bin/netstat/Makefile:1.30	Mon Dec 13 21:15:30 2010
+++ src/usr.bin/netstat/Makefile	Wed Dec 15 09:15:05 2010
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.30 2010/12/13 21:15:30 pooka Exp $
+#	$NetBSD: Makefile,v 1.31 2010/12/15 09:15:05 he Exp $
 #	from: @(#)Makefile	8.1 (Berkeley) 6/12/93
 
 .include 
@@ -23,6 +23,10 @@
 RUMPSRCS+= sysctlbyname.c sysctlgetmibinfo.c sysctlnametomib.c
 RUMPSRCS+= if_indextoname.c getifaddrs.c
 
+.if defined(CRUNCHEDPROG)
+SRCS+=	netstat_hostops.c
+.endif
+
 .if (${USE_INET6} != "no")
 CPPFLAGS+= -DINET6
 .endif



CVS commit: src/usr.bin/awk

2010-12-15 Thread Havard Eidnes
Module Name:src
Committed By:   he
Date:   Wed Dec 15 08:09:23 UTC 2010

Modified Files:
src/usr.bin/awk: Makefile

Log Message:
Make this build as part of the dist/miniroot build, where it's still
referenced.  Adjust for the move from dist/ to external/.


To generate a diff of this commit:
cvs rdiff -u -r1.14 -r1.15 src/usr.bin/awk/Makefile

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/awk/Makefile
diff -u src/usr.bin/awk/Makefile:1.14 src/usr.bin/awk/Makefile:1.15
--- src/usr.bin/awk/Makefile:1.14	Tue Apr 14 22:15:17 2009
+++ src/usr.bin/awk/Makefile	Wed Dec 15 08:09:23 2010
@@ -1,15 +1,15 @@
-#	$NetBSD: Makefile,v 1.14 2009/04/14 22:15:17 lukem Exp $
+#	$NetBSD: Makefile,v 1.15 2010/12/15 08:09:23 he Exp $
 
 WARNS?=	1	# fails -Wshadow -Wcast-qual
 
 .include 
 
-DIST=	${NETBSDSRCDIR}/dist
-.PATH:	${DIST}/nawk
+DIST=	${NETBSDSRCDIR}/external/historical/nawk/dist/
+.PATH:	${DIST}
 
 PROG=	awk
 SRCS=	awkgram.y b.c lex.c lib.c main.c parse.c proctab.c run.c tran.c
-CPPFLAGS+=	-I${DIST}/nawk -I. -DHAS_ISBLANK
+CPPFLAGS+=	-I${DIST} -I. -DHAS_ISBLANK
 LDADD+=	-lm
 .if !defined(HOSTPROG)
 DPADD+=	${LIBM}



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

2010-12-15 Thread Adam Hamsik
Module Name:src
Committed By:   haad
Date:   Wed Dec 15 08:09:02 UTC 2010

Modified Files:
src/sys/arch/i386/conf: MONOLITHIC

Log Message:
Enable device-mapper driver in MONOLITHIC kernels.


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 src/sys/arch/i386/conf/MONOLITHIC

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

Modified files:

Index: src/sys/arch/i386/conf/MONOLITHIC
diff -u src/sys/arch/i386/conf/MONOLITHIC:1.12 src/sys/arch/i386/conf/MONOLITHIC:1.13
--- src/sys/arch/i386/conf/MONOLITHIC:1.12	Sun Aug 22 18:56:21 2010
+++ src/sys/arch/i386/conf/MONOLITHIC	Wed Dec 15 08:09:02 2010
@@ -1,4 +1,4 @@
-# $NetBSD: MONOLITHIC,v 1.12 2010/08/22 18:56:21 rmind Exp $
+# $NetBSD: MONOLITHIC,v 1.13 2010/12/15 08:09:02 haad Exp $
 #
 # Non MODULAR, used mostly as a reference as to what we modularized.
 #
@@ -64,3 +64,4 @@
 
 pseudo-device	pad		# pseudo audio device driver
 
+pseudo-device 	dm		# device-mapper device driver