CVS commit: src/sys/modules

2011-02-16 Thread Jukka Ruohonen
Module Name:src
Committed By:   jruoho
Date:   Wed Feb 16 08:01:53 UTC 2011

Modified Files:
src/sys/modules/acpibat: Makefile
src/sys/modules/acpidalb: Makefile
src/sys/modules/acpifan: Makefile
src/sys/modules/acpipmtr: Makefile
src/sys/modules/acpitz: Makefile
src/sys/modules/acpiverbose: Makefile
src/sys/modules/acpivga: Makefile
Added Files:
src/sys/modules/acpibat: acpibat.ioconf
src/sys/modules/acpidalb: acpidalb.ioconf
src/sys/modules/acpifan: acpifan.ioconf
src/sys/modules/acpipmtr: acpipmtr.ioconf
src/sys/modules/acpitz: acpitz.ioconf
src/sys/modules/acpiverbose: acpiverbose.ioconf
src/sys/modules/acpivga: acpivga.ioconf
Removed Files:
src/sys/modules/acpibat: ACPIBAT.ioconf
src/sys/modules/acpidalb: ACPIDALB.ioconf
src/sys/modules/acpifan: ACPIFAN.ioconf
src/sys/modules/acpipmtr: ACPIPMTR.ioconf
src/sys/modules/acpitz: ACPITZ.ioconf
src/sys/modules/acpiverbose: ACPIVERBOSE.ioconf
src/sys/modules/acpivga: ACPIVGA.ioconf

Log Message:
Convert the ioconf files to lower case for consistency. No functional change.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r0 src/sys/modules/acpibat/ACPIBAT.ioconf
cvs rdiff -u -r1.3 -r1.4 src/sys/modules/acpibat/Makefile
cvs rdiff -u -r0 -r1.1 src/sys/modules/acpibat/acpibat.ioconf
cvs rdiff -u -r1.1 -r0 src/sys/modules/acpidalb/ACPIDALB.ioconf
cvs rdiff -u -r1.1 -r1.2 src/sys/modules/acpidalb/Makefile
cvs rdiff -u -r0 -r1.1 src/sys/modules/acpidalb/acpidalb.ioconf
cvs rdiff -u -r1.1 -r0 src/sys/modules/acpifan/ACPIFAN.ioconf
cvs rdiff -u -r1.1 -r1.2 src/sys/modules/acpifan/Makefile
cvs rdiff -u -r0 -r1.1 src/sys/modules/acpifan/acpifan.ioconf
cvs rdiff -u -r1.1 -r0 src/sys/modules/acpipmtr/ACPIPMTR.ioconf
cvs rdiff -u -r1.1 -r1.2 src/sys/modules/acpipmtr/Makefile
cvs rdiff -u -r0 -r1.1 src/sys/modules/acpipmtr/acpipmtr.ioconf
cvs rdiff -u -r1.1 -r0 src/sys/modules/acpitz/ACPITZ.ioconf
cvs rdiff -u -r1.2 -r1.3 src/sys/modules/acpitz/Makefile
cvs rdiff -u -r0 -r1.1 src/sys/modules/acpitz/acpitz.ioconf
cvs rdiff -u -r1.1 -r0 src/sys/modules/acpiverbose/ACPIVERBOSE.ioconf
cvs rdiff -u -r1.3 -r1.4 src/sys/modules/acpiverbose/Makefile
cvs rdiff -u -r0 -r1.1 src/sys/modules/acpiverbose/acpiverbose.ioconf
cvs rdiff -u -r1.1 -r0 src/sys/modules/acpivga/ACPIVGA.ioconf
cvs rdiff -u -r1.1 -r1.2 src/sys/modules/acpivga/Makefile
cvs rdiff -u -r0 -r1.1 src/sys/modules/acpivga/acpivga.ioconf

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

Modified files:

Index: src/sys/modules/acpibat/Makefile
diff -u src/sys/modules/acpibat/Makefile:1.3 src/sys/modules/acpibat/Makefile:1.4
--- src/sys/modules/acpibat/Makefile:1.3	Mon Oct 25 07:48:04 2010
+++ src/sys/modules/acpibat/Makefile	Wed Feb 16 08:01:52 2011
@@ -1,11 +1,11 @@
-# $NetBSD: Makefile,v 1.3 2010/10/25 07:48:04 jruoho Exp $
+# $NetBSD: Makefile,v 1.4 2011/02/16 08:01:52 jruoho Exp $
 
 .include ../Makefile.inc
 
 .PATH:	${S}/dev/acpi
 
 KMOD=	acpibat
-IOCONF=	ACPIBAT.ioconf
+IOCONF=	acpibat.ioconf
 SRCS=	acpi_bat.c
 
 WARNS=	4

Index: src/sys/modules/acpidalb/Makefile
diff -u src/sys/modules/acpidalb/Makefile:1.1 src/sys/modules/acpidalb/Makefile:1.2
--- src/sys/modules/acpidalb/Makefile:1.1	Mon Oct 25 17:17:56 2010
+++ src/sys/modules/acpidalb/Makefile	Wed Feb 16 08:01:52 2011
@@ -1,11 +1,11 @@
-#	$NetBSD: Makefile,v 1.1 2010/10/25 17:17:56 jruoho Exp $
+#	$NetBSD: Makefile,v 1.2 2011/02/16 08:01:52 jruoho Exp $
 
 .include ../Makefile.inc
 
 .PATH:	${S}/dev/acpi
 
 KMOD=	acpidalb
-IOCONF=	ACPIDALB.ioconf
+IOCONF=	acpidalb.ioconf
 SRCS=	dalb_acpi.c
 
 WARNS=	4

Index: src/sys/modules/acpifan/Makefile
diff -u src/sys/modules/acpifan/Makefile:1.1 src/sys/modules/acpifan/Makefile:1.2
--- src/sys/modules/acpifan/Makefile:1.1	Sun Jan  9 15:12:34 2011
+++ src/sys/modules/acpifan/Makefile	Wed Feb 16 08:01:52 2011
@@ -1,11 +1,11 @@
-# $NetBSD: Makefile,v 1.1 2011/01/09 15:12:34 jruoho Exp $
+# $NetBSD: Makefile,v 1.2 2011/02/16 08:01:52 jruoho Exp $
 
 .include ../Makefile.inc
 
 .PATH:	${S}/dev/acpi
 
 KMOD=	acpifan
-IOCONF=	ACPIFAN.ioconf
+IOCONF=	acpifan.ioconf
 SRCS=	acpi_fan.c
 
 WARNS=	4

Index: src/sys/modules/acpipmtr/Makefile
diff -u src/sys/modules/acpipmtr/Makefile:1.1 src/sys/modules/acpipmtr/Makefile:1.2
--- src/sys/modules/acpipmtr/Makefile:1.1	Wed Jan  5 20:15:52 2011
+++ src/sys/modules/acpipmtr/Makefile	Wed Feb 16 08:01:52 2011
@@ -1,11 +1,11 @@
-# $NetBSD: Makefile,v 1.1 2011/01/05 20:15:52 jruoho Exp $
+# $NetBSD: Makefile,v 1.2 2011/02/16 08:01:52 jruoho Exp $
 
 .include ../Makefile.inc
 
 .PATH:	${S}/dev/acpi
 
 KMOD=	acpipmtr
-IOCONF=	ACPIPMTR.ioconf
+IOCONF=	acpipmtr.ioconf
 SRCS=	acpi_pmtr.c
 
 WARNS=	4

Index: src/sys/modules/acpitz/Makefile
diff -u src/sys/modules/acpitz/Makefile:1.2 src/sys/modules/acpitz/Makefile:1.3
--- 

CVS commit: src/sys/modules

2011-02-16 Thread Jukka Ruohonen
Module Name:src
Committed By:   jruoho
Date:   Wed Feb 16 08:08:14 UTC 2011

Modified Files:
src/sys/modules/aibs: Makefile
src/sys/modules/asus: Makefile
src/sys/modules/hpqlb: Makefile
Added Files:
src/sys/modules/aibs: aibs.ioconf
src/sys/modules/asus: asus.ioconf
src/sys/modules/hpqlb: hpqlb.ioconf
Removed Files:
src/sys/modules/aibs: AIBS.ioconf
src/sys/modules/asus: ASUS.ioconf
src/sys/modules/hpqlb: HPQLB.ioconf

Log Message:
Convert the ioconf files to lower case for consistency. No functional change.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r0 src/sys/modules/aibs/AIBS.ioconf
cvs rdiff -u -r1.2 -r1.3 src/sys/modules/aibs/Makefile
cvs rdiff -u -r0 -r1.1 src/sys/modules/aibs/aibs.ioconf
cvs rdiff -u -r1.1 -r0 src/sys/modules/asus/ASUS.ioconf
cvs rdiff -u -r1.1 -r1.2 src/sys/modules/asus/Makefile
cvs rdiff -u -r0 -r1.1 src/sys/modules/asus/asus.ioconf
cvs rdiff -u -r1.1 -r0 src/sys/modules/hpqlb/HPQLB.ioconf
cvs rdiff -u -r1.1 -r1.2 src/sys/modules/hpqlb/Makefile
cvs rdiff -u -r0 -r1.1 src/sys/modules/hpqlb/hpqlb.ioconf

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

Modified files:

Index: src/sys/modules/aibs/Makefile
diff -u src/sys/modules/aibs/Makefile:1.2 src/sys/modules/aibs/Makefile:1.3
--- src/sys/modules/aibs/Makefile:1.2	Tue Oct 26 03:11:10 2010
+++ src/sys/modules/aibs/Makefile	Wed Feb 16 08:08:14 2011
@@ -1,11 +1,11 @@
-#	$NetBSD: Makefile,v 1.2 2010/10/26 03:11:10 jruoho Exp $
+#	$NetBSD: Makefile,v 1.3 2011/02/16 08:08:14 jruoho Exp $
 
 .include ../Makefile.inc
 
 .PATH:	${S}/dev/acpi
 
 KMOD=	aibs
-IOCONF=	AIBS.ioconf
+IOCONF=	aibs.ioconf
 SRCS=	atk0110.c
 
 WARNS=	4

Index: src/sys/modules/asus/Makefile
diff -u src/sys/modules/asus/Makefile:1.1 src/sys/modules/asus/Makefile:1.2
--- src/sys/modules/asus/Makefile:1.1	Tue Oct 26 05:36:49 2010
+++ src/sys/modules/asus/Makefile	Wed Feb 16 08:08:14 2011
@@ -1,11 +1,11 @@
-#	$NetBSD: Makefile,v 1.1 2010/10/26 05:36:49 jruoho Exp $
+#	$NetBSD: Makefile,v 1.2 2011/02/16 08:08:14 jruoho Exp $
 
 .include ../Makefile.inc
 
 .PATH:	${S}/dev/acpi
 
 KMOD=	asus
-IOCONF=	ASUS.ioconf
+IOCONF=	asus.ioconf
 SRCS=	asus_acpi.c
 
 WARNS=	4

Index: src/sys/modules/hpqlb/Makefile
diff -u src/sys/modules/hpqlb/Makefile:1.1 src/sys/modules/hpqlb/Makefile:1.2
--- src/sys/modules/hpqlb/Makefile:1.1	Tue Oct 26 05:36:49 2010
+++ src/sys/modules/hpqlb/Makefile	Wed Feb 16 08:08:14 2011
@@ -1,11 +1,11 @@
-#	$NetBSD: Makefile,v 1.1 2010/10/26 05:36:49 jruoho Exp $
+#	$NetBSD: Makefile,v 1.2 2011/02/16 08:08:14 jruoho Exp $
 
 .include ../Makefile.inc
 
 .PATH:	${S}/dev/acpi
 
 KMOD=	hpqlb
-IOCONF=	HPQLB.ioconf
+IOCONF=	hpqlb.ioconf
 SRCS=	hpqlb_acpi.c
 
 WARNS=	4

Added files:

Index: src/sys/modules/aibs/aibs.ioconf
diff -u /dev/null src/sys/modules/aibs/aibs.ioconf:1.1
--- /dev/null	Wed Feb 16 08:08:14 2011
+++ src/sys/modules/aibs/aibs.ioconf	Wed Feb 16 08:08:14 2011
@@ -0,0 +1,10 @@
+# $NetBSD: aibs.ioconf,v 1.1 2011/02/16 08:08:14 jruoho Exp $
+
+ioconf aibs
+
+include conf/files
+include dev/acpi/files.acpi
+
+pseudo-root acpi*
+
+aibs* at acpi?

Index: src/sys/modules/asus/asus.ioconf
diff -u /dev/null src/sys/modules/asus/asus.ioconf:1.1
--- /dev/null	Wed Feb 16 08:08:14 2011
+++ src/sys/modules/asus/asus.ioconf	Wed Feb 16 08:08:14 2011
@@ -0,0 +1,10 @@
+# $NetBSD: asus.ioconf,v 1.1 2011/02/16 08:08:14 jruoho Exp $
+
+ioconf asus
+
+include conf/files
+include dev/acpi/files.acpi
+
+pseudo-root acpi*
+
+asus* at acpi?

Index: src/sys/modules/hpqlb/hpqlb.ioconf
diff -u /dev/null src/sys/modules/hpqlb/hpqlb.ioconf:1.1
--- /dev/null	Wed Feb 16 08:08:14 2011
+++ src/sys/modules/hpqlb/hpqlb.ioconf	Wed Feb 16 08:08:14 2011
@@ -0,0 +1,10 @@
+# $NetBSD: hpqlb.ioconf,v 1.1 2011/02/16 08:08:14 jruoho Exp $
+
+ioconf hpqlb
+
+include conf/files
+include dev/acpi/files.acpi
+
+pseudo-root acpi*
+
+hpqlb* at acpi?



CVS commit: src/sys

2011-02-16 Thread Jukka Ruohonen
Module Name:src
Committed By:   jruoho
Date:   Wed Feb 16 08:19:57 UTC 2011

Modified Files:
src/sys/dev/acpi/wmi: wmi_acpi.c wmi_dell.c wmi_hp.c wmi_msi.c
src/sys/modules/acpiwmi: Makefile
src/sys/modules/wmidell: Makefile
src/sys/modules/wmihp: Makefile
src/sys/modules/wmimsi: Makefile
Added Files:
src/sys/modules/acpiwmi: acpiwmi.ioconf
src/sys/modules/wmidell: wmidell.ioconf
src/sys/modules/wmihp: wmihp.ioconf
src/sys/modules/wmimsi: wmimsi.ioconf

Log Message:
Convert the homegrown module declarations to use ioconf.


To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.12 src/sys/dev/acpi/wmi/wmi_acpi.c
cvs rdiff -u -r1.6 -r1.7 src/sys/dev/acpi/wmi/wmi_dell.c
cvs rdiff -u -r1.4 -r1.5 src/sys/dev/acpi/wmi/wmi_hp.c
cvs rdiff -u -r1.3 -r1.4 src/sys/dev/acpi/wmi/wmi_msi.c
cvs rdiff -u -r1.2 -r1.3 src/sys/modules/acpiwmi/Makefile
cvs rdiff -u -r0 -r1.1 src/sys/modules/acpiwmi/acpiwmi.ioconf
cvs rdiff -u -r1.2 -r1.3 src/sys/modules/wmidell/Makefile
cvs rdiff -u -r0 -r1.1 src/sys/modules/wmidell/wmidell.ioconf
cvs rdiff -u -r1.2 -r1.3 src/sys/modules/wmihp/Makefile
cvs rdiff -u -r0 -r1.1 src/sys/modules/wmihp/wmihp.ioconf
cvs rdiff -u -r1.2 -r1.3 src/sys/modules/wmimsi/Makefile
cvs rdiff -u -r0 -r1.1 src/sys/modules/wmimsi/wmimsi.ioconf

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/acpi/wmi/wmi_acpi.c
diff -u src/sys/dev/acpi/wmi/wmi_acpi.c:1.11 src/sys/dev/acpi/wmi/wmi_acpi.c:1.12
--- src/sys/dev/acpi/wmi/wmi_acpi.c:1.11	Thu Oct 28 15:55:04 2010
+++ src/sys/dev/acpi/wmi/wmi_acpi.c	Wed Feb 16 08:19:56 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: wmi_acpi.c,v 1.11 2010/10/28 15:55:04 jruoho Exp $	*/
+/*	$NetBSD: wmi_acpi.c,v 1.12 2011/02/16 08:19:56 jruoho Exp $	*/
 
 /*-
  * Copyright (c) 2009, 2010 Jukka Ruohonen jruoho...@iki.fi
@@ -27,7 +27,7 @@
  * SUCH DAMAGE.
  */
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: wmi_acpi.c,v 1.11 2010/10/28 15:55:04 jruoho Exp $);
+__KERNEL_RCSID(0, $NetBSD: wmi_acpi.c,v 1.12 2011/02/16 08:19:56 jruoho Exp $);
 
 #include sys/param.h
 #include sys/device.h
@@ -800,78 +800,38 @@
 	return AcpiEvaluateObject(sc-sc_node-ad_handle, path, arg, obuf);
 }
 
-#ifdef _MODULE
-
 MODULE(MODULE_CLASS_DRIVER, acpiwmi, NULL);
-CFDRIVER_DECL(acpiwmi, DV_DULL, NULL);
-
-static int acpiwmiloc[] = { -1 };
-extern struct cfattach acpiwmi_ca;
-
-static struct cfparent acpiparent = {
-	acpinodebus, NULL, DVUNIT_ANY
-};
-
-static struct cfdata acpiwmi_cfdata[] = {
-	{
-		.cf_name = acpiwmi,
-		.cf_atname = acpiwmi,
-		.cf_unit = 0,
-		.cf_fstate = FSTATE_STAR,
-		.cf_loc = acpiwmiloc,
-		.cf_flags = 0,
-		.cf_pspec = acpiparent,
-	},
 
-	{ NULL, NULL, 0, 0, NULL, 0, NULL }
-};
+#ifdef _MODULE
+#include ioconf.c
+#endif
 
 static int
-acpiwmi_modcmd(modcmd_t cmd, void *opaque)
+acpiwmi_modcmd(modcmd_t cmd, void *aux)
 {
-	int err;
+	int rv = 0;
 
 	switch (cmd) {
 
 	case MODULE_CMD_INIT:
 
-		err = config_cfdriver_attach(acpiwmi_cd);
-
-		if (err != 0)
-			return err;
-
-		err = config_cfattach_attach(acpiwmi, acpiwmi_ca);
-
-		if (err != 0) {
-			config_cfdriver_detach(acpiwmi_cd);
-			return err;
-		}
-
-		err = config_cfdata_attach(acpiwmi_cfdata, 1);
-
-		if (err != 0) {
-			config_cfattach_detach(acpiwmi, acpiwmi_ca);
-			config_cfdriver_detach(acpiwmi_cd);
-			return err;
-		}
-
-		return 0;
+#ifdef _MODULE
+		rv = config_init_component(cfdriver_ioconf_acpiwmi,
+		cfattach_ioconf_acpiwmi, cfdata_ioconf_acpiwmi);
+#endif
+		break;
 
 	case MODULE_CMD_FINI:
 
-		err = config_cfdata_detach(acpiwmi_cfdata);
-
-		if (err != 0)
-			return err;
-
-		config_cfattach_detach(acpiwmi, acpiwmi_ca);
-		config_cfdriver_detach(acpiwmi_cd);
-
-		return 0;
+#ifdef _MODULE
+		rv = config_fini_component(cfdriver_ioconf_acpiwmi,
+		cfattach_ioconf_acpiwmi, cfdata_ioconf_acpiwmi);
+#endif
+		break;
 
 	default:
-		return ENOTTY;
+		rv = ENOTTY;
 	}
-}
 
-#endif	/* _MODULE */
+	return rv;
+}

Index: src/sys/dev/acpi/wmi/wmi_dell.c
diff -u src/sys/dev/acpi/wmi/wmi_dell.c:1.6 src/sys/dev/acpi/wmi/wmi_dell.c:1.7
--- src/sys/dev/acpi/wmi/wmi_dell.c:1.6	Mon Oct 25 07:53:22 2010
+++ src/sys/dev/acpi/wmi/wmi_dell.c	Wed Feb 16 08:19:56 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: wmi_dell.c,v 1.6 2010/10/25 07:53:22 jruoho Exp $ */
+/*	$NetBSD: wmi_dell.c,v 1.7 2011/02/16 08:19:56 jruoho Exp $ */
 
 /*-
  * Copyright (c) 2009, 2010 The NetBSD Foundation, Inc.
@@ -31,7 +31,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: wmi_dell.c,v 1.6 2010/10/25 07:53:22 jruoho Exp $);
+__KERNEL_RCSID(0, $NetBSD: wmi_dell.c,v 1.7 2011/02/16 08:19:56 jruoho Exp $);
 
 #include sys/param.h
 #include sys/device.h
@@ -233,78 +233,38 @@
 		event 0x%02X: %s\n, evt, AcpiFormatException(rv));
 }
 
-#ifdef _MODULE
-
 MODULE(MODULE_CLASS_DRIVER, wmidell, NULL);
-CFDRIVER_DECL(wmidell, DV_DULL, NULL);
 
-static int wmidellloc[] = { -1 };
-extern 

CVS commit: src/sys

2011-02-16 Thread Jukka Ruohonen
Module Name:src
Committed By:   jruoho
Date:   Wed Feb 16 08:35:53 UTC 2011

Modified Files:
src/sys/dev/acpi: acpi_acad.c acpi_button.c acpi_cpu.c acpi_lid.c
thinkpad_acpi.c
src/sys/modules/acpiacad: Makefile
src/sys/modules/acpibut: Makefile
src/sys/modules/acpicpu: Makefile
src/sys/modules/acpilid: Makefile
src/sys/modules/thinkpad: Makefile
Added Files:
src/sys/modules/acpiacad: acpiacad.ioconf
src/sys/modules/acpibut: acpibut.ioconf
src/sys/modules/acpicpu: acpicpu.ioconf
src/sys/modules/acpilid: acpilid.ioconf
src/sys/modules/thinkpad: thinkpad.ioconf

Log Message:
Use ioconf for the module declarations.


To generate a diff of this commit:
cvs rdiff -u -r1.48 -r1.49 src/sys/dev/acpi/acpi_acad.c
cvs rdiff -u -r1.39 -r1.40 src/sys/dev/acpi/acpi_button.c
cvs rdiff -u -r1.25 -r1.26 src/sys/dev/acpi/acpi_cpu.c
cvs rdiff -u -r1.42 -r1.43 src/sys/dev/acpi/acpi_lid.c
cvs rdiff -u -r1.33 -r1.34 src/sys/dev/acpi/thinkpad_acpi.c
cvs rdiff -u -r1.2 -r1.3 src/sys/modules/acpiacad/Makefile
cvs rdiff -u -r0 -r1.1 src/sys/modules/acpiacad/acpiacad.ioconf
cvs rdiff -u -r1.2 -r1.3 src/sys/modules/acpibut/Makefile
cvs rdiff -u -r0 -r1.1 src/sys/modules/acpibut/acpibut.ioconf
cvs rdiff -u -r1.5 -r1.6 src/sys/modules/acpicpu/Makefile
cvs rdiff -u -r0 -r1.1 src/sys/modules/acpicpu/acpicpu.ioconf
cvs rdiff -u -r1.2 -r1.3 src/sys/modules/acpilid/Makefile
cvs rdiff -u -r0 -r1.1 src/sys/modules/acpilid/acpilid.ioconf
cvs rdiff -u -r1.2 -r1.3 src/sys/modules/thinkpad/Makefile
cvs rdiff -u -r0 -r1.1 src/sys/modules/thinkpad/thinkpad.ioconf

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/acpi/acpi_acad.c
diff -u src/sys/dev/acpi/acpi_acad.c:1.48 src/sys/dev/acpi/acpi_acad.c:1.49
--- src/sys/dev/acpi/acpi_acad.c:1.48	Tue Jan  4 05:48:48 2011
+++ src/sys/dev/acpi/acpi_acad.c	Wed Feb 16 08:35:51 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: acpi_acad.c,v 1.48 2011/01/04 05:48:48 jruoho Exp $	*/
+/*	$NetBSD: acpi_acad.c,v 1.49 2011/02/16 08:35:51 jruoho Exp $	*/
 
 /*
  * Copyright 2001 Wasabi Systems, Inc.
@@ -40,7 +40,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: acpi_acad.c,v 1.48 2011/01/04 05:48:48 jruoho Exp $);
+__KERNEL_RCSID(0, $NetBSD: acpi_acad.c,v 1.49 2011/02/16 08:35:51 jruoho Exp $);
 
 #include sys/param.h
 #include sys/device.h
@@ -295,78 +295,38 @@
 	sc-sc_sme = NULL;
 }
 
-#ifdef _MODULE
-
 MODULE(MODULE_CLASS_DRIVER, acpiacad, NULL);
-CFDRIVER_DECL(acpiacad, DV_DULL, NULL);
 
-static int acpiacadloc[] = { -1 };
-extern struct cfattach acpiacad_ca;
-
-static struct cfparent acpiparent = {
-	acpinodebus, NULL, DVUNIT_ANY
-};
-
-static struct cfdata acpiacad_cfdata[] = {
-	{
-		.cf_name = acpiacad,
-		.cf_atname = acpiacad,
-		.cf_unit = 0,
-		.cf_fstate = FSTATE_STAR,
-		.cf_loc = acpiacadloc,
-		.cf_flags = 0,
-		.cf_pspec = acpiparent,
-	},
-
-	{ NULL, NULL, 0, 0, NULL, 0, NULL }
-};
+#ifdef _MODULE
+#include ioconf.c
+#endif
 
 static int
-acpiacad_modcmd(modcmd_t cmd, void *context)
+acpiacad_modcmd(modcmd_t cmd, void *aux)
 {
-	int err;
+	int rv = 0;
 
 	switch (cmd) {
 
 	case MODULE_CMD_INIT:
 
-		err = config_cfdriver_attach(acpiacad_cd);
-
-		if (err != 0)
-			return err;
-
-		err = config_cfattach_attach(acpiacad, acpiacad_ca);
-
-		if (err != 0) {
-			config_cfdriver_detach(acpiacad_cd);
-			return err;
-		}
-
-		err = config_cfdata_attach(acpiacad_cfdata, 1);
-
-		if (err != 0) {
-			config_cfattach_detach(acpiacad, acpiacad_ca);
-			config_cfdriver_detach(acpiacad_cd);
-			return err;
-		}
-
-		return 0;
+#ifdef _MODULE
+		rv = config_init_component(cfdriver_ioconf_acpiacad,
+		cfattach_ioconf_acpiacad, cfdata_ioconf_acpiacad);
+#endif
+		break;
 
 	case MODULE_CMD_FINI:
 
-		err = config_cfdata_detach(acpiacad_cfdata);
-
-		if (err != 0)
-			return err;
-
-		config_cfattach_detach(acpiacad, acpiacad_ca);
-		config_cfdriver_detach(acpiacad_cd);
-
-		return 0;
+#ifdef _MODULE
+		rv = config_fini_component(cfdriver_ioconf_acpiacad,
+		cfattach_ioconf_acpiacad, cfdata_ioconf_acpiacad);
+#endif
+		break;
 
 	default:
-		return ENOTTY;
+		rv = ENOTTY;
 	}
-}
 
-#endif	/* _MODULE */
+	return rv;
+}

Index: src/sys/dev/acpi/acpi_button.c
diff -u src/sys/dev/acpi/acpi_button.c:1.39 src/sys/dev/acpi/acpi_button.c:1.40
--- src/sys/dev/acpi/acpi_button.c:1.39	Mon Oct 25 07:48:03 2010
+++ src/sys/dev/acpi/acpi_button.c	Wed Feb 16 08:35:51 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: acpi_button.c,v 1.39 2010/10/25 07:48:03 jruoho Exp $	*/
+/*	$NetBSD: acpi_button.c,v 1.40 2011/02/16 08:35:51 jruoho Exp $	*/
 
 /*
  * Copyright 2001, 2003 Wasabi Systems, Inc.
@@ -40,7 +40,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: acpi_button.c,v 1.39 2010/10/25 07:48:03 jruoho Exp $);
+__KERNEL_RCSID(0, $NetBSD: acpi_button.c,v 1.40 2011/02/16 08:35:51 jruoho Exp $);
 
 #include sys/param.h
 #include 

CVS commit: src/sys/dev/acpi

2011-02-16 Thread Jukka Ruohonen
Module Name:src
Committed By:   jruoho
Date:   Wed Feb 16 09:05:13 UTC 2011

Modified Files:
src/sys/dev/acpi: acpi_bat.c acpi_display.c acpi_fan.c acpi_pmtr.c
acpi_tz.c asus_acpi.c atk0110.c dalb_acpi.c hpqlb_acpi.c

Log Message:
Change the preprocessor defines around the module(9)'s modcmd() calls such
that the modules show in modstat(8) even though these are builtin.


To generate a diff of this commit:
cvs rdiff -u -r1.108 -r1.109 src/sys/dev/acpi/acpi_bat.c
cvs rdiff -u -r1.8 -r1.9 src/sys/dev/acpi/acpi_display.c \
src/sys/dev/acpi/hpqlb_acpi.c
cvs rdiff -u -r1.3 -r1.4 src/sys/dev/acpi/acpi_fan.c
cvs rdiff -u -r1.2 -r1.3 src/sys/dev/acpi/acpi_pmtr.c
cvs rdiff -u -r1.78 -r1.79 src/sys/dev/acpi/acpi_tz.c
cvs rdiff -u -r1.21 -r1.22 src/sys/dev/acpi/asus_acpi.c
cvs rdiff -u -r1.15 -r1.16 src/sys/dev/acpi/atk0110.c
cvs rdiff -u -r1.16 -r1.17 src/sys/dev/acpi/dalb_acpi.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/acpi/acpi_bat.c
diff -u src/sys/dev/acpi/acpi_bat.c:1.108 src/sys/dev/acpi/acpi_bat.c:1.109
--- src/sys/dev/acpi/acpi_bat.c:1.108	Thu Jan 13 13:05:13 2011
+++ src/sys/dev/acpi/acpi_bat.c	Wed Feb 16 09:05:12 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: acpi_bat.c,v 1.108 2011/01/13 13:05:13 jruoho Exp $	*/
+/*	$NetBSD: acpi_bat.c,v 1.109 2011/02/16 09:05:12 jruoho Exp $	*/
 
 /*-
  * Copyright (c) 2003 The NetBSD Foundation, Inc.
@@ -75,7 +75,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: acpi_bat.c,v 1.108 2011/01/13 13:05:13 jruoho Exp $);
+__KERNEL_RCSID(0, $NetBSD: acpi_bat.c,v 1.109 2011/02/16 09:05:12 jruoho Exp $);
 
 #include sys/param.h
 #include sys/condvar.h
@@ -832,29 +832,38 @@
 	*props |= PROP_BATTCAP | PROP_BATTWARN | PROP_DRIVER_LIMITS;
 }
 
-#ifdef _MODULE
-
 MODULE(MODULE_CLASS_DRIVER, acpibat, NULL);
 
+#ifdef _MODULE
 #include ioconf.c
+#endif
 
 static int
-acpibat_modcmd(modcmd_t cmd, void *context)
+acpibat_modcmd(modcmd_t cmd, void *aux)
 {
+	int rv = 0;
 
 	switch (cmd) {
 
 	case MODULE_CMD_INIT:
-		return config_init_component(cfdriver_ioconf_acpibat,
+
+#ifdef _MODULE
+		rv = config_init_component(cfdriver_ioconf_acpibat,
 		cfattach_ioconf_acpibat, cfdata_ioconf_acpibat);
+#endif
+		break;
 
 	case MODULE_CMD_FINI:
-		return config_fini_component(cfdriver_ioconf_acpibat,
+
+#ifdef _MODULE
+		rv = config_fini_component(cfdriver_ioconf_acpibat,
 		cfattach_ioconf_acpibat, cfdata_ioconf_acpibat);
+#endif
+		break;
 
 	default:
-		return ENOTTY;
+		rv = ENOTTY;
 	}
-}
 
-#endif	/* _MODULE */
+	return rv;
+}

Index: src/sys/dev/acpi/acpi_display.c
diff -u src/sys/dev/acpi/acpi_display.c:1.8 src/sys/dev/acpi/acpi_display.c:1.9
--- src/sys/dev/acpi/acpi_display.c:1.8	Mon Jan 10 09:07:27 2011
+++ src/sys/dev/acpi/acpi_display.c	Wed Feb 16 09:05:12 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: acpi_display.c,v 1.8 2011/01/10 09:07:27 jruoho Exp $	*/
+/*	$NetBSD: acpi_display.c,v 1.9 2011/02/16 09:05:12 jruoho Exp $	*/
 
 /*-
  * Copyright (c) 2010 The NetBSD Foundation, Inc.
@@ -66,7 +66,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: acpi_display.c,v 1.8 2011/01/10 09:07:27 jruoho Exp $);
+__KERNEL_RCSID(0, $NetBSD: acpi_display.c,v 1.9 2011/02/16 09:05:12 jruoho Exp $);
 
 #include sys/param.h
 #include sys/device.h
@@ -2066,29 +2066,38 @@
 	return;
 }
 
-#ifdef _MODULE
-
 MODULE(MODULE_CLASS_DRIVER, acpivga, NULL);
 
+#ifdef _MODULE
 #include ioconf.c
+#endif
 
 static int
-acpivga_modcmd(modcmd_t cmd, void *context)
+acpivga_modcmd(modcmd_t cmd, void *aux)
 {
+	int rv = 0;
 
 	switch (cmd) {
 
 	case MODULE_CMD_INIT:
-		return config_init_component(cfdriver_ioconf_acpivga,
+
+#ifdef _MODULE
+		rv = config_init_component(cfdriver_ioconf_acpivga,
 		cfattach_ioconf_acpivga, cfdata_ioconf_acpivga);
+#endif
+		break;
 
 	case MODULE_CMD_FINI:
-		return config_fini_component(cfdriver_ioconf_acpivga,
+
+#ifdef _MODULE
+		rv = config_fini_component(cfdriver_ioconf_acpivga,
 		cfattach_ioconf_acpivga, cfdata_ioconf_acpivga);
+#endif
+		break;
 
 	default:
-		return ENOTTY;
+		rv = ENOTTY;
 	}
-}
 
-#endif	/* _MODULE */
+	return rv;
+}
Index: src/sys/dev/acpi/hpqlb_acpi.c
diff -u src/sys/dev/acpi/hpqlb_acpi.c:1.8 src/sys/dev/acpi/hpqlb_acpi.c:1.9
--- src/sys/dev/acpi/hpqlb_acpi.c:1.8	Tue Oct 26 05:28:29 2010
+++ src/sys/dev/acpi/hpqlb_acpi.c	Wed Feb 16 09:05:12 2011
@@ -1,4 +1,4 @@
-/* $NetBSD: hpqlb_acpi.c,v 1.8 2010/10/26 05:28:29 jruoho Exp $ */
+/* $NetBSD: hpqlb_acpi.c,v 1.9 2011/02/16 09:05:12 jruoho Exp $ */
 
 /*-
  * Copyright (c) 2008  Christoph Egger ceg...@netbsd.org
@@ -27,7 +27,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: hpqlb_acpi.c,v 1.8 2010/10/26 05:28:29 jruoho Exp $);
+__KERNEL_RCSID(0, $NetBSD: hpqlb_acpi.c,v 1.9 2011/02/16 09:05:12 jruoho Exp $);
 
 #include sys/param.h
 #include sys/device.h
@@ -303,29 +303,38 @@
 	return true;
 }
 
-#ifdef _MODULE
-
 MODULE(MODULE_CLASS_DRIVER, 

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

2011-02-16 Thread Jukka Ruohonen
Module Name:src
Committed By:   jruoho
Date:   Wed Feb 16 09:57:57 UTC 2011

Modified Files:
src/sys/arch/amd64/conf: GENERIC

Log Message:
Add (commented) aps(4) from i386 GENERIC.


To generate a diff of this commit:
cvs rdiff -u -r1.305 -r1.306 src/sys/arch/amd64/conf/GENERIC

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

Modified files:

Index: src/sys/arch/amd64/conf/GENERIC
diff -u src/sys/arch/amd64/conf/GENERIC:1.305 src/sys/arch/amd64/conf/GENERIC:1.306
--- src/sys/arch/amd64/conf/GENERIC:1.305	Wed Feb 16 03:16:57 2011
+++ src/sys/arch/amd64/conf/GENERIC	Wed Feb 16 09:57:57 2011
@@ -1,4 +1,4 @@
-# $NetBSD: GENERIC,v 1.305 2011/02/16 03:16:57 jym Exp $
+# $NetBSD: GENERIC,v 1.306 2011/02/16 09:57:57 jruoho Exp $
 #
 # GENERIC machine description file
 #
@@ -22,7 +22,7 @@
 
 options 	INCLUDE_CONFIG_FILE	# embed config file in kernel binary
 
-#ident 		GENERIC-$Revision: 1.305 $
+#ident 		GENERIC-$Revision: 1.306 $
 
 maxusers	64		# estimated number of users
 
@@ -476,6 +476,9 @@
 #dbcool* at iic? addr 0x2D		# Tyan S2881
 #dbcool* at iic? addr 0x2E		# Tyan S2882-D
 
+# IBM Thinkpad Active Protection System
+#aps0 	at isa? port 0x1600
+
 # Fintek Super I/O with hardware monitor
 #finsio0 	at isa? port 0x4e
 



CVS commit: src/sys/dev/isa

2011-02-16 Thread Jukka Ruohonen
Module Name:src
Committed By:   jruoho
Date:   Wed Feb 16 10:08:05 UTC 2011

Modified Files:
src/sys/dev/isa: aps.c

Log Message:
As suggested by Sverre Froyen in a follow-up to PR # 41698, change the
sensor names to real words (e.g. temperature 1 instead of TEMP_1).
No functional change; only consistent envstat(8) output with other sensors.


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 src/sys/dev/isa/aps.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/isa/aps.c
diff -u src/sys/dev/isa/aps.c:1.13 src/sys/dev/isa/aps.c:1.14
--- src/sys/dev/isa/aps.c:1.13	Tue Jan 18 16:45:11 2011
+++ src/sys/dev/isa/aps.c	Wed Feb 16 10:08:05 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: aps.c,v 1.13 2011/01/18 16:45:11 jmcneill Exp $	*/
+/*	$NetBSD: aps.c,v 1.14 2011/02/16 10:08:05 jruoho Exp $	*/
 /*	$OpenBSD: aps.c,v 1.15 2007/05/19 19:14:11 tedu Exp $	*/
 /*	$OpenBSD: aps.c,v 1.17 2008/06/27 06:08:43 canacar Exp $	*/
 /*
@@ -24,7 +24,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: aps.c,v 1.13 2011/01/18 16:45:11 jmcneill Exp $);
+__KERNEL_RCSID(0, $NetBSD: aps.c,v 1.14 2011/02/16 10:08:05 jruoho Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -326,15 +326,15 @@
 	strlcpy(sc-sc_sensor[idx].desc, string,			\
 	sizeof(sc-sc_sensor[idx].desc));
 
-	INITDATA(APS_SENSOR_XACCEL, ENVSYS_INTEGER, X_ACCEL);
-	INITDATA(APS_SENSOR_YACCEL, ENVSYS_INTEGER, Y_ACCEL);
-	INITDATA(APS_SENSOR_TEMP1, ENVSYS_STEMP, TEMP_1);
-	INITDATA(APS_SENSOR_TEMP2, ENVSYS_STEMP, TEMP_2);
-	INITDATA(APS_SENSOR_XVAR, ENVSYS_INTEGER, X_VAR);
-	INITDATA(APS_SENSOR_YVAR, ENVSYS_INTEGER, Y_VAR);
-	INITDATA(APS_SENSOR_KBACT, ENVSYS_INDICATOR, Keyboard Active);
-	INITDATA(APS_SENSOR_MSACT, ENVSYS_INDICATOR, Mouse Active);
-	INITDATA(APS_SENSOR_LIDOPEN, ENVSYS_INDICATOR, Lid Open);
+	INITDATA(APS_SENSOR_XACCEL, ENVSYS_INTEGER, x-acceleration);
+	INITDATA(APS_SENSOR_YACCEL, ENVSYS_INTEGER, y-acceleration);
+	INITDATA(APS_SENSOR_TEMP1, ENVSYS_STEMP, temperature 1);
+	INITDATA(APS_SENSOR_TEMP2, ENVSYS_STEMP, temperature 2);
+	INITDATA(APS_SENSOR_XVAR, ENVSYS_INTEGER, x-variable);
+	INITDATA(APS_SENSOR_YVAR, ENVSYS_INTEGER, y-variable);
+	INITDATA(APS_SENSOR_KBACT, ENVSYS_INDICATOR, keyboard active);
+	INITDATA(APS_SENSOR_MSACT, ENVSYS_INDICATOR, mouse active);
+	INITDATA(APS_SENSOR_LIDOPEN, ENVSYS_INDICATOR, lid open);
 
 	sc-sc_sme = sysmon_envsys_create();
 	for (i = 0; i  APS_NUM_SENSORS; i++) {



CVS commit: src/share/mk

2011-02-16 Thread Julio Merino
Module Name:src
Committed By:   jmmv
Date:   Wed Feb 16 10:13:00 UTC 2011

Modified Files:
src/share/mk: bsd.test.mk

Log Message:
Miscellaneous improvements from Garrett Cooper:
- Add to variables only once, instead of from within a loop.
- Use :tl instead of :M to match against strings for readability.
- Use CLEANFILES instead of a custom clean target.

Full release built successfully after this change.


To generate a diff of this commit:
cvs rdiff -u -r1.14 -r1.15 src/share/mk/bsd.test.mk

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

Modified files:

Index: src/share/mk/bsd.test.mk
diff -u src/share/mk/bsd.test.mk:1.14 src/share/mk/bsd.test.mk:1.15
--- src/share/mk/bsd.test.mk:1.14	Sun Feb  6 19:38:48 2011
+++ src/share/mk/bsd.test.mk	Wed Feb 16 10:13:00 2011
@@ -1,9 +1,9 @@
-# $NetBSD: bsd.test.mk,v 1.14 2011/02/06 19:38:48 jmmv Exp $
+# $NetBSD: bsd.test.mk,v 1.15 2011/02/16 10:13:00 jmmv Exp $
 #
 
 .include bsd.init.mk
 
-_TESTS=		# empty
+_TESTS:=	# empty
 
 .if defined(TESTS_SUBDIRS)
 SUBDIR+=	${TESTS_SUBDIRS}
@@ -13,33 +13,34 @@
 .include bsd.subdir.mk
 
 .if defined(TESTS_C)
+_TESTS+=	${TESTS_C}
 PROGS+=		${TESTS_C}
 LDADD+=		-latf-c
 .  for _T in ${TESTS_C}
 BINDIR.${_T}=	${TESTSDIR}
 MAN.${_T}?=	# empty
-_TESTS+=	${_T}
 .  endfor
 .endif
 
 .if defined(TESTS_CXX)
+_TESTS+=	${TESTS_CXX}
 PROGS_CXX+=	${TESTS_CXX}
 LDADD+=		-latf-c++ -latf-c
 .  for _T in ${TESTS_CXX}
 BINDIR.${_T}=	${TESTSDIR}
 MAN.${_T}?=	# empty
-_TESTS+=	${_T}
 .  endfor
 .endif
 
 .if defined(TESTS_SH)
+_TESTS+=		${TESTS_SH}
+CLEANFILES+=		${TESTS_SH}
 
 .  for _T in ${TESTS_SH}
 SCRIPTS+=		${_T}
 SCRIPTSDIR_${_T}=	${TESTSDIR}
 
-_TESTS+=		${_T}
-CLEANFILES+=		${_T} ${_T}.tmp
+CLEANFILES+=		${_T}.tmp
 
 TESTS_SH_SRC_${_T}?=	${_T}.sh
 ${_T}: ${TESTS_SH_SRC_${_T}}
@@ -53,11 +54,13 @@
 
 ATFFILE?=	auto
 
-.if empty(ATFFILE:M[Nn][Oo])
+.if ${ATFFILE:tl} != no
 FILES+=			Atffile
 FILESDIR_Atffile=	${TESTSDIR}
 
-.  if !empty(ATFFILE:M[Aa][Uu][Tt][Oo])
+.  if ${ATFFILE:tl} == auto
+CLEANFILES+=	Atffile Atffile.tmp
+
 realall: Atffile
 Atffile: Makefile
 	${_MKTARGET_CREATE}
@@ -71,10 +74,6 @@
 	echo tp: $${tp}; \
 	done; } Atffile.tmp
 	@mv Atffile.tmp Atffile
-
-clean: clean-atffile
-clean-atffile: .PHONY
-	rm -f Atffile Atffile.tmp
 .  endif
 
 .include bsd.files.mk



CVS commit: src/usr.bin/vmstat

2011-02-16 Thread Takeshi Nakayama
Module Name:src
Committed By:   nakayama
Date:   Wed Feb 16 12:58:38 UTC 2011

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

Log Message:
Fix header, format and total count of system interrupt counters.


To generate a diff of this commit:
cvs rdiff -u -r1.179 -r1.180 src/usr.bin/vmstat/vmstat.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/vmstat/vmstat.c
diff -u src/usr.bin/vmstat/vmstat.c:1.179 src/usr.bin/vmstat/vmstat.c:1.180
--- src/usr.bin/vmstat/vmstat.c:1.179	Sat Feb  5 13:12:07 2011
+++ src/usr.bin/vmstat/vmstat.c	Wed Feb 16 12:58:38 2011
@@ -1,4 +1,4 @@
-/* $NetBSD: vmstat.c,v 1.179 2011/02/05 13:12:07 mlelstv Exp $ */
+/* $NetBSD: vmstat.c,v 1.180 2011/02/16 12:58:38 nakayama Exp $ */
 
 /*-
  * Copyright (c) 1998, 2000, 2001, 2007 The NetBSD Foundation, Inc.
@@ -70,7 +70,7 @@
 #if 0
 static char sccsid[] = @(#)vmstat.c	8.2 (Berkeley) 3/1/95;
 #else
-__RCSID($NetBSD: vmstat.c,v 1.179 2011/02/05 13:12:07 mlelstv Exp $);
+__RCSID($NetBSD: vmstat.c,v 1.180 2011/02/16 12:58:38 nakayama Exp $);
 #endif
 #endif /* not lint */
 
@@ -1137,7 +1137,9 @@
 
 	counttotal = 0;
 	uptime = getuptime();
-	(void)printf(%-34s %16s %8s %s\n, event, total, rate, type);
+	if (type == EVCNT_TYPE_ANY)
+		(void)printf(%-34s %16s %8s %s\n, event, total, rate,
+		type);
 
 	if (memf == NULL) do {
 		const int mib[4] = { CTL_KERN, KERN_EVCNT, type,
@@ -1175,7 +1177,9 @@
 		while (evs  last_evs
 		 buflen = sizeof(*evs)/sizeof(uint64_t)
 		 buflen = evs-ev_len) {
-			(void)printf(%s %s%*s %16PRIu64 %8PRIu64 %s\n,
+			(void)printf(type == EVCNT_TYPE_ANY ?
+			%s %s%*s %16PRIu64 %8PRIu64 %s\n :
+			%s %s%*s %16PRIu64 %8PRIu64\n,
 			evs-ev_strings,
 			evs-ev_strings + evs-ev_grouplen + 1,
 			34 - (evs-ev_grouplen + 1 + evs-ev_namelen), ,
@@ -1184,8 +1188,8 @@
 			(evs-ev_type  __arraycount(evtypes) ?
 evtypes[evs-ev_type] : ?));
 			buflen -= evs-ev_len;
+			counttotal += evs-ev_count;
 			evs = (const void *)((const uint64_t *)evs + evs-ev_len);
-			counttotal += evcnt.ev_count++;
 		}
 		free(buf);
 		if (type != EVCNT_TYPE_ANY)
@@ -1211,7 +1215,9 @@
 		deref_kptr(evcnt.ev_name, evname,
 		(size_t)evcnt.ev_namelen + 1, event chain trashed);
 
-		(void)printf(%s %s%*s %16PRIu64 %8PRIu64 %s\n,
+		(void)printf(type == EVCNT_TYPE_ANY ?
+		%s %s%*s %16PRIu64 %8PRIu64 %s\n :
+		%s %s%*s %16PRIu64 %8PRIu64\n,
 		evgroup, evname,
 		34 - (evcnt.ev_grouplen + 1 + evcnt.ev_namelen), ,
 		evcnt.ev_count,
@@ -1219,7 +1225,7 @@
 		(evcnt.ev_type  __arraycount(evtypes) ?
 			evtypes[evcnt.ev_type] : ?));
 
-		counttotal += evcnt.ev_count++;
+		counttotal += evcnt.ev_count;
 	}
 	if (type != EVCNT_TYPE_ANY)
 		(void)printf(%-34s %16PRIu64 %8PRIu64\n,



CVS commit: src/sys/dev/acpi/wmi

2011-02-16 Thread Jukka Ruohonen
Module Name:src
Committed By:   jruoho
Date:   Wed Feb 16 13:15:49 UTC 2011

Modified Files:
src/sys/dev/acpi/wmi: wmi_dell.c wmi_eeepc.c wmi_hp.c wmi_msi.c

Log Message:
Make the WMI modules depend on the parent mapper.


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/sys/dev/acpi/wmi/wmi_dell.c
cvs rdiff -u -r1.1 -r1.2 src/sys/dev/acpi/wmi/wmi_eeepc.c
cvs rdiff -u -r1.5 -r1.6 src/sys/dev/acpi/wmi/wmi_hp.c
cvs rdiff -u -r1.4 -r1.5 src/sys/dev/acpi/wmi/wmi_msi.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/acpi/wmi/wmi_dell.c
diff -u src/sys/dev/acpi/wmi/wmi_dell.c:1.7 src/sys/dev/acpi/wmi/wmi_dell.c:1.8
--- src/sys/dev/acpi/wmi/wmi_dell.c:1.7	Wed Feb 16 08:19:56 2011
+++ src/sys/dev/acpi/wmi/wmi_dell.c	Wed Feb 16 13:15:49 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: wmi_dell.c,v 1.7 2011/02/16 08:19:56 jruoho Exp $ */
+/*	$NetBSD: wmi_dell.c,v 1.8 2011/02/16 13:15:49 jruoho Exp $ */
 
 /*-
  * Copyright (c) 2009, 2010 The NetBSD Foundation, Inc.
@@ -31,7 +31,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: wmi_dell.c,v 1.7 2011/02/16 08:19:56 jruoho Exp $);
+__KERNEL_RCSID(0, $NetBSD: wmi_dell.c,v 1.8 2011/02/16 13:15:49 jruoho Exp $);
 
 #include sys/param.h
 #include sys/device.h
@@ -233,7 +233,7 @@
 		event 0x%02X: %s\n, evt, AcpiFormatException(rv));
 }
 
-MODULE(MODULE_CLASS_DRIVER, wmidell, NULL);
+MODULE(MODULE_CLASS_DRIVER, wmidell, acpiwmi);
 
 #ifdef _MODULE
 #include ioconf.c

Index: src/sys/dev/acpi/wmi/wmi_eeepc.c
diff -u src/sys/dev/acpi/wmi/wmi_eeepc.c:1.1 src/sys/dev/acpi/wmi/wmi_eeepc.c:1.2
--- src/sys/dev/acpi/wmi/wmi_eeepc.c:1.1	Wed Feb 16 07:30:26 2011
+++ src/sys/dev/acpi/wmi/wmi_eeepc.c	Wed Feb 16 13:15:49 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: wmi_eeepc.c,v 1.1 2011/02/16 07:30:26 jruoho Exp $ */
+/*	$NetBSD: wmi_eeepc.c,v 1.2 2011/02/16 13:15:49 jruoho Exp $ */
 
 /*-
  * Copyright (c) 2011 The NetBSD Foundation, Inc.
@@ -31,7 +31,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: wmi_eeepc.c,v 1.1 2011/02/16 07:30:26 jruoho Exp $);
+__KERNEL_RCSID(0, $NetBSD: wmi_eeepc.c,v 1.2 2011/02/16 13:15:49 jruoho Exp $);
 
 #include sys/param.h
 #include sys/device.h
@@ -220,7 +220,7 @@
 		event 0x%02X: %s\n, evt, AcpiFormatException(rv));
 }
 
-MODULE(MODULE_CLASS_DRIVER, wmieeepc, NULL);
+MODULE(MODULE_CLASS_DRIVER, wmieeepc, acpiwmi);
 
 #ifdef _MODULE
 #include ioconf.c

Index: src/sys/dev/acpi/wmi/wmi_hp.c
diff -u src/sys/dev/acpi/wmi/wmi_hp.c:1.5 src/sys/dev/acpi/wmi/wmi_hp.c:1.6
--- src/sys/dev/acpi/wmi/wmi_hp.c:1.5	Wed Feb 16 08:19:56 2011
+++ src/sys/dev/acpi/wmi/wmi_hp.c	Wed Feb 16 13:15:49 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: wmi_hp.c,v 1.5 2011/02/16 08:19:56 jruoho Exp $ */
+/*	$NetBSD: wmi_hp.c,v 1.6 2011/02/16 13:15:49 jruoho Exp $ */
 
 /*-
  * Copyright (c) 2009, 2010 The NetBSD Foundation, Inc.
@@ -57,7 +57,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: wmi_hp.c,v 1.5 2011/02/16 08:19:56 jruoho Exp $);
+__KERNEL_RCSID(0, $NetBSD: wmi_hp.c,v 1.6 2011/02/16 13:15:49 jruoho Exp $);
 
 #include sys/param.h
 #include sys/device.h
@@ -531,7 +531,7 @@
 	}
 }
 
-MODULE(MODULE_CLASS_DRIVER, wmihp, NULL);
+MODULE(MODULE_CLASS_DRIVER, wmihp, acpiwmi);
 
 #ifdef _MODULE
 #include ioconf.c

Index: src/sys/dev/acpi/wmi/wmi_msi.c
diff -u src/sys/dev/acpi/wmi/wmi_msi.c:1.4 src/sys/dev/acpi/wmi/wmi_msi.c:1.5
--- src/sys/dev/acpi/wmi/wmi_msi.c:1.4	Wed Feb 16 08:19:56 2011
+++ src/sys/dev/acpi/wmi/wmi_msi.c	Wed Feb 16 13:15:49 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: wmi_msi.c,v 1.4 2011/02/16 08:19:56 jruoho Exp $ */
+/*	$NetBSD: wmi_msi.c,v 1.5 2011/02/16 13:15:49 jruoho Exp $ */
 
 /*-
  * Copyright (c) 2010 The NetBSD Foundation, Inc.
@@ -31,7 +31,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: wmi_msi.c,v 1.4 2011/02/16 08:19:56 jruoho Exp $);
+__KERNEL_RCSID(0, $NetBSD: wmi_msi.c,v 1.5 2011/02/16 13:15:49 jruoho Exp $);
 
 #include sys/param.h
 #include sys/device.h
@@ -194,7 +194,7 @@
 		event 0x%02X: %s\n, evt, AcpiFormatException(rv));
 }
 
-MODULE(MODULE_CLASS_DRIVER, wmimsi, NULL);
+MODULE(MODULE_CLASS_DRIVER, wmimsi, acpiwmi);
 
 #ifdef _MODULE
 #include ioconf.c



CVS commit: src/lib

2011-02-16 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Wed Feb 16 15:33:47 UTC 2011

Modified Files:
src/lib/librumpclient: rumpclient.c rumpclient.h
src/lib/librumphijack: hijack.c

Log Message:
Push the fiddly tasks for exec and fork from rumphijack to rumpclient.
This makes it possible easily execute those operations also from
non-hijacked rump clients (plus fixes one memory leak in an error
branch).


To generate a diff of this commit:
cvs rdiff -u -r1.29 -r1.30 src/lib/librumpclient/rumpclient.c
cvs rdiff -u -r1.6 -r1.7 src/lib/librumpclient/rumpclient.h
cvs rdiff -u -r1.41 -r1.42 src/lib/librumphijack/hijack.c

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

Modified files:

Index: src/lib/librumpclient/rumpclient.c
diff -u src/lib/librumpclient/rumpclient.c:1.29 src/lib/librumpclient/rumpclient.c:1.30
--- src/lib/librumpclient/rumpclient.c:1.29	Tue Feb 15 10:37:07 2011
+++ src/lib/librumpclient/rumpclient.c	Wed Feb 16 15:33:47 2011
@@ -1,4 +1,4 @@
-/*  $NetBSD: rumpclient.c,v 1.29 2011/02/15 10:37:07 pooka Exp $	*/
+/*  $NetBSD: rumpclient.c,v 1.30 2011/02/16 15:33:47 pooka Exp $	*/
 
 /*
  * Copyright (c) 2010, 2011 Antti Kantee.  All Rights Reserved.
@@ -74,6 +74,8 @@
 int	(*host_kevent)(int, const struct kevent *, size_t,
 		   struct kevent *, size_t, const struct timespec *);
 
+int	(*host_execve)(const char *, char *const[], char *const[]);
+
 #include sp_common.c
 
 static struct spclient clispc = {
@@ -748,6 +750,7 @@
 	FINDSYM(setsockopt);
 	FINDSYM(dup);
 	FINDSYM(kqueue);
+	FINDSYM(execve);
 #if !__NetBSD_Prereq__(5,99,7)
 	FINDSYM(kevent);
 #else
@@ -813,7 +816,7 @@
 	pthread_sigmask(SIG_SETMASK, fullset, omask);
 	rpf = malloc(sizeof(*rpf));
 	if (rpf == NULL)
-		return NULL;
+		goto out;
 
 	if ((rv = prefork_req(clispc, omask, resp)) != 0) {
 		free(rpf);
@@ -926,6 +929,30 @@
 	return 0;
 }
 
+pid_t
+rumpclient_fork(pid_t (*forkfn)(void))
+{
+	struct rumpclient_fork *rf;
+	pid_t rv;
+
+	if ((rf = rumpclient_prefork()) == NULL)
+		return -1;
+
+	switch ((rv = forkfn())) {
+	case -1:
+		/* XXX: cancel rf */
+		break;
+	case 0:
+		if (rumpclient_fork_init(rf) == -1)
+			rv = -1;
+		break;
+	default:
+		break;
+	}
+
+	return rv;
+}
+
 /*
  * Process is about to exec.  Save info about our existing connection
  * in the env.  rumpclient will check for this info in init().
@@ -933,13 +960,13 @@
  * may use it as well.
  */
 int
-rumpclient__exec_augmentenv(char *const oenv1[], char *const oenv2[],
-	char ***newenvp)
+rumpclient_exec(const char *path, char *const argv[], char *const envp[])
 {
 	char buf[4096];
 	char **newenv;
 	char *envstr, *envstr2;
-	size_t nelem1, nelem2;
+	size_t nelem;
+	int rv, sverrno;
 
 	snprintf(buf, sizeof(buf), RUMPCLIENT__EXECFD=%d,%d,
 	clispc.spc_fd, kq);
@@ -963,31 +990,28 @@
 		envstr2 = NULL;
 	}
 
-	nelem1 = 0;
-	if (oenv1) {
-		for (; oenv1[nelem1]; nelem1++)
-			continue;
-	}
-	nelem2 = 0;
-	if (oenv2) {
-		for (; oenv2[nelem2]; nelem2++)
-			continue;
-	}
+	for (nelem = 0; envp  envp[nelem]; nelem++)
+		continue;
 
-	newenv = malloc(sizeof(*newenv) * nelem1+nelem2+3);
+	newenv = malloc(sizeof(*newenv) * nelem+3);
 	if (newenv == NULL) {
 		free(envstr2);
 		free(envstr);
 		return ENOMEM;
 	}
-	memcpy(newenv[0], oenv1, sizeof(*oenv1) * nelem1);
-	memcpy(newenv[nelem1], oenv2, sizeof(*oenv2) * nelem2);
-
-	newenv[nelem1+nelem2] = envstr;
-	newenv[nelem1+nelem2+1] = envstr2;
-	newenv[nelem1+nelem2+2] = NULL;
-
-	*newenvp = newenv;
+	memcpy(newenv[0], envp, nelem*sizeof(*envp));
 
-	return 0;
+	newenv[nelem] = envstr;
+	newenv[nelem+1] = envstr2;
+	newenv[nelem+2] = NULL;
+
+	rv = host_execve(path, argv, newenv);
+
+	_DIAGASSERT(rv != 0);
+	sverrno = errno;
+	free(envstr2);
+	free(envstr);
+	free(newenv);
+	errno = sverrno;
+	return rv;
 }

Index: src/lib/librumpclient/rumpclient.h
diff -u src/lib/librumpclient/rumpclient.h:1.6 src/lib/librumpclient/rumpclient.h:1.7
--- src/lib/librumpclient/rumpclient.h:1.6	Mon Feb 14 14:56:23 2011
+++ src/lib/librumpclient/rumpclient.h	Wed Feb 16 15:33:47 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: rumpclient.h,v 1.6 2011/02/14 14:56:23 pooka Exp $	*/
+/*	$NetBSD: rumpclient.h,v 1.7 2011/02/16 15:33:47 pooka Exp $	*/
 
 /*-
  * Copyright (c) 2010 Antti Kantee.  All Rights Reserved.
@@ -39,6 +39,9 @@
 struct rumpclient_fork *rumpclient_prefork(void);
 int			rumpclient_fork_init(struct rumpclient_fork *);
 
+int rumpclient_fork(pid_t (*forkfn)(void));
+int rumpclient_exec(const char *, char *const [], char *const[]);
+
 #define RUMPCLIENT_RETRYCONN_INFTIME ((time_t)-1)
 #define RUMPCLIENT_RETRYCONN_ONCE ((time_t)-2)
 #define RUMPCLIENT_RETRYCONN_DIE ((time_t)-3)
@@ -50,7 +53,6 @@
 	RUMPCLIENT_CLOSE_FCLOSEM
 };
 int rumpclient__closenotify(int *, enum rumpclient_closevariant);
-int rumpclient__exec_augmentenv(char *const[], char *const[], char ***);
 
 __END_DECLS
 

Index: src/lib/librumphijack/hijack.c
diff -u 

CVS commit: src/tests/lib/librumpclient

2011-02-16 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Wed Feb 16 15:34:18 UTC 2011

Modified Files:
src/tests/lib/librumpclient: h_exec.c t_exec.sh

Log Message:
Don't use hijack here since exec is now easy in pure rump clients.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/tests/lib/librumpclient/h_exec.c
cvs rdiff -u -r1.2 -r1.3 src/tests/lib/librumpclient/t_exec.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/lib/librumpclient/h_exec.c
diff -u src/tests/lib/librumpclient/h_exec.c:1.3 src/tests/lib/librumpclient/h_exec.c:1.4
--- src/tests/lib/librumpclient/h_exec.c:1.3	Tue Feb 15 15:57:33 2011
+++ src/tests/lib/librumpclient/h_exec.c	Wed Feb 16 15:34:18 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: h_exec.c,v 1.3 2011/02/15 15:57:33 pooka Exp $	*/
+/*	$NetBSD: h_exec.c,v 1.4 2011/02/16 15:34:18 pooka Exp $	*/
 
 /*
  * Copyright (c) 2011 The NetBSD Foundation, Inc.
@@ -40,10 +40,8 @@
 #include string.h
 #include unistd.h
 
-/*
- * Uses rumphijack because it's convenient with exec.  XXX: fixme to
- * have sensible exec support in rumpclient.
- */
+#include rump/rumpclient.h
+#include rump/rump_syscalls.h
 
 int
 main(int argc, char *argv[])
@@ -52,6 +50,11 @@
 	socklen_t slen;
 	int s1, s2;
 	char buf[12];
+	char *eargv[4];
+	extern char **environ;
+
+	if (rumpclient_init() == -1)
+		err(1, init);
 
 	if (argc  1) {
 		if (strcmp(argv[1], _didexec) == 0) {
@@ -59,14 +62,14 @@
 			s2 = atoi(argv[2]);
 			slen = sizeof(sin);
 			/* see below */
-			accept(s2, (struct sockaddr *)sin, slen);
+			rump_sys_accept(s2, (struct sockaddr *)sin, slen);
 		}
 	}
 
 	/* open and listenize two TCP4 suckets */
-	if ((s1 = socket(PF_INET, SOCK_STREAM, 0)) == -1)
+	if ((s1 = rump_sys_socket(PF_INET, SOCK_STREAM, 0)) == -1)
 		err(1, socket 1);
-	if ((s2 = socket(PF_INET, SOCK_STREAM, 0)) == -1)
+	if ((s2 = rump_sys_socket(PF_INET, SOCK_STREAM, 0)) == -1)
 		err(1, socket 2);
 
 	memset(sin, 0, sizeof(sin));
@@ -74,15 +77,15 @@
 	sin.sin_family = AF_INET;
 	sin.sin_port = htons(1234);
 
-	if (bind(s1, (struct sockaddr *)sin, sizeof(sin)) == -1)
+	if (rump_sys_bind(s1, (struct sockaddr *)sin, sizeof(sin)) == -1)
 		err(1, bind1);
 	sin.sin_port = htons(2345);
-	if (bind(s2, (struct sockaddr *)sin, sizeof(sin)) == -1)
+	if (rump_sys_bind(s2, (struct sockaddr *)sin, sizeof(sin)) == -1)
 		err(1, bind2);
 
-	if (listen(s1, 1) == -1)
+	if (rump_sys_listen(s1, 1) == -1)
 		err(1, listen1);
-	if (listen(s2, 1) == -1)
+	if (rump_sys_listen(s2, 1) == -1)
 		err(1, listen2);
 
 	if (argc == 1) {
@@ -92,17 +95,21 @@
 		 * pause(), but conveniently gets rid of this helper
 		 * since we were called with RUMPCLIENT_RETRYCONN_DIE set
 		 */
-		accept(s2, (struct sockaddr *)sin, slen);
+		rump_sys_accept(s2, (struct sockaddr *)sin, slen);
 	}
 
 	if (argc == 3  strcmp(argv[2], cloexec1) == 0) {
-		if (fcntl(s1, F_SETFD, FD_CLOEXEC) == -1) {
+		if (rump_sys_fcntl(s1, F_SETFD, FD_CLOEXEC) == -1) {
 			err(1, cloexec failed);
 		}
 	}
 
 	/* omstart! */
 	sprintf(buf, %d, s2);
-	if (execl(argv[1], h_ution, _didexec, buf, NULL) == -1)
+	eargv[0] = __UNCONST(h_ution);
+	eargv[1] = __UNCONST(_didexec);
+	eargv[2] = buf;
+	eargv[3] = NULL;
+	if (rumpclient_exec(argv[1], __UNCONST(eargv), environ) == -1)
 		err(1, exec);
 }

Index: src/tests/lib/librumpclient/t_exec.sh
diff -u src/tests/lib/librumpclient/t_exec.sh:1.2 src/tests/lib/librumpclient/t_exec.sh:1.3
--- src/tests/lib/librumpclient/t_exec.sh:1.2	Tue Feb 15 15:54:56 2011
+++ src/tests/lib/librumpclient/t_exec.sh	Wed Feb 16 15:34:18 2011
@@ -1,4 +1,4 @@
-#   $NetBSD: t_exec.sh,v 1.2 2011/02/15 15:54:56 pooka Exp $
+#   $NetBSD: t_exec.sh,v 1.3 2011/02/16 15:34:18 pooka Exp $
 #
 # Copyright (c) 2011 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -39,8 +39,7 @@
 {
 
 	atf_check -s exit:0 ${rumpsrv} ${RUMP_SERVER}
-	atf_check -s exit:0 env LD_PRELOAD=/usr/lib/librumphijack.so \
-	$(atf_get_srcdir)/h_exec
+	atf_check -s exit:0 env $(atf_get_srcdir)/h_exec
 	atf_check -s exit:0 -o save:sstat.out rump.sockstat
 	atf_check -s exit:0 -o match:'^root.*h_exec.*tcp.*\*\.1234' \
 	sed -n 2p sstat.out
@@ -63,8 +62,7 @@
 {
 
 	atf_check -s exit:0 ${rumpsrv} ${RUMP_SERVER}
-	atf_check -s exit:0 env LD_PRELOAD=/usr/lib/librumphijack.so \
-	$(atf_get_srcdir)/h_exec $(atf_get_srcdir)/h_ution
+	atf_check -s exit:0 $(atf_get_srcdir)/h_exec $(atf_get_srcdir)/h_ution
 	atf_check -s exit:0 -o save:sstat.out rump.sockstat
 	atf_check -s exit:0 -o match:'^root.*h_ution.*tcp.*\*\.1234' \
 	sed -n 2p sstat.out
@@ -87,7 +85,7 @@
 {
 
 	atf_check -s exit:0 ${rumpsrv} ${RUMP_SERVER}
-	atf_check -s exit:0 env LD_PRELOAD=/usr/lib/librumphijack.so \
+	atf_check -s exit:0  \
 	$(atf_get_srcdir)/h_exec $(atf_get_srcdir)/h_ution cloexec1
 	atf_check -s exit:0 -o save:sstat.out rump.sockstat
 	atf_check -s exit:0 -o inline:'2\n' sed -n '$=' sstat.out



CVS commit: src/etc

2011-02-16 Thread Masao Uebayashi
Module Name:src
Committed By:   uebayasi
Date:   Wed Feb 16 15:52:51 UTC 2011

Modified Files:
src/etc: Makefile

Log Message:
To install 0-sized files, check if the destination already has one.
This avoids unnecessary updates (== timestamp changes in METALOG).


To generate a diff of this commit:
cvs rdiff -u -r1.384 -r1.385 src/etc/Makefile

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

Modified files:

Index: src/etc/Makefile
diff -u src/etc/Makefile:1.384 src/etc/Makefile:1.385
--- src/etc/Makefile:1.384	Mon Dec 27 03:38:52 2010
+++ src/etc/Makefile	Wed Feb 16 15:52:51 2011
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.384 2010/12/27 03:38:52 christos Exp $
+#	$NetBSD: Makefile,v 1.385 2011/02/16 15:52:51 uebayasi Exp $
 #	from: @(#)Makefile	8.7 (Berkeley) 5/25/95
 
 # Environment variables without default values:
@@ -338,8 +338,10 @@
 		games games		664	/var/games/snake.log \
 		games games		664	/var/games/tetris.scores
 	${_MKMSG_INSTALL} ${DESTDIR}${file}
-	${ETC_INSTALL_FILE} -o ${owner} -g ${group} -m ${mode} \
-		/dev/null ${DESTDIR}${file}
+	if [ ! -e ${DESTDIR}${file} -o -s ${DESTDIR}${file} ]; then \
+		${ETC_INSTALL_FILE} -o ${owner} -g ${group} -m ${mode} \
+			/dev/null ${DESTDIR}${file}; \
+	else true; fi
 .endfor
 .for subdir in . defaults bluetooth iscsi mtree namedb pam.d powerd rc.d root skel ssh
 	${MAKEDIRTARGET} ${subdir} configinstall



CVS commit: src

2011-02-16 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Wed Feb 16 16:02:52 UTC 2011

Modified Files:
src/distrib/sets/lists/tests: mi
src/tests/lib/librumpclient: Makefile h_exec.c t_exec.sh

Log Message:
no need to create a hardlinked name for the helper, just fake argv[]


To generate a diff of this commit:
cvs rdiff -u -r1.248 -r1.249 src/distrib/sets/lists/tests/mi
cvs rdiff -u -r1.2 -r1.3 src/tests/lib/librumpclient/Makefile
cvs rdiff -u -r1.4 -r1.5 src/tests/lib/librumpclient/h_exec.c
cvs rdiff -u -r1.3 -r1.4 src/tests/lib/librumpclient/t_exec.sh

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.248 src/distrib/sets/lists/tests/mi:1.249
--- src/distrib/sets/lists/tests/mi:1.248	Tue Feb 15 15:18:37 2011
+++ src/distrib/sets/lists/tests/mi	Wed Feb 16 16:02:52 2011
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.248 2011/02/15 15:18:37 pooka Exp $
+# $NetBSD: mi,v 1.249 2011/02/16 16:02:52 pooka Exp $
 #
 # Note: don't delete entries from here - mark them as obsolete instead.
 #
@@ -471,7 +471,7 @@
 ./usr/libdata/debug/usr/tests/lib/librt/t_sem.debug			tests-lib-debug		debug,atf
 ./usr/libdata/debug/usr/tests/lib/librumpclient	tests-lib-debug
 ./usr/libdata/debug/usr/tests/lib/librumpclient/h_exec.debug			tests-lib-debug		debug,atf
-./usr/libdata/debug/usr/tests/lib/librumpclient/h_ution.debug			tests-lib-debug		debug,atf
+./usr/libdata/debug/usr/tests/lib/librumpclient/h_ution.debug			tests-obsolete		obsolete
 ./usr/libdata/debug/usr/tests/lib/librumpclient/t_fd.debug			tests-lib-debug		debug,atf
 ./usr/libdata/debug/usr/tests/lib/librumphijack	tests-lib-debug
 ./usr/libdata/debug/usr/tests/lib/librumphijack/h_client.debug			tests-lib-debug		debug,atf
@@ -1902,7 +1902,7 @@
 ./usr/tests/lib/librumpclienttests-lib-tests		atf
 ./usr/tests/lib/librumpclient/Atffile			tests-lib-tests		atf
 ./usr/tests/lib/librumpclient/h_exec			tests-lib-tests		atf
-./usr/tests/lib/librumpclient/h_ution			tests-lib-tests		atf
+./usr/tests/lib/librumpclient/h_ution			tests-obsolete		obsolete
 ./usr/tests/lib/librumpclient/t_exec			tests-lib-tests		atf
 ./usr/tests/lib/librumpclient/t_fd			tests-lib-tests		atf
 ./usr/tests/lib/librumphijack			tests-lib-tests		atf

Index: src/tests/lib/librumpclient/Makefile
diff -u src/tests/lib/librumpclient/Makefile:1.2 src/tests/lib/librumpclient/Makefile:1.3
--- src/tests/lib/librumpclient/Makefile:1.2	Tue Feb 15 15:16:46 2011
+++ src/tests/lib/librumpclient/Makefile	Wed Feb 16 16:02:52 2011
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.2 2011/02/15 15:16:46 pooka Exp $
+#	$NetBSD: Makefile,v 1.3 2011/02/16 16:02:52 pooka Exp $
 #
 
 .include bsd.own.mk
@@ -10,9 +10,6 @@
 
 TESTS_SH=	t_exec
 
-# what do you mean I missed?
-LINKS+=		${TESTSDIR}/h_exec ${TESTSDIR}/h_ution
-
 ATFFILE=	yes
 
 LDADD+= -lrumpclient

Index: src/tests/lib/librumpclient/h_exec.c
diff -u src/tests/lib/librumpclient/h_exec.c:1.4 src/tests/lib/librumpclient/h_exec.c:1.5
--- src/tests/lib/librumpclient/h_exec.c:1.4	Wed Feb 16 15:34:18 2011
+++ src/tests/lib/librumpclient/h_exec.c	Wed Feb 16 16:02:52 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: h_exec.c,v 1.4 2011/02/16 15:34:18 pooka Exp $	*/
+/*	$NetBSD: h_exec.c,v 1.5 2011/02/16 16:02:52 pooka Exp $	*/
 
 /*
  * Copyright (c) 2011 The NetBSD Foundation, Inc.
@@ -51,6 +51,7 @@
 	int s1, s2;
 	char buf[12];
 	char *eargv[4];
+	char *ename;
 	extern char **environ;
 
 	if (rumpclient_init() == -1)
@@ -104,9 +105,11 @@
 		}
 	}
 
+	ename = __UNCONST(h_ution);
+
 	/* omstart! */
 	sprintf(buf, %d, s2);
-	eargv[0] = __UNCONST(h_ution);
+	eargv[0] = ename;
 	eargv[1] = __UNCONST(_didexec);
 	eargv[2] = buf;
 	eargv[3] = NULL;

Index: src/tests/lib/librumpclient/t_exec.sh
diff -u src/tests/lib/librumpclient/t_exec.sh:1.3 src/tests/lib/librumpclient/t_exec.sh:1.4
--- src/tests/lib/librumpclient/t_exec.sh:1.3	Wed Feb 16 15:34:18 2011
+++ src/tests/lib/librumpclient/t_exec.sh	Wed Feb 16 16:02:52 2011
@@ -1,4 +1,4 @@
-#   $NetBSD: t_exec.sh,v 1.3 2011/02/16 15:34:18 pooka Exp $
+#   $NetBSD: t_exec.sh,v 1.4 2011/02/16 16:02:52 pooka Exp $
 #
 # Copyright (c) 2011 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -62,7 +62,7 @@
 {
 
 	atf_check -s exit:0 ${rumpsrv} ${RUMP_SERVER}
-	atf_check -s exit:0 $(atf_get_srcdir)/h_exec $(atf_get_srcdir)/h_ution
+	atf_check -s exit:0 $(atf_get_srcdir)/h_exec $(atf_get_srcdir)/h_exec
 	atf_check -s exit:0 -o save:sstat.out rump.sockstat
 	atf_check -s exit:0 -o match:'^root.*h_ution.*tcp.*\*\.1234' \
 	sed -n 2p sstat.out
@@ -86,7 +86,7 @@
 
 	atf_check -s exit:0 ${rumpsrv} ${RUMP_SERVER}
 	atf_check -s exit:0  \
-	$(atf_get_srcdir)/h_exec $(atf_get_srcdir)/h_ution cloexec1
+	$(atf_get_srcdir)/h_exec $(atf_get_srcdir)/h_exec cloexec1
 	atf_check -s exit:0 -o save:sstat.out rump.sockstat
 	atf_check -s exit:0 -o inline:'2\n' sed -n '$=' sstat.out
 	

CVS commit: src/etc

2011-02-16 Thread Masao Uebayashi
Module Name:src
Committed By:   uebayasi
Date:   Wed Feb 16 16:20:06 UTC 2011

Modified Files:
src/etc: Makefile

Log Message:
Generate MAKEDEV only when really necessary.  Write dependency correctly.


To generate a diff of this commit:
cvs rdiff -u -r1.385 -r1.386 src/etc/Makefile

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

Modified files:

Index: src/etc/Makefile
diff -u src/etc/Makefile:1.385 src/etc/Makefile:1.386
--- src/etc/Makefile:1.385	Wed Feb 16 15:52:51 2011
+++ src/etc/Makefile	Wed Feb 16 16:20:06 2011
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.385 2011/02/16 15:52:51 uebayasi Exp $
+#	$NetBSD: Makefile,v 1.386 2011/02/16 16:20:06 uebayasi Exp $
 #	from: @(#)Makefile	8.7 (Berkeley) 5/25/95
 
 # Environment variables without default values:
@@ -173,7 +173,8 @@
 
 
 CLEANFILES+=	MAKEDEV
-MAKEDEV: .EXEC
+MAKEDEV: ${.CURDIR}/MAKEDEV.awk ${.CURDIR}/MAKEDEV.tmpl \
+${.CURDIR}/etc.${MACHINE}/MAKEDEV.conf
 	${_MKTARGET_CREATE}
 	MACHINE=${MACHINE:Q} MACHINE_ARCH=${MACHINE_ARCH:Q} \
 	NETBSDSRCDIR=${NETBSDSRCDIR:Q} \



CVS commit: src/etc

2011-02-16 Thread Masao Uebayashi
Module Name:src
Committed By:   uebayasi
Date:   Wed Feb 16 16:22:13 UTC 2011

Modified Files:
src/etc: Makefile

Log Message:
Install obsolete files only when necessary.


To generate a diff of this commit:
cvs rdiff -u -r1.386 -r1.387 src/etc/Makefile

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

Modified files:

Index: src/etc/Makefile
diff -u src/etc/Makefile:1.386 src/etc/Makefile:1.387
--- src/etc/Makefile:1.386	Wed Feb 16 16:20:06 2011
+++ src/etc/Makefile	Wed Feb 16 16:22:13 2011
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.386 2011/02/16 16:20:06 uebayasi Exp $
+#	$NetBSD: Makefile,v 1.387 2011/02/16 16:22:13 uebayasi Exp $
 #	from: @(#)Makefile	8.7 (Berkeley) 5/25/95
 
 # Environment variables without default values:
@@ -378,6 +378,7 @@
 OBSOLETE.files+=	xbase xcomp xetc xfont xserver
 .endif
 
+# XXX make makeobsolete set wise; then generate files respectively
 install-obsolete-lists: .PHONY .MAKE
 	mkdir -p ${OBSOLETE.dir}
 .if ${MKX11} != no
@@ -389,8 +390,11 @@
 .endif
 .for file in ${OBSOLETE.files}
 	${_MKMSG_INSTALL} ${DESTDIR}/var/db/obsolete/${file}
-	${ETC_INSTALL_FILE} -o ${BINOWN} -g ${BINGRP} -m 644 \
-	${OBSOLETE.dir}/${file} ${DESTDIR}/var/db/obsolete
+	if [ ! -e ${DESTDIR}/var/db/obsolete/${file} ] || \
+	! cmp -s ${OBSOLETE.dir}/${file} ${DESTDIR}/var/db/obsolete/${file}; then \
+		${ETC_INSTALL_FILE} -o ${BINOWN} -g ${BINGRP} -m 644 \
+		${OBSOLETE.dir}/${file} ${DESTDIR}/var/db/obsolete; \
+	else true; fi
 .endfor
 
 



CVS commit: src/sbin

2011-02-16 Thread David Young
Module Name:src
Committed By:   dyoung
Date:   Wed Feb 16 17:53:31 UTC 2011

Modified Files:
src/sbin/reboot: reboot.8 reboot.c
src/sbin/shutdown: shutdown.8 shutdown.c

Log Message:
Add flags -v, -x, and -z for verbose, debug, and silent shutdowns,
respectively, by passing flags AB_VERBOSE, AB_DEBUG, and/or AB_SILENT to
reboot(2).


To generate a diff of this commit:
cvs rdiff -u -r1.27 -r1.28 src/sbin/reboot/reboot.8
cvs rdiff -u -r1.36 -r1.37 src/sbin/reboot/reboot.c
cvs rdiff -u -r1.28 -r1.29 src/sbin/shutdown/shutdown.8
cvs rdiff -u -r1.52 -r1.53 src/sbin/shutdown/shutdown.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/reboot/reboot.8
diff -u src/sbin/reboot/reboot.8:1.27 src/sbin/reboot/reboot.8:1.28
--- src/sbin/reboot/reboot.8:1.27	Sun Dec 12 11:38:42 2010
+++ src/sbin/reboot/reboot.8	Wed Feb 16 17:53:31 2011
@@ -1,4 +1,4 @@
-.\	$NetBSD: reboot.8,v 1.27 2010/12/12 11:38:42 pooka Exp $
+.\	$NetBSD: reboot.8,v 1.28 2011/02/16 17:53:31 dyoung Exp $
 .\
 .\ Copyright (c) 1990, 1991, 1993
 .\	The Regents of the University of California.  All rights reserved.
@@ -29,7 +29,7 @@
 .\
 .\	@(#)reboot.8	8.1 (Berkeley) 6/9/93
 .\
-.Dd October 21, 2008
+.Dd February 16, 2011
 .Dt REBOOT 8
 .Os
 .Sh NAME
@@ -81,6 +81,27 @@
 software powerdown, the system will halt.
 This option is only valid for
 .Nm halt .
+.It Fl v
+To enable verbose messages on the console, pass the
+.Xr boothowto 9
+flag
+.Dv AB_VERBOSE
+to
+.Xr reboot 2 .
+.It Fl x
+To enable debugging messages on the console, pass the
+.Xr boothowto 9
+flag
+.Dv AB_DEBUG
+to
+.Xr reboot 2 .
+.It Fl z
+To silence some shutdown messages on the console, pass the
+.Xr boothowto 9
+flag
+.Dv AB_SILENT
+to
+.Xr reboot 2 .
 .It Fl q
 Do not give processes a chance to shut down before halting or restarting.
 This option should not normally be used.

Index: src/sbin/reboot/reboot.c
diff -u src/sbin/reboot/reboot.c:1.36 src/sbin/reboot/reboot.c:1.37
--- src/sbin/reboot/reboot.c:1.36	Sun Jul 20 01:20:23 2008
+++ src/sbin/reboot/reboot.c	Wed Feb 16 17:53:31 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: reboot.c,v 1.36 2008/07/20 01:20:23 lukem Exp $	*/
+/*	$NetBSD: reboot.c,v 1.37 2011/02/16 17:53:31 dyoung Exp $	*/
 
 /*
  * Copyright (c) 1980, 1986, 1993
@@ -40,7 +40,7 @@
 #if 0
 static char sccsid[] = @(#)reboot.c	8.1 (Berkeley) 6/5/93;
 #else
-__RCSID($NetBSD: reboot.c,v 1.36 2008/07/20 01:20:23 lukem Exp $);
+__RCSID($NetBSD: reboot.c,v 1.37 2011/02/16 17:53:31 dyoung Exp $);
 #endif
 #endif /* not lint */
 
@@ -85,7 +85,7 @@
 	} else
 		howto = 0;
 	lflag = nflag = qflag = 0;
-	while ((ch = getopt(argc, argv, dlnpq)) != -1)
+	while ((ch = getopt(argc, argv, dlnpqvxz)) != -1)
 		switch(ch) {
 		case 'd':
 			howto |= RB_DUMP;
@@ -105,6 +105,15 @@
 		case 'q':
 			qflag = 1;
 			break;
+		case 'v':
+			howto |= AB_VERBOSE;
+			break;
+		case 'x':
+			howto |= AB_DEBUG;
+			break;
+		case 'z':
+			howto |= AB_SILENT;
+			break;
 		case '?':
 		default:
 			usage();

Index: src/sbin/shutdown/shutdown.8
diff -u src/sbin/shutdown/shutdown.8:1.28 src/sbin/shutdown/shutdown.8:1.29
--- src/sbin/shutdown/shutdown.8:1.28	Tue Oct 21 02:35:51 2008
+++ src/sbin/shutdown/shutdown.8	Wed Feb 16 17:53:31 2011
@@ -1,4 +1,4 @@
-.\	$NetBSD: shutdown.8,v 1.28 2008/10/21 02:35:51 lukem Exp $
+.\	$NetBSD: shutdown.8,v 1.29 2011/02/16 17:53:31 dyoung Exp $
 .\
 .\ Copyright (c) 1988, 1991, 1993
 .\	The Regents of the University of California.  All rights reserved.
@@ -29,7 +29,7 @@
 .\
 .\ @(#)shutdown.8	8.2 (Berkeley) 4/27/95
 .\
-.Dd October 21, 2008
+.Dd February 16, 2011
 .Dt SHUTDOWN 8
 .Os
 .Sh NAME
@@ -110,6 +110,27 @@
 .Ar time ,
 using
 .Xr reboot 8 .
+.It Fl v
+To enable verbose messages on the console, pass
+.Fl v
+to
+.Xr reboot 8
+or
+.Xr halt 8 .
+.It Fl x
+To enable debugging messages on the console, pass
+.Fl x
+to
+.Xr reboot 8
+or
+.Xr halt 8 .
+.It Fl z
+To silence some shutdown messages on the console, pass
+.Fl z
+to
+.Xr reboot 8
+or
+.Xr halt 8 .
 .It Fl D
 Prevents
 .Nm

Index: src/sbin/shutdown/shutdown.c
diff -u src/sbin/shutdown/shutdown.c:1.52 src/sbin/shutdown/shutdown.c:1.53
--- src/sbin/shutdown/shutdown.c:1.52	Wed Jun  9 04:51:53 2010
+++ src/sbin/shutdown/shutdown.c	Wed Feb 16 17:53:31 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: shutdown.c,v 1.52 2010/06/09 04:51:53 riz Exp $	*/
+/*	$NetBSD: shutdown.c,v 1.53 2011/02/16 17:53:31 dyoung Exp $	*/
 
 /*
  * Copyright (c) 1988, 1990, 1993
@@ -39,7 +39,7 @@
 #if 0
 static char sccsid[] = @(#)shutdown.c	8.4 (Berkeley) 4/28/95;
 #else
-__RCSID($NetBSD: shutdown.c,v 1.52 2010/06/09 04:51:53 riz Exp $);
+__RCSID($NetBSD: shutdown.c,v 1.53 2011/02/16 17:53:31 dyoung Exp $);
 #endif
 #endif /* not lint */
 
@@ -91,6 +91,7 @@
 static int dofast, dohalt, doreboot, killflg, nofork, nosync, dodump;
 static size_t mbuflen;
 static int dopowerdown;
+static int dodebug, dosilent, doverbose;
 static const char 

CVS commit: src/lib

2011-02-16 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Wed Feb 16 17:56:46 UTC 2011

Modified Files:
src/lib/librumpclient: rumpclient.c rumpclient.h
src/lib/librumphijack: hijack.c

Log Message:
Support vfork.  Add rumpclient wrapper for daemon(3).


To generate a diff of this commit:
cvs rdiff -u -r1.30 -r1.31 src/lib/librumpclient/rumpclient.c
cvs rdiff -u -r1.7 -r1.8 src/lib/librumpclient/rumpclient.h
cvs rdiff -u -r1.42 -r1.43 src/lib/librumphijack/hijack.c

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

Modified files:

Index: src/lib/librumpclient/rumpclient.c
diff -u src/lib/librumpclient/rumpclient.c:1.30 src/lib/librumpclient/rumpclient.c:1.31
--- src/lib/librumpclient/rumpclient.c:1.30	Wed Feb 16 15:33:47 2011
+++ src/lib/librumpclient/rumpclient.c	Wed Feb 16 17:56:46 2011
@@ -1,4 +1,4 @@
-/*  $NetBSD: rumpclient.c,v 1.30 2011/02/16 15:33:47 pooka Exp $	*/
+/*  $NetBSD: rumpclient.c,v 1.31 2011/02/16 17:56:46 pooka Exp $	*/
 
 /*
  * Copyright (c) 2010, 2011 Antti Kantee.  All Rights Reserved.
@@ -803,6 +803,8 @@
 
 struct rumpclient_fork {
 	uint32_t fork_auth[AUTHLEN];
+	struct spclient fork_spc;
+	int fork_kq;
 };
 
 struct rumpclient_fork *
@@ -828,6 +830,9 @@
 	memcpy(rpf-fork_auth, resp, sizeof(rpf-fork_auth));
 	free(resp);
 
+	rpf-fork_spc = clispc;
+	rpf-fork_kq = kq;
+
  out:
 	pthread_sigmask(SIG_SETMASK, omask, NULL);
 	return rpf;
@@ -863,6 +868,21 @@
 }
 
 void
+rumpclient_fork_cancel(struct rumpclient_fork *rpf)
+{
+
+	/* EUNIMPL */
+}
+
+void
+rumpclient_fork_vparent(struct rumpclient_fork *rpf)
+{
+
+	clispc = rpf-fork_spc;
+	kq = rpf-fork_kq;
+}
+
+void
 rumpclient_setconnretry(time_t timeout)
 {
 
@@ -930,27 +950,10 @@
 }
 
 pid_t
-rumpclient_fork(pid_t (*forkfn)(void))
+rumpclient_fork()
 {
-	struct rumpclient_fork *rf;
-	pid_t rv;
-
-	if ((rf = rumpclient_prefork()) == NULL)
-		return -1;
-
-	switch ((rv = forkfn())) {
-	case -1:
-		/* XXX: cancel rf */
-		break;
-	case 0:
-		if (rumpclient_fork_init(rf) == -1)
-			rv = -1;
-		break;
-	default:
-		break;
-	}
 
-	return rv;
+	return rumpclient__dofork(fork);
 }
 
 /*
@@ -1015,3 +1018,25 @@
 	errno = sverrno;
 	return rv;
 }
+
+int
+rumpclient_daemon(int nochdir, int noclose)
+{
+	struct rumpclient_fork *rf;
+	int sverrno;
+
+	if ((rf = rumpclient_prefork()) == NULL)
+		return -1;
+
+	if (daemon(nochdir, noclose) == -1) {
+		sverrno = errno;
+		rumpclient_fork_cancel(rf);
+		errno = sverrno;
+		return -1;
+	}
+
+	if (rumpclient_fork_init(rf) == -1)
+		return -1;
+
+	return 0;
+}

Index: src/lib/librumpclient/rumpclient.h
diff -u src/lib/librumpclient/rumpclient.h:1.7 src/lib/librumpclient/rumpclient.h:1.8
--- src/lib/librumpclient/rumpclient.h:1.7	Wed Feb 16 15:33:47 2011
+++ src/lib/librumpclient/rumpclient.h	Wed Feb 16 17:56:46 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: rumpclient.h,v 1.7 2011/02/16 15:33:47 pooka Exp $	*/
+/*	$NetBSD: rumpclient.h,v 1.8 2011/02/16 17:56:46 pooka Exp $	*/
 
 /*-
  * Copyright (c) 2010 Antti Kantee.  All Rights Reserved.
@@ -30,17 +30,23 @@
 
 #include sys/types.h
 
+struct rumpclient_fork;
+
+#define rumpclient_vfork() rumpclient__dofork(vfork)
+
 __BEGIN_DECLS
 
 int rumpclient_syscall(int, const void *, size_t, register_t *);
 int rumpclient_init(void);
 
-struct rumpclient_fork;
 struct rumpclient_fork *rumpclient_prefork(void);
 int			rumpclient_fork_init(struct rumpclient_fork *);
+void			rumpclient_fork_cancel(struct rumpclient_fork *);
+void			rumpclient_fork_vparent(struct rumpclient_fork *);
 
-int rumpclient_fork(pid_t (*forkfn)(void));
+int rumpclient_fork(void);
 int rumpclient_exec(const char *, char *const [], char *const[]);
+int rumpclient_daemon(int, int);
 
 #define RUMPCLIENT_RETRYCONN_INFTIME ((time_t)-1)
 #define RUMPCLIENT_RETRYCONN_ONCE ((time_t)-2)
@@ -54,6 +60,39 @@
 };
 int rumpclient__closenotify(int *, enum rumpclient_closevariant);
 
+/*
+ * vfork needs to be implemented as an inline to make everything
+ * run in the caller's stackframe.
+ */
+static inline pid_t
+rumpclient__dofork(pid_t (*forkfn)(void))
+{
+	struct rumpclient_fork *rf;
+	pid_t pid;
+	int childran = 0;
+
+	if ((rf = rumpclient_prefork()) == NULL)
+		return -1;
+
+	switch ((pid = forkfn())) {
+	case -1:
+		rumpclient_fork_cancel(rf);
+		break;
+	case 0:
+		childran = 1;
+		if (rumpclient_fork_init(rf) == -1)
+			pid = -1;
+		break;
+	default:
+		/* XXX: multithreaded vforker?  do they exist? */
+		if (childran)
+			rumpclient_fork_vparent(rf);
+		break;
+	}
+
+	return pid;
+}
+
 __END_DECLS
 
 #endif /* _RUMP_RUMPCLIENT_H_ */

Index: src/lib/librumphijack/hijack.c
diff -u src/lib/librumphijack/hijack.c:1.42 src/lib/librumphijack/hijack.c:1.43
--- src/lib/librumphijack/hijack.c:1.42	Wed Feb 16 15:33:46 2011
+++ src/lib/librumphijack/hijack.c	Wed Feb 16 17:56:46 2011
@@ -1,4 +1,4 @@
-/*  $NetBSD: hijack.c,v 1.42 2011/02/16 15:33:46 pooka Exp $	*/
+/*  $NetBSD: hijack.c,v 1.43 

CVS commit: src/tests/lib/librumpclient

2011-02-16 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Wed Feb 16 17:57:44 UTC 2011

Modified Files:
src/tests/lib/librumpclient: h_exec.c t_exec.sh

Log Message:
test rumpclient_vfork()


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/tests/lib/librumpclient/h_exec.c
cvs rdiff -u -r1.4 -r1.5 src/tests/lib/librumpclient/t_exec.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/lib/librumpclient/h_exec.c
diff -u src/tests/lib/librumpclient/h_exec.c:1.5 src/tests/lib/librumpclient/h_exec.c:1.6
--- src/tests/lib/librumpclient/h_exec.c:1.5	Wed Feb 16 16:02:52 2011
+++ src/tests/lib/librumpclient/h_exec.c	Wed Feb 16 17:57:44 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: h_exec.c,v 1.5 2011/02/16 16:02:52 pooka Exp $	*/
+/*	$NetBSD: h_exec.c,v 1.6 2011/02/16 17:57:44 pooka Exp $	*/
 
 /*
  * Copyright (c) 2011 The NetBSD Foundation, Inc.
@@ -59,7 +59,7 @@
 
 	if (argc  1) {
 		if (strcmp(argv[1], _didexec) == 0) {
-			daemon(0, 0); /* detach-me-notnot ergo detach */
+			rumpclient_daemon(0, 0); /* detach-me-notnot */
 			s2 = atoi(argv[2]);
 			slen = sizeof(sin);
 			/* see below */
@@ -90,7 +90,7 @@
 		err(1, listen2);
 
 	if (argc == 1) {
-		daemon(0, 0);
+		rumpclient_daemon(0, 0);
 		slen = sizeof(sin);
 		/*
 		 * pause(), but conveniently gets rid of this helper
@@ -105,10 +105,24 @@
 		}
 	}
 
-	ename = __UNCONST(h_ution);
+	sprintf(buf, %d, s2);
+
+	if (argc == 3  strcmp(argv[2], vfork_please) == 0) {
+		switch (rumpclient_vfork()) {
+		case 0:
+			ename = __UNCONST(fourchette);
+			break;
+		case -1:
+			err(1, vfork);
+		default:
+			ename = __UNCONST(h_ution);
+			break;
+		}
+	} else {
+		ename = __UNCONST(h_ution);
+	}
 
 	/* omstart! */
-	sprintf(buf, %d, s2);
 	eargv[0] = ename;
 	eargv[1] = __UNCONST(_didexec);
 	eargv[2] = buf;

Index: src/tests/lib/librumpclient/t_exec.sh
diff -u src/tests/lib/librumpclient/t_exec.sh:1.4 src/tests/lib/librumpclient/t_exec.sh:1.5
--- src/tests/lib/librumpclient/t_exec.sh:1.4	Wed Feb 16 16:02:52 2011
+++ src/tests/lib/librumpclient/t_exec.sh	Wed Feb 16 17:57:44 2011
@@ -1,4 +1,4 @@
-#   $NetBSD: t_exec.sh,v 1.4 2011/02/16 16:02:52 pooka Exp $
+#   $NetBSD: t_exec.sh,v 1.5 2011/02/16 17:57:44 pooka Exp $
 #
 # Copyright (c) 2011 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -98,10 +98,40 @@
 	rump.halt
 }
 
+atf_test_case vfork cleanup
+vfork_head()
+{
+atf_set descr test rumpclient_vfork()
+}
+
+vfork_body()
+{
+
+	atf_check -s exit:0 ${rumpsrv} ${RUMP_SERVER}
+	atf_check -s exit:0  \
+	$(atf_get_srcdir)/h_exec $(atf_get_srcdir)/h_exec vfork_please
+	atf_check -s exit:0 -o save:sstat.out rump.sockstat
+	atf_check -s exit:0 -o inline:'5\n' sed -n '$=' sstat.out
+	atf_check -s exit:0 -o match:'^root.*h_ution.*tcp.*\*\.1234' \
+	cat sstat.out
+	atf_check -s exit:0 -o match:'^root.*h_ution.*tcp.*\*\.2345' \
+	cat sstat.out
+	atf_check -s exit:0 -o match:'^root.*fourchette.*tcp.*\*\.1234' \
+	cat sstat.out
+	atf_check -s exit:0 -o match:'^root.*fourchette.*tcp.*\*\.2345' \
+	cat sstat.out
+}
+
+vfork_cleanup()
+{
+	rump.halt
+}
+
 
 atf_init_test_cases()
 {
 	atf_add_test_case noexec
 	atf_add_test_case exec
 	atf_add_test_case cloexec
+	atf_add_test_case vfork
 }



CVS commit: src/usr.bin/grep

2011-02-16 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Wed Feb 16 18:35:39 UTC 2011

Modified Files:
src/usr.bin/grep: fastgrep.c file.c util.c

Log Message:
Fix signed / unsigned issues. Refactor basename usage to use a local
copy and do it only once, not for each pattern. Remove late inline.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/usr.bin/grep/fastgrep.c
cvs rdiff -u -r1.4 -r1.5 src/usr.bin/grep/file.c
cvs rdiff -u -r1.7 -r1.8 src/usr.bin/grep/util.c

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

Modified files:

Index: src/usr.bin/grep/fastgrep.c
diff -u src/usr.bin/grep/fastgrep.c:1.1 src/usr.bin/grep/fastgrep.c:1.2
--- src/usr.bin/grep/fastgrep.c:1.1	Wed Feb 16 01:31:33 2011
+++ src/usr.bin/grep/fastgrep.c	Wed Feb 16 18:35:39 2011
@@ -36,7 +36,7 @@
  */
 
 #include sys/cdefs.h
-__RCSID($NetBSD: fastgrep.c,v 1.1 2011/02/16 01:31:33 joerg Exp $);
+__RCSID($NetBSD: fastgrep.c,v 1.2 2011/02/16 18:35:39 joerg Exp $);
 
 #include limits.h
 #include stdbool.h
@@ -61,8 +61,7 @@
 	fg-eol = false;
 	fg-reversed = false;
 
-	fg-pattern = grep_malloc(strlen(pat) + 1);
-	strcpy(fg-pattern, pat);
+	fg-pattern = (unsigned char *)grep_strdup(pat);
 
 	/* Preprocess pattern. */
 	for (i = 0; i = UCHAR_MAX; i++)
@@ -120,7 +119,8 @@
 	 * string respectively.
 	 */
 	fg-pattern = grep_malloc(fg-len + 1);
-	strlcpy(fg-pattern, pat + (bol ? 1 : 0) + wflag, fg-len + 1);
+	strlcpy((char *)fg-pattern, pat + (bol ? 1 : 0) + wflag,
+	fg-len + 1);
 
 	/* Look for ways to cheat...er...avoid the full regex engine. */
 	for (i = 0; i  fg-len; i++) {

Index: src/usr.bin/grep/file.c
diff -u src/usr.bin/grep/file.c:1.4 src/usr.bin/grep/file.c:1.5
--- src/usr.bin/grep/file.c:1.4	Wed Feb 16 01:31:33 2011
+++ src/usr.bin/grep/file.c	Wed Feb 16 18:35:39 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: file.c,v 1.4 2011/02/16 01:31:33 joerg Exp $	*/
+/*	$NetBSD: file.c,v 1.5 2011/02/16 18:35:39 joerg Exp $	*/
 /*	$FreeBSD: head/usr.bin/grep/file.c 211496 2010-08-19 09:28:59Z des $	*/
 /*	$OpenBSD: file.c,v 1.11 2010/07/02 20:48:48 nicm Exp $	*/
 
@@ -31,7 +31,7 @@
  */
 
 #include sys/cdefs.h
-__RCSID($NetBSD: file.c,v 1.4 2011/02/16 01:31:33 joerg Exp $);
+__RCSID($NetBSD: file.c,v 1.5 2011/02/16 18:35:39 joerg Exp $);
 
 #include sys/param.h
 #include sys/types.h
@@ -139,13 +139,13 @@
 	if (bufrem == 0) {
 		/* Return zero length to indicate EOF */
 		*lenp = 0;
-		return (bufpos);
+		return ((char *)bufpos);
 	}
 
 	/* Look for a newline in the remaining part of the buffer */
 	if ((p = memchr(bufpos, '\n', bufrem)) != NULL) {
 		++p; /* advance over newline */
-		ret = bufpos;
+		ret = (char *)bufpos;
 		len = p - bufpos;
 		bufrem -= len;
 		bufpos = p;
@@ -179,7 +179,7 @@
 		break;
 	}
 	*lenp = len;
-	return (lnbuf);
+	return ((char *)lnbuf);
 
 error:
 	*lenp = 0;

Index: src/usr.bin/grep/util.c
diff -u src/usr.bin/grep/util.c:1.7 src/usr.bin/grep/util.c:1.8
--- src/usr.bin/grep/util.c:1.7	Wed Feb 16 01:31:33 2011
+++ src/usr.bin/grep/util.c	Wed Feb 16 18:35:39 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: util.c,v 1.7 2011/02/16 01:31:33 joerg Exp $	*/
+/*	$NetBSD: util.c,v 1.8 2011/02/16 18:35:39 joerg Exp $	*/
 /*	$FreeBSD: head/usr.bin/grep/util.c 211496 2010-08-19 09:28:59Z des $	*/
 /*	$OpenBSD: util.c,v 1.39 2010/07/02 22:18:03 tedu Exp $	*/
 
@@ -30,7 +30,7 @@
  */
 
 #include sys/cdefs.h
-__RCSID($NetBSD: util.c,v 1.7 2011/02/16 01:31:33 joerg Exp $);
+__RCSID($NetBSD: util.c,v 1.8 2011/02/16 18:35:39 joerg Exp $);
 
 #include sys/stat.h
 #include sys/types.h
@@ -57,20 +57,23 @@
 bool
 file_matching(const char *fname)
 {
+	char *fname_base, *fname_copy;
 	bool ret;
 
 	ret = finclude ? false : true;
+	fname_copy = grep_strdup(fname);
+	fname_base = basename(fname_copy);
 
 	for (unsigned int i = 0; i  fpatterns; ++i) {
-		if (fnmatch(fpattern[i].pat,
-		fname, 0) == 0 || fnmatch(fpattern[i].pat,
-		basename(fname), 0) == 0) {
+		if (fnmatch(fpattern[i].pat, fname, 0) == 0 ||
+		fnmatch(fpattern[i].pat, fname_base, 0) == 0) {
 			if (fpattern[i].mode == EXCL_PAT)
 return (false);
 			else
 ret = true;
 		}
 	}
+	free(fname_copy);
 	return (ret);
 }
 
@@ -279,7 +282,7 @@
  * matches.  The matching lines are passed to printline() to display the
  * appropriate output.
  */
-static inline int
+static int
 procline(struct str *l, int nottext)
 {
 	regmatch_t matches[MAX_LINE_MATCHES];



CVS commit: src/sys/arch/powerpc/include/booke

2011-02-16 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Wed Feb 16 18:38:48 UTC 2011

Modified Files:
src/sys/arch/powerpc/include/booke: e500reg.h

Log Message:
Add USB_SNOOP1/2 related definitions


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/sys/arch/powerpc/include/booke/e500reg.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/powerpc/include/booke/e500reg.h
diff -u src/sys/arch/powerpc/include/booke/e500reg.h:1.3 src/sys/arch/powerpc/include/booke/e500reg.h:1.4
--- src/sys/arch/powerpc/include/booke/e500reg.h:1.3	Tue Feb  8 06:16:59 2011
+++ src/sys/arch/powerpc/include/booke/e500reg.h	Wed Feb 16 18:38:48 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: e500reg.h,v 1.3 2011/02/08 06:16:59 matt Exp $	*/
+/*	$NetBSD: e500reg.h,v 1.4 2011/02/16 18:38:48 matt Exp $	*/
 /*-
  * Copyright (c) 2010, 2011 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -276,6 +276,11 @@
 #define	USB3_BASE	0x2b100	/* MPC8536 */
 #define	USB_SIZE	0x00f00
 
+#define	USB_SNOOP1	0x400
+#define	USB_SNOOP2	0x404
+
+#define	SNOOP_2GB	0x1e
+
 #define	ETSEC1_BASE	0x24000
 #define	ETSEC2_BASE	0x25000
 #define	ETSEC3_BASE	0x26000



CVS commit: src/sys/arch/powerpc/include/booke

2011-02-16 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Wed Feb 16 18:39:27 UTC 2011

Modified Files:
src/sys/arch/powerpc/include/booke: spr.h

Log Message:
Add MPC8533 SVR.  Fix DBCR0 IAC bits


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/sys/arch/powerpc/include/booke/spr.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/powerpc/include/booke/spr.h
diff -u src/sys/arch/powerpc/include/booke/spr.h:1.4 src/sys/arch/powerpc/include/booke/spr.h:1.5
--- src/sys/arch/powerpc/include/booke/spr.h:1.4	Tue Feb  8 06:18:04 2011
+++ src/sys/arch/powerpc/include/booke/spr.h	Wed Feb 16 18:39:26 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: spr.h,v 1.4 2011/02/08 06:18:04 matt Exp $	*/
+/*	$NetBSD: spr.h,v 1.5 2011/02/16 18:39:26 matt Exp $	*/
 /*-
  * Copyright (c) 2010, 2011 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -51,6 +51,7 @@
 
 #define	SVR_MPC8544v1		  0x80340110
 #define	SVR_MPC8544v1plus	  0x80340111
+#define	SVR_MPC8533		  0x80340010
 
 #define	SVR_MPC8536v1		  0x80370091
 
@@ -140,10 +141,10 @@
 #define	  DBCR0_BRT		  0x0400 /* 5: Branch Taken debug event */
 #define	  DBCR0_IRPT		  0x0200 /* 6: Interrupt Taken debug event */
 #define	  DBCR0_TRAP		  0x0100 /* 7: Trap Instruction Debug Event */
-#define	  DBCR0_IA1		  0x0080 /* 8: IAC (Instruction Address Compare) 1 debug event */
-#define	  DBCR0_IA2		  0x0040 /* 9: IAC 2 debug event */
-#define	  DBCR0_IA3		  0x0020 /* 10: IAC 3 debug event */
-#define	  DBCR0_IA4		  0x0010 /* 11: IAC 4 debug event */
+#define	  DBCR0_IAC1		  0x0080 /* 8: IAC (Instruction Address Compare) 1 debug event */
+#define	  DBCR0_IAC2		  0x0040 /* 9: IAC 2 debug event */
+#define	  DBCR0_IAC3		  0x0020 /* 10: IAC 3 debug event */
+#define	  DBCR0_IAC4		  0x0010 /* 11: IAC 4 debug event */
 #define	  DBCR0_DAC1_LOAD	  0x0008 /* 12: DAC (Data Address Compare) 1 load event */
 #define	  DBCR0_DAC1_STORE	  0x0004 /* 13: DAC (Data Address Compare) 1 store event */
 #define	  DBCR0_DAC2_LOAD	  0x0002 /* 14: DAC 2 load event */



CVS commit: src/sys/netipsec

2011-02-16 Thread Matthias Drochner
Module Name:src
Committed By:   drochner
Date:   Wed Feb 16 18:39:34 UTC 2011

Modified Files:
src/sys/netipsec: ipsec_input.c xform_ah.c

Log Message:
remove some unnecessary pointer typecasts
(one was wrong on BE systems, but was harmless here because the
result is effectively unused)


To generate a diff of this commit:
cvs rdiff -u -r1.23 -r1.24 src/sys/netipsec/ipsec_input.c
cvs rdiff -u -r1.28 -r1.29 src/sys/netipsec/xform_ah.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/netipsec/ipsec_input.c
diff -u src/sys/netipsec/ipsec_input.c:1.23 src/sys/netipsec/ipsec_input.c:1.24
--- src/sys/netipsec/ipsec_input.c:1.23	Sat Apr 18 14:58:06 2009
+++ src/sys/netipsec/ipsec_input.c	Wed Feb 16 18:39:33 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: ipsec_input.c,v 1.23 2009/04/18 14:58:06 tsutsui Exp $	*/
+/*	$NetBSD: ipsec_input.c,v 1.24 2011/02/16 18:39:33 drochner Exp $	*/
 /*	$FreeBSD: /usr/local/www/cvsroot/FreeBSD/src/sys/netipsec/ipsec_input.c,v 1.2.4.2 2003/03/28 20:32:53 sam Exp $	*/
 /*	$OpenBSD: ipsec_input.c,v 1.63 2003/02/20 18:35:43 deraadt Exp $	*/
 
@@ -39,7 +39,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: ipsec_input.c,v 1.23 2009/04/18 14:58:06 tsutsui Exp $);
+__KERNEL_RCSID(0, $NetBSD: ipsec_input.c,v 1.24 2011/02/16 18:39:33 drochner Exp $);
 
 /*
  * IPsec input processing.
@@ -606,13 +606,13 @@
 ipsec6_common_input_cb(struct mbuf *m, struct secasvar *sav, int skip, int protoff,
 struct m_tag *mt)
 {
-	int prot, af, sproto;
+	int af, sproto;
 	struct ip6_hdr *ip6;
 	struct m_tag *mtag;
 	struct tdb_ident *tdbi;
 	struct secasindex *saidx;
 	int nxt;
-	u_int8_t nxt8;
+	u_int8_t prot, nxt8;
 	int error, nest;
 
 	IPSEC_ASSERT(m != NULL, (ipsec6_common_input_cb: null mbuf));
@@ -655,7 +655,7 @@
 	ip6-ip6_plen = htons(m-m_pkthdr.len - sizeof(struct ip6_hdr));
 
 	/* Save protocol */
-	m_copydata(m, protoff, 1, (unsigned char *) prot);
+	m_copydata(m, protoff, 1, prot);
 
 #ifdef INET
 	/* IP-in-IP encapsulation */

Index: src/sys/netipsec/xform_ah.c
diff -u src/sys/netipsec/xform_ah.c:1.28 src/sys/netipsec/xform_ah.c:1.29
--- src/sys/netipsec/xform_ah.c:1.28	Mon Feb 14 13:43:45 2011
+++ src/sys/netipsec/xform_ah.c	Wed Feb 16 18:39:33 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: xform_ah.c,v 1.28 2011/02/14 13:43:45 drochner Exp $	*/
+/*	$NetBSD: xform_ah.c,v 1.29 2011/02/16 18:39:33 drochner Exp $	*/
 /*	$FreeBSD: src/sys/netipsec/xform_ah.c,v 1.1.4.1 2003/01/24 05:11:36 sam Exp $	*/
 /*	$OpenBSD: ip_ah.c,v 1.63 2001/06/26 06:18:58 angelos Exp $ */
 /*
@@ -39,7 +39,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: xform_ah.c,v 1.28 2011/02/14 13:43:45 drochner Exp $);
+__KERNEL_RCSID(0, $NetBSD: xform_ah.c,v 1.29 2011/02/16 18:39:33 drochner Exp $);
 
 #include opt_inet.h
 #ifdef __FreeBSD__
@@ -718,7 +718,7 @@
 		 * Save the authenticator, the skipped portion of the packet,
 		 * and the AH header.
 		 */
-		m_copydata(m, 0, skip + rplen + authsize, (char *)(tc+1));
+		m_copydata(m, 0, skip + rplen + authsize, (tc + 1));
 
 		{
 			u_int8_t * = ((char *)(tc+1))+skip+rplen;
@@ -1083,7 +1083,7 @@
 	ah = (struct newah *)(mtod(mi, char *) + roff);
 
 	/* Initialize the AH header. */
-	m_copydata(m, protoff, sizeof(u_int8_t), (char *) ah-ah_nxt);
+	m_copydata(m, protoff, sizeof(u_int8_t), ah-ah_nxt);
 	ah-ah_len = (rplen + authsize - sizeof(struct ah)) / sizeof(u_int32_t);
 	ah-ah_reserve = 0;
 	ah-ah_spi = sav-spi;



CVS commit: src/sys/arch/powerpc/include/booke

2011-02-16 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Wed Feb 16 18:41:48 UTC 2011

Modified Files:
src/sys/arch/powerpc/include/booke: cpuvar.h

Log Message:
Add little endian bus_space_tags.
Note highest memory in cpu_softc.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/sys/arch/powerpc/include/booke/cpuvar.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/powerpc/include/booke/cpuvar.h
diff -u src/sys/arch/powerpc/include/booke/cpuvar.h:1.3 src/sys/arch/powerpc/include/booke/cpuvar.h:1.4
--- src/sys/arch/powerpc/include/booke/cpuvar.h:1.3	Tue Feb  8 06:21:03 2011
+++ src/sys/arch/powerpc/include/booke/cpuvar.h	Wed Feb 16 18:41:48 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: cpuvar.h,v 1.3 2011/02/08 06:21:03 matt Exp $	*/
+/*	$NetBSD: cpuvar.h,v 1.4 2011/02/16 18:41:48 matt Exp $	*/
 /*-
  * Copyright (c) 2010, 2011 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -49,9 +49,12 @@
 	struct cpu_info *cpu_ci;
 	struct evcnt *cpu_evcnt_intrs;
 	bus_space_tag_t cpu_bst;
+	bus_space_tag_t cpu_le_bst;
 	bus_space_handle_t cpu_bsh;
 	bus_addr_t cpu_clock_gtbcr;
 
+	paddr_t cpu_highmem;
+
 	u_int cpu_pcpls[5];
 	struct evcnt cpu_evcnt_spurious_intr;
 	struct lwp *cpu_softlwps[SOFTINT_COUNT];
@@ -75,6 +78,7 @@
 struct cpunode_attach_args {
 	const char *cna_busname;
 	bus_space_tag_t cna_memt;
+	bus_space_tag_t cna_le_memt;
 	bus_dma_tag_t cna_dmat;
 	struct cpunode_locators cna_locs;
 	u_int cna_childmask;
@@ -83,6 +87,7 @@
 struct mainbus_attach_args {
 	const char *ma_name;
 	bus_space_tag_t ma_memt;
+	bus_space_tag_t ma_le_memt;
 	bus_dma_tag_t ma_dmat;
 	int ma_node;
 };



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

2011-02-16 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Wed Feb 16 18:42:33 UTC 2011

Modified Files:
src/sys/arch/powerpc/include: cpu.h

Log Message:
Fix CLKF_INTR
Add debug evcnt.


To generate a diff of this commit:
cvs rdiff -u -r1.74 -r1.75 src/sys/arch/powerpc/include/cpu.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/powerpc/include/cpu.h
diff -u src/sys/arch/powerpc/include/cpu.h:1.74 src/sys/arch/powerpc/include/cpu.h:1.75
--- src/sys/arch/powerpc/include/cpu.h:1.74	Tue Jan 18 01:02:54 2011
+++ src/sys/arch/powerpc/include/cpu.h	Wed Feb 16 18:42:33 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: cpu.h,v 1.74 2011/01/18 01:02:54 matt Exp $	*/
+/*	$NetBSD: cpu.h,v 1.75 2011/02/16 18:42:33 matt Exp $	*/
 
 /*
  * Copyright (C) 1999 Wolfgang Solfrank.
@@ -136,6 +136,7 @@
 	struct evcnt ci_ev_isi;		/* user ISI traps */
 	struct evcnt ci_ev_isi_fatal;	/* user ISI trap failures */
 	struct evcnt ci_ev_pgm;		/* user PGM traps */
+	struct evcnt ci_ev_debug;	/* user debug traps */
 	struct evcnt ci_ev_fpu;		/* FPU traps */
 	struct evcnt ci_ev_fpusw;	/* FPU context switch */
 	struct evcnt ci_ev_ali;		/* Alignment traps */
@@ -323,7 +324,7 @@
 
 #define	CLKF_USERMODE(frame)	(((frame)-cf_srr1  PSL_PR) != 0)
 #define	CLKF_PC(frame)		((frame)-cf_srr0)
-#define	CLKF_INTR(frame)	((frame)-cf_idepth = 0)
+#define	CLKF_INTR(frame)	((frame)-cf_idepth  0)
 
 #define	LWP_PC(l)		(trapframe(l)-tf_srr0)
 



CVS commit: src/sys/arch/powerpc/booke

2011-02-16 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Wed Feb 16 18:43:35 UTC 2011

Modified Files:
src/sys/arch/powerpc/booke: e500_intr.c

Log Message:
Cleanup intr_info initialization.  Make it per SVR.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/sys/arch/powerpc/booke/e500_intr.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/powerpc/booke/e500_intr.c
diff -u src/sys/arch/powerpc/booke/e500_intr.c:1.2 src/sys/arch/powerpc/booke/e500_intr.c:1.3
--- src/sys/arch/powerpc/booke/e500_intr.c:1.2	Tue Jan 18 01:02:52 2011
+++ src/sys/arch/powerpc/booke/e500_intr.c	Wed Feb 16 18:43:35 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: e500_intr.c,v 1.2 2011/01/18 01:02:52 matt Exp $	*/
+/*	$NetBSD: e500_intr.c,v 1.3 2011/02/16 18:43:35 matt Exp $	*/
 /*-
  * Copyright (c) 2010, 2011 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -34,6 +34,8 @@
  * POSSIBILITY OF SUCH DAMAGE.
  */
 
+#include opt_mpc85xx.h
+
 #define __INTR_PRIVATE
 
 #include sys/param.h
@@ -108,6 +110,7 @@
 	{ ISOURCE_PCIEX2, pcie2 },
 	{ ISOURCE_PCIEX	, pcie1 },
 	{ ISOURCE_PCIEX3, pcie3 },
+	{ ISOURCE_USB1, usb1 },
 	{ ISOURCE_ETSEC1_TX, etsec1-tx },
 	{ ISOURCE_ETSEC1_RX, etsec1-rx },
 	{ ISOURCE_ETSEC3_TX, etsec3-tx },
@@ -124,72 +127,24 @@
 	{ ISOURCE_I2C, i2c },
 	{ ISOURCE_PERFMON, perfmon },
 	{ ISOURCE_SECURITY1, sec1 },
+	{ ISOURCE_GPIO, gpio },
 	{ ISOURCE_SRIO_EWPU, srio-ewpu },
 	{ ISOURCE_SRIO_ODBELL, srio-odbell },
 	{ ISOURCE_SRIO_IDBELL, srio-idbell },
 	{ ISOURCE_SRIO_OMU1, srio-omu1 },
 	{ ISOURCE_SRIO_IMU1, srio-imu1 },
 	{ ISOURCE_SRIO_OMU2, srio-omu2 },
-	{ ISOURCE_SRIO_IMU2, srio-imu2 },
-	{ 0,  },
-};
-
-const struct e500_intr_name mpc8548_external_intr_names[] = {
-	{ 0,  },
-};
-
-const struct e500_intr_name mpc8536_external_intr_names[] = {
-	{ 0,  },
-};
-
-const struct e500_intr_name mpc8572_external_intr_names[] = {
-	{ 0,  },
-};
-
-const struct e500_intr_name mpc8548_onchip_intr_names[] = {
-	{ ISOURCE_PCI1, pci1 },
-	{ ISOURCE_PCI2, pci2 },
-	{ 0,  },
-};
-
-const struct e500_intr_name mpc8544_onchip_intr_names[] = {
-	{ 0,  },
-};
-
-const struct e500_intr_name mpc8536_onchip_intr_names[] = {
-	{ ISOURCE_USB1, usb1 },
-	{ ISOURCE_SATA2, sata2 },
-	{ ISOURCE_USB2, usb2 },
 	{ ISOURCE_SECURITY2, sec2 },
 	{ ISOURCE_SPI, spi },
-	{ ISOURCE_USB3, usb3 },
 	{ ISOURCE_ETSEC1_PTP, etsec1-ptp },
+	{ ISOURCE_ETSEC2_PTP, etsec2-ptp },
 	{ ISOURCE_ETSEC3_PTP, etsec3-ptp },
+	{ ISOURCE_ETSEC4_PTP, etsec4-ptp },
 	{ ISOURCE_ESDHC, esdhc },
-	{ ISOURCE_SATA1, sata1 },
 	{ 0,  },
 };
 
-const struct e500_intr_name mpc8572_onchip_intr_names[] = {
-	{ ISOURCE_PCIEX3_MPC8572, pcie3 },
-	{ ISOURCE_FEC, fec },
-	{ ISOURCE_GPIO, gpio },
-	{ ISOURCE_PME_GENERAL, pme },
-	{ ISOURCE_SECURITY2, sec2 },
-	{ ISOURCE_TLU1, tlu1 },
-	{ ISOURCE_TLU2, tlu2 },
-	{ ISOURCE_PME_CHAN1, pme-chan1 },
-	{ ISOURCE_PME_CHAN2, pme-chan2 },
-	{ ISOURCE_PME_CHAN3, pme-chan3 },
-	{ ISOURCE_PME_CHAN4, pme-chan4 },
-	{ ISOURCE_ETSEC1_PTP, etsec1-ptp },
-	{ ISOURCE_ETSEC2_PTP, etsec2-ptp },
-	{ ISOURCE_ETSEC3_PTP, etsec3-ptp },
-	{ ISOURCE_ETSEC4_PTP, etsec4-ptp },
-	{ ISOURCE_DMA2_CHAN1, dma2-chan1 },
-	{ ISOURCE_DMA2_CHAN2, dma2-chan2 },
-	{ ISOURCE_DMA2_CHAN3, dma2-chan3 },
-	{ ISOURCE_DMA2_CHAN4, dma2-chan4 },
+const struct e500_intr_name default_external_intr_names[] = {
 	{ 0,  },
 };
 
@@ -243,132 +198,141 @@
 	u_int8_t ii_ist_vectors[IST_MAX+1];
 };
 
-static kmutex_t e500_intr_lock __aligned(32);
+static kmutex_t e500_intr_lock __cacheline_aligned;
 static struct e500_intr_info e500_intr_info;
 
-static const struct e500_intr_info mpc8548_intr_info = {
-	.ii_external_sources = MPC8548_EXTERNALSOURCES,
-	.ii_onchip_bitmap = MPC8548_ONCHIPBITMAP,
-	.ii_onchip_sources = MPC8548_ONCHIPSOURCES,
-	.ii_msigroup_sources = MPC8548_MSIGROUPSOURCES,
-	.ii_timer_sources = MPC8548_TIMERSOURCES,
-	.ii_ipi_sources = MPC8548_IPISOURCES,
-	.ii_mi_sources = MPC8548_MISOURCES,
-	.ii_percpu_sources = MPC8548_TIMERSOURCES
-	+ MPC8548_IPISOURCES + MPC8548_MISOURCES, 
-	.ii_external_intr_names = mpc8548_external_intr_names,
-	.ii_onchip_intr_names = mpc8548_onchip_intr_names,
-	.ii_ist_vectors = {
-		[IST_NONE]		= ~0,
-		[IST_EDGE]		= 0,
-		[IST_LEVEL_LOW]		= 0,
-		[IST_LEVEL_HIGH]	= 0,
-		[IST_ONCHIP]		= MPC8548_EXTERNALSOURCES,
-		[IST_MSIGROUP]		= MPC8548_EXTERNALSOURCES
-	+ MPC8548_ONCHIPSOURCES,
-		[IST_TIMER]		= MPC8548_EXTERNALSOURCES
-	+ MPC8548_ONCHIPSOURCES
-	+ MPC8548_MSIGROUPSOURCES,
-		[IST_IPI]		= MPC8548_EXTERNALSOURCES
-	+ MPC8548_ONCHIPSOURCES
-	+ MPC8548_MSIGROUPSOURCES
-	+ MPC8548_TIMERSOURCES,
-		[IST_MI]		= MPC8548_EXTERNALSOURCES
-	+ MPC8548_ONCHIPSOURCES
-	+ MPC8548_MSIGROUPSOURCES
-	+ MPC8548_TIMERSOURCES
-	+ MPC8548_IPISOURCES,
-		[IST_MAX]		= MPC8548_EXTERNALSOURCES
-	+ MPC8548_ONCHIPSOURCES
-	+ MPC8548_MSIGROUPSOURCES

CVS commit: src/sys/arch/powerpc/booke

2011-02-16 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Wed Feb 16 18:44:55 UTC 2011

Modified Files:
src/sys/arch/powerpc/booke: booke_machdep.c

Log Message:
Count debug traps.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/sys/arch/powerpc/booke/booke_machdep.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/powerpc/booke/booke_machdep.c
diff -u src/sys/arch/powerpc/booke/booke_machdep.c:1.2 src/sys/arch/powerpc/booke/booke_machdep.c:1.3
--- src/sys/arch/powerpc/booke/booke_machdep.c:1.2	Tue Jan 18 01:02:52 2011
+++ src/sys/arch/powerpc/booke/booke_machdep.c	Wed Feb 16 18:44:54 2011
@@ -387,6 +387,8 @@
 		ci-ci_ev_traps, xname, system call traps);
 	evcnt_attach_dynamic_nozero(ci-ci_ev_pgm, EVCNT_TYPE_TRAP,
 		ci-ci_ev_traps, xname, PGM traps);
+	evcnt_attach_dynamic_nozero(ci-ci_ev_debug, EVCNT_TYPE_TRAP,
+		ci-ci_ev_traps, xname, debug traps);
 	evcnt_attach_dynamic_nozero(ci-ci_ev_fpu, EVCNT_TYPE_TRAP,
 		ci-ci_ev_traps, xname, FPU unavailable traps);
 	evcnt_attach_dynamic_nozero(ci-ci_ev_fpusw, EVCNT_TYPE_MISC,



CVS commit: src/sys/arch/powerpc/booke/dev

2011-02-16 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Wed Feb 16 18:45:34 UTC 2011

Modified Files:
src/sys/arch/powerpc/booke/dev: cpunode.c

Log Message:
Fill in LE bus_space_tag in attach args.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/sys/arch/powerpc/booke/dev/cpunode.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/powerpc/booke/dev/cpunode.c
diff -u src/sys/arch/powerpc/booke/dev/cpunode.c:1.3 src/sys/arch/powerpc/booke/dev/cpunode.c:1.4
--- src/sys/arch/powerpc/booke/dev/cpunode.c:1.3	Tue Feb  8 06:21:03 2011
+++ src/sys/arch/powerpc/booke/dev/cpunode.c	Wed Feb 16 18:45:33 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: cpunode.c,v 1.3 2011/02/08 06:21:03 matt Exp $	*/
+/*	$NetBSD: cpunode.c,v 1.4 2011/02/16 18:45:33 matt Exp $	*/
 /*-
  * Copyright (c) 2010, 2011 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -36,7 +36,7 @@
 
 #include sys/cdefs.h
 
-__KERNEL_RCSID(0, $NetBSD: cpunode.c,v 1.3 2011/02/08 06:21:03 matt Exp $);
+__KERNEL_RCSID(0, $NetBSD: cpunode.c,v 1.4 2011/02/16 18:45:33 matt Exp $);
 
 #include sys/param.h
 #include sys/device.h
@@ -136,6 +136,7 @@
 
 		cna.cna_busname = cpunode;
 		cna.cna_memt = ma-ma_memt;
+		cna.cna_le_memt = ma-ma_le_memt;
 		cna.cna_dmat = ma-ma_dmat;
 		cna.cna_childmask = childmask;
 		cna.cna_locs = *cnl;



CVS commit: src/sys/arch/powerpc/booke/dev

2011-02-16 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Wed Feb 16 18:46:37 UTC 2011

Modified Files:
src/sys/arch/powerpc/booke/dev: pq3ehci.c

Log Message:
Use LE bus space tag for EHCI register access.
Initialize SNOOP for all of RAM.
Use IPL_USB


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/sys/arch/powerpc/booke/dev/pq3ehci.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/powerpc/booke/dev/pq3ehci.c
diff -u src/sys/arch/powerpc/booke/dev/pq3ehci.c:1.2 src/sys/arch/powerpc/booke/dev/pq3ehci.c:1.3
--- src/sys/arch/powerpc/booke/dev/pq3ehci.c:1.2	Tue Jan 18 01:02:53 2011
+++ src/sys/arch/powerpc/booke/dev/pq3ehci.c	Wed Feb 16 18:46:37 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: pq3ehci.c,v 1.2 2011/01/18 01:02:53 matt Exp $	*/
+/*	$NetBSD: pq3ehci.c,v 1.3 2011/02/16 18:46:37 matt Exp $	*/
 /*-
  * Copyright (c) 2010, 2011 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -29,7 +29,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: pq3ehci.c,v 1.2 2011/01/18 01:02:53 matt Exp $);
+__KERNEL_RCSID(0, $NetBSD: pq3ehci.c,v 1.3 2011/02/16 18:46:37 matt Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -90,7 +90,7 @@
 	int error;
 
 	psc-sc_children |= cna-cna_childmask;
-	sc-sc.iot = cna-cna_memt;
+	sc-sc.iot = cna-cna_le_memt;	/* EHCI registers are little endian */
 	sc-sc.sc_dev = self;
 	sc-sc.sc_bus.dmatag = cna-cna_dmat;
 	sc-sc.sc_bus.hci_private = sc;
@@ -111,7 +111,16 @@
 	}
 	sc-sc.sc_size = cnl-cnl_size;
 
-	sc-sc_ih = intr_establish(cnl-cnl_intrs[0], IPL_VM, IST_ONCHIP,
+	/*
+	 * We need to tell the USB interface to snoop all off RAM starting
+	 * at 0.  Since it can do it by powers of 2, get the highest RAM
+	 * address and roughly round it to the next power of 2 and find
+	 * the number of leading zero bits.  
+	 */
+	cpu_write_4(cnl-cnl_addr + USB_SNOOP1,
+	SNOOP_2GB - __builtin_clz(curcpu()-ci_softc-cpu_highmem * 2 - 1));
+
+	sc-sc_ih = intr_establish(cnl-cnl_intrs[0], IPL_USB, IST_ONCHIP,
 	ehci_intr, sc);
 	if (sc-sc_ih == NULL) {
 		aprint_error_dev(self, failed to establish interrupt %d\n,



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

2011-02-16 Thread Jukka Ruohonen
Module Name:src
Committed By:   jruoho
Date:   Wed Feb 16 18:55:50 UTC 2011

Modified Files:
src/sys/arch/x86/acpi: acpi_wakeup.c

Log Message:
Explicitly re-enable the SCI interrupt when the wakeup starts (and before
interrupts are enabled). A workaround for a BIOS bug. Fixes the interrupt
storm reported by Taylor R. Campbell in PR # 44581.


To generate a diff of this commit:
cvs rdiff -u -r1.27 -r1.28 src/sys/arch/x86/acpi/acpi_wakeup.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/x86/acpi/acpi_wakeup.c
diff -u src/sys/arch/x86/acpi/acpi_wakeup.c:1.27 src/sys/arch/x86/acpi/acpi_wakeup.c:1.28
--- src/sys/arch/x86/acpi/acpi_wakeup.c:1.27	Thu Jan 13 03:45:38 2011
+++ src/sys/arch/x86/acpi/acpi_wakeup.c	Wed Feb 16 18:55:50 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: acpi_wakeup.c,v 1.27 2011/01/13 03:45:38 jruoho Exp $	*/
+/*	$NetBSD: acpi_wakeup.c,v 1.28 2011/02/16 18:55:50 jruoho Exp $	*/
 
 /*-
  * Copyright (c) 2002 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: acpi_wakeup.c,v 1.27 2011/01/13 03:45:38 jruoho Exp $);
+__KERNEL_RCSID(0, $NetBSD: acpi_wakeup.c,v 1.28 2011/02/16 18:55:50 jruoho Exp $);
 
 /*-
  * Copyright (c) 2001 Takanori Watanabe takaw...@jp.freebsd.org
@@ -342,6 +342,13 @@
 	inittodr(time_second);
 
 	/*
+	 * The BIOS should always re-enable the SCI upon
+	 * resume from the S3 state. The following is a
+	 * workaround for systems that fail to do this.
+	 */
+	(void)AcpiWriteBitRegister(ACPI_BITREG_SCI_ENABLE, 1);
+
+	/*
 	 * Clear fixed events (see e.g. ACPI 3.0, p. 62).
 	 * Also prevent GPEs from misfiring by disabling
 	 * all GPEs before interrupts are enabled. The



CVS commit: src/sys/opencrypto

2011-02-16 Thread Matthias Drochner
Module Name:src
Committed By:   drochner
Date:   Wed Feb 16 19:08:58 UTC 2011

Modified Files:
src/sys/opencrypto: deflate.c deflate.h

Log Message:
-avoid allocation of an extra result buffer and data copy in case
 the DEFLATE complssion/decompression result is within a single
 buffer already
-simplify bookkeeping of allocated buffers (and don't waste the
 last member of the metadata array)
from Wolfgang Stukenbrock per PR kern/36865 (with some cleanup
of error handling by me)
The Gzip compression case can be improved too, but for now I've applied
the buffer bookkeeping changes.

tested with IP4 IPCOMP


To generate a diff of this commit:
cvs rdiff -u -r1.14 -r1.15 src/sys/opencrypto/deflate.c
cvs rdiff -u -r1.6 -r1.7 src/sys/opencrypto/deflate.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/opencrypto/deflate.c
diff -u src/sys/opencrypto/deflate.c:1.14 src/sys/opencrypto/deflate.c:1.15
--- src/sys/opencrypto/deflate.c:1.14	Thu Feb 10 21:17:49 2011
+++ src/sys/opencrypto/deflate.c	Wed Feb 16 19:08:57 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: deflate.c,v 1.14 2011/02/10 21:17:49 drochner Exp $ */
+/*	$NetBSD: deflate.c,v 1.15 2011/02/16 19:08:57 drochner Exp $ */
 /*	$FreeBSD: src/sys/opencrypto/deflate.c,v 1.1.2.1 2002/11/21 23:34:23 sam Exp $	*/
 /* $OpenBSD: deflate.c,v 1.3 2001/08/20 02:45:22 hugh Exp $ */
 
@@ -35,7 +35,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: deflate.c,v 1.14 2011/02/10 21:17:49 drochner Exp $);
+__KERNEL_RCSID(0, $NetBSD: deflate.c,v 1.15 2011/02/16 19:08:57 drochner Exp $);
 
 #include sys/types.h
 #include sys/malloc.h
@@ -77,10 +77,10 @@
 
 	z_stream zbuf;
 	u_int8_t *output;
-	u_int32_t count, result;
-	int error, i = 0, j;
+	u_int32_t count, result, tocopy;
+	int error, i, j;
 	struct deflate_buf *buf, *tmp;
-	size_t len, old_len;
+	size_t len;
 
 	DPRINTF((deflate_global: size %d\n, size));
 
@@ -90,9 +90,6 @@
 		return 0;
 
 	memset(zbuf, 0, sizeof(z_stream));
-	for (j = 0; j  len; j++)
-		buf[j].flag = 0;
-
 	zbuf.next_in = data;	/* data that is going to be processed */
 	zbuf.zalloc = ocf_zalloc;
 	zbuf.zfree = ocf_zfree;
@@ -100,12 +97,7 @@
 	zbuf.avail_in = size;	/* Total length of data to be processed */
 
 	if (!decomp) {
-		buf[i].out = malloc(size, M_CRYPTO_DATA, M_NOWAIT);
-		if (buf[i].out == NULL)
-			goto bad;
-		buf[i].size = size;
-		buf[i].flag = 1;
-		i++;
+		buf[0].size = size;
 	} else {
 		/*
 	 	 * Choose a buffer with 4x the size of the input buffer
@@ -114,13 +106,12 @@
 	 	 * updated while the decompression is going on
 	 	 */
 
-		buf[i].size = size * 4;
-		buf[i].out = malloc(buf[i].size, M_CRYPTO_DATA, M_NOWAIT);
-		if (buf[i].out == NULL)
-			goto bad;
-		buf[i].flag = 1;
-		i++;
+		buf[0].size = size * 4;
 	}
+	buf[0].out = malloc(buf[0].size, M_CRYPTO_DATA, M_NOWAIT);
+	if (buf[0].out == NULL)
+		goto bad3;
+	i = 1;
 
 	zbuf.next_out = buf[0].out;
 	zbuf.avail_out = buf[0].size;
@@ -130,7 +121,7 @@
 		window_deflate, Z_MEMLEVEL, Z_DEFAULT_STRATEGY);
 
 	if (error != Z_OK)
-		goto bad;
+		goto bad2;
 	for (;;) {
 		error = decomp ? inflate(zbuf, Z_SYNC_FLUSH) :
  deflate(zbuf, Z_FINISH);
@@ -139,16 +130,13 @@
 		else if (zbuf.avail_in == 0  zbuf.avail_out != 0)
 			goto end;
 		else if (zbuf.avail_out == 0) {
-			if (i == (len-1)) {
-old_len = i;
+			if (i == len) {
 len += ZBUF;
 tmp = realloc(buf,len*sizeof(struct deflate_buf),
 			  M_CRYPTO_DATA, M_NOWAIT);
 if (tmp == NULL)
 	goto bad;
 buf = tmp;
-for (j = old_len; j  len; j++)
-	buf[j].flag = 0;
 			}
 			/* we need more output space, allocate size */
 			buf[i].out = malloc(size, M_CRYPTO_DATA, M_NOWAIT);
@@ -156,7 +144,6 @@
 goto bad;
 			zbuf.next_out = buf[i].out;
 			buf[i].size = size;
-			buf[i].flag = 1;
 			zbuf.avail_out = buf[i].size;
 			i++;
 		} else
@@ -166,41 +153,41 @@
 end:
 	result = count = zbuf.total_out;
 
-	*out = malloc(result, M_CRYPTO_DATA, M_NOWAIT);
-	if (*out == NULL)
-		goto bad;
-	if (decomp)
-		inflateEnd(zbuf);
-	else
-		deflateEnd(zbuf);
-	output = *out;
-	for (j = 0; buf[j].flag != 0; j++) {
-		if (count  buf[j].size) {
-			memcpy(*out, buf[j].out, buf[j].size);
-			*out += buf[j].size;
-			free(buf[j].out, M_CRYPTO_DATA);
-			count -= buf[j].size;
-		} else {
-			/* it should be the last buffer */
-			memcpy(*out, buf[j].out, count);
-			*out += count;
+	if (i != 1) { /* copy everything into one buffer */
+		output = malloc(result, M_CRYPTO_DATA, M_NOWAIT);
+		if (output == NULL)
+			goto bad;
+		*out = output;
+		for (j = 0; j  i; j++) {
+			tocopy = MIN(count, buf[j].size);
+			/* XXX the last buf can be empty */
+			KASSERT(tocopy || j == (i - 1));
+			memcpy(output, buf[j].out, tocopy);
+			output += tocopy;
 			free(buf[j].out, M_CRYPTO_DATA);
-			count = 0;
+			count -= tocopy;
 		}
+		KASSERT(count == 0);
+	} else {
+		*out = buf[0].out;
 	}
 	free(buf, M_CRYPTO_DATA);
-	

CVS commit: src/lib

2011-02-16 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Wed Feb 16 19:26:59 UTC 2011

Modified Files:
src/lib/librumpclient: rumpclient.c
src/lib/librumphijack: hijack.c

Log Message:
* set default server connection retry to 0 (no reconnection attempts).
  while for some cases attempting retry after server restart works
  brilliantly (e.g. firefox), in other cases it's quite disasterous
  (sshd doesn't like its file descriptors going missing and does not
  attempt to reopen them, leading to a quite catastophic loop of
  EBADF once the server does come back)
* rename RUMPHIJACK_RETRY to the slightly more sensible
  RUMPHIJACK_RETRYCONNECT


To generate a diff of this commit:
cvs rdiff -u -r1.31 -r1.32 src/lib/librumpclient/rumpclient.c
cvs rdiff -u -r1.43 -r1.44 src/lib/librumphijack/hijack.c

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

Modified files:

Index: src/lib/librumpclient/rumpclient.c
diff -u src/lib/librumpclient/rumpclient.c:1.31 src/lib/librumpclient/rumpclient.c:1.32
--- src/lib/librumpclient/rumpclient.c:1.31	Wed Feb 16 17:56:46 2011
+++ src/lib/librumpclient/rumpclient.c	Wed Feb 16 19:26:58 2011
@@ -1,4 +1,4 @@
-/*  $NetBSD: rumpclient.c,v 1.31 2011/02/16 17:56:46 pooka Exp $	*/
+/*  $NetBSD: rumpclient.c,v 1.32 2011/02/16 19:26:58 pooka Exp $	*/
 
 /*
  * Copyright (c) 2010, 2011 Antti Kantee.  All Rights Reserved.
@@ -88,7 +88,11 @@
 static int doconnect(bool);
 static int handshake_req(struct spclient *, int, void *, int, bool);
 
-time_t retrytimo = RUMPCLIENT_RETRYCONN_ONCE;
+/*
+ * Default: don't retry.  Most clients can't handle it
+ * (consider e.g. fds suddenly going missing).
+ */
+static time_t retrytimo = 0;
 
 static int
 send_with_recon(struct spclient *spc, const void *data, size_t dlen)
@@ -102,8 +106,10 @@
 		rv = dosend(spc, data, dlen);
 		if (__predict_false(rv == ENOTCONN || rv == EBADF)) {
 			/* no persistent connections */
-			if (retrytimo == 0)
+			if (retrytimo == 0) {
+rv = ENOTCONN;
 break;
+			}
 			if (retrytimo == RUMPCLIENT_RETRYCONN_DIE)
 exit(1);
 

Index: src/lib/librumphijack/hijack.c
diff -u src/lib/librumphijack/hijack.c:1.43 src/lib/librumphijack/hijack.c:1.44
--- src/lib/librumphijack/hijack.c:1.43	Wed Feb 16 17:56:46 2011
+++ src/lib/librumphijack/hijack.c	Wed Feb 16 19:26:58 2011
@@ -1,4 +1,4 @@
-/*  $NetBSD: hijack.c,v 1.43 2011/02/16 17:56:46 pooka Exp $	*/
+/*  $NetBSD: hijack.c,v 1.44 2011/02/16 19:26:58 pooka Exp $	*/
 
 /*-
  * Copyright (c) 2011 Antti Kantee.  All Rights Reserved.
@@ -26,7 +26,7 @@
  */
 
 #include sys/cdefs.h
-__RCSID($NetBSD: hijack.c,v 1.43 2011/02/16 17:56:46 pooka Exp $);
+__RCSID($NetBSD: hijack.c,v 1.44 2011/02/16 19:26:58 pooka Exp $);
 
 #define __ssp_weak_name(fun) _hijack_ ## fun
 
@@ -256,11 +256,7 @@
 		err(1, rumpclient init);
 
 	/* set client persistence level */
-	if (getenv_r(RUMPHIJACK_RETRY, buf, sizeof(buf)) == -1) {
-		if (errno == ERANGE)
-			err(1, invalid RUMPHIJACK_RETRY);
-		rumpclient_setconnretry(RUMPCLIENT_RETRYCONN_INFTIME);
-	} else {
+	if (getenv_r(RUMPHIJACK_RETRYCONNECT, buf, sizeof(buf)) != -1) {
 		if (strcmp(buf, die) == 0)
 			rumpclient_setconnretry(RUMPCLIENT_RETRYCONN_DIE);
 		else if (strcmp(buf, inftime) == 0)
@@ -269,11 +265,12 @@
 			rumpclient_setconnretry(RUMPCLIENT_RETRYCONN_ONCE);
 		else {
 			time_t timeout;
+			char *ep;
 
-			timeout = (time_t)strtoll(buf, NULL, 10);
-			if (timeout = 0)
-errx(1, RUMPHIJACK_RETRY must be keyword 
-or a positive integer, got: %s, buf);
+			timeout = (time_t)strtoll(buf, ep, 10);
+			if (timeout = 0 || ep != buf + strlen(buf))
+errx(1, RUMPHIJACK_RETRYCONNECT must be 
+keyword or integer, got: %s, buf);
 
 			rumpclient_setconnretry(timeout);
 		}



CVS commit: [netbsd-5] src

2011-02-16 Thread Manuel Bouyer
Module Name:src
Committed By:   bouyer
Date:   Wed Feb 16 19:27:16 UTC 2011

Modified Files:
src/distrib/sets/lists/base [netbsd-5]: mi
src/distrib/sets/lists/man [netbsd-5]: mi
src/usr.sbin [netbsd-5]: Makefile
Added Files:
src/usr.sbin/wake [netbsd-5]: Makefile wake.8 wake.c

Log Message:
Pull up following revision(s) (requested by mbalmer in ticket #1533):
usr.sbin/wake/wake.c: revisions 1.1 - 1.10
distrib/sets/lists/man/mi: revision 1.1143
usr.sbin/wake/wake.8: revisions 1.1 - 1.8
usr.sbin/wake/Makefile: revisions 1.1 - 1.2
distrib/sets/lists/base/mi: revision 1.821
usr.sbin/Makefile: revision 1.242
wake(8) is a command to send Wake-on-LAN packets to machines on the local
ethernet, allowing machines to be powered up without physical access to them.


To generate a diff of this commit:
cvs rdiff -u -r1.780.2.17 -r1.780.2.18 src/distrib/sets/lists/base/mi
cvs rdiff -u -r1.1109.2.16 -r1.1109.2.17 src/distrib/sets/lists/man/mi
cvs rdiff -u -r1.237.4.2 -r1.237.4.3 src/usr.sbin/Makefile
cvs rdiff -u -r0 -r1.2.4.2 src/usr.sbin/wake/Makefile
cvs rdiff -u -r0 -r1.8.4.2 src/usr.sbin/wake/wake.8
cvs rdiff -u -r0 -r1.12.4.2 src/usr.sbin/wake/wake.c

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.780.2.17 src/distrib/sets/lists/base/mi:1.780.2.18
--- src/distrib/sets/lists/base/mi:1.780.2.17	Thu Jan  6 21:42:07 2011
+++ src/distrib/sets/lists/base/mi	Wed Feb 16 19:27:15 2011
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.780.2.17 2011/01/06 21:42:07 riz Exp $
+# $NetBSD: mi,v 1.780.2.18 2011/02/16 19:27:15 bouyer Exp $
 #
 # Note:	Don't delete entries from here - mark them as obsolete instead,
 #	unless otherwise stated below.
@@ -1627,6 +1627,7 @@
 ./usr/sbin/veriexecgenbase-sysutil-bin
 ./usr/sbin/vipw	base-sysutil-bin
 ./usr/sbin/vnconfigbase-sysutil-bin
+./usr/sbin/wake	base-netutil-bin
 ./usr/sbin/wiconfigbase-sysutil-bin
 ./usr/sbin/wire-testbase-netutil-bin
 ./usr/sbin/wlanctlbase-sysutil-bin

Index: src/distrib/sets/lists/man/mi
diff -u src/distrib/sets/lists/man/mi:1.1109.2.16 src/distrib/sets/lists/man/mi:1.1109.2.17
--- src/distrib/sets/lists/man/mi:1.1109.2.16	Thu Jan  6 21:42:08 2011
+++ src/distrib/sets/lists/man/mi	Wed Feb 16 19:27:14 2011
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.1109.2.16 2011/01/06 21:42:08 riz Exp $
+# $NetBSD: mi,v 1.1109.2.17 2011/02/16 19:27:14 bouyer Exp $
 #
 # Note: don't delete entries from here - mark them as obsolete instead.
 #
@@ -2630,6 +2630,7 @@
 ./usr/share/man/cat8/virtual.0			man-postfix-catman	postfix,.cat
 ./usr/share/man/cat8/vmstat.0			man-obsolete		obsolete
 ./usr/share/man/cat8/vnconfig.0			man-sysutil-catman	.cat
+./usr/share/man/cat8/wake.0			man-netutil-catman	.cat
 ./usr/share/man/cat8/walnut/MAKEDEV.0		man-obsolete		obsolete
 ./usr/share/man/cat8/walnut/makedev.0		man-obsolete		obsolete
 ./usr/share/man/cat8/wdogctl.0			man-sysutil-catman	.cat
@@ -4887,6 +4888,7 @@
 ./usr/share/man/html8/virecover.html		man-sysutil-htmlman	html
 ./usr/share/man/html8/virtual.html		man-postfix-htmlman	postfix,html
 ./usr/share/man/html8/vnconfig.html		man-sysutil-htmlman	html
+./usr/share/man/html8/wake.html			man-netutil-htmlman	html
 ./usr/share/man/html8/wdogctl.html		man-sysutil-htmlman	html
 ./usr/share/man/html8/wiconfig.html		man-netutil-htmlman	html
 ./usr/share/man/html8/wire-test.html		man-netutil-htmlman	html
@@ -7512,6 +7514,7 @@
 ./usr/share/man/man8/virtual.8			man-postfix-man		postfix,.man
 ./usr/share/man/man8/vmstat.8			man-obsolete		obsolete
 ./usr/share/man/man8/vnconfig.8			man-sysutil-man		.man
+./usr/share/man/man8/wake.8			man-netutil-man		.man
 ./usr/share/man/man8/walnut/MAKEDEV.8		man-obsolete		obsolete
 ./usr/share/man/man8/walnut/makedev.8		man-obsolete		obsolete
 ./usr/share/man/man8/wdogctl.8			man-sysutil-man		.man

Index: src/usr.sbin/Makefile
diff -u src/usr.sbin/Makefile:1.237.4.2 src/usr.sbin/Makefile:1.237.4.3
--- src/usr.sbin/Makefile:1.237.4.2	Sun Oct 18 16:50:14 2009
+++ src/usr.sbin/Makefile	Wed Feb 16 19:27:15 2011
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.237.4.2 2009/10/18 16:50:14 bouyer Exp $
+#	$NetBSD: Makefile,v 1.237.4.3 2011/02/16 19:27:15 bouyer Exp $
 #	from: @(#)Makefile	5.20 (Berkeley) 6/12/93
 
 .include bsd.own.mk
@@ -21,7 +21,8 @@
 	schedctl sliplogin sntp \
 	spray srtconfig sti sunlabel sup syslogd tadpolectl tcpdchk \
 	tcpdmatch tcpdump tcpdrop timed tpctl traceroute trpt unlink \
-	usbdevs user videomode vipw veriexecgen vnconfig wiconfig wlanctl wpa \
+	usbdevs user videomode vipw veriexecgen vnconfig wake wiconfig \
+	wlanctl wpa \
 	wsconscfg wsfontload wsmoused wsmuxctl zdump zic
 
 .if (${MKISCSI} != no)

Added files:

Index: src/usr.sbin/wake/Makefile
diff -u /dev/null src/usr.sbin/wake/Makefile:1.2.4.2
--- /dev/null	Wed Feb 16 19:27:16 2011
+++ 

CVS commit: src/include

2011-02-16 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Feb 16 19:29:35 UTC 2011

Modified Files:
src/include: rmt.h

Log Message:
handle ssp


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/include/rmt.h

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

Modified files:

Index: src/include/rmt.h
diff -u src/include/rmt.h:1.6 src/include/rmt.h:1.7
--- src/include/rmt.h:1.6	Tue Aug 31 01:12:35 2010
+++ src/include/rmt.h	Wed Feb 16 14:29:35 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: rmt.h,v 1.6 2010/08/31 05:12:35 enami Exp $	*/
+/*	$NetBSD: rmt.h,v 1.7 2011/02/16 19:29:35 christos Exp $	*/
 
 /*
  *	rmt.h
@@ -19,6 +19,11 @@
 
 #include sys/cdefs.h
 
+#if _FORTIFY_SOURCE  0
+#define __ssp_weak_name(x)	rmt ## x
+#include ssp/unistd.h
+#endif 
+
 __BEGIN_DECLS
 int	isrmt(int);
 int	rmtaccess(const char *, int);
@@ -49,7 +54,9 @@
 #define lseek rmtlseek
 #define lstat rmtlstat
 #define open rmtopen
+#if __SSP_FORTIFY_LEVEL == 0
 #define read rmtread
+#endif
 #define stat rmtstat
 #define write rmtwrite
 #endif /* __RMTLIB_PRIVATE */



CVS commit: src/tests/lib

2011-02-16 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Wed Feb 16 19:31:31 UTC 2011

Modified Files:
src/tests/lib/librumpclient: t_exec.sh
src/tests/lib/librumphijack: t_tcpip.sh

Log Message:
RUMPHIJACK_RETRY - RUMPHIJACK_RETRYCONNECT


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/tests/lib/librumpclient/t_exec.sh
cvs rdiff -u -r1.4 -r1.5 src/tests/lib/librumphijack/t_tcpip.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/lib/librumpclient/t_exec.sh
diff -u src/tests/lib/librumpclient/t_exec.sh:1.5 src/tests/lib/librumpclient/t_exec.sh:1.6
--- src/tests/lib/librumpclient/t_exec.sh:1.5	Wed Feb 16 17:57:44 2011
+++ src/tests/lib/librumpclient/t_exec.sh	Wed Feb 16 19:31:31 2011
@@ -1,4 +1,4 @@
-#   $NetBSD: t_exec.sh,v 1.5 2011/02/16 17:57:44 pooka Exp $
+#   $NetBSD: t_exec.sh,v 1.6 2011/02/16 19:31:31 pooka Exp $
 #
 # Copyright (c) 2011 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -27,7 +27,7 @@
 
 rumpsrv='rump_server -lrumpnet -lrumpnet_net -lrumpnet_netinet'
 export RUMP_SERVER=unix://csock
-export RUMPHIJACK_RETRY='die'
+export RUMPHIJACK_RETRYCONNECT='die'
 
 atf_test_case noexec cleanup
 noexec_head()

Index: src/tests/lib/librumphijack/t_tcpip.sh
diff -u src/tests/lib/librumphijack/t_tcpip.sh:1.4 src/tests/lib/librumphijack/t_tcpip.sh:1.5
--- src/tests/lib/librumphijack/t_tcpip.sh:1.4	Mon Feb 14 19:56:30 2011
+++ src/tests/lib/librumphijack/t_tcpip.sh	Wed Feb 16 19:31:31 2011
@@ -1,4 +1,4 @@
-#   $NetBSD: t_tcpip.sh,v 1.4 2011/02/14 19:56:30 pooka Exp $
+#   $NetBSD: t_tcpip.sh,v 1.5 2011/02/16 19:31:31 pooka Exp $
 #
 # Copyright (c) 2011 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -39,7 +39,7 @@
 
 	atf_check -s exit:0 ${rumpnetsrv} ${RUMP_SERVER}
 	# make sure clients die after we nuke the server
-	export RUMPHIJACK_RETRY='die'
+	export RUMPHIJACK_RETRYCONNECT='die'
 
 	# start bozo in daemon mode
 	atf_check -s exit:0 env LD_PRELOAD=/usr/lib/librumphijack.so \
@@ -121,7 +121,7 @@
 
 	atf_check -s exit:0 ${rumpnetsrv} ${RUMP_SERVER}
 	# make sure clients die after we nuke the server
-	export RUMPHIJACK_RETRY='die'
+	export RUMPHIJACK_RETRYCONNECT='die'
 
 	start_sshd
 
@@ -143,7 +143,7 @@
 ssh_cleanup()
 {
 	rump.halt
-	# sshd dies due to RUMPHIJACK_RETRY=1d6
+	# sshd dies due to RUMPHIJACK_RETRYCONNECT=1d6
 }
 
 atf_init_test_cases()



CVS commit: [netbsd-5] src/sys/kern

2011-02-16 Thread Manuel Bouyer
Module Name:src
Committed By:   bouyer
Date:   Wed Feb 16 19:31:44 UTC 2011

Modified Files:
src/sys/kern [netbsd-5]: vfs_wapbl.c

Log Message:
Pull up following revision(s) (requested by tron in ticket #1535):
sys/kern/vfs_wapbl.c: revision 1.39 via patch
Add two sysctls one that does verbose transaction logging and a second one
that disables flushing the disk cache (which is fast but dangerous for
data integrity). From simon a long while back.


To generate a diff of this commit:
cvs rdiff -u -r1.3.8.3 -r1.3.8.4 src/sys/kern/vfs_wapbl.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/vfs_wapbl.c
diff -u src/sys/kern/vfs_wapbl.c:1.3.8.3 src/sys/kern/vfs_wapbl.c:1.3.8.4
--- src/sys/kern/vfs_wapbl.c:1.3.8.3	Mon Nov 22 02:52:29 2010
+++ src/sys/kern/vfs_wapbl.c	Wed Feb 16 19:31:44 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: vfs_wapbl.c,v 1.3.8.3 2010/11/22 02:52:29 riz Exp $	*/
+/*	$NetBSD: vfs_wapbl.c,v 1.3.8.4 2011/02/16 19:31:44 bouyer Exp $	*/
 
 /*-
  * Copyright (c) 2003, 2008, 2009 The NetBSD Foundation, Inc.
@@ -33,7 +33,7 @@
  * This implements file system independent write ahead filesystem logging.
  */
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: vfs_wapbl.c,v 1.3.8.3 2010/11/22 02:52:29 riz Exp $);
+__KERNEL_RCSID(0, $NetBSD: vfs_wapbl.c,v 1.3.8.4 2011/02/16 19:31:44 bouyer Exp $);
 
 #include sys/param.h
 
@@ -41,6 +41,7 @@
 #include sys/param.h
 #include sys/namei.h
 #include sys/proc.h
+#include sys/sysctl.h
 #include sys/uio.h
 #include sys/vnode.h
 #include sys/file.h
@@ -65,6 +66,10 @@
 #define	wapbl_free(a) free((a), M_WAPBL)
 #define	wapbl_calloc(n, s) malloc((n)*(s), M_WAPBL, M_WAITOK | M_ZERO)
 
+static struct sysctllog *wapbl_sysctl;
+static int wapbl_flush_disk_cache = 1;
+static int wapbl_verbose_commit = 0;
+
 #else /* !_KERNEL */
 #include assert.h
 #include errno.h
@@ -245,8 +250,45 @@
 void
 wapbl_init()
 {
+	int rv;
+	const struct sysctlnode *rnode, *cnode;
 
 	malloc_type_attach(M_WAPBL);
+
+	wapbl_sysctl = NULL;
+
+	rv = sysctl_createv(wapbl_sysctl, 0, NULL, rnode,
+		   CTLFLAG_PERMANENT,
+		   CTLTYPE_NODE, vfs, NULL,
+		   NULL, 0, NULL, 0,
+		   CTL_VFS, CTL_EOL);
+	if (rv)
+		return;
+
+	rv = sysctl_createv(wapbl_sysctl, 0, rnode, rnode,
+		   CTLFLAG_PERMANENT,
+		   CTLTYPE_NODE, wapbl,
+		   SYSCTL_DESCR(WAPBL journaling options),
+		   NULL, 0, NULL, 0,
+		   CTL_CREATE, CTL_EOL);
+	if (rv)
+		return;
+
+	rv = sysctl_createv(wapbl_sysctl, 0, rnode, cnode,
+		   CTLFLAG_PERMANENT|CTLFLAG_READWRITE,
+		   CTLTYPE_INT, flush_disk_cache,
+		   SYSCTL_DESCR(flush disk cache),
+		   NULL, 0, wapbl_flush_disk_cache, 0,
+		   CTL_CREATE, CTL_EOL);
+	if (rv)
+		return;
+
+	rv = sysctl_createv(wapbl_sysctl, 0, rnode, cnode,
+		   CTLFLAG_PERMANENT|CTLFLAG_READWRITE,
+		   CTLTYPE_INT, verbose_commit,
+		   SYSCTL_DESCR(show time and size of wapbl log commits),
+		   NULL, 0, wapbl_verbose_commit, 0,
+		   CTL_CREATE, CTL_EOL);
 }
 
 int
@@ -1322,6 +1364,13 @@
 
 	/* Calculate amount of space needed to flush */
 	flushsize = wapbl_transaction_len(wl);
+	if (wapbl_verbose_commit) {
+		struct timespec ts;
+		getnanotime(ts);
+		printf(%s: %lld.%06ld this transaction = %zu bytes\n,
+		__func__, (long long)ts.tv_sec,
+		(long)ts.tv_nsec, flushsize);
+	}
 
 	if (flushsize  (wl-wl_circ_size - wl-wl_reserved_bytes)) {
 		/*
@@ -1823,12 +1872,15 @@
 	int error;
 	int force = 1;
 
-	/* XXX Calc checksum here, instead we do this for now */
-	error = VOP_IOCTL(wl-wl_devvp, DIOCCACHESYNC, force, FWRITE, FSCRED);
-	if (error) {
-		WAPBL_PRINTF(WAPBL_PRINT_ERROR,
-		(wapbl_write_commit: DIOCCACHESYNC on dev 0x%x 
-		returned %d\n, wl-wl_devvp-v_rdev, error));
+	if (wapbl_flush_disk_cache) {
+		/* XXX Calc checksum here, instead we do this for now */
+		error = VOP_IOCTL(wl-wl_devvp, DIOCCACHESYNC, force,
+		FWRITE, FSCRED);
+		if (error) {
+			WAPBL_PRINTF(WAPBL_PRINT_ERROR,
+			(wapbl_write_commit: DIOCCACHESYNC on dev 0x%x 
+			returned %d\n, wl-wl_devvp-v_rdev, error));
+		}
 	}
 
 	wc-wc_head = head;
@@ -1853,11 +1905,14 @@
 	if (error)
 		return error;
 
-	error = VOP_IOCTL(wl-wl_devvp, DIOCCACHESYNC, force, FWRITE, FSCRED);
-	if (error) {
-		WAPBL_PRINTF(WAPBL_PRINT_ERROR,
-		(wapbl_write_commit: DIOCCACHESYNC on dev 0x%x 
-		returned %d\n, wl-wl_devvp-v_rdev, error));
+	if (wapbl_flush_disk_cache) {
+		error = VOP_IOCTL(wl-wl_devvp, DIOCCACHESYNC, force,
+		FWRITE, FSCRED);
+		if (error) {
+			WAPBL_PRINTF(WAPBL_PRINT_ERROR,
+			(wapbl_write_commit: DIOCCACHESYNC on dev 0x%x 
+			returned %d\n, wl-wl_devvp-v_rdev, error));
+		}
 	}
 
 	/*



CVS commit: src/sbin/reboot

2011-02-16 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Wed Feb 16 19:32:26 UTC 2011

Modified Files:
src/sbin/reboot: reboot.8 reboot.c

Log Message:
Add -vxz to SYNOPSIS and usage.


To generate a diff of this commit:
cvs rdiff -u -r1.28 -r1.29 src/sbin/reboot/reboot.8
cvs rdiff -u -r1.37 -r1.38 src/sbin/reboot/reboot.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/reboot/reboot.8
diff -u src/sbin/reboot/reboot.8:1.28 src/sbin/reboot/reboot.8:1.29
--- src/sbin/reboot/reboot.8:1.28	Wed Feb 16 17:53:31 2011
+++ src/sbin/reboot/reboot.8	Wed Feb 16 19:32:26 2011
@@ -1,4 +1,4 @@
-.\	$NetBSD: reboot.8,v 1.28 2011/02/16 17:53:31 dyoung Exp $
+.\	$NetBSD: reboot.8,v 1.29 2011/02/16 19:32:26 wiz Exp $
 .\
 .\ Copyright (c) 1990, 1991, 1993
 .\	The Regents of the University of California.  All rights reserved.
@@ -39,11 +39,11 @@
 .Nd restarting, powering down and stopping the system
 .Sh SYNOPSIS
 .Nm halt
-.Op Fl dlnpq
+.Op Fl dlnpqvxz
 .Nm poweroff
-.Op Fl dlnq
+.Op Fl dlnqvxz
 .Nm
-.Op Fl dlnq
+.Op Fl dlnqvxz
 .Op Ar arg ...
 .Sh DESCRIPTION
 The

Index: src/sbin/reboot/reboot.c
diff -u src/sbin/reboot/reboot.c:1.37 src/sbin/reboot/reboot.c:1.38
--- src/sbin/reboot/reboot.c:1.37	Wed Feb 16 17:53:31 2011
+++ src/sbin/reboot/reboot.c	Wed Feb 16 19:32:26 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: reboot.c,v 1.37 2011/02/16 17:53:31 dyoung Exp $	*/
+/*	$NetBSD: reboot.c,v 1.38 2011/02/16 19:32:26 wiz Exp $	*/
 
 /*
  * Copyright (c) 1980, 1986, 1993
@@ -40,7 +40,7 @@
 #if 0
 static char sccsid[] = @(#)reboot.c	8.1 (Berkeley) 6/5/93;
 #else
-__RCSID($NetBSD: reboot.c,v 1.37 2011/02/16 17:53:31 dyoung Exp $);
+__RCSID($NetBSD: reboot.c,v 1.38 2011/02/16 19:32:26 wiz Exp $);
 #endif
 #endif /* not lint */
 
@@ -251,7 +251,7 @@
 {
 	const char *pflag = dohalt ? p : ;
 
-	(void)fprintf(stderr, usage: %s [-dln%sq] [-- boot string]\n,
+	(void)fprintf(stderr, usage: %s [-dln%sqvxz] [-- boot string]\n,
 	getprogname(), pflag);
 	exit(1);
 }



CVS commit: src/sbin/shutdown

2011-02-16 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Wed Feb 16 19:33:40 UTC 2011

Modified Files:
src/sbin/shutdown: shutdown.8

Log Message:
Add -vxz to SYNOPSIS. Sort.


To generate a diff of this commit:
cvs rdiff -u -r1.29 -r1.30 src/sbin/shutdown/shutdown.8

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

Modified files:

Index: src/sbin/shutdown/shutdown.8
diff -u src/sbin/shutdown/shutdown.8:1.29 src/sbin/shutdown/shutdown.8:1.30
--- src/sbin/shutdown/shutdown.8:1.29	Wed Feb 16 17:53:31 2011
+++ src/sbin/shutdown/shutdown.8	Wed Feb 16 19:33:39 2011
@@ -1,4 +1,4 @@
-.\	$NetBSD: shutdown.8,v 1.29 2011/02/16 17:53:31 dyoung Exp $
+.\	$NetBSD: shutdown.8,v 1.30 2011/02/16 19:33:39 wiz Exp $
 .\
 .\ Copyright (c) 1988, 1991, 1993
 .\	The Regents of the University of California.  All rights reserved.
@@ -37,8 +37,8 @@
 .Nd close down the system at a given time
 .Sh SYNOPSIS
 .Nm
+.Op Fl Ddfhknprvxz
 .Op Fl b Ar bootstr
-.Op Fl Ddfhknpr
 .Ar time
 .Op Ar message ... | Ar -
 .Sh DESCRIPTION



CVS commit: src/sbin/shutdown

2011-02-16 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Wed Feb 16 19:33:49 UTC 2011

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

Log Message:
Add -b and -vxz to usage.


To generate a diff of this commit:
cvs rdiff -u -r1.53 -r1.54 src/sbin/shutdown/shutdown.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/shutdown/shutdown.c
diff -u src/sbin/shutdown/shutdown.c:1.53 src/sbin/shutdown/shutdown.c:1.54
--- src/sbin/shutdown/shutdown.c:1.53	Wed Feb 16 17:53:31 2011
+++ src/sbin/shutdown/shutdown.c	Wed Feb 16 19:33:48 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: shutdown.c,v 1.53 2011/02/16 17:53:31 dyoung Exp $	*/
+/*	$NetBSD: shutdown.c,v 1.54 2011/02/16 19:33:48 wiz Exp $	*/
 
 /*
  * Copyright (c) 1988, 1990, 1993
@@ -39,7 +39,7 @@
 #if 0
 static char sccsid[] = @(#)shutdown.c	8.4 (Berkeley) 4/28/95;
 #else
-__RCSID($NetBSD: shutdown.c,v 1.53 2011/02/16 17:53:31 dyoung Exp $);
+__RCSID($NetBSD: shutdown.c,v 1.54 2011/02/16 19:33:48 wiz Exp $);
 #endif
 #endif /* not lint */
 
@@ -586,7 +586,7 @@
 {
 
 	(void)fprintf(stderr,
-	Usage: %s [-Ddfhknpr] time [message ... | -]\n,
+	Usage: %s [-Ddfhknprvxz] [-b bootstr] time [message ... | -]\n,
 	getprogname());
 	exit(1);
 }



CVS commit: [netbsd-5] src/gnu/dist/gdb6/gdb

2011-02-16 Thread Manuel Bouyer
Module Name:src
Committed By:   bouyer
Date:   Wed Feb 16 19:38:03 UTC 2011

Modified Files:
src/gnu/dist/gdb6/gdb [netbsd-5]: shnbsd-tdep.c

Log Message:
Pull up following revision(s) (requested by uwe in ticket #1542):
gnu/dist/gdb6/gdb/shnbsd-tdep.c: revision 1.6
Branch with delay slot executes delay slot even if branch is not
taken, so adjust next_pc logic accordingly.  Fixes SIGILL
(breakpoint's trapa causes an illegal slot instruction exception)
when stepping through such branches.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.5.2.1 src/gnu/dist/gdb6/gdb/shnbsd-tdep.c

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

Modified files:

Index: src/gnu/dist/gdb6/gdb/shnbsd-tdep.c
diff -u src/gnu/dist/gdb6/gdb/shnbsd-tdep.c:1.5 src/gnu/dist/gdb6/gdb/shnbsd-tdep.c:1.5.2.1
--- src/gnu/dist/gdb6/gdb/shnbsd-tdep.c:1.5	Mon Oct 27 00:33:19 2008
+++ src/gnu/dist/gdb6/gdb/shnbsd-tdep.c	Wed Feb 16 19:38:03 2011
@@ -286,14 +286,14 @@
 {
   sr = read_register (SR_REGNUM);
 
+  delay_slot = CONDITIONAL_BRANCH_SLOT_P(insn);
   if (!CONDITIONAL_BRANCH_TAKEN_P(insn, sr))
-	next_pc = pc + 2;
+	next_pc = pc + (delay_slot ? 4 : 2);
   else
 	{
 	  displacement = shnbsd_displacement_8 (insn);
 
 	  next_pc = pc + 4 + (displacement  1);
-	  delay_slot = CONDITIONAL_BRANCH_SLOT_P(insn);
 	}
 }
 



CVS commit: [netbsd-5] src/external/mit/xorg/lib/libX11

2011-02-16 Thread Manuel Bouyer
Module Name:src
Committed By:   bouyer
Date:   Wed Feb 16 19:39:56 UTC 2011

Modified Files:
src/external/mit/xorg/lib/libX11 [netbsd-5]: Makefile

Log Message:
Pull up following revision(s) (requested by dholland in ticket #1538):
external/mit/xorg/lib/libX11/Makefile: revision 1.8
USETBL=yes.  several of these manuals need it.  from PR#36600.


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.6.2.1 src/external/mit/xorg/lib/libX11/Makefile

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

Modified files:

Index: src/external/mit/xorg/lib/libX11/Makefile
diff -u src/external/mit/xorg/lib/libX11/Makefile:1.6 src/external/mit/xorg/lib/libX11/Makefile:1.6.2.1
--- src/external/mit/xorg/lib/libX11/Makefile:1.6	Mon Oct 27 20:24:10 2008
+++ src/external/mit/xorg/lib/libX11/Makefile	Wed Feb 16 19:39:55 2011
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.6 2008/10/27 20:24:10 cube Exp $
+#	$NetBSD: Makefile,v 1.6.2.1 2011/02/16 19:39:55 bouyer Exp $
 
 .include bsd.own.mk
 
@@ -80,6 +80,8 @@
 		XrmGetResource.3 XrmInitialize.3 XrmMergeDatabases.3 \
 		XrmPutResource.3 XrmUniqueQuark.3
 
+USETBL=		yes
+
 FILES=		XErrorDB XKeysymDB Xcms.txt
 FILESDIR=	${X11LIBDIR}
 



CVS commit: src/sys/kern

2011-02-16 Thread Juergen Hannken-Illjes
Module Name:src
Committed By:   hannken
Date:   Wed Feb 16 19:43:06 UTC 2011

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

Log Message:
Set the limit for deallocations in one transaction to a more realistic
(and much lower) value.  When flushing the log these deallocations will
produce new blocks and that may execeed the journal size resulting in
a wapbl_flush: current transaction too big to flush panic.
Seen when removing a large snapshot.

Adresses PR #44568 (WAPBL doens't play nice with snapshots).


To generate a diff of this commit:
cvs rdiff -u -r1.40 -r1.41 src/sys/kern/vfs_wapbl.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/vfs_wapbl.c
diff -u src/sys/kern/vfs_wapbl.c:1.40 src/sys/kern/vfs_wapbl.c:1.41
--- src/sys/kern/vfs_wapbl.c:1.40	Mon Feb 14 16:05:11 2011
+++ src/sys/kern/vfs_wapbl.c	Wed Feb 16 19:43:05 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: vfs_wapbl.c,v 1.40 2011/02/14 16:05:11 bouyer Exp $	*/
+/*	$NetBSD: vfs_wapbl.c,v 1.41 2011/02/16 19:43:05 hannken Exp $	*/
 
 /*-
  * Copyright (c) 2003, 2008, 2009 The NetBSD Foundation, Inc.
@@ -36,7 +36,7 @@
 #define WAPBL_INTERNAL
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: vfs_wapbl.c,v 1.40 2011/02/14 16:05:11 bouyer Exp $);
+__KERNEL_RCSID(0, $NetBSD: vfs_wapbl.c,v 1.41 2011/02/16 19:43:05 hannken Exp $);
 
 #include sys/param.h
 #include sys/bitops.h
@@ -479,7 +479,7 @@
 	wl-wl_bufcount_max = (nbuf / 2) * 1024;
 
 	/* XXX tie this into resource estimation */
-	wl-wl_dealloclim = 2 * btodb(wl-wl_bufbytes_max);
+	wl-wl_dealloclim = wl-wl_bufbytes_max / mp-mnt_stat.f_bsize / 2;
 	
 	wl-wl_deallocblks = wapbl_malloc(sizeof(*wl-wl_deallocblks) *
 	wl-wl_dealloclim);



CVS commit: src/sys/ufs/ffs

2011-02-16 Thread Juergen Hannken-Illjes
Module Name:src
Committed By:   hannken
Date:   Wed Feb 16 19:43:50 UTC 2011

Modified Files:
src/sys/ufs/ffs: ffs_snapshot.c

Log Message:
Refine the scope of WAPBL transactions so we should no longer get
a wapbl_flush: current transaction too big to flush panic when
creating or removing snapshots on larger logging disks.

Adresses PR #44568 (WAPBL doens't play nice with snapshots).


To generate a diff of this commit:
cvs rdiff -u -r1.102 -r1.103 src/sys/ufs/ffs/ffs_snapshot.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/ufs/ffs/ffs_snapshot.c
diff -u src/sys/ufs/ffs/ffs_snapshot.c:1.102 src/sys/ufs/ffs/ffs_snapshot.c:1.103
--- src/sys/ufs/ffs/ffs_snapshot.c:1.102	Mon Dec 20 00:25:47 2010
+++ src/sys/ufs/ffs/ffs_snapshot.c	Wed Feb 16 19:43:50 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: ffs_snapshot.c,v 1.102 2010/12/20 00:25:47 matt Exp $	*/
+/*	$NetBSD: ffs_snapshot.c,v 1.103 2011/02/16 19:43:50 hannken Exp $	*/
 
 /*
  * Copyright 2000 Marshall Kirk McKusick. All Rights Reserved.
@@ -38,7 +38,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: ffs_snapshot.c,v 1.102 2010/12/20 00:25:47 matt Exp $);
+__KERNEL_RCSID(0, $NetBSD: ffs_snapshot.c,v 1.103 2011/02/16 19:43:50 hannken Exp $);
 
 #if defined(_KERNEL_OPT)
 #include opt_ffs.h
@@ -114,6 +114,7 @@
 static int rwfsblk(struct vnode *, int, void *, daddr_t);
 static int syncsnap(struct vnode *);
 static int wrsnapblk(struct vnode *, void *, daddr_t);
+static int blocks_in_journal(struct fs *);
 
 static inline bool is_active_snapshot(struct snap_info *, struct inode *);
 static inline daddr_t db_get(struct inode *, int);
@@ -403,11 +404,12 @@
 static int
 snapshot_setup(struct mount *mp, struct vnode *vp)
 {
-	int error, i, len, loc;
+	int error, n, len, loc;
 	daddr_t blkno, numblks;
 	struct buf *ibp, *nbp;
 	struct fs *fs = VFSTOUFS(mp)-um_fs;
 	struct lwp *l = curlwp;
+	const int wbreak = blocks_in_journal(fs)/8;
 
 	/*
 	 * Check mount, exclusive reference and owner.
@@ -452,13 +454,13 @@
 	error = UFS_WAPBL_BEGIN(mp);
 	if (error)
 		return error;
-	for (blkno = NDADDR, i = 0; blkno  numblks; blkno += NINDIR(fs)) {
+	for (blkno = NDADDR, n = 0; blkno  numblks; blkno += NINDIR(fs)) {
 		error = ffs_balloc(vp, lblktosize(fs, (off_t)blkno),
 		fs-fs_bsize, l-l_cred, B_METAONLY, ibp);
 		if (error)
 			goto out;
 		brelse(ibp, 0);
-		if ((++i % 16) == 0) {
+		if (wbreak  0  (++n % wbreak) == 0) {
 			UFS_WAPBL_END(mp);
 			error = UFS_WAPBL_BEGIN(mp);
 			if (error)
@@ -561,7 +563,6 @@
 snapshot_expunge(struct mount *mp, struct vnode *vp, struct fs *copy_fs,
 daddr_t *snaplistsize, daddr_t **snaplist)
 {
-	bool has_wapbl = false;
 	int cg, error, len, loc;
 	daddr_t blkno, *blkp;
 	struct fs *fs = VFSTOUFS(mp)-um_fs;
@@ -593,10 +594,6 @@
 	 */
 	*snaplistsize = fs-fs_ncg + howmany(fs-fs_cssize, fs-fs_bsize) +
 	FSMAXSNAP + 1 /* superblock */ + 1 /* last block */ + 1 /* size */;
-	error = UFS_WAPBL_BEGIN(mp);
-	if (error)
-		goto out;
-	has_wapbl = true;
 	mutex_enter(mntvnode_lock);
 	/*
 	 * NOTE: not using the TAILQ_FOREACH here since in this loop vgone()
@@ -648,19 +645,30 @@
 		if (loc  NDADDR) {
 			len = fragroundup(fs, blkoff(fs, xp-i_size));
 			if (len  0  len  fs-fs_bsize) {
+error = UFS_WAPBL_BEGIN(mp);
+if (error) {
+	(void)vunmark(mvp);
+	goto out;
+}
 ffs_blkfree_snap(copy_fs, vp, db_get(xp, loc),
 len, xp-i_number);
 blkno = db_get(xp, loc);
 db_assign(xp, loc, 0);
+UFS_WAPBL_END(mp);
 			}
 		}
 		*snaplistsize += 1;
 		error = expunge(vp, xp, copy_fs, fullacct, BLK_NOCOPY);
 		if (blkno)
 			db_assign(xp, loc, blkno);
-		if (!error)
-			error = ffs_freefile_snap(copy_fs, vp, xp-i_number,
-			xp-i_mode);
+		if (!error) {
+			error = UFS_WAPBL_BEGIN(mp);
+			if (!error) {
+error = ffs_freefile_snap(copy_fs, vp,
+xp-i_number, xp-i_mode);
+UFS_WAPBL_END(mp);
+			}
+		}
 		if (error) {
 			(void)vunmark(mvp);
 			goto out;
@@ -688,8 +696,6 @@
 	(*snaplist)[0] = blkp - (*snaplist)[0];
 
 out:
-	if (has_wapbl)
-		UFS_WAPBL_END(mp);
 	if (mvp != NULL)
 		vnfree(mvp);
 	if (logvp != NULL)
@@ -711,16 +717,13 @@
 snapshot_expunge_snap(struct mount *mp, struct vnode *vp,
 struct fs *copy_fs, daddr_t snaplistsize)
 {
-	int error, i;
+	int error = 0, i;
 	daddr_t numblks, *snaplist = NULL;
 	struct fs *fs = VFSTOUFS(mp)-um_fs;
 	struct inode *ip = VTOI(vp), *xp;
 	struct lwp *l = curlwp;
 	struct snap_info *si = VFSTOUFS(mp)-um_snapinfo;
 
-	error = UFS_WAPBL_BEGIN(mp);
-	if (error)
-		return error;
 	TAILQ_FOREACH(xp, si-si_snapshots, i_nextsnap) {
 		if (xp == ip)
 			break;
@@ -729,7 +732,11 @@
 			break;
 		if (xp-i_nlink != 0)
 			continue;
+		error = UFS_WAPBL_BEGIN(mp);
+		if (error)
+			break;
 		error = ffs_freefile_snap(copy_fs, vp, xp-i_number, xp-i_mode);
+		UFS_WAPBL_END(mp);
 		if (error)
 			break;
 	}
@@ -761,12 +768,10 @@
 		

CVS commit: src/lib/librumphijack

2011-02-16 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Wed Feb 16 19:46:42 UTC 2011

Modified Files:
src/lib/librumphijack: rumphijack.3

Log Message:
document RUMPHIJACK_RETRYCONNECT


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/lib/librumphijack/rumphijack.3

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

Modified files:

Index: src/lib/librumphijack/rumphijack.3
diff -u src/lib/librumphijack/rumphijack.3:1.2 src/lib/librumphijack/rumphijack.3:1.3
--- src/lib/librumphijack/rumphijack.3:1.2	Tue Jan 25 14:05:42 2011
+++ src/lib/librumphijack/rumphijack.3	Wed Feb 16 19:46:42 2011
@@ -1,4 +1,4 @@
-.\ $NetBSD: rumphijack.3,v 1.2 2011/01/25 14:05:42 pooka Exp $
+.\ $NetBSD: rumphijack.3,v 1.3 2011/02/16 19:46:42 pooka Exp $
 .\
 .\ Copyright (c) 2011 Antti Kantee.  All rights reserved.
 .\
@@ -23,7 +23,7 @@
 .\ OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 .\ SUCH DAMAGE.
 .\
-.Dd January 25, 2011
+.Dd February 16, 2011
 .Dt RUMPHIJACK 3
 .Os
 .Sh NAME
@@ -43,20 +43,51 @@
 to capture and redirect system call requests to a rump kernel instead
 of the host kernel.
 .Pp
+The behaviour of hijacked applications is affected by the following
+environment variables:
+.Bl -tag -width 12345
+.It Dv RUMPHIJACK_RETRYCONNECT
+Change how
+.Xr rumpclient 3
+attempts to reconnect to the server in case the connection is lost.
+Acceptable values are:
+.Bl -tag -width xxinftimexx
+.It Dq inftime
+retry indefinitely
+.It Dq once
+retry once, when that connection fails, give up
+.It Dq die
+call
+.Xr exit 3
+if connection failure is detected
+.It n
+Attempt reconnect for n seconds.
+The value 0 means reconnection is not attempted.
+The value n must be a positive integer.
+.El
+.Pp
+See
+.Xr rumpclient 3
+for more discussion.
+.El
+.Pp
 Currently
 .Nm
 supports only TCP/IP related system calls.
 The set of supported subsystems may change later along with the usage
 of the library.
 .Sh EXAMPLES
-Use an alternate TCP/IP stack for firefox:
+Use an alternate TCP/IP stack for firefox with a persistent server
+connection:
 .Bd -literal -offset indent
 $ setenv RUMP_SERVER unix:///tmp/tcpip
 $ setenv LD_PRELOAD /usr/lib/librumphijack.so
+$ setenv RUMPHIJACK_RETRYCONNECT inftime
 $ firefox
 .Ed
 .Sh SEE ALSO
 .Xr ld.so 1 ,
 .Xr rump_server 1 ,
 .Xr rump 3 ,
+.Xr rumpclient 3 ,
 .Xr rump_sp 7



CVS commit: src/lib/librumpclient

2011-02-16 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Wed Feb 16 19:58:01 UTC 2011

Modified Files:
src/lib/librumpclient: rumpclient.h

Log Message:
fix signature of rumpclient_fork()


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/lib/librumpclient/rumpclient.h

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

Modified files:

Index: src/lib/librumpclient/rumpclient.h
diff -u src/lib/librumpclient/rumpclient.h:1.8 src/lib/librumpclient/rumpclient.h:1.9
--- src/lib/librumpclient/rumpclient.h:1.8	Wed Feb 16 17:56:46 2011
+++ src/lib/librumpclient/rumpclient.h	Wed Feb 16 19:58:01 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: rumpclient.h,v 1.8 2011/02/16 17:56:46 pooka Exp $	*/
+/*	$NetBSD: rumpclient.h,v 1.9 2011/02/16 19:58:01 pooka Exp $	*/
 
 /*-
  * Copyright (c) 2010 Antti Kantee.  All Rights Reserved.
@@ -44,7 +44,7 @@
 void			rumpclient_fork_cancel(struct rumpclient_fork *);
 void			rumpclient_fork_vparent(struct rumpclient_fork *);
 
-int rumpclient_fork(void);
+pid_t rumpclient_fork(void);
 int rumpclient_exec(const char *, char *const [], char *const[]);
 int rumpclient_daemon(int, int);
 



CVS commit: src/lib/libc/gen

2011-02-16 Thread Matthias Scheler
Module Name:src
Committed By:   tron
Date:   Wed Feb 16 20:20:25 UTC 2011

Modified Files:
src/lib/libc/gen: getcwd.c

Log Message:
Fix build with SSP enabled.


To generate a diff of this commit:
cvs rdiff -u -r1.48 -r1.49 src/lib/libc/gen/getcwd.c

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

Modified files:

Index: src/lib/libc/gen/getcwd.c
diff -u src/lib/libc/gen/getcwd.c:1.48 src/lib/libc/gen/getcwd.c:1.49
--- src/lib/libc/gen/getcwd.c:1.48	Tue Feb 15 16:29:09 2011
+++ src/lib/libc/gen/getcwd.c	Wed Feb 16 20:20:25 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: getcwd.c,v 1.48 2011/02/15 16:29:09 christos Exp $	*/
+/*	$NetBSD: getcwd.c,v 1.49 2011/02/16 20:20:25 tron Exp $	*/
 
 /*
  * Copyright (c) 1989, 1991, 1993, 1995
@@ -37,7 +37,7 @@
 #if 0
 static char sccsid[] = @(#)getcwd.c	8.5 (Berkeley) 2/7/95;
 #else
-__RCSID($NetBSD: getcwd.c,v 1.48 2011/02/15 16:29:09 christos Exp $);
+__RCSID($NetBSD: getcwd.c,v 1.49 2011/02/16 20:20:25 tron Exp $);
 #endif
 #endif /* LIBC_SCCS and not lint */
 
@@ -58,6 +58,7 @@
 __weak_alias(_getcwd,_sys_getcwd)
 __weak_alias(realpath,_realpath)
 
+#if !defined(lint)
 #undef getcwd
 #define getcwd _sys_getcwd
 #if !defined(_FORTIFY_SOURCE)
@@ -65,6 +66,7 @@
 #endif
 
 #endif
+#endif
 
 /*
  * char *realpath(const char *path, char resolved[MAXPATHLEN]);



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

2011-02-16 Thread Jean-Yves Migeon
Module Name:src
Committed By:   jym
Date:   Wed Feb 16 20:23:21 UTC 2011

Modified Files:
src/sys/arch/amd64/conf: GENERIC INSTALL

Log Message:
Per mrg@ request, add MFS as default builtin, for things like init(8).

XXX should be replaced by TMPFS eventually.


To generate a diff of this commit:
cvs rdiff -u -r1.306 -r1.307 src/sys/arch/amd64/conf/GENERIC
cvs rdiff -u -r1.84 -r1.85 src/sys/arch/amd64/conf/INSTALL

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

Modified files:

Index: src/sys/arch/amd64/conf/GENERIC
diff -u src/sys/arch/amd64/conf/GENERIC:1.306 src/sys/arch/amd64/conf/GENERIC:1.307
--- src/sys/arch/amd64/conf/GENERIC:1.306	Wed Feb 16 09:57:57 2011
+++ src/sys/arch/amd64/conf/GENERIC	Wed Feb 16 20:23:21 2011
@@ -1,4 +1,4 @@
-# $NetBSD: GENERIC,v 1.306 2011/02/16 09:57:57 jruoho Exp $
+# $NetBSD: GENERIC,v 1.307 2011/02/16 20:23:21 jym Exp $
 #
 # GENERIC machine description file
 #
@@ -22,7 +22,7 @@
 
 options 	INCLUDE_CONFIG_FILE	# embed config file in kernel binary
 
-#ident 		GENERIC-$Revision: 1.306 $
+#ident 		GENERIC-$Revision: 1.307 $
 
 maxusers	64		# estimated number of users
 
@@ -139,12 +139,12 @@
 #options 	DKWEDGE_METHOD_MBR	# Support MBR partitions as wedges
 
 file-system 	FFS		# UFS
+file-system	MFS		# memory file system
 file-system 	NFS		# Network File System client
 file-system	TMPFS		# Efficient memory file-system
 # File systems, built as module(7)s by default
 #file-system	EXT2FS		# second extended file system (linux)
 #file-system	LFS		# log-structured file system
-#file-system	MFS		# memory file system
 #file-system	NTFS		# Windows/NT file system (experimental)
 #file-system	CD9660		# ISO 9660 + Rock Ridge file system
 #file-system	MSDOSFS		# MS-DOS file system

Index: src/sys/arch/amd64/conf/INSTALL
diff -u src/sys/arch/amd64/conf/INSTALL:1.84 src/sys/arch/amd64/conf/INSTALL:1.85
--- src/sys/arch/amd64/conf/INSTALL:1.84	Wed Feb 16 03:16:57 2011
+++ src/sys/arch/amd64/conf/INSTALL	Wed Feb 16 20:23:21 2011
@@ -1,4 +1,4 @@
-# $NetBSD: INSTALL,v 1.84 2011/02/16 03:16:57 jym Exp $
+# $NetBSD: INSTALL,v 1.85 2011/02/16 20:23:21 jym Exp $
 #
 #	INSTALL - Installation kernel.
 #
@@ -7,13 +7,13 @@
 
 include	arch/amd64/conf/GENERIC
 
-#ident 		INSTALL-$Revision: 1.84 $
+#ident 		INSTALL-$Revision: 1.85 $
 
 # INSTALL kernels do not have access to module(7)s. Compile some
 # file-systems statically.
 file-system	EXT2FS		# second extended file system (linux)
 file-system	LFS		# log-structured file system
-file-system	MFS		# memory file system
+#file-system	MFS		# memory file system
 file-system	NTFS		# Windows/NT file system (experimental)
 file-system	CD9660		# ISO 9660 + Rock Ridge file system
 file-system	MSDOSFS		# MS-DOS file system



CVS commit: [netbsd-5]

2011-02-16 Thread Manuel Bouyer
Module Name:xsrc
Committed By:   bouyer
Date:   Wed Feb 16 20:27:34 UTC 2011

Modified Files:
src/distrib/sets/lists/xserver [netbsd-5]: md.i386
src/external/mit/xorg/server/drivers [netbsd-5]: Makefile
src/share/mk [netbsd-5]: bsd.own.mk
Added Files:
src/external/mit/xorg/server/drivers/xf86-input-elographics [netbsd-5]:
Makefile
xsrc/external/mit/xf86-input-elographics/dist [netbsd-5]: COPYING
ChangeLog Makefile.am Makefile.bsd-wrapper Makefile.in README
aclocal.m4 config.guess config.h.in config.sub configure
configure.ac depcomp install-sh ltmain.sh missing
xsrc/external/mit/xf86-input-elographics/dist/man [netbsd-5]:
Makefile.am Makefile.in elographics.man
xsrc/external/mit/xf86-input-elographics/dist/src [netbsd-5]:
Makefile.am Makefile.in xf86Elo.c
xsrc/external/mit/xf86-input-elographics/include [netbsd-5]: config.h

Log Message:
Pull up following revision(s) (requested by mbalmer in ticket #1534):
xsrc/external/mit/xf86-input-elographics/dist/config.h.in   1.1.1.2
xsrc/external/mit/xf86-input-elographics/dist/config.sub1.1.1.2
xsrc/external/mit/xf86-input-elographics/dist/configure 1.1.1.2
xsrc/external/mit/xf86-input-elographics/dist/configure.ac  1.1.1.2
xsrc/external/mit/xf86-input-elographics/dist/depcomp   1.1.1.2
xsrc/external/mit/xf86-input-elographics/dist/install-sh1.1.1.2
xsrc/external/mit/xf86-input-elographics/dist/ltmain.sh 1.1.1.2
xsrc/external/mit/xf86-input-elographics/dist/missing   1.1.1.2
xsrc/external/mit/xf86-input-elographics/dist/man/Makefile.am   1.1.1.1
xsrc/external/mit/xf86-input-elographics/dist/man/Makefile.in   1.1.1.2
xsrc/external/mit/xf86-input-elographics/dist/man/elographics.man 
1.1.1.2
xsrc/external/mit/xf86-input-elographics/dist/src/Makefile.am   1.1.1.2
xsrc/external/mit/xf86-input-elographics/dist/src/Makefile.in   1.1.1.2
xsrc/external/mit/xf86-input-elographics/dist/src/xf86Elo.c 1.1.1.2
xsrc/external/mit/xf86-input-elographics/include/config.h   1.2
external/mit/xorg/server/drivers/xf86-input-elographics/Makefile: 
revision 1.1
distrib/sets/lists/xserver/md.i386: revision 1.73
external/mit/xorg/server/drivers/Makefile: revision 1.35
share/mk/bsd.own.mk: revision 1.597
Add the xf86-input-elographics driver to i386 builds.
Forgotten commit. Noticed by snj, thanks!


To generate a diff of this commit:
cvs rdiff -u -r1.56.2.3 -r1.56.2.4 src/distrib/sets/lists/xserver/md.i386
cvs rdiff -u -r1.18.2.6 -r1.18.2.7 \
src/external/mit/xorg/server/drivers/Makefile
cvs rdiff -u -r0 -r1.1.4.2 \
src/external/mit/xorg/server/drivers/xf86-input-elographics/Makefile
cvs rdiff -u -r1.542.2.14 -r1.542.2.15 src/share/mk/bsd.own.mk
cvs rdiff -u -r0 -r1.1.1.1.2.2 \
xsrc/external/mit/xf86-input-elographics/dist/COPYING \
xsrc/external/mit/xf86-input-elographics/dist/README
cvs rdiff -u -r0 -r1.1.1.2.2.2 \
xsrc/external/mit/xf86-input-elographics/dist/ChangeLog \
xsrc/external/mit/xf86-input-elographics/dist/Makefile.am \
xsrc/external/mit/xf86-input-elographics/dist/Makefile.in \
xsrc/external/mit/xf86-input-elographics/dist/aclocal.m4 \
xsrc/external/mit/xf86-input-elographics/dist/config.guess \
xsrc/external/mit/xf86-input-elographics/dist/config.h.in \
xsrc/external/mit/xf86-input-elographics/dist/config.sub \
xsrc/external/mit/xf86-input-elographics/dist/configure \
xsrc/external/mit/xf86-input-elographics/dist/configure.ac \
xsrc/external/mit/xf86-input-elographics/dist/depcomp \
xsrc/external/mit/xf86-input-elographics/dist/install-sh \
xsrc/external/mit/xf86-input-elographics/dist/ltmain.sh \
xsrc/external/mit/xf86-input-elographics/dist/missing
cvs rdiff -u -r0 -r1.2.2.2 \
xsrc/external/mit/xf86-input-elographics/dist/Makefile.bsd-wrapper
cvs rdiff -u -r0 -r1.1.1.1.2.2 \
xsrc/external/mit/xf86-input-elographics/dist/man/Makefile.am
cvs rdiff -u -r0 -r1.1.1.2.2.2 \
xsrc/external/mit/xf86-input-elographics/dist/man/Makefile.in \
xsrc/external/mit/xf86-input-elographics/dist/man/elographics.man
cvs rdiff -u -r0 -r1.1.1.2.2.2 \
xsrc/external/mit/xf86-input-elographics/dist/src/Makefile.am \
xsrc/external/mit/xf86-input-elographics/dist/src/Makefile.in \
xsrc/external/mit/xf86-input-elographics/dist/src/xf86Elo.c
cvs rdiff -u -r0 -r1.2.2.2 \
xsrc/external/mit/xf86-input-elographics/include/config.h

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

diffs are larger than 1MB and have been omitted


CVS commit: [netbsd-5] src/sys/dev/pci

2011-02-16 Thread Manuel Bouyer
Module Name:src
Committed By:   bouyer
Date:   Wed Feb 16 20:31:57 UTC 2011

Modified Files:
src/sys/dev/pci [netbsd-5]: pci.c

Log Message:
Pull up following revision(s) (requested by dyoung in ticket #1540):
sys/dev/pci/pci.c: revision 1.131
During shutdown, restore the each PCI device's bus-mastering enable to
the state that we found it in before attaching a driver to it.


To generate a diff of this commit:
cvs rdiff -u -r1.119.4.1 -r1.119.4.2 src/sys/dev/pci/pci.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/pci.c
diff -u src/sys/dev/pci/pci.c:1.119.4.1 src/sys/dev/pci/pci.c:1.119.4.2
--- src/sys/dev/pci/pci.c:1.119.4.1	Thu Nov 20 02:40:59 2008
+++ src/sys/dev/pci/pci.c	Wed Feb 16 20:31:57 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: pci.c,v 1.119.4.1 2008/11/20 02:40:59 snj Exp $	*/
+/*	$NetBSD: pci.c,v 1.119.4.2 2011/02/16 20:31:57 bouyer Exp $	*/
 
 /*
  * Copyright (c) 1995, 1996, 1997, 1998
@@ -36,7 +36,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: pci.c,v 1.119.4.1 2008/11/20 02:40:59 snj Exp $);
+__KERNEL_RCSID(0, $NetBSD: pci.c,v 1.119.4.2 2011/02/16 20:31:57 bouyer Exp $);
 
 #include opt_pci.h
 
@@ -869,6 +869,7 @@
 	int p_pm_offset;
 	pcireg_t p_pm_cap;
 	pcireg_t p_class;
+	pcireg_t p_csr;
 };
 
 static bool
@@ -922,9 +923,10 @@
 	struct pci_child_power *priv = device_pmf_bus_private(dv);
 	pcireg_t csr;
 
-	/* disable busmastering */
+	/* restore original bus-mastering state */
 	csr = pci_conf_read(priv-p_pc, priv-p_tag, PCI_COMMAND_STATUS_REG);
 	csr = ~PCI_COMMAND_MASTER_ENABLE;
+	csr |= priv-p_csr  PCI_COMMAND_MASTER_ENABLE;
 	pci_conf_write(priv-p_pc, priv-p_tag, PCI_COMMAND_STATUS_REG, csr);
 	return true;
 }
@@ -955,6 +957,8 @@
 	priv-p_tag = pci_make_tag(priv-p_pc, sc-sc_bus, device,
 	function);
 	priv-p_class = pci_conf_read(priv-p_pc, priv-p_tag, PCI_CLASS_REG);
+	priv-p_csr = pci_conf_read(priv-p_pc, priv-p_tag,
+	PCI_COMMAND_STATUS_REG);
 
 	if (pci_get_capability(priv-p_pc, priv-p_tag,
 			   PCI_CAP_PWRMGMT, off, reg)) {



CVS commit: [netbsd-5-0] src/sys/dev/pci

2011-02-16 Thread Manuel Bouyer
Module Name:src
Committed By:   bouyer
Date:   Wed Feb 16 20:32:10 UTC 2011

Modified Files:
src/sys/dev/pci [netbsd-5-0]: pci.c

Log Message:
Pull up following revision(s) (requested by dyoung in ticket #1540):
sys/dev/pci/pci.c: revision 1.131
During shutdown, restore the each PCI device's bus-mastering enable to
the state that we found it in before attaching a driver to it.


To generate a diff of this commit:
cvs rdiff -u -r1.119.4.1 -r1.119.4.1.2.1 src/sys/dev/pci/pci.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/pci.c
diff -u src/sys/dev/pci/pci.c:1.119.4.1 src/sys/dev/pci/pci.c:1.119.4.1.2.1
--- src/sys/dev/pci/pci.c:1.119.4.1	Thu Nov 20 02:40:59 2008
+++ src/sys/dev/pci/pci.c	Wed Feb 16 20:32:10 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: pci.c,v 1.119.4.1 2008/11/20 02:40:59 snj Exp $	*/
+/*	$NetBSD: pci.c,v 1.119.4.1.2.1 2011/02/16 20:32:10 bouyer Exp $	*/
 
 /*
  * Copyright (c) 1995, 1996, 1997, 1998
@@ -36,7 +36,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: pci.c,v 1.119.4.1 2008/11/20 02:40:59 snj Exp $);
+__KERNEL_RCSID(0, $NetBSD: pci.c,v 1.119.4.1.2.1 2011/02/16 20:32:10 bouyer Exp $);
 
 #include opt_pci.h
 
@@ -869,6 +869,7 @@
 	int p_pm_offset;
 	pcireg_t p_pm_cap;
 	pcireg_t p_class;
+	pcireg_t p_csr;
 };
 
 static bool
@@ -922,9 +923,10 @@
 	struct pci_child_power *priv = device_pmf_bus_private(dv);
 	pcireg_t csr;
 
-	/* disable busmastering */
+	/* restore original bus-mastering state */
 	csr = pci_conf_read(priv-p_pc, priv-p_tag, PCI_COMMAND_STATUS_REG);
 	csr = ~PCI_COMMAND_MASTER_ENABLE;
+	csr |= priv-p_csr  PCI_COMMAND_MASTER_ENABLE;
 	pci_conf_write(priv-p_pc, priv-p_tag, PCI_COMMAND_STATUS_REG, csr);
 	return true;
 }
@@ -955,6 +957,8 @@
 	priv-p_tag = pci_make_tag(priv-p_pc, sc-sc_bus, device,
 	function);
 	priv-p_class = pci_conf_read(priv-p_pc, priv-p_tag, PCI_CLASS_REG);
+	priv-p_csr = pci_conf_read(priv-p_pc, priv-p_tag,
+	PCI_COMMAND_STATUS_REG);
 
 	if (pci_get_capability(priv-p_pc, priv-p_tag,
 			   PCI_CAP_PWRMGMT, off, reg)) {



CVS commit: [netbsd-5-1] src/sys/dev/pci

2011-02-16 Thread Manuel Bouyer
Module Name:src
Committed By:   bouyer
Date:   Wed Feb 16 20:32:15 UTC 2011

Modified Files:
src/sys/dev/pci [netbsd-5-1]: pci.c

Log Message:
Pull up following revision(s) (requested by dyoung in ticket #1540):
sys/dev/pci/pci.c: revision 1.131
During shutdown, restore the each PCI device's bus-mastering enable to
the state that we found it in before attaching a driver to it.


To generate a diff of this commit:
cvs rdiff -u -r1.119.4.1 -r1.119.4.1.6.1 src/sys/dev/pci/pci.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/pci.c
diff -u src/sys/dev/pci/pci.c:1.119.4.1 src/sys/dev/pci/pci.c:1.119.4.1.6.1
--- src/sys/dev/pci/pci.c:1.119.4.1	Thu Nov 20 02:40:59 2008
+++ src/sys/dev/pci/pci.c	Wed Feb 16 20:32:15 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: pci.c,v 1.119.4.1 2008/11/20 02:40:59 snj Exp $	*/
+/*	$NetBSD: pci.c,v 1.119.4.1.6.1 2011/02/16 20:32:15 bouyer Exp $	*/
 
 /*
  * Copyright (c) 1995, 1996, 1997, 1998
@@ -36,7 +36,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: pci.c,v 1.119.4.1 2008/11/20 02:40:59 snj Exp $);
+__KERNEL_RCSID(0, $NetBSD: pci.c,v 1.119.4.1.6.1 2011/02/16 20:32:15 bouyer Exp $);
 
 #include opt_pci.h
 
@@ -869,6 +869,7 @@
 	int p_pm_offset;
 	pcireg_t p_pm_cap;
 	pcireg_t p_class;
+	pcireg_t p_csr;
 };
 
 static bool
@@ -922,9 +923,10 @@
 	struct pci_child_power *priv = device_pmf_bus_private(dv);
 	pcireg_t csr;
 
-	/* disable busmastering */
+	/* restore original bus-mastering state */
 	csr = pci_conf_read(priv-p_pc, priv-p_tag, PCI_COMMAND_STATUS_REG);
 	csr = ~PCI_COMMAND_MASTER_ENABLE;
+	csr |= priv-p_csr  PCI_COMMAND_MASTER_ENABLE;
 	pci_conf_write(priv-p_pc, priv-p_tag, PCI_COMMAND_STATUS_REG, csr);
 	return true;
 }
@@ -955,6 +957,8 @@
 	priv-p_tag = pci_make_tag(priv-p_pc, sc-sc_bus, device,
 	function);
 	priv-p_class = pci_conf_read(priv-p_pc, priv-p_tag, PCI_CLASS_REG);
+	priv-p_csr = pci_conf_read(priv-p_pc, priv-p_tag,
+	PCI_COMMAND_STATUS_REG);
 
 	if (pci_get_capability(priv-p_pc, priv-p_tag,
 			   PCI_CAP_PWRMGMT, off, reg)) {



CVS commit: [netbsd-5] src/sys

2011-02-16 Thread Manuel Bouyer
Module Name:src
Committed By:   bouyer
Date:   Wed Feb 16 20:37:47 UTC 2011

Modified Files:
src/sys/compat/common [netbsd-5]: uipc_syscalls_43.c
src/sys/net [netbsd-5]: if.c

Log Message:
Pull up following revision(s) (requested by chs in ticket #1541):
sys/compat/common/if_43.c: revision 1.3 via patch
sys/net/if.c: revision 1.247 via patch
PR/44054: Onno van der Linden: Stacksmashing in handling of ioctl OOSIO*
parameter.
can't map the old and the new SIO calls the way we did before because the
numbers have changed. Instead provide a switch. Keep the old code there,
to handle cases we did not handle in the first switch, but this is a hack
and should be removed.


To generate a diff of this commit:
cvs rdiff -u -r1.43 -r1.43.10.1 src/sys/compat/common/uipc_syscalls_43.c
cvs rdiff -u -r1.230.4.3 -r1.230.4.4 src/sys/net/if.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/compat/common/uipc_syscalls_43.c
diff -u src/sys/compat/common/uipc_syscalls_43.c:1.43 src/sys/compat/common/uipc_syscalls_43.c:1.43.10.1
--- src/sys/compat/common/uipc_syscalls_43.c:1.43	Tue Apr 29 19:02:14 2008
+++ src/sys/compat/common/uipc_syscalls_43.c	Wed Feb 16 20:37:47 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: uipc_syscalls_43.c,v 1.43 2008/04/29 19:02:14 ad Exp $	*/
+/*	$NetBSD: uipc_syscalls_43.c,v 1.43.10.1 2011/02/16 20:37:47 bouyer Exp $	*/
 
 /*
  * Copyright (c) 1982, 1986, 1989, 1990, 1993
@@ -32,7 +32,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: uipc_syscalls_43.c,v 1.43 2008/04/29 19:02:14 ad Exp $);
+__KERNEL_RCSID(0, $NetBSD: uipc_syscalls_43.c,v 1.43.10.1 2011/02/16 20:37:47 bouyer Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -407,80 +407,124 @@
 	if (IOCPARM_LEN(cmd) != sizeof(struct oifreq))
 		return cmd;
 
-	ncmd = ((cmd)  ~(IOCPARM_MASK  IOCPARM_SHIFT)) | 
-		(sizeof(struct ifreq)  IOCPARM_SHIFT);
-
-	switch (ncmd) {
-	case BIOCGETIF:
-	case BIOCSETIF:
-	case GREDSOCK:
-	case GREGADDRD:
-	case GREGADDRS:
-	case GREGPROTO:
-	case GRESADDRD:
-	case GRESADDRS:
-	case GRESPROTO:
-	case GRESSOCK:
+	switch (cmd) {
+	case OSIOCSIFADDR:
+		return SIOCSIFADDR;
+	case OOSIOCGIFADDR:
+		return SIOCGIFADDR;
+	case OSIOCSIFDSTADDR:
+		return SIOCSIFDSTADDR;
+	case OOSIOCGIFDSTADDR:
+		return SIOCGIFDSTADDR;
+	case OSIOCSIFFLAGS:
+		return SIOCSIFFLAGS;
+	case OSIOCGIFFLAGS:
+		return SIOCGIFFLAGS;
+	case OOSIOCGIFBRDADDR:
+		return SIOCGIFBRDADDR;
+	case OSIOCSIFBRDADDR:
+		return SIOCSIFBRDADDR;
+	case OOSIOCGIFCONF:
+		return SIOCGIFCONF;
+	case OOSIOCGIFNETMASK:
+		return SIOCGIFNETMASK;
+	case OSIOCSIFNETMASK:
+		return SIOCSIFNETMASK;
+	case OSIOCGIFCONF:
+		return SIOCGIFCONF;
+	case OSIOCADDMULTI:
+		return SIOCADDMULTI;
+	case OSIOCDELMULTI:
+		return SIOCDELMULTI;
+	case OSIOCSIFMEDIA:
+		return SIOCSIFMEDIA;
+	case OBIOCGETIF:
+		return BIOCGETIF;
+	case OBIOCSETIF:
+		return BIOCSETIF;
+	case OTAPGIFNAME:
+		return TAPGIFNAME;
+	default:
+		/*
+		 * XXX: the following code should be removed and the
+		 * needing treatment ioctls should move to the switch
+		 * above.
+		 */
+		ncmd = ((cmd)  ~(IOCPARM_MASK  IOCPARM_SHIFT)) | 
+		(sizeof(struct ifreq)  IOCPARM_SHIFT);
+		switch (ncmd) {
+		case BIOCGETIF:
+		case BIOCSETIF:
+		case GREDSOCK:
+		case GREGADDRD:
+		case GREGADDRS:
+		case GREGPROTO:
+		case GRESADDRD:
+		case GRESADDRS:
+		case GRESPROTO:
+		case GRESSOCK:
 #ifdef COMPAT_20
-	case OSIOCG80211STATS:
-	case OSIOCG80211ZSTATS:
+		case OSIOCG80211STATS:
+		case OSIOCG80211ZSTATS:
 #endif /* COMPAT_20 */
-	case SIOCADDMULTI:
-	case SIOCDELMULTI:
-	case SIOCDIFADDR:
-	case SIOCDIFADDR_IN6:
-	case SIOCDIFPHYADDR:
-	case SIOCGDEFIFACE_IN6:
-	case SIOCG80211NWID:
-	case SIOCG80211STATS:
-	case SIOCG80211ZSTATS:
-	case SIOCGIFADDR:
-	case SIOCGIFADDR_IN6:
-	case SIOCGIFAFLAG_IN6:
-	case SIOCGIFALIFETIME_IN6:
-	case SIOCGIFBRDADDR:
-	case SIOCGIFDLT:
-	case SIOCGIFDSTADDR:
-	case SIOCGIFDSTADDR_IN6:
-	case SIOCGIFFLAGS:
-	case SIOCGIFGENERIC:
-	case SIOCGIFMETRIC:
-	case SIOCGIFMTU:
-	case SIOCGIFNETMASK:
-	case SIOCGIFNETMASK_IN6:
-	case SIOCGIFPDSTADDR:
-	case SIOCGIFPDSTADDR_IN6:
-	case SIOCGIFPSRCADDR:
-	case SIOCGIFPSRCADDR_IN6:
-	case SIOCGIFSTAT_ICMP6:
-	case SIOCGIFSTAT_IN6:
-	case SIOCGPVCSIF:
-	case SIOCGVH:
-	case SIOCIFCREATE:
-	case SIOCIFDESTROY:
-	case SIOCS80211NWID:
-	case SIOCSDEFIFACE_IN6:
-	case SIOCSIFADDR:
-	case SIOCSIFADDR_IN6:
-	case SIOCSIFBRDADDR:
-	case SIOCSIFDSTADDR:
-	case SIOCSIFDSTADDR_IN6:
-	case SIOCSIFFLAGS:
-	case SIOCSIFGENERIC:
-	case SIOCSIFMEDIA:
-	case SIOCSIFMETRIC:
-	case SIOCSIFMTU:
-	case SIOCSIFNETMASK:
-	case SIOCSIFNETMASK_IN6:
-	case SIOCSNDFLUSH_IN6:
-	case SIOCSPFXFLUSH_IN6:
-	case SIOCSPVCSIF:
-	case SIOCSRTRFLUSH_IN6:
-	case SIOCSVH:
-	case TAPGIFNAME:
-		return ncmd;
+		case SIOCADDMULTI:
+		case SIOCDELMULTI:
+		case SIOCDIFADDR:
+		case SIOCDIFADDR_IN6:
+		case SIOCDIFPHYADDR:
+		case 

CVS commit: [netbsd-5-0] src/doc

2011-02-16 Thread Manuel Bouyer
Module Name:src
Committed By:   bouyer
Date:   Wed Feb 16 20:38:45 UTC 2011

Modified Files:
src/doc [netbsd-5-0]: CHANGES-5.0.3

Log Message:
ticket 1540


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.25 -r1.1.2.26 src/doc/CHANGES-5.0.3

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

Modified files:

Index: src/doc/CHANGES-5.0.3
diff -u src/doc/CHANGES-5.0.3:1.1.2.25 src/doc/CHANGES-5.0.3:1.1.2.26
--- src/doc/CHANGES-5.0.3:1.1.2.25	Sun Jan 16 13:23:21 2011
+++ src/doc/CHANGES-5.0.3	Wed Feb 16 20:38:45 2011
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-5.0.3,v 1.1.2.25 2011/01/16 13:23:21 bouyer Exp $
+# $NetBSD: CHANGES-5.0.3,v 1.1.2.26 2011/02/16 20:38:45 bouyer Exp $
 
 A complete list of changes from the NetBSD 5.0.2 release to the NetBSD 5.0.3
 release:
@@ -2565,3 +2565,9 @@
 	Fix a kernel lock leak
 	[pooka, ticket #1529]
 
+sys/dev/pci/pci.c1.131
+
+	During shutdown, restore the each PCI device's bus-mastering enable to
+	the state that we found it in before attaching a driver to it.
+	[dyoung, ticket #1540]
+



CVS commit: [netbsd-5-1] src/doc

2011-02-16 Thread Manuel Bouyer
Module Name:src
Committed By:   bouyer
Date:   Wed Feb 16 20:39:07 UTC 2011

Modified Files:
src/doc [netbsd-5-1]: CHANGES-5.1.1

Log Message:
ticket 1540


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.8 -r1.1.2.9 src/doc/CHANGES-5.1.1

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

Modified files:

Index: src/doc/CHANGES-5.1.1
diff -u src/doc/CHANGES-5.1.1:1.1.2.8 src/doc/CHANGES-5.1.1:1.1.2.9
--- src/doc/CHANGES-5.1.1:1.1.2.8	Sun Jan 16 13:23:09 2011
+++ src/doc/CHANGES-5.1.1	Wed Feb 16 20:39:07 2011
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-5.1.1,v 1.1.2.8 2011/01/16 13:23:09 bouyer Exp $
+# $NetBSD: CHANGES-5.1.1,v 1.1.2.9 2011/02/16 20:39:07 bouyer Exp $
 
 A complete list of changes from the NetBSD 5.1 release to the NetBSD 5.1.1
 release:
@@ -2240,3 +2240,9 @@
 	Increase the image size from 1300KB to 1400KB.
 	[isaki, ticket #1531]
 
+sys/dev/pci/pci.c1.131
+
+	During shutdown, restore the each PCI device's bus-mastering enable to
+	the state that we found it in before attaching a driver to it.
+	[dyoung, ticket #1540]
+



CVS commit: [netbsd-5] src/doc

2011-02-16 Thread Manuel Bouyer
Module Name:src
Committed By:   bouyer
Date:   Wed Feb 16 20:40:22 UTC 2011

Modified Files:
src/doc [netbsd-5]: CHANGES-5.2

Log Message:
Tickets 1533-1535, 1538, 1540-1542


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.55 -r1.1.2.56 src/doc/CHANGES-5.2

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

Modified files:

Index: src/doc/CHANGES-5.2
diff -u src/doc/CHANGES-5.2:1.1.2.55 src/doc/CHANGES-5.2:1.1.2.56
--- src/doc/CHANGES-5.2:1.1.2.55	Fri Jan 28 07:21:56 2011
+++ src/doc/CHANGES-5.2	Wed Feb 16 20:40:22 2011
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-5.2,v 1.1.2.55 2011/01/28 07:21:56 snj Exp $
+# $NetBSD: CHANGES-5.2,v 1.1.2.56 2011/02/16 20:40:22 bouyer Exp $
 
 A complete list of changes from the NetBSD 5.1 release to the NetBSD 5.2
 release:
@@ -4557,3 +4557,82 @@
 	More fixes for sparc SMP.
 	[mrg, ticket #1532]
 
+distrib/sets/lists/base/mi			1.821
+distrib/sets/lists/man/mi			1.1143
+usr.sbin/Makefile1.242
+usr.sbin/wake/Makefile1.1, 1.2
+usr.sbin/wake/wake.81.1 - 1.8
+usr.sbin/wake/wake.c1.1 - 1.12
+
+	wake(8) is a command to send Wake-on-LAN packets to machines on the
+	local ethernet, allowing machines to be powered up without physical
+	access to them.
+	[mbalmer, ticket #1533]
+
+sys/kern/vfs_wapbl.c1.39 via patch
+
+	Add two sysctls one that does verbose transaction logging and a
+	second one that disables flushing the disk cache (which is fast but
+	dangerous for data integrity). From simon a long while back.
+	[tron, ticket #1535]
+
+gnu/dist/gdb6/gdb/shnbsd-tdep.c			1.6
+
+	Branch with delay slot executes delay slot even if branch is not
+	taken, so adjust next_pc logic accordingly.  Fixes SIGILL
+	(breakpoint's trapa causes an illegal slot instruction exception)
+	when stepping through such branches.
+	[uwe, ticket #1542]
+
+external/mit/xorg/lib/libX11/Makefile		1.8
+
+	USETBL=yes.  several of these manuals need it.  from PR#36600.
+	[dholland, ticket #1538]
+
+xsrc/external/mit/xf86-input-elographics/dist/COPYING	1.1.1.1
+xsrc/external/mit/xf86-input-elographics/dist/ChangeLog	1.1.1.2
+xsrc/external/mit/xf86-input-elographics/dist/Makefile.am	1.1.1.2
+xsrc/external/mit/xf86-input-elographics/dist/Makefile.in	1.1.1.2
+xsrc/external/mit/xf86-input-elographics/dist/README	1.1.1.1
+xsrc/external/mit/xf86-input-elographics/dist/aclocal.m4	1.1.1.2
+xsrc/external/mit/xf86-input-elographics/dist/config.guess	1.1.1.2
+xsrc/external/mit/xf86-input-elographics/dist/config.h.in	1.1.1.2
+xsrc/external/mit/xf86-input-elographics/dist/config.sub	1.1.1.2
+xsrc/external/mit/xf86-input-elographics/dist/configure		1.1.1.2
+xsrc/external/mit/xf86-input-elographics/dist/configure.ac	1.1.1.2
+xsrc/external/mit/xf86-input-elographics/dist/depcomp		1.1.1.2
+xsrc/external/mit/xf86-input-elographics/dist/install-sh	1.1.1.2
+xsrc/external/mit/xf86-input-elographics/dist/ltmain.sh		1.1.1.2
+xsrc/external/mit/xf86-input-elographics/dist/missing		1.1.1.2
+xsrc/external/mit/xf86-input-elographics/dist/man/Makefile.am	1.1.1.1
+xsrc/external/mit/xf86-input-elographics/dist/man/Makefile.in	1.1.1.2
+xsrc/external/mit/xf86-input-elographics/dist/man/elographics.man 1.1.1.2
+xsrc/external/mit/xf86-input-elographics/dist/src/Makefile.am	1.1.1.2
+xsrc/external/mit/xf86-input-elographics/dist/src/Makefile.in	1.1.1.2
+xsrc/external/mit/xf86-input-elographics/dist/src/xf86Elo.c	1.1.1.2
+xsrc/external/mit/xf86-input-elographics/include/config.h	1.2
+distrib/sets/lists/xserver/md.i386		1.73
+external/mit/xorg/server/drivers/Makefile	1.35
+external/mit/xorg/server/drivers/xf86-input-elographics/Makefile 1.1
+share/mk/bsd.own.mk1.597
+
+	Add the xf86-input-elographics driver
+	[mbalmer, ticket #1534]
+
+sys/dev/pci/pci.c1.131
+
+	During shutdown, restore the each PCI device's bus-mastering enable to
+	the state that we found it in before attaching a driver to it.
+	[dyoung, ticket #1540]
+
+sys/compat/common/if_43.c			1.3 via patch
+sys/net/if.c	1.247 via patch
+
+	PR/44054: Onno van der Linden: Stacksmashing in handling of
+	ioctl OOSIO* parameter.
+	can't map the old and the new SIO calls the way we did before
+	because the numbers have changed. Instead provide a switch. Keep the
+	old code there, to handle cases we did not handle in the first switch,
+	but this is a hack and should be removed.
+	[chs, ticket #1541]
+



CVS commit: [netbsd-5] src/lib/libc/resolv

2011-02-16 Thread Manuel Bouyer
Module Name:src
Committed By:   bouyer
Date:   Wed Feb 16 20:50:06 UTC 2011

Modified Files:
src/lib/libc/resolv [netbsd-5]: res_send.c

Log Message:
Pull up following revision(s) (requested by pooka in ticket #1546):
lib/libc/resolv/res_send.c: revision 1.21
Don't do highestFD check with USE_POLL.  It provides no benefit
but causes a dependency between RLIMIT_NOFILE and rumphijack FDOFF.
christos ok


To generate a diff of this commit:
cvs rdiff -u -r1.15.4.1 -r1.15.4.2 src/lib/libc/resolv/res_send.c

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

Modified files:

Index: src/lib/libc/resolv/res_send.c
diff -u src/lib/libc/resolv/res_send.c:1.15.4.1 src/lib/libc/resolv/res_send.c:1.15.4.2
--- src/lib/libc/resolv/res_send.c:1.15.4.1	Thu Jan  6 21:42:48 2011
+++ src/lib/libc/resolv/res_send.c	Wed Feb 16 20:50:05 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: res_send.c,v 1.15.4.1 2011/01/06 21:42:48 riz Exp $	*/
+/*	$NetBSD: res_send.c,v 1.15.4.2 2011/02/16 20:50:05 bouyer Exp $	*/
 
 /*
  * Portions Copyright (C) 2004-2009  Internet Systems Consortium, Inc. (ISC)
@@ -93,7 +93,7 @@
 static const char sccsid[] = @(#)res_send.c	8.1 (Berkeley) 6/4/93;
 static const char rcsid[] = Id: res_send.c,v 1.22 2009/01/22 23:49:23 tbox Exp;
 #else
-__RCSID($NetBSD: res_send.c,v 1.15.4.1 2011/01/06 21:42:48 riz Exp $);
+__RCSID($NetBSD: res_send.c,v 1.15.4.2 2011/02/16 20:50:05 bouyer Exp $);
 #endif
 #endif /* LIBC_SCCS and not lint */
 
@@ -157,8 +157,6 @@
 
 #ifndef USE_POLL
 static const int highestFD = FD_SETSIZE - 1;
-#else
-static int highestFD = 0;
 #endif
 
 /* Forward. */
@@ -333,10 +331,6 @@
 	int gotsomewhere, terrno, tries, v_circuit, resplen, ns, n;
 	char abuf[NI_MAXHOST];
 
-#ifdef USE_POLL
-	highestFD = sysconf(_SC_OPEN_MAX) - 1;
-#endif
-
 	(void)res_check(statp, NULL);
 
 	/* No name servers or res_init() failure */
@@ -669,10 +663,12 @@
 			res_nclose(statp);
 
 		statp-_vcsock = socket(nsap-sa_family, SOCK_STREAM, 0);
+#ifndef USE_POLL
 		if (statp-_vcsock  highestFD) {
 			res_nclose(statp);
 			errno = ENOTSOCK;
 		}
+#endif
 		if (statp-_vcsock  0) {
 			switch (errno) {
 			case EPROTONOSUPPORT:
@@ -848,10 +844,12 @@
 	nsaplen = get_salen(nsap);
 	if (EXT(statp).nssocks[ns] == -1) {
 		EXT(statp).nssocks[ns] = socket(nsap-sa_family, SOCK_DGRAM, 0);
+#ifndef USE_POLL
 		if (EXT(statp).nssocks[ns]  highestFD) {
 			res_nclose(statp);
 			errno = ENOTSOCK;
 		}
+#endif
 		if (EXT(statp).nssocks[ns]  0) {
 			switch (errno) {
 			case EPROTONOSUPPORT:



CVS commit: [netbsd-5] src/sys/arch/x86/x86

2011-02-16 Thread Manuel Bouyer
Module Name:src
Committed By:   bouyer
Date:   Wed Feb 16 20:54:13 UTC 2011

Modified Files:
src/sys/arch/x86/x86 [netbsd-5]: mtrr_i686.c

Log Message:
Pull up following revision(s) (requested by jmcneill in ticket #1547):
sys/arch/x86/x86/mtrr_i686.c: revisions 1.23, 1.24
allows overlapping uncached and cached mappings
corrects an off-by-one which prevents adjacent mappings from being setup.


To generate a diff of this commit:
cvs rdiff -u -r1.19 -r1.19.4.1 src/sys/arch/x86/x86/mtrr_i686.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/x86/x86/mtrr_i686.c
diff -u src/sys/arch/x86/x86/mtrr_i686.c:1.19 src/sys/arch/x86/x86/mtrr_i686.c:1.19.4.1
--- src/sys/arch/x86/x86/mtrr_i686.c:1.19	Mon Oct 13 10:27:10 2008
+++ src/sys/arch/x86/x86/mtrr_i686.c	Wed Feb 16 20:54:13 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: mtrr_i686.c,v 1.19 2008/10/13 10:27:10 sborrill Exp $ */
+/*	$NetBSD: mtrr_i686.c,v 1.19.4.1 2011/02/16 20:54:13 bouyer Exp $ */
 
 /*-
  * Copyright (c) 2000 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: mtrr_i686.c,v 1.19 2008/10/13 10:27:10 sborrill Exp $);
+__KERNEL_RCSID(0, $NetBSD: mtrr_i686.c,v 1.19.4.1 2011/02/16 20:54:13 bouyer Exp $);
 
 #include opt_multiprocessor.h
 
@@ -64,7 +64,7 @@
 static void i686_raw2soft(void);
 static void i686_mtrr_commit(void);
 static int i686_mtrr_setone(struct mtrr *, struct proc *p);
-
+static int i686_mtrr_conflict(uint8_t, uint8_t);
 
 static struct mtrr_state
 mtrr_raw[] = {
@@ -482,6 +482,14 @@
 	|| mtrrp-type  MTRR_TYPE_WB)  (mtrrp-flags  MTRR_VALID))
 		return EINVAL;
 
+	/* 
+	 * If write-combining is requested, make sure that the WC feature   
+	 * is supported by the processor.
+	 */
+	if (mtrrp-type == MTRR_TYPE_WC 
+	!(i686_mtrr_cap  MTRR_I686_CAP_WC_MASK))
+		return ENODEV;
+
 	/*
 	 * Only use fixed ranges  1M.
 	 */
@@ -605,7 +613,7 @@
 	 * XXX could be more sophisticated here by merging ranges.
 	 */
 	low = mtrrp-base;
-	high = low + mtrrp-len;
+	high = low + mtrrp-len - 1;
 	freep = NULL;
 	for (i = 0; i  i686_mtrr_vcnt; i++) {
 		if (!(mtrr_var[i].flags  MTRR_VALID)) {
@@ -613,7 +621,7 @@
 			continue;
 		}
 		curlow = mtrr_var[i].base;
-		curhigh = curlow + mtrr_var[i].len;
+		curhigh = curlow + mtrr_var[i].len - 1;
 		if (low == curlow  high == curhigh 
 		(!(mtrr_var[i].flags  MTRR_PRIVATE) ||
 		 ((mtrrp-flags  MTRR_PRIVATE)  (p != NULL) 
@@ -623,7 +631,7 @@
 		}
 		if (((high = curlow  high  curhigh) ||
 		(low = curlow  low  curhigh)) 
-	 	((mtrr_var[i].type != mtrrp-type) ||
+	 	(i686_mtrr_conflict(mtrr_var[i].type, mtrrp-type) ||
 		 ((mtrr_var[i].flags  MTRR_PRIVATE) 
  		  (!(mtrrp-flags  MTRR_PRIVATE) || (p == NULL) ||
 		   (mtrr_var[i].owner != p-p_pid) {
@@ -639,6 +647,17 @@
 	return 0;
 }
 
+static int
+i686_mtrr_conflict(uint8_t type1, uint8_t type2)
+{
+	if (type1 == MTRR_TYPE_UC || type2 == MTRR_TYPE_UC)
+		return 0;
+	if ((type1 == MTRR_TYPE_WT  type2 == MTRR_TYPE_WB) ||
+	(type1 == MTRR_TYPE_WB  type2 == MTRR_TYPE_WT))
+		return 0;
+	return 1;
+}
+
 static void
 i686_mtrr_clean(struct proc *p)
 {



CVS commit: [netbsd-5] src/crypto/dist/openssl/ssl

2011-02-16 Thread Manuel Bouyer
Module Name:src
Committed By:   bouyer
Date:   Wed Feb 16 21:00:24 UTC 2011

Modified Files:
src/crypto/dist/openssl/ssl [netbsd-5]: t1_lib.c

Log Message:
Pull up following revision(s) (requested by spz in ticket #1545):
crypto/external/bsd/openssl/dist/ssl/t1_lib.c: revision 1.4 via patch
fix for CVE-2011-0014 (OCSP stapling vulnerability in OpenSSL)
patch taken from http://www.openssl.org/news/secadv_20110208.txt


To generate a diff of this commit:
cvs rdiff -u -r1.2.4.2 -r1.2.4.3 src/crypto/dist/openssl/ssl/t1_lib.c

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

Modified files:

Index: src/crypto/dist/openssl/ssl/t1_lib.c
diff -u src/crypto/dist/openssl/ssl/t1_lib.c:1.2.4.2 src/crypto/dist/openssl/ssl/t1_lib.c:1.2.4.3
--- src/crypto/dist/openssl/ssl/t1_lib.c:1.2.4.2	Fri Dec 10 21:44:17 2010
+++ src/crypto/dist/openssl/ssl/t1_lib.c	Wed Feb 16 21:00:23 2011
@@ -810,6 +810,7 @@
 		}
 	n2s(data, idsize);
 	dsize -= 2 + idsize;
+	size -= 2 + idsize;
 	if (dsize  0)
 		{
 		*al = SSL_AD_DECODE_ERROR;
@@ -848,9 +849,14 @@
 	}
 
 /* Read in request_extensions */
+if (size  2)
+	{
+	*al = SSL_AD_DECODE_ERROR;
+	return 0;
+	}
 n2s(data,dsize);
 size -= 2;
-if (dsize  size) 
+if (dsize != size) 
 	{
 	*al = SSL_AD_DECODE_ERROR;
 	return 0;



CVS commit: [netbsd-5-0] src/crypto/dist/openssl/ssl

2011-02-16 Thread Manuel Bouyer
Module Name:src
Committed By:   bouyer
Date:   Wed Feb 16 21:00:32 UTC 2011

Modified Files:
src/crypto/dist/openssl/ssl [netbsd-5-0]: t1_lib.c

Log Message:
Pull up following revision(s) (requested by spz in ticket #1545):
crypto/external/bsd/openssl/dist/ssl/t1_lib.c: revision 1.4 via patch
fix for CVE-2011-0014 (OCSP stapling vulnerability in OpenSSL)
patch taken from http://www.openssl.org/news/secadv_20110208.txt


To generate a diff of this commit:
cvs rdiff -u -r1.2.8.2 -r1.2.8.3 src/crypto/dist/openssl/ssl/t1_lib.c

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

Modified files:

Index: src/crypto/dist/openssl/ssl/t1_lib.c
diff -u src/crypto/dist/openssl/ssl/t1_lib.c:1.2.8.2 src/crypto/dist/openssl/ssl/t1_lib.c:1.2.8.3
--- src/crypto/dist/openssl/ssl/t1_lib.c:1.2.8.2	Fri Dec 10 21:44:33 2010
+++ src/crypto/dist/openssl/ssl/t1_lib.c	Wed Feb 16 21:00:32 2011
@@ -810,6 +810,7 @@
 		}
 	n2s(data, idsize);
 	dsize -= 2 + idsize;
+	size -= 2 + idsize;
 	if (dsize  0)
 		{
 		*al = SSL_AD_DECODE_ERROR;
@@ -848,9 +849,14 @@
 	}
 
 /* Read in request_extensions */
+if (size  2)
+	{
+	*al = SSL_AD_DECODE_ERROR;
+	return 0;
+	}
 n2s(data,dsize);
 size -= 2;
-if (dsize  size) 
+if (dsize != size) 
 	{
 	*al = SSL_AD_DECODE_ERROR;
 	return 0;



CVS commit: [netbsd-5-1] src/crypto/dist/openssl/ssl

2011-02-16 Thread Manuel Bouyer
Module Name:src
Committed By:   bouyer
Date:   Wed Feb 16 21:01:03 UTC 2011

Modified Files:
src/crypto/dist/openssl/ssl [netbsd-5-1]: t1_lib.c

Log Message:
Pull up following revision(s) (requested by spz in ticket #1545):
crypto/external/bsd/openssl/dist/ssl/t1_lib.c: revision 1.4 via patch
fix for CVE-2011-0014 (OCSP stapling vulnerability in OpenSSL)
patch taken from http://www.openssl.org/news/secadv_20110208.txt


To generate a diff of this commit:
cvs rdiff -u -r1.2.12.2 -r1.2.12.3 src/crypto/dist/openssl/ssl/t1_lib.c

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

Modified files:

Index: src/crypto/dist/openssl/ssl/t1_lib.c
diff -u src/crypto/dist/openssl/ssl/t1_lib.c:1.2.12.2 src/crypto/dist/openssl/ssl/t1_lib.c:1.2.12.3
--- src/crypto/dist/openssl/ssl/t1_lib.c:1.2.12.2	Fri Dec 10 21:44:25 2010
+++ src/crypto/dist/openssl/ssl/t1_lib.c	Wed Feb 16 21:01:02 2011
@@ -810,6 +810,7 @@
 		}
 	n2s(data, idsize);
 	dsize -= 2 + idsize;
+	size -= 2 + idsize;
 	if (dsize  0)
 		{
 		*al = SSL_AD_DECODE_ERROR;
@@ -848,9 +849,14 @@
 	}
 
 /* Read in request_extensions */
+if (size  2)
+	{
+	*al = SSL_AD_DECODE_ERROR;
+	return 0;
+	}
 n2s(data,dsize);
 size -= 2;
-if (dsize  size) 
+if (dsize != size) 
 	{
 	*al = SSL_AD_DECODE_ERROR;
 	return 0;



CVS commit: [netbsd-5] src/usr.sbin/ypbind

2011-02-16 Thread Manuel Bouyer
Module Name:src
Committed By:   bouyer
Date:   Wed Feb 16 21:04:04 UTC 2011

Modified Files:
src/usr.sbin/ypbind [netbsd-5]: ypbind.c

Log Message:
Pull up following revision(s) (requested by chuck in ticket #1549):
usr.sbin/ypbind/ypbind.c: revision 1.58 - 1.61
in the case where ypbind is serving more than one domain (i.e.
not just the yp_get_default_domain() domain), we must remove
any old binding files from /var/yp/binding (BINDINGDIR) from
previous runs, or the non-yp_get_default_domain()'s will not
bind properly.   add a purge_bindingdir() function that basically
does rm BINDINGDIR/*.[0-9] at ypbind startup time.
example case of where this is an issue: bind a second (non-default)
domain.   ypbind will create and flock a /var/yp/binding/xxx.2
file for it.  stop and restart ypbind.  the old /var/yp/binding/xxx.2
file will remain from the previous run.   since it is not flock()'d
by the new instance of ypbind, libc functions like yp_master() will
fail without even bothering to talk to ypbind itself.   (and ypbind
is totally unaware of the old file...)


To generate a diff of this commit:
cvs rdiff -u -r1.57 -r1.57.18.1 src/usr.sbin/ypbind/ypbind.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/ypbind/ypbind.c
diff -u src/usr.sbin/ypbind/ypbind.c:1.57 src/usr.sbin/ypbind/ypbind.c:1.57.18.1
--- src/usr.sbin/ypbind/ypbind.c:1.57	Sat Jul  7 22:33:57 2007
+++ src/usr.sbin/ypbind/ypbind.c	Wed Feb 16 21:04:03 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: ypbind.c,v 1.57 2007/07/07 22:33:57 christos Exp $	*/
+/*	$NetBSD: ypbind.c,v 1.57.18.1 2011/02/16 21:04:03 bouyer Exp $	*/
 
 /*
  * Copyright (c) 1992, 1993 Theo de Raadt dera...@fsa.ca
@@ -28,7 +28,7 @@
 
 #include sys/cdefs.h
 #ifndef LINT
-__RCSID($NetBSD: ypbind.c,v 1.57 2007/07/07 22:33:57 christos Exp $);
+__RCSID($NetBSD: ypbind.c,v 1.57.18.1 2011/02/16 21:04:03 bouyer Exp $);
 #endif
 
 #include sys/param.h
@@ -129,6 +129,7 @@
 static struct _dom_binding *makebinding(const char *);
 static int makelock(struct _dom_binding *);
 static void removelock(struct _dom_binding *);
+static int purge_bindingdir(const char *);
 static void *ypbindproc_null_2(SVCXPRT *, void *);
 static void *ypbindproc_domain_2(SVCXPRT *, void *);
 static void *ypbindproc_setdom_2(SVCXPRT *, void *);
@@ -221,6 +222,50 @@
 	(void)unlink(path);
 }
 
+/*
+ * purge_bindingdir: remove old binding files (i.e. rm BINDINGDIR\/\*.[0-9])
+ *
+ * local YP functions [e.g. yp_master()] will fail without even talking
+ * to ypbind if there is a stale (non-flock'd) binding file present.
+ * we have to scan the entire BINDINGDIR for binding files, because
+ * ypbind may bind more than just the yp_get_default_domain() domain.
+ */
+static int
+purge_bindingdir(const char *dirpath)
+{
+	DIR *dirp;
+	int unlinkedfiles, l;
+	struct dirent *dp;
+	char pathname[MAXPATHLEN];
+
+	if ((dirp = opendir(dirpath)) == NULL)
+		return(-1);   /* at this point, shouldn't ever happen */
+
+	do {
+		unlinkedfiles = 0;
+		while ((dp = readdir(dirp)) != NULL) {
+			l = dp-d_namlen;
+			/* 'rm *.[0-9]' */
+			if (l  2  dp-d_name[l-2] == '.' 
+			dp-d_name[l-1] = '0'  dp-d_name[l-1] = '9') {
+(void)snprintf(pathname, sizeof(pathname), 
+	%s/%s, dirpath, dp-d_name);
+if (unlink(pathname)  0  errno != ENOENT)
+	return(-1);
+unlinkedfiles++;
+			}
+		}
+
+		/* rescan dir if we removed it */
+		if (unlinkedfiles)
+			rewinddir(dirp);
+
+	} while (unlinkedfiles);
+
+	closedir(dirp);
+	return(0);
+}
+
 static void *
 /*ARGSUSED*/
 ypbindproc_null_2(SVCXPRT *transp, void *argp)
@@ -507,8 +552,6 @@
 	/* initialise syslog */
 	openlog(ypbind, LOG_PERROR | LOG_PID, LOG_DAEMON);
 
-	/* blow away everything in BINDINGDIR */
-
 	lockfd = open(_PATH_YPBIND_LOCK, O_CREAT|O_SHLOCK|O_RDWR|O_TRUNC, 0644);
 	if (lockfd == -1)
 		err(1, Cannot create %s, _PATH_YPBIND_LOCK);
@@ -559,6 +602,10 @@
 	if (_yp_invalid_domain(domainname))
 		errx(1, bad domainname: %s, domainname);
 
+	/* blow away old bindings in BINDINGDIR */
+	if (purge_bindingdir(BINDINGDIR)  0)
+		errx(1, unable to purge old bindings from %s, BINDINGDIR);
+
 	/* build initial domain binding, make it unsuccessful */
 	ypbindlist = makebinding(domainname);
 	ypbindlist-dom_vers = YPVERS;
@@ -966,7 +1013,7 @@
 	iov[1].iov_len = sizeof(ybr);
 	bytes = readv(fd, iov, 2);
 	(void)close(fd);
-	if (bytes != (iov[0].iov_len + iov[1].iov_len)) {
+	if ((size_t)bytes != (iov[0].iov_len + iov[1].iov_len)) {
 		/* Binding file corrupt? */
 		yp_log(LOG_WARNING, %s: %m, path);
 		been_ypset = 0;
@@ -1022,7 +1069,7 @@
 #endif
 		return RPC_CANTRECV;
 	}
-	if (inlen  sizeof(u_int32_t))
+	if ((size_t)inlen  sizeof(u_int32_t))
 		goto recv_again;
 
 	/*
@@ -1083,7 +1130,7 @@
 #endif
 		return RPC_CANTRECV;
 	}
-	if (inlen  sizeof(u_int32_t))
+	if ((size_t)inlen  sizeof(u_int32_t))
 		goto recv_again;
 
 	/*
@@ -1188,7 +1235,7 @@
 	

CVS commit: [netbsd-5] src/usr.sbin/ypserv/ypxfr

2011-02-16 Thread Manuel Bouyer
Module Name:src
Committed By:   bouyer
Date:   Wed Feb 16 21:07:21 UTC 2011

Modified Files:
src/usr.sbin/ypserv/ypxfr [netbsd-5]: ypxfr.c

Log Message:
Pull up following revision(s) (requested by chuck in ticket #1550):
usr.sbin/ypserv/ypxfr/ypxfr.c: revision 1.16 - 1.19
Fix WARNS=4 issues (-Wshadow -Wcast-qual -Wsign-compare)
Follow upstream's lead and remove third and fourth clauses (except on
from usr.sbin/mopd/common/pf.c, where only the ad clause is removed,
because it has a shared UCB copyright) on Mats O Jansson's files.
thorpej OK'd usr.sbin/rpc.yppasswdd/yppasswdd_mkpw.c, where he shares
copyright.
yppush RPC is supposed to return yppush_status error/status codes
(e.g. YPPUSH_SUCC, YPPUSH_NOMAP, etc.).
Functions like yp_master, yp_order_host, yp_master_host, and
yp_match_host return YPERR-style error codes.  YPERR-style error
codes do not directly correspond to yppush_status codes, so it
is a bad idea to just directly YPERR codes into the yppush return
status value (it causes failing yppush runs to print confusing
error messages).
Change ypxfr.c to convert the YPERR codes to YPPUSH codes.
rev 1.18 un-covered some bugs:
 1. add_interdomain and add_secure are optional... not all maps use these
keys.  if we are unable to add them due to a YPERR_KEY (meaning they
are not being used), then we should not flag this as a general error.
 2. if we have a failure (status = 0) we unlink_db() the temp database
as part of error handling.   but we should not overwrite our error
status code with the return value from unlink_db() because if the
unlink_db() works (likely true) than that success will wipe out our
error code and the calling yppush will think we worked.


To generate a diff of this commit:
cvs rdiff -u -r1.15 -r1.15.8.1 src/usr.sbin/ypserv/ypxfr/ypxfr.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/ypserv/ypxfr/ypxfr.c
diff -u src/usr.sbin/ypserv/ypxfr/ypxfr.c:1.15 src/usr.sbin/ypserv/ypxfr/ypxfr.c:1.15.8.1
--- src/usr.sbin/ypserv/ypxfr/ypxfr.c:1.15	Fri Feb 29 03:00:47 2008
+++ src/usr.sbin/ypserv/ypxfr/ypxfr.c	Wed Feb 16 21:07:21 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: ypxfr.c,v 1.15 2008/02/29 03:00:47 lukem Exp $	*/
+/*	$NetBSD: ypxfr.c,v 1.15.8.1 2011/02/16 21:07:21 bouyer Exp $	*/
 
 /*
  * Copyright (c) 1994 Mats O Jansson m...@stacken.kth.se
@@ -12,11 +12,6 @@
  * 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.
- * 3. All advertising materials mentioning features or use of this software
- *must display the following acknowledgement:
- *	This product includes software developed by Mats O Jansson
- * 4. The name of the author may not be used to endorse or promote products
- *derived from this software without specific prior written permission.
  *
  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS
  * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
@@ -33,7 +28,7 @@
 
 #include sys/cdefs.h
 #ifndef lint
-__RCSID($NetBSD: ypxfr.c,v 1.15 2008/02/29 03:00:47 lukem Exp $);
+__RCSID($NetBSD: ypxfr.c,v 1.15.8.1 2011/02/16 21:07:21 bouyer Exp $);
 #endif
 
 #include sys/param.h
@@ -63,6 +58,7 @@
 
 DBM	*db;
 
+static	int yperr2yppush(int);
 static	int ypxfr_foreach(int, char *, int, char *, int, char *);
 
 int	main(int, char *[]);
@@ -155,7 +151,7 @@
 		fprintf(stderr, usage: %s [-cf] [-d domain] [-h host] %s\n,
 		   getprogname(),
 		   [-s domain] [-C tid prog ipadd port] mapname);
-		goto punt;
+		exit(1);
 	}
 
 #ifdef DEBUG
@@ -195,7 +191,7 @@
 		if (status == 0)
 			status = YPPUSH_SUCC;
 		else {
-			status = -status;
+			status = YPPUSH_MADDR;
 			goto punt;
 		}
 	}
@@ -245,7 +241,7 @@
 		if (status  0)
 			status = install_db(domain, map, temp_map);
 		else
-			status = unlink_db(domain, map, temp_map);
+			(void) unlink_db(domain, map, temp_map);
 	}
 	
  punt:
@@ -271,6 +267,30 @@
 	exit (0);
 }
 
+/*
+ * yperr2yppush: convert error codes from functions like yp_order_host,
+ * yp_master_host, and yp_match_host into YPPUSH rpc status values.
+ */
+static int
+yperr2yppush(int yperr) {
+	switch (yperr) {
+	case YPERR_DOMAIN:
+		return(YPPUSH_NODOM);
+	case YPERR_MAP:
+		return(YPPUSH_NOMAP);
+	case YPERR_KEY:
+		return(YPPUSH_YPERR);
+	case YPERR_BADDB:
+		return(YPPUSH_YPERR);
+	}
+
+	/*
+	 * generic error status for the rest (BADARGS, RPC, YPERR, RESRC,
+	 * NOMORE, PMAP, YPBIND, YPSERV, NODOM, VERS, ACCESS, BUSY)
+	 */
+	return(YPPUSH_XFRERR);   /* generic error status */
+}
+
 static int
 ypxfr_foreach(int status, char *keystr, int keylen, char *valstr,
 	  int vallen, char *data)
@@ -289,6 +309,7 @@
 	val.dptr = valstr;
 	val.dsize = strlen(valstr);
 
+/* XXX: suspect... ignoring return value here */
 	

CVS commit: [netbsd-5] src/sys/arch/powerpc/powerpc

2011-02-16 Thread Manuel Bouyer
Module Name:src
Committed By:   bouyer
Date:   Wed Feb 16 21:16:14 UTC 2011

Modified Files:
src/sys/arch/powerpc/powerpc [netbsd-5]: sig_machdep.c

Log Message:
Pull up following revision(s) (requested by jmmv in ticket #1551):
sys/arch/powerpc/powerpc/sig_machdep.c: revision 1.39 via patch
PR port-macppc/43619
Save handler before calling sendsig_reset before it will reset to SIG_DFL
is SA_RESETHAND is set.


To generate a diff of this commit:
cvs rdiff -u -r1.32 -r1.32.12.1 src/sys/arch/powerpc/powerpc/sig_machdep.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/powerpc/powerpc/sig_machdep.c
diff -u src/sys/arch/powerpc/powerpc/sig_machdep.c:1.32 src/sys/arch/powerpc/powerpc/sig_machdep.c:1.32.12.1
--- src/sys/arch/powerpc/powerpc/sig_machdep.c:1.32	Thu Apr 24 18:39:21 2008
+++ src/sys/arch/powerpc/powerpc/sig_machdep.c	Wed Feb 16 21:16:13 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: sig_machdep.c,v 1.32 2008/04/24 18:39:21 ad Exp $	*/
+/*	$NetBSD: sig_machdep.c,v 1.32.12.1 2011/02/16 21:16:13 bouyer Exp $	*/
 
 /*
  * Copyright (C) 1995, 1996 Wolfgang Solfrank.
@@ -32,7 +32,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: sig_machdep.c,v 1.32 2008/04/24 18:39:21 ad Exp $);
+__KERNEL_RCSID(0, $NetBSD: sig_machdep.c,v 1.32.12.1 2011/02/16 21:16:13 bouyer Exp $);
 
 #include opt_compat_netbsd.h
 #include opt_ppcarch.h
@@ -58,9 +58,11 @@
 	struct lwp * const l = curlwp;
 	struct proc * const p = l-l_proc;
 	struct trapframe * const tf = trapframe(l);
-	struct sigaltstack *ss = l-l_sigstk;
-	const struct sigact_sigdesc *sd =
+	struct sigaltstack * const ss = l-l_sigstk;
+	const struct sigact_sigdesc * const sd =
 	p-p_sigacts-sa_sigdesc[ksi-ksi_signo];
+	/* save handler before sendsig_reset trashes it! */
+	const void * const handler = sd-sd_sigact.sa_handler;
 	ucontext_t uc;
 	vaddr_t sp, sip, ucp;
 	int onstack, error;
@@ -130,7 +132,7 @@
 		/* Preserve ucp across call to signal function */
 		tf-fixreg[30] = (register_t)ucp;
 		tf-lr = (register_t)sd-sd_tramp;
-		tf-srr0   = (register_t)sd-sd_sigact.sa_handler;
+		tf-srr0   = (register_t)handler;
 		break;
 
 	default:



CVS commit: [netbsd-5] src/usr.bin/xargs

2011-02-16 Thread Manuel Bouyer
Module Name:src
Committed By:   bouyer
Date:   Wed Feb 16 21:17:51 UTC 2011

Modified Files:
src/usr.bin/xargs [netbsd-5]: xargs.1

Log Message:
Pull up following revision(s) (requested by dholland in ticket #1552):
usr.bin/xargs/xargs.1: revision 1.21
usr.bin/xargs/xargs.1: revision 1.22
PR/44259: Aleksey Cheusov: xargs: -r option is supported but not documented
Synced with the FreeBSD doc.
Talk more about NetBSD and less about FreeBSD. Sort sections.


To generate a diff of this commit:
cvs rdiff -u -r1.20 -r1.20.12.1 src/usr.bin/xargs/xargs.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/xargs/xargs.1
diff -u src/usr.bin/xargs/xargs.1:1.20 src/usr.bin/xargs/xargs.1:1.20.12.1
--- src/usr.bin/xargs/xargs.1:1.20	Sun Dec  2 19:47:56 2007
+++ src/usr.bin/xargs/xargs.1	Wed Feb 16 21:17:51 2011
@@ -1,4 +1,4 @@
-.\ $NetBSD: xargs.1,v 1.20 2007/12/02 19:47:56 wiz Exp $
+.\ $NetBSD: xargs.1,v 1.20.12.1 2011/02/16 21:17:51 bouyer Exp $
 .\
 .\ Copyright (c) 1990, 1991, 1993
 .\	The Regents of the University of California.  All rights reserved.
@@ -32,10 +32,10 @@
 .\ SUCH DAMAGE.
 .\
 .\	@(#)xargs.1	8.1 (Berkeley) 6/6/93
-.\ $FreeBSD: src/usr.bin/xargs/xargs.1,v 1.37 2006/09/29 15:20:48 ru Exp $
+.\ $FreeBSD: src/usr.bin/xargs/xargs.1,v 1.40 2010/12/11 08:32:16 joel Exp $
 .\ $xMach: xargs.1,v 1.2 2002/02/23 05:23:37 tim Exp $
 .\
-.Dd April 18, 2007
+.Dd December 21, 2010
 .Dt XARGS 1
 .Os
 .Sh NAME
@@ -43,7 +43,7 @@
 .Nd construct argument list(s) and execute utility
 .Sh SYNOPSIS
 .Nm
-.Op Fl 0opt
+.Op Fl 0oprt
 .Op Fl E Ar eofstr
 .Oo
 .Fl I Ar replstr
@@ -219,6 +219,34 @@
 causes the command to be executed, any other response causes it to be
 skipped.
 No commands are executed if the process is not attached to a terminal.
+.It Fl r
+Compatibility with GNU
+.Nm .
+The GNU version of
+.Nm
+runs the
+.Ar utility
+argument at least once, even if
+.Nm
+input is empty, and it supports a
+.Fl r
+option to inhibit this behavior.
+The
+.Nx
+version of
+.Nm
+does not run the
+.Ar utility
+argument on empty input, but it supports the
+.Fl r
+option for command-line compatibility with GNU
+.Nm ;
+but the
+.Fl r
+option does nothing in the
+.Nx
+version of
+.Nm .
 .It Fl R Ar replacements
 Specify the maximum number of arguments that
 .Fl I
@@ -279,6 +307,11 @@
 or an invocation of
 .Ar utility
 exits with a value of 255.
+.Sh FILES
+.Bl -tag -width /dev/tty -compact
+.It Pa /dev/tty
+used to read responses in prompt mode
+.El
 .Sh EXIT STATUS
 .Nm
 exits with one of the following values:
@@ -310,11 +343,6 @@
 .It 1
 Some other error occurred.
 .El
-.Sh FILES
-.Bl -tag -width /dev/tty -compact
-.It Pa /dev/tty
-used to read responses in prompt mode
-.El
 .Sh SEE ALSO
 .Xr echo 1 ,
 .Xr find 1 ,



CVS commit: [netbsd-5] src/sys/fs/hfs

2011-02-16 Thread Manuel Bouyer
Module Name:src
Committed By:   bouyer
Date:   Wed Feb 16 21:20:04 UTC 2011

Modified Files:
src/sys/fs/hfs [netbsd-5]: hfs_vnops.c

Log Message:
Pull up following revision(s) (requested by dholland in ticket #1554):
sys/fs/hfs/hfs_vnops.c: revision 1.21, 1.22 via patch
PR/44523: Taylor R Campbell: mount_hfs badly handles file names with slashes
in them, encode them as colons. XXX: Should encode : as :: too?
remove comments about needing to encode : since the on disk format does
not allow them. Also fix reversed encoding in lookup. From Taylor R Campbell.


To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.11.4.1 src/sys/fs/hfs/hfs_vnops.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/fs/hfs/hfs_vnops.c
diff -u src/sys/fs/hfs/hfs_vnops.c:1.11 src/sys/fs/hfs/hfs_vnops.c:1.11.4.1
--- src/sys/fs/hfs/hfs_vnops.c:1.11	Wed Sep  3 22:57:46 2008
+++ src/sys/fs/hfs/hfs_vnops.c	Wed Feb 16 21:20:04 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: hfs_vnops.c,v 1.11 2008/09/03 22:57:46 gmcgarry Exp $	*/
+/*	$NetBSD: hfs_vnops.c,v 1.11.4.1 2011/02/16 21:20:04 bouyer Exp $	*/
 
 /*-
  * Copyright (c) 2005, 2007 The NetBSD Foundation, Inc.
@@ -101,7 +101,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: hfs_vnops.c,v 1.11 2008/09/03 22:57:46 gmcgarry Exp $);
+__KERNEL_RCSID(0, $NetBSD: hfs_vnops.c,v 1.11.4.1 2011/02/16 21:20:04 bouyer Exp $);
 
 #ifdef _KERNEL_OPT
 #include opt_ipsec.h
@@ -398,7 +398,7 @@
 		*vpp = vdp;
 	} else {
 		hfs_callback_args cbargs;
-		uint8_t len;
+		uint8_t len, ni;
 
 		hfslib_init_cbargs(cbargs);
 
@@ -407,6 +407,9 @@
 		unicn = malloc(cnp-cn_namelen*sizeof(unicn[0]), M_TEMP, M_WAITOK);
 		len = utf8_to_utf16(unicn, cnp-cn_namelen,
 cnp-cn_nameptr, cnp-cn_namelen, 0, NULL);
+		for (ni = 0; ni  len; ni++)
+			if (unicn[ni] == (unichar_t)':')
+unicn[ni] = (unichar_t)'/';
 		/* XXX: check conversion errors? */
 		if (hfslib_make_catalog_key(VTOH(vdp)-h_rec.u.cnid, len, unicn,
 			key) == 0) {
@@ -861,7 +864,7 @@
 	off_t bufoff; /* current position in buffer relative to start of dirents */
 	uint32_t numchildren;
 	uint32_t curchild; /* index of child we're currently stuffing into dirent */
-	size_t namlen;
+	size_t namlen, ni;
 	int error;
 	int i; /* dummy variable */
 	
@@ -906,6 +909,9 @@
 			/* XXX: how to handle name too long? */
 			continue;
 		}
+		for (ni = 0; ni  namlen; ni++)
+			if (curent.d_name[ni] == '/')
+curent.d_name[ni] = ':';
 		curent.d_namlen = namlen;
 		curent.d_reclen = _DIRENT_SIZE(curent);
 		



CVS commit: [netbsd-5] src/sys/arch/sparc64/dev

2011-02-16 Thread Manuel Bouyer
Module Name:src
Committed By:   bouyer
Date:   Wed Feb 16 21:21:21 UTC 2011

Modified Files:
src/sys/arch/sparc64/dev [netbsd-5]: psycho.c

Log Message:
Pull up following revision(s) (requested by nakayama in ticket #1555):
sys/arch/sparc64/dev/psycho.c: revision 1.102 via patch
Don't enable the powerfail interrupt on Netra X1 since it may hang.
Discussed on port-sparc64.


To generate a diff of this commit:
cvs rdiff -u -r1.91 -r1.91.4.1 src/sys/arch/sparc64/dev/psycho.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/sparc64/dev/psycho.c
diff -u src/sys/arch/sparc64/dev/psycho.c:1.91 src/sys/arch/sparc64/dev/psycho.c:1.91.4.1
--- src/sys/arch/sparc64/dev/psycho.c:1.91	Sat Oct 18 03:31:10 2008
+++ src/sys/arch/sparc64/dev/psycho.c	Wed Feb 16 21:21:21 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: psycho.c,v 1.91 2008/10/18 03:31:10 nakayama Exp $	*/
+/*	$NetBSD: psycho.c,v 1.91.4.1 2011/02/16 21:21:21 bouyer Exp $	*/
 
 /*
  * Copyright (c) 1999, 2000 Matthew R. Green
@@ -55,7 +55,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: psycho.c,v 1.91 2008/10/18 03:31:10 nakayama Exp $);
+__KERNEL_RCSID(0, $NetBSD: psycho.c,v 1.91.4.1 2011/02/16 21:21:21 bouyer Exp $);
 
 #include opt_ddb.h
 
@@ -288,6 +288,7 @@
 	int psycho_br[2], n, i;
 	bus_space_handle_t pci_ctl;
 	char *model = prom_getpropstring(ma-ma_node, model);
+	extern char machine_model[];
 
 	aprint_normal(\n);
 
@@ -519,10 +520,15 @@
 		psycho_set_intr(sc, 15, psycho_bus_a,
 			sc-sc_regs-pciaerr_int_map, 
 			sc-sc_regs-pciaerr_clr_int);
-		psycho_set_intr(sc, 15, psycho_powerfail,
-			sc-sc_regs-power_int_map, 
-			sc-sc_regs-power_clr_int);
-		psycho_register_power_button(sc);
+		/*
+		 * Netra X1 may hang when the powerfail interrupt is enabled.
+		 */
+		if (strcmp(machine_model, SUNW,UltraAX-i2) != 0) {
+			psycho_set_intr(sc, 15, psycho_powerfail,
+sc-sc_regs-power_int_map,
+sc-sc_regs-power_clr_int);
+			psycho_register_power_button(sc);
+		}
 		if (sc-sc_mode != PSYCHO_MODE_SABRE) {
 			/* sabre doesn't have these interrupts */
 			psycho_set_intr(sc, 15, psycho_bus_b,



CVS commit: [netbsd-5] src/sys

2011-02-16 Thread Manuel Bouyer
Module Name:src
Committed By:   bouyer
Date:   Wed Feb 16 21:22:45 UTC 2011

Modified Files:
src/sys/compat/irix [netbsd-5]: irix_signal.c
src/sys/compat/netbsd32 [netbsd-5]: netbsd32_signal.c
src/sys/compat/svr4 [netbsd-5]: svr4_signal.c
src/sys/kern [netbsd-5]: sys_sig.c

Log Message:
Pull up following revision(s) (requested by joerg in ticket #1556):
sys/compat/irix/irix_signal.c: revision 1.56
sys/compat/svr4/svr4_signal.c: revision 1.65
sys/compat/netbsd32/netbsd32_signal.c: revision 1.35
sys/kern/sys_sig.c: revision 1.31
Explicitly initialize ucontext before calling getmcontext.


To generate a diff of this commit:
cvs rdiff -u -r1.48 -r1.48.10.1 src/sys/compat/irix/irix_signal.c
cvs rdiff -u -r1.31 -r1.31.4.1 src/sys/compat/netbsd32/netbsd32_signal.c
cvs rdiff -u -r1.64 -r1.64.10.1 src/sys/compat/svr4/svr4_signal.c
cvs rdiff -u -r1.17.4.3 -r1.17.4.4 src/sys/kern/sys_sig.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/compat/irix/irix_signal.c
diff -u src/sys/compat/irix/irix_signal.c:1.48 src/sys/compat/irix/irix_signal.c:1.48.10.1
--- src/sys/compat/irix/irix_signal.c:1.48	Mon Apr 28 20:23:42 2008
+++ src/sys/compat/irix/irix_signal.c	Wed Feb 16 21:22:44 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: irix_signal.c,v 1.48 2008/04/28 20:23:42 martin Exp $ */
+/*	$NetBSD: irix_signal.c,v 1.48.10.1 2011/02/16 21:22:44 bouyer Exp $ */
 
 /*-
  * Copyright (c) 1994, 2001-2002 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: irix_signal.c,v 1.48 2008/04/28 20:23:42 martin Exp $);
+__KERNEL_RCSID(0, $NetBSD: irix_signal.c,v 1.48.10.1 2011/02/16 21:22:44 bouyer Exp $);
 
 #include sys/types.h
 #include sys/signal.h
@@ -710,6 +710,8 @@
 
 	f = (struct frame *)l-l_md.md_regs;
 
+	memset(kucp, 0, sizeof(kucp));
+
 	kucp.iuc_flags = IRIX_UC_ALL;
 	kucp.iuc_link = NULL;		/* XXX */
 

Index: src/sys/compat/netbsd32/netbsd32_signal.c
diff -u src/sys/compat/netbsd32/netbsd32_signal.c:1.31 src/sys/compat/netbsd32/netbsd32_signal.c:1.31.4.1
--- src/sys/compat/netbsd32/netbsd32_signal.c:1.31	Wed Oct 15 06:51:19 2008
+++ src/sys/compat/netbsd32/netbsd32_signal.c	Wed Feb 16 21:22:45 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: netbsd32_signal.c,v 1.31 2008/10/15 06:51:19 wrstuden Exp $	*/
+/*	$NetBSD: netbsd32_signal.c,v 1.31.4.1 2011/02/16 21:22:45 bouyer Exp $	*/
 
 /*
  * Copyright (c) 1998, 2001 Matthew R. Green
@@ -27,7 +27,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: netbsd32_signal.c,v 1.31 2008/10/15 06:51:19 wrstuden Exp $);
+__KERNEL_RCSID(0, $NetBSD: netbsd32_signal.c,v 1.31.4.1 2011/02/16 21:22:45 bouyer Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -362,6 +362,8 @@
 	struct proc *p = l-l_proc;
 	ucontext32_t uc;
 
+	memset(uc, 0, sizeof(uc));
+
 	mutex_enter(p-p_lock);
 	getucontext32(l, uc);
 	mutex_exit(p-p_lock);

Index: src/sys/compat/svr4/svr4_signal.c
diff -u src/sys/compat/svr4/svr4_signal.c:1.64 src/sys/compat/svr4/svr4_signal.c:1.64.10.1
--- src/sys/compat/svr4/svr4_signal.c:1.64	Mon Apr 28 20:23:45 2008
+++ src/sys/compat/svr4/svr4_signal.c	Wed Feb 16 21:22:44 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: svr4_signal.c,v 1.64 2008/04/28 20:23:45 martin Exp $	 */
+/*	$NetBSD: svr4_signal.c,v 1.64.10.1 2011/02/16 21:22:44 bouyer Exp $	 */
 
 /*-
  * Copyright (c) 1994, 1998 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: svr4_signal.c,v 1.64 2008/04/28 20:23:45 martin Exp $);
+__KERNEL_RCSID(0, $NetBSD: svr4_signal.c,v 1.64.10.1 2011/02/16 21:22:44 bouyer Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -462,6 +462,8 @@
 	svr4_ucontext_t uc;
 	*retval = 0;
 
+	memset(uc, 0, sizeof(uc));
+
 	switch (SCARG(uap, func)) {
 	case SVR4_GETCONTEXT:
 		DPRINTF((getcontext(%p)\n, SCARG(uap, uc)));

Index: src/sys/kern/sys_sig.c
diff -u src/sys/kern/sys_sig.c:1.17.4.3 src/sys/kern/sys_sig.c:1.17.4.4
--- src/sys/kern/sys_sig.c:1.17.4.3	Thu Jan  7 07:04:50 2010
+++ src/sys/kern/sys_sig.c	Wed Feb 16 21:22:45 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: sys_sig.c,v 1.17.4.3 2010/01/07 07:04:50 snj Exp $	*/
+/*	$NetBSD: sys_sig.c,v 1.17.4.4 2011/02/16 21:22:45 bouyer Exp $	*/
 
 /*-
  * Copyright (c) 2006, 2007, 2008 The NetBSD Foundation, Inc.
@@ -66,7 +66,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: sys_sig.c,v 1.17.4.3 2010/01/07 07:04:50 snj Exp $);
+__KERNEL_RCSID(0, $NetBSD: sys_sig.c,v 1.17.4.4 2011/02/16 21:22:45 bouyer Exp $);
 
 #include opt_ptrace.h
 #include opt_compat_netbsd.h
@@ -307,6 +307,8 @@
 	struct proc *p = l-l_proc;
 	ucontext_t uc;
 
+	memset(uc, 0, sizeof(uc));
+
 	mutex_enter(p-p_lock);
 	getucontext(l, uc);
 	mutex_exit(p-p_lock);



CVS commit: [netbsd-5] src/doc

2011-02-16 Thread Manuel Bouyer
Module Name:src
Committed By:   bouyer
Date:   Wed Feb 16 21:23:44 UTC 2011

Modified Files:
src/doc [netbsd-5]: CHANGES-5.2

Log Message:
Tickets 1545 - 1552, 1554-1556


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.56 -r1.1.2.57 src/doc/CHANGES-5.2

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

Modified files:

Index: src/doc/CHANGES-5.2
diff -u src/doc/CHANGES-5.2:1.1.2.56 src/doc/CHANGES-5.2:1.1.2.57
--- src/doc/CHANGES-5.2:1.1.2.56	Wed Feb 16 20:40:22 2011
+++ src/doc/CHANGES-5.2	Wed Feb 16 21:23:44 2011
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-5.2,v 1.1.2.56 2011/02/16 20:40:22 bouyer Exp $
+# $NetBSD: CHANGES-5.2,v 1.1.2.57 2011/02/16 21:23:44 bouyer Exp $
 
 A complete list of changes from the NetBSD 5.1 release to the NetBSD 5.2
 release:
@@ -4636,3 +4636,80 @@
 	but this is a hack and should be removed.
 	[chs, ticket #1541]
 
+lib/libc/resolv/res_send.c			1.21
+
+	Don't do highestFD check with USE_POLL.  It provides no benefit
+	but causes a dependency between RLIMIT_NOFILE and rumphijack FDOFF.
+	[pooka, ticket #1546]
+
+sys/arch/x86/x86/mtrr_i686.c			1.23, 1.24
+
+	allows overlapping uncached and cached mappings 
+	corrects an off-by-one which prevents adjacent mappings from
+	being setup.
+	[jmcneill, ticket #1547]
+
+crypto/external/bsd/openssl/dist/ssl/t1_lib.c	1.4 via patch
+
+	fix for CVE-2011-0014 (OCSP stapling vulnerability in OpenSSL)
+	patch taken from http://www.openssl.org/news/secadv_20110208.txt
+	[spz, ticket #1545]
+
+usr.sbin/ypbind/ypbind.c			1.58 - 1.61
+
+	in the case where ypbind is serving more than one domain (i.e.
+	not just the yp_get_default_domain() domain), we must remove
+	any old binding files from /var/yp/binding (BINDINGDIR) from
+	previous runs, or the non-yp_get_default_domain()'s will not
+	bind properly.   add a purge_bindingdir() function that basically
+	does rm BINDINGDIR/*.[0-9] at ypbind startup time.
+	[chuck, ticket #1549]
+
+usr.sbin/ypserv/ypxfr/ypxfr.c			1.16 - 1.19
+
+	yppush RPC is supposed to return yppush_status error/status codes
+	(e.g. YPPUSH_SUCC, YPPUSH_NOMAP, etc.).
+	Functions like yp_master, yp_order_host, yp_master_host, and
+	yp_match_host return YPERR-style error codes.  YPERR-style error
+	codes do not directly correspond to yppush_status codes, so it
+	is a bad idea to just directly YPERR codes into the yppush return
+	status value (it causes failing yppush runs to print confusing
+	error messages).
+	[chuck, ticket #1550]
+
+sys/arch/powerpc/powerpc/sig_machdep.c		1.39 via patch
+
+	PR port-macppc/43619
+	Save handler before calling sendsig_reset before it will reset to
+	SIG_DFL is SA_RESETHAND is set.
+	[jmmv, ticket #1551]
+
+usr.bin/xargs/xargs.11.21, 1.22
+
+	PR/44259: Aleksey Cheusov: xargs: -r option is supported but not
+	documented.
+	Synced with the FreeBSD doc.
+	[dholland, ticket #1552]
+
+sys/fs/hfs/hfs_vnops.c1.21, 1.22 via patch
+
+	PR/44523: Taylor R Campbell: mount_hfs badly handles file names with
+	slashes in them, encode them as colons. XXX: Should encode : as :: too?
+	remove comments about needing to encode : since the on disk format does
+	not allow them. Also fix reversed encoding in lookup.
+	From Taylor R Campbell.
+	[dholland, ticket #1554]
+
+sys/arch/sparc64/dev/psycho.c			1.102 via patch
+
+	Don't enable the powerfail interrupt on Netra X1 since it may hang.
+	[nakayama, ticket #1555]
+
+sys/compat/irix/irix_signal.c			1.56
+sys/compat/netbsd32/netbsd32_signal.c		1.35
+sys/compat/svr4/svr4_signal.c			1.65
+sys/kern/sys_sig.c1.31
+
+	Explicitly initialize ucontext before calling getmcontext.
+	[joerg, ticket #1556]
+



CVS commit: [netbsd-5-0] src/doc

2011-02-16 Thread Manuel Bouyer
Module Name:src
Committed By:   bouyer
Date:   Wed Feb 16 21:24:15 UTC 2011

Modified Files:
src/doc [netbsd-5-0]: CHANGES-5.0.3

Log Message:
ticket 1545


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.26 -r1.1.2.27 src/doc/CHANGES-5.0.3

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

Modified files:

Index: src/doc/CHANGES-5.0.3
diff -u src/doc/CHANGES-5.0.3:1.1.2.26 src/doc/CHANGES-5.0.3:1.1.2.27
--- src/doc/CHANGES-5.0.3:1.1.2.26	Wed Feb 16 20:38:45 2011
+++ src/doc/CHANGES-5.0.3	Wed Feb 16 21:24:15 2011
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-5.0.3,v 1.1.2.26 2011/02/16 20:38:45 bouyer Exp $
+# $NetBSD: CHANGES-5.0.3,v 1.1.2.27 2011/02/16 21:24:15 bouyer Exp $
 
 A complete list of changes from the NetBSD 5.0.2 release to the NetBSD 5.0.3
 release:
@@ -2571,3 +2571,9 @@
 	the state that we found it in before attaching a driver to it.
 	[dyoung, ticket #1540]
 
+crypto/external/bsd/openssl/dist/ssl/t1_lib.c	1.4 via patch
+
+	fix for CVE-2011-0014 (OCSP stapling vulnerability in OpenSSL)
+	patch taken from http://www.openssl.org/news/secadv_20110208.txt
+	[spz, ticket #1545]
+



CVS commit: [netbsd-5] src/sys/arch/sparc/sparc

2011-02-16 Thread Manuel Bouyer
Module Name:src
Committed By:   bouyer
Date:   Wed Feb 16 21:33:25 UTC 2011

Modified Files:
src/sys/arch/sparc/sparc [netbsd-5]: cpu.c cpuvar.h pmap.c
timer_sun4m.c

Log Message:
Apply patch, requested my mrg in ticket 1553:
sys/arch/sparc/sparc/cpu.c: patch
sys/arch/sparc/sparc/cpuvar.h:  patch
sys/arch/sparc/sparc/pmap.c:patch
sys/arch/sparc/sparc/timer_sun4m.c: patch
- print the curpcb in ddb mach cpu output as well.
- bump the size of cpus[] by one, so we have a NULL pointer at the end,
  from tsutsui
- for MP kernels, copy the loop to find the bootcpu in mainbus_attach()
  into getcacheinfo_obp() so we can get cache properties on the bootcpu
  before calling main()
- in getcpuinfo(), move the call of getmid() before the call to
  getcacheinfo() so that the above change to getcacheinfo_obp() can work
- move the struct cpu_info setup to the end of the initial kernel page
  setup and don't access this space until after we have switched to the
  kernel pagetables
- revive most of the old CPUINFO_VA alignment/congruency code from the
  old alloc_cpuinfo_global_va() function, and ensure that all cpuinfo
  structures are sanely aligned.  this makes hypersparc work again
- introduce a new way to free the wasted pages back to UVM, as we can't
  simply uvm_unmap() them this early in bootstrap
- make sure to initialise the cpuinfo sz in all cases.  noted by martin.
- add per-cpu event counters for lev10 and lev14 interrupts.
- make CPU_INFO_FOREACH() set the iterator count to '0' in the !MP case.
- add some disabled MP code to poke other cpus on level 14 interrupts.
- add a diagnostic to ensure that cpus[0] == cpu0's cpu_info-ci_self
- if a cpu doesn't have any mappings allocated, don't copy them.  this
  occurs if a cpu isn't attached (such as a MP kernel with only cpu0
  listed in the config file..)
- fix the previous to compile !MULTIPROCESSOR.


To generate a diff of this commit:
cvs rdiff -u -r1.211.8.3 -r1.211.8.4 src/sys/arch/sparc/sparc/cpu.c
cvs rdiff -u -r1.75.10.3 -r1.75.10.4 src/sys/arch/sparc/sparc/cpuvar.h
cvs rdiff -u -r1.322.20.4 -r1.322.20.5 src/sys/arch/sparc/sparc/pmap.c
cvs rdiff -u -r1.16.56.1 -r1.16.56.2 src/sys/arch/sparc/sparc/timer_sun4m.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/sparc/sparc/cpu.c
diff -u src/sys/arch/sparc/sparc/cpu.c:1.211.8.3 src/sys/arch/sparc/sparc/cpu.c:1.211.8.4
--- src/sys/arch/sparc/sparc/cpu.c:1.211.8.3	Fri Jan 28 07:16:13 2011
+++ src/sys/arch/sparc/sparc/cpu.c	Wed Feb 16 21:33:25 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: cpu.c,v 1.211.8.3 2011/01/28 07:16:13 snj Exp $ */
+/*	$NetBSD: cpu.c,v 1.211.8.4 2011/02/16 21:33:25 bouyer Exp $ */
 
 /*
  * Copyright (c) 1996
@@ -52,7 +52,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: cpu.c,v 1.211.8.3 2011/01/28 07:16:13 snj Exp $);
+__KERNEL_RCSID(0, $NetBSD: cpu.c,v 1.211.8.4 2011/02/16 21:33:25 bouyer Exp $);
 
 #include opt_multiprocessor.h
 #include opt_lockdebug.h
@@ -102,7 +102,7 @@
 extern char machine_model[];
 
 int	sparc_ncpus;			/* # of CPUs detected by PROM */
-struct cpu_info *cpus[_MAXNCPU];	/* we only support 4 CPUs. */
+struct cpu_info *cpus[_MAXNCPU+1];	/* we only support 4 CPUs. */
 
 /* The CPU configuration driver. */
 static void cpu_mainbus_attach(struct device *, struct device *, void *);
@@ -424,7 +424,7 @@
 	}
 
 	/*
-	 * Note: `eintstack' is set in init_cpuinfo() above.
+	 * Note: `eintstack' is set in cpu_attach_non_boot() above.
 	 * The %wim register will be initialized in cpu_hatch().
 	 */
 	cpi-ci_curlwp = cpi-ci_data.cpu_idlelwp;
@@ -1123,6 +1123,35 @@
 	struct cacheinfo *ci = sc-cacheinfo;
 	int i, l;
 
+#if defined(MULTIPROCESSOR)
+	/*
+	 * We really really want the cache info early for MP systems,
+	 * so figure out the boot node, if we can.
+	 *
+	 * XXX this loop stolen from mainbus_attach()
+	 */
+	if (node == 0  CPU_ISSUN4M  bootmid != 0) {
+		const char *cp;
+		char namebuf[32];
+		int mid, node2;
+
+		for (node2 = firstchild(findroot());
+		 node2;
+		 node2 = nextsibling(node2)) {
+			cp = prom_getpropstringA(node2, device_type,
+	namebuf, sizeof namebuf);
+			if (strcmp(cp, cpu) != 0)
+continue;
+
+			mid = prom_getpropint(node2, mid, -1);
+			if (mid == bootmid) {
+node = node2;
+break;
+			}
+		}
+	}
+#endif
+
 	if (node == 0)
 		/* Bootstrapping */
 		return;
@@ -1862,6 +1891,9 @@
 		if (sc-cacheinfo.c_vactype == VAC_UNKNOWN)
 			sc-cacheinfo.c_vactype = mp-minfo-vactype;
 
+		if (sc-master  mp-minfo-getmid != NULL)
+			bootmid = mp-minfo-getmid();
+
 		mp-minfo-getcacheinfo(sc, node);
 
 		if (node  sc-hz == 0  !CPU_ISSUN4/*XXX*/) {
@@ -1875,9 +1907,6 @@
 			}
 		}
 
-		if (sc-master  mp-minfo-getmid != NULL)
-			bootmid = mp-minfo-getmid();
-
 		/*
 		 * Copy CPU/MMU/Cache specific routines into cpu_info.
 		 */
@@ -2015,16 +2044,17 @@
 	struct 

CVS commit: [netbsd-5] src/doc

2011-02-16 Thread Manuel Bouyer
Module Name:src
Committed By:   bouyer
Date:   Wed Feb 16 21:35:18 UTC 2011

Modified Files:
src/doc [netbsd-5]: CHANGES-5.2

Log Message:
Ticket 1553


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.57 -r1.1.2.58 src/doc/CHANGES-5.2

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

Modified files:

Index: src/doc/CHANGES-5.2
diff -u src/doc/CHANGES-5.2:1.1.2.57 src/doc/CHANGES-5.2:1.1.2.58
--- src/doc/CHANGES-5.2:1.1.2.57	Wed Feb 16 21:23:44 2011
+++ src/doc/CHANGES-5.2	Wed Feb 16 21:35:18 2011
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-5.2,v 1.1.2.57 2011/02/16 21:23:44 bouyer Exp $
+# $NetBSD: CHANGES-5.2,v 1.1.2.58 2011/02/16 21:35:18 bouyer Exp $
 
 A complete list of changes from the NetBSD 5.1 release to the NetBSD 5.2
 release:
@@ -4713,3 +4713,35 @@
 	Explicitly initialize ucontext before calling getmcontext.
 	[joerg, ticket #1556]
 
+sys/arch/sparc/sparc/cpu.c			patch
+sys/arch/sparc/sparc/cpuvar.h			patch
+sys/arch/sparc/sparc/pmap.c			patch
+sys/arch/sparc/sparc/timer_sun4m.c		patch
+
+	- print the curpcb in ddb mach cpu output as well.
+	- bump the size of cpus[] by one, so we have a NULL pointer at the end,
+	  from tsutsui
+	- for MP kernels, copy the loop to find the bootcpu in mainbus_attach() 
+	  into getcacheinfo_obp() so we can get cache properties on the bootcpu
+	  before calling main()
+	- in getcpuinfo(), move the call of getmid() before the call to
+	  getcacheinfo() so that the above change to getcacheinfo_obp() can work
+	- move the struct cpu_info setup to the end of the initial kernel page
+	  setup and don't access this space until after we have switched to the
+	  kernel pagetables
+	- revive most of the old CPUINFO_VA alignment/congruency code from the
+	  old alloc_cpuinfo_global_va() function, and ensure that all cpuinfo
+	  structures are sanely aligned.  this makes hypersparc work again
+	- introduce a new way to free the wasted pages back to UVM, as we can't
+	  simply uvm_unmap() them this early in bootstrap
+	- make sure to initialise the cpuinfo sz in all cases.  noted by martin.
+	- add per-cpu event counters for lev10 and lev14 interrupts.
+	- make CPU_INFO_FOREACH() set the iterator count to '0' in the !MP case.
+	- add some disabled MP code to poke other cpus on level 14 interrupts.
+	- add a diagnostic to ensure that cpus[0] == cpu0's cpu_info-ci_self
+	- if a cpu doesn't have any mappings allocated, don't copy them.  this
+	  occurs if a cpu isn't attached (such as a MP kernel with only cpu0
+	  listed in the config file..)
+	- fix the previous to compile !MULTIPROCESSOR.
+	[mrg, ticket 1553]
+



CVS commit: [netbsd-5] src/doc

2011-02-16 Thread Manuel Bouyer
Module Name:src
Committed By:   bouyer
Date:   Wed Feb 16 21:36:01 UTC 2011

Modified Files:
src/doc [netbsd-5]: CHANGES-5.2

Log Message:
Fix message for ticket 1553


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.58 -r1.1.2.59 src/doc/CHANGES-5.2

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

Modified files:

Index: src/doc/CHANGES-5.2
diff -u src/doc/CHANGES-5.2:1.1.2.58 src/doc/CHANGES-5.2:1.1.2.59
--- src/doc/CHANGES-5.2:1.1.2.58	Wed Feb 16 21:35:18 2011
+++ src/doc/CHANGES-5.2	Wed Feb 16 21:36:01 2011
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-5.2,v 1.1.2.58 2011/02/16 21:35:18 bouyer Exp $
+# $NetBSD: CHANGES-5.2,v 1.1.2.59 2011/02/16 21:36:01 bouyer Exp $
 
 A complete list of changes from the NetBSD 5.1 release to the NetBSD 5.2
 release:
@@ -4743,5 +4743,8 @@
 	  occurs if a cpu isn't attached (such as a MP kernel with only cpu0
 	  listed in the config file..)
 	- fix the previous to compile !MULTIPROCESSOR.
+	from tsutsui:
+	- Make sure to initialize cpus[0] which will also be used as cpuinfo
+	for sun4 and sun4c, not only for sun4m. Okay'ed by mrg@.
 	[mrg, ticket 1553]
 



CVS commit: src/lib/librumpclient

2011-02-16 Thread Matthias Scheler
Module Name:src
Committed By:   tron
Date:   Wed Feb 16 22:35:41 UTC 2011

Modified Files:
src/lib/librumpclient: rumpclient.h

Log Message:
Include sys/null.h to get the definition of NULL.


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/lib/librumpclient/rumpclient.h

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

Modified files:

Index: src/lib/librumpclient/rumpclient.h
diff -u src/lib/librumpclient/rumpclient.h:1.9 src/lib/librumpclient/rumpclient.h:1.10
--- src/lib/librumpclient/rumpclient.h:1.9	Wed Feb 16 19:58:01 2011
+++ src/lib/librumpclient/rumpclient.h	Wed Feb 16 22:35:41 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: rumpclient.h,v 1.9 2011/02/16 19:58:01 pooka Exp $	*/
+/*	$NetBSD: rumpclient.h,v 1.10 2011/02/16 22:35:41 tron Exp $	*/
 
 /*-
  * Copyright (c) 2010 Antti Kantee.  All Rights Reserved.
@@ -29,6 +29,7 @@
 #define _RUMP_RUMPCLIENT_H_
 
 #include sys/types.h
+#include sys/null.h
 
 struct rumpclient_fork;
 



CVS commit: src/usr.bin/stat

2011-02-16 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Feb 16 23:08:29 UTC 2011

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

Log Message:
Add verbose mode for readlink.


To generate a diff of this commit:
cvs rdiff -u -r1.28 -r1.29 src/usr.bin/stat/stat.1
cvs rdiff -u -r1.33 -r1.34 src/usr.bin/stat/stat.c

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

Modified files:

Index: src/usr.bin/stat/stat.1
diff -u src/usr.bin/stat/stat.1:1.28 src/usr.bin/stat/stat.1:1.29
--- src/usr.bin/stat/stat.1:1.28	Mon Apr  5 17:25:01 2010
+++ src/usr.bin/stat/stat.1	Wed Feb 16 18:08:29 2011
@@ -1,4 +1,4 @@
-.\	$NetBSD: stat.1,v 1.28 2010/04/05 21:25:01 joerg Exp $
+.\	$NetBSD: stat.1,v 1.29 2011/02/16 23:08:29 christos Exp $
 .\
 .\ Copyright (c) 2002-2005 The NetBSD Foundation, Inc.
 .\ All rights reserved.
@@ -27,7 +27,7 @@
 .\ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 .\ POSSIBILITY OF SUCH DAMAGE.
 .\
-.Dd November 7, 2008
+.Dd February 16, 2011
 .Dt STAT 1
 .Os
 .Sh NAME
@@ -47,7 +47,7 @@
 .Op Fl t Ar timefmt
 .Op Ar
 .Nm readlink
-.Op Fl fn
+.Op Fl fnqsv
 .Op Ar
 .Sh DESCRIPTION
 The
@@ -165,11 +165,16 @@
 Display information in
 .Dq shell output ,
 suitable for initializing variables.
+When run as
+.Nm readlink ,
+suppress error messages.
 .It Fl t Ar timefmt
 Display timestamps using the specified format.
 This format is
 passed directly to
 .Xr strftime 3 .
+.It Fl v
+Turn off quiet mode.
 .It Fl x
 Display information in a more verbose way as known from some Linux
 distributions.

Index: src/usr.bin/stat/stat.c
diff -u src/usr.bin/stat/stat.c:1.33 src/usr.bin/stat/stat.c:1.34
--- src/usr.bin/stat/stat.c:1.33	Sat Jan 15 17:54:10 2011
+++ src/usr.bin/stat/stat.c	Wed Feb 16 18:08:29 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: stat.c,v 1.33 2011/01/15 22:54:10 njoly Exp $ */
+/*	$NetBSD: stat.c,v 1.34 2011/02/16 23:08:29 christos Exp $ */
 
 /*
  * Copyright (c) 2002 The NetBSD Foundation, Inc.
@@ -35,7 +35,7 @@
 
 #include sys/cdefs.h
 #if !defined(lint)
-__RCSID($NetBSD: stat.c,v 1.33 2011/01/15 22:54:10 njoly Exp $);
+__RCSID($NetBSD: stat.c,v 1.34 2011/02/16 23:08:29 christos Exp $);
 #endif
 
 #if ! HAVE_NBTOOL_CONFIG_H
@@ -176,13 +176,13 @@
 
 void	usage(const char *);
 void	output(const struct stat *, const char *,
-	const char *, int, int);
+	const char *, int, int, int);
 int	format1(const struct stat *,	/* stat info */
 	const char *,		/* the file name */
 	const char *, int,		/* the format string itself */
 	char *, size_t,		/* a place to put the output */
 	int, int, int, int,		/* the parsed format */
-	int, int);
+	int, int, int);
 
 const char *timefmt;
 int linkfail;
@@ -211,10 +211,12 @@
 	statfmt = NULL;
 	timefmt = NULL;
 
+	setprogname(argv[0]);
+
 	if (strcmp(getprogname(), readlink) == 0) {
 		am_readlink = 1;
-		options = fn;
-		synopsis = [-fn] [file ...];
+		options = fnqsv;
+		synopsis = [-fnqsv] [file ...];
 		statfmt = %Y;
 		fmtchar = 'f';
 		quiet = 1;
@@ -247,6 +249,11 @@
 		case 'l':
 		case 'r':
 		case 's':
+			if (am_readlink) {
+quiet = 1;
+break;
+			}
+			/*FALLTHROUGH*/
 		case 'x':
 			if (fmtchar != 0)
 errx(1, can't use format '%c' with '%c',
@@ -256,6 +263,9 @@
 		case 't':
 			timefmt = optarg;
 			break;
+		case 'v':
+			quiet = 0;
+			break;
 		default:
 			usage(synopsis);
 		}
@@ -329,7 +339,7 @@
 usestat ? stat : lstat);
 		}
 		else
-			output(st, argv[0], statfmt, fn, nonl);
+			output(st, argv[0], statfmt, fn, nonl, quiet);
 
 		argv++;
 		argc--;
@@ -352,7 +362,7 @@
  */
 void
 output(const struct stat *st, const char *file,
-const char *statfmt, int fn, int nonl)
+const char *statfmt, int fn, int nonl, int quiet)
 {
 	int flags, size, prec, ofmt, hilo, what;
 	char buf[PATH_MAX + 4 + 1];
@@ -523,7 +533,7 @@
 		 file,
 		 subfmt, statfmt - subfmt,
 		 buf, sizeof(buf),
-		 flags, size, prec, ofmt, hilo, what);
+		 flags, size, prec, ofmt, hilo, what, quiet);
 
 		for (i = 0; i  t  i  (int)(sizeof(buf) - 1); i++)
 			addchar(stdout, buf[i], nl);
@@ -549,7 +559,7 @@
 const char *fmt, int flen,
 char *buf, size_t blen,
 int flags, int size, int prec, int ofmt,
-int hilo, int what)
+int hilo, int what, int quiet)
 {
 	u_int64_t data;
 	char *stmp, lfmt[24], tmp[20];
@@ -797,6 +807,8 @@
 		} else {
 			snprintf(path, sizeof(path),  - );
 			if (realpath(file, path + 4) == NULL) {
+if (!quiet)
+	warn(realpath `%s', file);
 linkfail = 1;
 l = 0;
 path[0] = '\0';
@@ -815,6 +827,8 @@
 			snprintf(path, sizeof(path),  - );
 			l = readlink(file, path + 4, sizeof(path) - 4 - 1);
 			if (l == -1) {
+if (!quiet)
+	warn(readlink `%s', file);
 linkfail = 1;
 l = 0;
 path[0] = '\0';
@@ -933,13 +947,13 @@
 			fmt, flen,
 			majdev, sizeof(majdev),
 			flags, size, prec,
-			ofmt, HIGH_PIECE, SHOW_st_rdev);
+			

CVS commit: src/sys/sys

2011-02-16 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Feb 16 23:22:30 UTC 2011

Modified Files:
src/sys/sys: exec_elf.h

Log Message:
add the rest of the gnu specific pt sections.


To generate a diff of this commit:
cvs rdiff -u -r1.108 -r1.109 src/sys/sys/exec_elf.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/sys/exec_elf.h
diff -u src/sys/sys/exec_elf.h:1.108 src/sys/sys/exec_elf.h:1.109
--- src/sys/sys/exec_elf.h:1.108	Fri Dec 24 07:41:43 2010
+++ src/sys/sys/exec_elf.h	Wed Feb 16 18:22:30 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: exec_elf.h,v 1.108 2010/12/24 12:41:43 skrll Exp $	*/
+/*	$NetBSD: exec_elf.h,v 1.109 2011/02/16 23:22:30 christos Exp $	*/
 
 /*-
  * Copyright (c) 1994 The NetBSD Foundation, Inc.
@@ -344,7 +344,12 @@
 #define	PT_NUM		8
 
 #define	PT_LOOS 0x6000	/* OS-specific range */
-#define	PT_GNU_EH_FRAME	0x6474e550	/* GNU-specific EH frame segment */
+
+/* GNU-specific */
+#define	PT_GNU_EH_FRAME	0x6474e550	/* EH frame segment */
+#define	PT_GNU_STACK	0x6474e551	/* Indicate executable stack */
+#define	PT_GNU_RELRO	0x6474e552  /* Make read-only after relocation */
+
 #define	PT_HIOS 0x6fff
 #define	PT_LOPROC	0x7000	/* Processor-specific range */
 #define	PT_HIPROC	0x7fff



CVS commit: src/sys/arch/sgimips/hpc

2011-02-16 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Wed Feb 16 23:44:20 UTC 2011

Modified Files:
src/sys/arch/sgimips/hpc: panel.c pi1ppc.c

Log Message:
validate cf_name in driver match method


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/sys/arch/sgimips/hpc/panel.c
cvs rdiff -u -r1.8 -r1.9 src/sys/arch/sgimips/hpc/pi1ppc.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/sgimips/hpc/panel.c
diff -u src/sys/arch/sgimips/hpc/panel.c:1.1 src/sys/arch/sgimips/hpc/panel.c:1.2
--- src/sys/arch/sgimips/hpc/panel.c:1.1	Thu May 14 01:10:19 2009
+++ src/sys/arch/sgimips/hpc/panel.c	Wed Feb 16 23:44:19 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: panel.c,v 1.1 2009/05/14 01:10:19 macallan Exp $ */
+/*	$NetBSD: panel.c,v 1.2 2011/02/16 23:44:19 jmcneill Exp $ */
 
 /*-
  * Copyright (c) 2009 Michael Lorenz
@@ -27,7 +27,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: panel.c,v 1.1 2009/05/14 01:10:19 macallan Exp $);
+__KERNEL_RCSID(0, $NetBSD: panel.c,v 1.2 2011/02/16 23:44:19 jmcneill Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -71,6 +71,11 @@
 static int
 panel_match(device_t parent, cfdata_t match, void *aux)
 {
+	struct hpc_attach_args *ha = aux;
+
+	if (strcmp(ha-ha_name, match-cf_name) != 0)
+		return 0;
+
 	if (mach_type == MACH_SGI_IP22)
 		return 1;
 

Index: src/sys/arch/sgimips/hpc/pi1ppc.c
diff -u src/sys/arch/sgimips/hpc/pi1ppc.c:1.8 src/sys/arch/sgimips/hpc/pi1ppc.c:1.9
--- src/sys/arch/sgimips/hpc/pi1ppc.c:1.8	Tue Jan 25 12:21:04 2011
+++ src/sys/arch/sgimips/hpc/pi1ppc.c	Wed Feb 16 23:44:20 2011
@@ -1,4 +1,4 @@
-/* $NetBSD: pi1ppc.c,v 1.8 2011/01/25 12:21:04 tsutsui Exp $ */
+/* $NetBSD: pi1ppc.c,v 1.9 2011/02/16 23:44:20 jmcneill Exp $ */
 
 /*
  * Copyright (c) 2001 Alcove - Nicolas Souchu
@@ -33,7 +33,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: pi1ppc.c,v 1.8 2011/01/25 12:21:04 tsutsui Exp $);
+__KERNEL_RCSID(0, $NetBSD: pi1ppc.c,v 1.9 2011/02/16 23:44:20 jmcneill Exp $);
 
 #include opt_pi1ppc.h
 
@@ -162,6 +162,11 @@
 static int
 pi1ppc_match(device_t parent, cfdata_t match, void *aux)
 {
+	struct hpc_attach_args *ha = aux;
+
+	if (strcmp(ha-ha_name, match-cf_name) != 0)
+		return 0;
+
 	if (mach_type == MACH_SGI_IP22)
 		return 1;
 



CVS commit: src/lib/librumpclient

2011-02-16 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Wed Feb 16 23:45:40 UTC 2011

Modified Files:
src/lib/librumpclient: Makefile
Added Files:
src/lib/librumpclient: rumpclient.3

Log Message:
add some excuse of a manpage for librumpclient


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/lib/librumpclient/Makefile
cvs rdiff -u -r0 -r1.1 src/lib/librumpclient/rumpclient.3

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

Modified files:

Index: src/lib/librumpclient/Makefile
diff -u src/lib/librumpclient/Makefile:1.2 src/lib/librumpclient/Makefile:1.3
--- src/lib/librumpclient/Makefile:1.2	Tue Nov 23 12:41:47 2010
+++ src/lib/librumpclient/Makefile	Wed Feb 16 23:45:40 2011
@@ -1,10 +1,11 @@
-#	$NetBSD: Makefile,v 1.2 2010/11/23 12:41:47 pooka Exp $
+#	$NetBSD: Makefile,v 1.3 2011/02/16 23:45:40 pooka Exp $
 #
 
 .PATH:	${.CURDIR}/../../sys/rump/librump/rumpkern
 
 LIB=		rumpclient
 USE_SHLIBDIR=	yes
+MAN=		rumpclient.3
 
 .include bsd.own.mk
 

Added files:

Index: src/lib/librumpclient/rumpclient.3
diff -u /dev/null src/lib/librumpclient/rumpclient.3:1.1
--- /dev/null	Wed Feb 16 23:45:40 2011
+++ src/lib/librumpclient/rumpclient.3	Wed Feb 16 23:45:40 2011
@@ -0,0 +1,202 @@
+.\ $NetBSD: rumpclient.3,v 1.1 2011/02/16 23:45:40 pooka Exp $
+.\
+.\ Copyright (c) 2011 Antti Kantee.  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 AUTHOR 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 AUTHOR OR CONTRIBUTORS BE LIABLE
+.\ FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\ OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\ HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\ LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\ OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\ SUCH DAMAGE.
+.\
+.Dd February 16, 2011
+.Dt RUMPCLIENT 3
+.Os
+.Sh NAME
+.Nm rumpclient
+.Nd rump client library
+.Sh LIBRARY
+.Lb rumpclient (librumpclient, \-lrumpclient)
+.Sh SYNOPSIS
+.In rump/rumpclient.h
+.In rump/rump_syscalls.h
+.Ft int
+.Fn rumpclient_init
+.Ft pid_t
+.Fn rumpclient_fork
+.Ft pid_t
+.Fn rumpclient_vfork
+.Ft struct rumpclient_fork *
+.Fn rumpclient_prefork
+.Ft int
+.Fn rumpclient_fork_init struct rumpclient_fork *rfp
+.Ft void
+.Fn rumpclient_fork_cancel struct rumpclient_fork *rfp
+.Ft int
+.Fn rumpclient_exec const char *path char *const argv[] char *const envp[]
+.Ft int
+.Fn rumpclient_daemon int nochdir int noclose
+.Ft void
+.Fn rumpclient_setconnretry time_t retrytime
+.Ft int
+.Fo rumpclient_syscall
+.Fa int num const void *sysarg size_t argsize register_t *retval
+.Fc
+.Sh DESCRIPTION
+.Nm
+is the clientside implementation of the
+.Xr rump_sp 7
+facility.
+It can be used to connect to a rump kernel server and make system call
+style requests.
+.Pp
+Every connection to a rump kernel server creates a new process
+context in the rump kernel.
+By default a process is inherited from init, but through existing
+connections and the forking facility offered by
+.Nm
+it is possible to form process trees.
+.Bl -tag -width 
+.It Fn rumpclient_init
+Initialize
+.Nm .
+The server address is determined from the environment variable
+.Dv RUMP_SERVER
+according to syntax described in
+.Xr rump_sp 7 .
+The new process is registered to the rump kernel with the command
+name from
+.Xr getprogname 3 .
+.It Fn rumpclient_fork
+Fork a rump client process.
+This also causes a host process fork via
+.Xr fork 2 .
+The child will have a copy of the parent's rump kernel file descriptors.
+.It Fn rumpclient_vfork
+Like above, but the host uses
+.Xr vfork 2 .
+.It Fn rumpclient_prefork
+Low-level routine which instructs the rump kernel that the current
+process is planning to fork.
+The routine returns a non-NULL cookie if succesful.
+.It Fn rumpclient_fork_init rfp
+Low-level routine which works like
+.Fn rumpclient_init ,
+with the exception that it uses the
+.Ar rfp
+context created by a call to
+.Xr rumpclient_prefork .
+This is typically called from the child of a
+.Xr fork 2
+call.
+.It Fn rumpclient_fork_cancel rfp

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

2011-02-16 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Wed Feb 16 23:48:52 UTC 2011

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

Log Message:
rumpclient manpage


To generate a diff of this commit:
cvs rdiff -u -r1.1587 -r1.1588 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/comp/mi
diff -u src/distrib/sets/lists/comp/mi:1.1587 src/distrib/sets/lists/comp/mi:1.1588
--- src/distrib/sets/lists/comp/mi:1.1587	Sat Feb 12 22:25:59 2011
+++ src/distrib/sets/lists/comp/mi	Wed Feb 16 23:48:51 2011
@@ -1,4 +1,4 @@
-#	$NetBSD: mi,v 1.1587 2011/02/12 22:25:59 matt Exp $
+#	$NetBSD: mi,v 1.1588 2011/02/16 23:48:51 pooka Exp $
 #
 # Note: don't delete entries from here - mark them as obsolete instead.
 #
@@ -8084,6 +8084,7 @@
 ./usr/share/man/cat3/rresvport_af.0		comp-c-catman		.cat
 ./usr/share/man/cat3/rsa.0			comp-obsolete		obsolete
 ./usr/share/man/cat3/rump.0			comp-c-catman		.cat
+./usr/share/man/cat3/rumpclient.0			comp-c-catman		.cat
 ./usr/share/man/cat3/rumphijack.0			comp-c-catman		.cat
 ./usr/share/man/cat3/rump_etfs.0			comp-c-catman		.cat
 ./usr/share/man/cat3/rump_lwproc.0			comp-c-catman		.cat
@@ -14092,6 +14093,7 @@
 ./usr/share/man/html3/rresvport.html		comp-c-htmlman		html
 ./usr/share/man/html3/rresvport_af.html		comp-c-htmlman		html
 ./usr/share/man/html3/rump.html			comp-c-htmlman		html
+./usr/share/man/html3/rumpclient.html			comp-c-htmlman		html
 ./usr/share/man/html3/rumphijack.html			comp-c-htmlman		html
 ./usr/share/man/html3/rump_etfs.html			comp-c-htmlman		html
 ./usr/share/man/html3/rump_lwproc.html			comp-c-htmlman		html
@@ -20106,6 +20108,7 @@
 ./usr/share/man/man3/rresvport_af.3		comp-c-man		.man
 ./usr/share/man/man3/rsa.3			comp-obsolete		obsolete
 ./usr/share/man/man3/rump.3			comp-c-man		.man
+./usr/share/man/man3/rumpclient.3			comp-c-man		.man
 ./usr/share/man/man3/rumphijack.3			comp-c-man		.man
 ./usr/share/man/man3/rump_etfs.3			comp-c-man		.man
 ./usr/share/man/man3/rump_lwproc.3			comp-c-man		.man



CVS commit: src/lib/librump

2011-02-16 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Wed Feb 16 23:51:51 UTC 2011

Modified Files:
src/lib/librump: rump.3 rump_sp.7

Log Message:
sprinkle a few references (just a diet sprinkling really)


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/lib/librump/rump.3
cvs rdiff -u -r1.4 -r1.5 src/lib/librump/rump_sp.7

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

Modified files:

Index: src/lib/librump/rump.3
diff -u src/lib/librump/rump.3:1.6 src/lib/librump/rump.3:1.7
--- src/lib/librump/rump.3:1.6	Thu Dec 16 12:39:39 2010
+++ src/lib/librump/rump.3	Wed Feb 16 23:51:50 2011
@@ -1,4 +1,4 @@
-.\ $NetBSD: rump.3,v 1.6 2010/12/16 12:39:39 pooka Exp $
+.\ $NetBSD: rump.3,v 1.7 2011/02/16 23:51:50 pooka Exp $
 .\
 .\ Copyright (c) 2008-2010 Antti Kantee.  All rights reserved.
 .\
@@ -151,8 +151,10 @@
 .Xr p2k 3 ,
 .Xr rump_etfs 3 ,
 .Xr rump_lwproc 3 ,
+.Xr rumpclient 3 ,
 .Xr rumpuser 3 ,
-.Xr ukfs 3
+.Xr ukfs 3 ,
+.Xr rump_sp 7
 .Rs
 .%A Antti Kantee
 .%D March 2009

Index: src/lib/librump/rump_sp.7
diff -u src/lib/librump/rump_sp.7:1.4 src/lib/librump/rump_sp.7:1.5
--- src/lib/librump/rump_sp.7:1.4	Mon Feb  7 22:04:36 2011
+++ src/lib/librump/rump_sp.7	Wed Feb 16 23:51:50 2011
@@ -1,4 +1,4 @@
-.\ $NetBSD: rump_sp.7,v 1.4 2011/02/07 22:04:36 pooka Exp $
+.\ $NetBSD: rump_sp.7,v 1.5 2011/02/16 23:51:50 pooka Exp $
 .\
 .\ Copyright (c) 2010 Antti Kantee.  All rights reserved.
 .\
@@ -98,7 +98,8 @@
 .Ed
 .Sh SEE ALSO
 .Xr rump_server 1 ,
-.Xr rump 3
+.Xr rump 3 ,
+.Xr rumpclient 3
 .Sh HISTORY
 .Nm
 first appeared in



CVS commit: src/usr.sbin/acpitools/acpidump

2011-02-16 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Thu Feb 17 02:55:16 UTC 2011

Modified Files:
src/usr.sbin/acpitools/acpidump: acpi.c acpidump.c acpidump.h

Log Message:
dump bytes for tables that acpidump doesn't decode, and print them
as characters instead of hex if '-c' flag is provided


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/usr.sbin/acpitools/acpidump/acpi.c
cvs rdiff -u -r1.2 -r1.3 src/usr.sbin/acpitools/acpidump/acpidump.c \
src/usr.sbin/acpitools/acpidump/acpidump.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/acpitools/acpidump/acpi.c
diff -u src/usr.sbin/acpitools/acpidump/acpi.c:1.6 src/usr.sbin/acpitools/acpidump/acpi.c:1.7
--- src/usr.sbin/acpitools/acpidump/acpi.c:1.6	Sun Dec 19 16:25:16 2010
+++ src/usr.sbin/acpitools/acpidump/acpi.c	Thu Feb 17 02:55:16 2011
@@ -1,4 +1,4 @@
-/* $NetBSD: acpi.c,v 1.6 2010/12/19 16:25:16 jruoho Exp $ */
+/* $NetBSD: acpi.c,v 1.7 2011/02/17 02:55:16 jmcneill Exp $ */
 
 /*-
  * Copyright (c) 1998 Doug Rabson
@@ -30,7 +30,7 @@
  */
 
 #include sys/cdefs.h
-__RCSID($NetBSD: acpi.c,v 1.6 2010/12/19 16:25:16 jruoho Exp $);
+__RCSID($NetBSD: acpi.c,v 1.7 2011/02/17 02:55:16 jmcneill Exp $);
 
 #include sys/param.h
 #include sys/endian.h
@@ -103,6 +103,7 @@
 static void	acpi_handle_wdat(ACPI_TABLE_HEADER *sdp);
 static void	acpi_handle_wdrt(ACPI_TABLE_HEADER *sdp);
 static void	acpi_print_sdt(ACPI_TABLE_HEADER *sdp);
+static void	acpi_dump_bytes(ACPI_TABLE_HEADER *sdp);
 static void	acpi_print_fadt(ACPI_TABLE_HEADER *sdp);
 static void	acpi_print_facs(ACPI_TABLE_FACS *facs);
 static void	acpi_print_dsdt(ACPI_TABLE_HEADER *dsdp);
@@ -1896,6 +1897,32 @@
 }
 
 static void
+acpi_dump_bytes(ACPI_TABLE_HEADER *sdp)
+{
+	unsigned int i;
+	uint8_t *p;
+
+	p = (uint8_t *)sdp + sizeof(*sdp);
+	printf(\n\tData={);
+	for (i = 0; i  sdp-Length; i++) {
+		if (cflag) {
+			if (i % 64 == 0)
+printf(\n\t );
+			else if (i % 16 == 0)
+printf( );
+			printf(%c, (p[i] = ' '  p[i] = '~') ? p[i] : '.');
+		} else {
+			if (i % 16 == 0)
+printf(\n\t\t);
+			else if (i % 8 == 0)
+printf(   );
+			printf( %02x, p[i]);
+		}
+	}
+	printf(\n\t}\n);
+}
+
+static void
 acpi_print_rsdt(ACPI_TABLE_HEADER *rsdp)
 {
 	ACPI_TABLE_RSDT *rsdt;
@@ -2241,6 +2268,7 @@
 		else {
 			printf(BEGIN_COMMENT);
 			acpi_print_sdt(sdp);
+			acpi_dump_bytes(sdp);
 			printf(END_COMMENT);
 		}
 	}

Index: src/usr.sbin/acpitools/acpidump/acpidump.c
diff -u src/usr.sbin/acpitools/acpidump/acpidump.c:1.2 src/usr.sbin/acpitools/acpidump/acpidump.c:1.3
--- src/usr.sbin/acpitools/acpidump/acpidump.c:1.2	Tue Dec 22 08:44:03 2009
+++ src/usr.sbin/acpitools/acpidump/acpidump.c	Thu Feb 17 02:55:16 2011
@@ -1,4 +1,4 @@
-/* $NetBSD: acpidump.c,v 1.2 2009/12/22 08:44:03 cegger Exp $ */
+/* $NetBSD: acpidump.c,v 1.3 2011/02/17 02:55:16 jmcneill Exp $ */
 
 /*-
  * Copyright (c) 2000 Mitsuru IWASAKI iwas...@freebsd.org
@@ -29,7 +29,7 @@
  */
 
 #include sys/cdefs.h
-__RCSID($NetBSD: acpidump.c,v 1.2 2009/12/22 08:44:03 cegger Exp $);
+__RCSID($NetBSD: acpidump.c,v 1.3 2011/02/17 02:55:16 jmcneill Exp $);
 
 
 #include sys/param.h
@@ -45,13 +45,14 @@
 int	dflag;	/* Disassemble AML using iasl(8) */
 int	tflag;	/* Dump contents of SDT tables */
 int	vflag;	/* Use verbose messages */
+int	cflag;	/* Dump unknown table data as characters */
 
 static void
 usage(void)
 {
 	const char *progname = getprogname();
 
-	fprintf(stderr, usage: %s [-d] [-t] [-h] [-v] [-f dsdt_input] 
+	fprintf(stderr, usage: %s [-c] [-d] [-t] [-h] [-v] [-f dsdt_input] 
 			[-o dsdt_output]\n, progname);
 	fprintf(stderr, To send ASL:\n\t%s -dt | gzip -c9  foo.asl.gz\n,
 	progname);
@@ -70,8 +71,11 @@
 	if (argc  2)
 		usage();
 
-	while ((c = getopt(argc, argv, dhtvf:o:)) != -1) {
+	while ((c = getopt(argc, argv, cdhtvf:o:)) != -1) {
 		switch (c) {
+		case 'c':
+			cflag = 1;
+			break;
 		case 'd':
 			dflag = 1;
 			break;
Index: src/usr.sbin/acpitools/acpidump/acpidump.h
diff -u src/usr.sbin/acpitools/acpidump/acpidump.h:1.2 src/usr.sbin/acpitools/acpidump/acpidump.h:1.3
--- src/usr.sbin/acpitools/acpidump/acpidump.h:1.2	Tue Dec 22 08:44:03 2009
+++ src/usr.sbin/acpitools/acpidump/acpidump.h	Thu Feb 17 02:55:16 2011
@@ -1,4 +1,4 @@
-/* $NetBSD: acpidump.h,v 1.2 2009/12/22 08:44:03 cegger Exp $ */
+/* $NetBSD: acpidump.h,v 1.3 2011/02/17 02:55:16 jmcneill Exp $ */
 
 /*-
  * Copyright (c) 1999 Doug Rabson
@@ -81,6 +81,7 @@
 int	 acpi_checksum(void *, size_t);
 
 /* Command line flags */
+extern int	cflag;
 extern int	dflag;
 extern int	tflag;
 extern int	vflag;



CVS commit: src/sys/external/bsd/acpica/dist

2011-02-16 Thread Jukka Ruohonen
Module Name:src
Committed By:   jruoho
Date:   Thu Feb 17 07:17:15 UTC 2011

Update of /cvsroot/src/sys/external/bsd/acpica/dist
In directory ivanova.netbsd.org:/tmp/cvs-serv17684

Log Message:
Reimport ACPICA 20100528 to a new location.


Status:

Vendor Tag: intel
Release Tags:   acpica-20100528

N src/sys/external/bsd/acpica/dist/changes.txt
N src/sys/external/bsd/acpica/dist/osunixxf.c
N src/sys/external/bsd/acpica/dist/README
N src/sys/external/bsd/acpica/dist/common/adisasm.c
N src/sys/external/bsd/acpica/dist/common/adfile.c
N src/sys/external/bsd/acpica/dist/common/dmextern.c
N src/sys/external/bsd/acpica/dist/common/adwalk.c
N src/sys/external/bsd/acpica/dist/common/dmrestag.c
N src/sys/external/bsd/acpica/dist/common/dmtable.c
N src/sys/external/bsd/acpica/dist/common/dmtbdump.c
N src/sys/external/bsd/acpica/dist/common/dmtbinfo.c
N src/sys/external/bsd/acpica/dist/common/getopt.c
N src/sys/external/bsd/acpica/dist/compiler/aslcompiler.h
N src/sys/external/bsd/acpica/dist/compiler/aslanalyze.c
N src/sys/external/bsd/acpica/dist/compiler/aslcodegen.c
N src/sys/external/bsd/acpica/dist/compiler/aslcompile.c
N src/sys/external/bsd/acpica/dist/compiler/aslcompiler.l
N src/sys/external/bsd/acpica/dist/compiler/aslcompiler.y
N src/sys/external/bsd/acpica/dist/compiler/asldefine.h
N src/sys/external/bsd/acpica/dist/compiler/aslerror.c
N src/sys/external/bsd/acpica/dist/compiler/aslfiles.c
N src/sys/external/bsd/acpica/dist/compiler/aslfold.c
N src/sys/external/bsd/acpica/dist/compiler/aslglobal.h
N src/sys/external/bsd/acpica/dist/compiler/asllength.c
N src/sys/external/bsd/acpica/dist/compiler/asllisting.c
N src/sys/external/bsd/acpica/dist/compiler/aslload.c
N src/sys/external/bsd/acpica/dist/compiler/asllookup.c
N src/sys/external/bsd/acpica/dist/compiler/aslmain.c
N src/sys/external/bsd/acpica/dist/compiler/aslmap.c
N src/sys/external/bsd/acpica/dist/compiler/aslopcodes.c
N src/sys/external/bsd/acpica/dist/compiler/asloperands.c
N src/sys/external/bsd/acpica/dist/compiler/aslopt.c
N src/sys/external/bsd/acpica/dist/compiler/aslpredef.c
N src/sys/external/bsd/acpica/dist/compiler/aslstubs.c
N src/sys/external/bsd/acpica/dist/compiler/aslresource.c
N src/sys/external/bsd/acpica/dist/compiler/aslrestype1.c
N src/sys/external/bsd/acpica/dist/compiler/aslrestype1i.c
N src/sys/external/bsd/acpica/dist/compiler/aslrestype2.c
N src/sys/external/bsd/acpica/dist/compiler/aslrestype2d.c
N src/sys/external/bsd/acpica/dist/compiler/aslrestype2e.c
N src/sys/external/bsd/acpica/dist/compiler/aslrestype2q.c
N src/sys/external/bsd/acpica/dist/compiler/aslrestype2w.c
N src/sys/external/bsd/acpica/dist/compiler/aslstartup.c
N src/sys/external/bsd/acpica/dist/compiler/asltransform.c
N src/sys/external/bsd/acpica/dist/compiler/asltree.c
N src/sys/external/bsd/acpica/dist/compiler/asltypes.h
N src/sys/external/bsd/acpica/dist/compiler/aslutils.c
N src/sys/external/bsd/acpica/dist/compiler/dtcompile.c
N src/sys/external/bsd/acpica/dist/compiler/dtcompiler.h
N src/sys/external/bsd/acpica/dist/compiler/dtfield.c
N src/sys/external/bsd/acpica/dist/compiler/dtio.c
N src/sys/external/bsd/acpica/dist/compiler/dtsubtable.c
N src/sys/external/bsd/acpica/dist/compiler/dttable.c
N src/sys/external/bsd/acpica/dist/compiler/dtutils.c
N src/sys/external/bsd/acpica/dist/compiler/Makefile
N src/sys/external/bsd/acpica/dist/compiler/readme.txt
N src/sys/external/bsd/acpica/dist/debugger/dbdisply.c
N src/sys/external/bsd/acpica/dist/debugger/dbcmds.c
N src/sys/external/bsd/acpica/dist/debugger/dbfileio.c
N src/sys/external/bsd/acpica/dist/debugger/dbexec.c
N src/sys/external/bsd/acpica/dist/debugger/dbhistry.c
N src/sys/external/bsd/acpica/dist/debugger/dbinput.c
N src/sys/external/bsd/acpica/dist/debugger/dbstats.c
N src/sys/external/bsd/acpica/dist/debugger/dbutils.c
N src/sys/external/bsd/acpica/dist/debugger/dbxface.c
N src/sys/external/bsd/acpica/dist/disassembler/dmbuffer.c
N src/sys/external/bsd/acpica/dist/disassembler/dmnames.c
N src/sys/external/bsd/acpica/dist/disassembler/dmobject.c
N src/sys/external/bsd/acpica/dist/disassembler/dmopcode.c
N src/sys/external/bsd/acpica/dist/disassembler/dmresrc.c
N src/sys/external/bsd/acpica/dist/disassembler/dmresrcl.c
N src/sys/external/bsd/acpica/dist/disassembler/dmresrcs.c
N src/sys/external/bsd/acpica/dist/disassembler/dmutils.c
N src/sys/external/bsd/acpica/dist/disassembler/dmwalk.c
N src/sys/external/bsd/acpica/dist/dispatcher/dsfield.c
N src/sys/external/bsd/acpica/dist/dispatcher/dsinit.c
N src/sys/external/bsd/acpica/dist/dispatcher/dsmethod.c
N src/sys/external/bsd/acpica/dist/dispatcher/dsmthdat.c
N src/sys/external/bsd/acpica/dist/dispatcher/dsobject.c
N src/sys/external/bsd/acpica/dist/dispatcher/dsopcode.c
N src/sys/external/bsd/acpica/dist/dispatcher/dsutils.c
N src/sys/external/bsd/acpica/dist/dispatcher/dswexec.c
N src/sys/external/bsd/acpica/dist/dispatcher/dswload.c
N src/sys/external/bsd/acpica/dist/dispatcher/dswscope.c
N 

CVS commit: src/sys/external/bsd/acpica/conf

2011-02-16 Thread Jukka Ruohonen
Module Name:src
Committed By:   jruoho
Date:   Thu Feb 17 07:27:17 UTC 2011

Added Files:
src/sys/external/bsd/acpica/conf: files.acpica

Log Message:
Add the build glue.


To generate a diff of this commit:
cvs rdiff -u -r0 -r1.1 src/sys/external/bsd/acpica/conf/files.acpica

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

Added files:

Index: src/sys/external/bsd/acpica/conf/files.acpica
diff -u /dev/null src/sys/external/bsd/acpica/conf/files.acpica:1.1
--- /dev/null	Thu Feb 17 07:27:17 2011
+++ src/sys/external/bsd/acpica/conf/files.acpica	Thu Feb 17 07:27:17 2011
@@ -0,0 +1,162 @@
+# $NetBSD: files.acpica,v 1.1 2011/02/17 07:27:17 jruoho Exp $
+
+define		acpica
+makeoptions	acpi	CPPFLAGS+=-I$S/external/bsd/acpica/dist/include
+
+# debugger/
+file	external/bsd/acpica/dist/debugger/dbcmds.c		acpica  acpi_debug  ddb
+file	external/bsd/acpica/dist/debugger/dbdisply.c		acpica  acpi_debug  ddb
+file	external/bsd/acpica/dist/debugger/dbexec.c		acpica  acpi_debug  ddb
+file	external/bsd/acpica/dist/debugger/dbfileio.c		acpica  acpi_debug  ddb
+file	external/bsd/acpica/dist/debugger/dbhistry.c		acpica  acpi_debug  ddb
+file	external/bsd/acpica/dist/debugger/dbinput.c		acpica  acpi_debug  ddb
+file	external/bsd/acpica/dist/debugger/dbstats.c		acpica  acpi_debug  ddb
+file	external/bsd/acpica/dist/debugger/dbutils.c		acpica  acpi_debug  ddb
+file	external/bsd/acpica/dist/debugger/dbxface.c		acpica  acpi_debug  ddb
+
+# disassembler/
+file	external/bsd/acpica/dist/disassembler/dmbuffer.c	acpica  acpi_debug  ddb
+file	external/bsd/acpica/dist/disassembler/dmnames.c		acpica  acpi_debug  ddb
+file	external/bsd/acpica/dist/disassembler/dmobject.c	acpica  acpi_debug  ddb
+file	external/bsd/acpica/dist/disassembler/dmopcode.c	acpica  acpi_debug  ddb
+file	external/bsd/acpica/dist/disassembler/dmresrc.c		acpica  acpi_debug  ddb
+file	external/bsd/acpica/dist/disassembler/dmresrcl.c	acpica  acpi_debug  ddb
+file	external/bsd/acpica/dist/disassembler/dmresrcs.c	acpica  acpi_debug  ddb
+file	external/bsd/acpica/dist/disassembler/dmutils.c		acpica  acpi_debug  ddb
+file	external/bsd/acpica/dist/disassembler/dmwalk.c		acpica  acpi_debug  ddb
+
+# dispatcher/
+file	external/bsd/acpica/dist/dispatcher/dsfield.c		acpica
+file	external/bsd/acpica/dist/dispatcher/dsinit.c		acpica
+file	external/bsd/acpica/dist/dispatcher/dsmethod.c		acpica
+file	external/bsd/acpica/dist/dispatcher/dsmthdat.c		acpica
+file	external/bsd/acpica/dist/dispatcher/dsobject.c		acpica
+file	external/bsd/acpica/dist/dispatcher/dsopcode.c		acpica
+file	external/bsd/acpica/dist/dispatcher/dsutils.c		acpica
+file	external/bsd/acpica/dist/dispatcher/dswexec.c		acpica
+file	external/bsd/acpica/dist/dispatcher/dswload.c		acpica
+file	external/bsd/acpica/dist/dispatcher/dswscope.c		acpica
+file	external/bsd/acpica/dist/dispatcher/dswstate.c		acpica
+
+# events/
+file	external/bsd/acpica/dist/events/evevent.c		acpica
+file	external/bsd/acpica/dist/events/evgpe.c			acpica
+file	external/bsd/acpica/dist/events/evgpeblk.c		acpica
+file	external/bsd/acpica/dist/events/evgpeinit.c		acpica
+file	external/bsd/acpica/dist/events/evgpeutil.c		acpica
+file	external/bsd/acpica/dist/events/evmisc.c		acpica
+file	external/bsd/acpica/dist/events/evregion.c		acpica
+file	external/bsd/acpica/dist/events/evrgnini.c		acpica
+file	external/bsd/acpica/dist/events/evsci.c			acpica
+file	external/bsd/acpica/dist/events/evxface.c		acpica
+file	external/bsd/acpica/dist/events/evxfevnt.c		acpica
+file	external/bsd/acpica/dist/events/evxfregn.c		acpica
+
+# executer/
+file	external/bsd/acpica/dist/executer/exconfig.c		acpica
+file	external/bsd/acpica/dist/executer/exconvrt.c		acpica
+file	external/bsd/acpica/dist/executer/excreate.c		acpica
+file	external/bsd/acpica/dist/executer/exdebug.c		acpica
+file	external/bsd/acpica/dist/executer/exdump.c		acpica
+file	external/bsd/acpica/dist/executer/exfield.c		acpica
+file	external/bsd/acpica/dist/executer/exfldio.c		acpica
+file	external/bsd/acpica/dist/executer/exmisc.c		acpica
+file	external/bsd/acpica/dist/executer/exmutex.c		acpica
+file	external/bsd/acpica/dist/executer/exnames.c		acpica
+file	external/bsd/acpica/dist/executer/exoparg1.c		acpica
+file	external/bsd/acpica/dist/executer/exoparg2.c		acpica
+file	external/bsd/acpica/dist/executer/exoparg3.c		acpica
+file	external/bsd/acpica/dist/executer/exoparg6.c		acpica
+file	external/bsd/acpica/dist/executer/exprep.c		acpica
+file	external/bsd/acpica/dist/executer/exregion.c		acpica
+file	external/bsd/acpica/dist/executer/exresnte.c		acpica
+file	external/bsd/acpica/dist/executer/exresolv.c		acpica
+file	external/bsd/acpica/dist/executer/exresop.c		acpica
+file	external/bsd/acpica/dist/executer/exstore.c		acpica
+file	external/bsd/acpica/dist/executer/exstoren.c		acpica
+file	external/bsd/acpica/dist/executer/exstorob.c		acpica
+file	external/bsd/acpica/dist/executer/exsystem.c		acpica
+file	

CVS commit: src/sys/dev/acpi

2011-02-16 Thread Jukka Ruohonen
Module Name:src
Committed By:   jruoho
Date:   Thu Feb 17 07:34:43 UTC 2011

Modified Files:
src/sys/dev/acpi: acpica.h
src/sys/dev/acpi/acpica: OsdMisc.c files.acpica

Log Message:
Switch acpi(4) to use the new location of ACPICA.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/sys/dev/acpi/acpica.h
cvs rdiff -u -r1.9 -r1.10 src/sys/dev/acpi/acpica/OsdMisc.c
cvs rdiff -u -r1.14 -r1.15 src/sys/dev/acpi/acpica/files.acpica

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/acpi/acpica.h
diff -u src/sys/dev/acpi/acpica.h:1.4 src/sys/dev/acpi/acpica.h:1.5
--- src/sys/dev/acpi/acpica.h:1.4	Fri Mar  5 08:30:48 2010
+++ src/sys/dev/acpi/acpica.h	Thu Feb 17 07:34:42 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: acpica.h,v 1.4 2010/03/05 08:30:48 jruoho Exp $	*/
+/*	$NetBSD: acpica.h,v 1.5 2011/02/17 07:34:42 jruoho Exp $	*/
 
 /*
  * Copyright 2001 Wasabi Systems, Inc.
@@ -43,7 +43,7 @@
  * headers.
  */
 
-#include external/intel-public/acpica/dist/include/acpi.h
-#include external/intel-public/acpica/dist/include/accommon.h
+#include external/bsd/acpica/dist/include/acpi.h
+#include external/bsd/acpica/dist/include/accommon.h
 
 #endif	/* !_SYS_DEV_ACPI_ACPICA_H */

Index: src/sys/dev/acpi/acpica/OsdMisc.c
diff -u src/sys/dev/acpi/acpica/OsdMisc.c:1.9 src/sys/dev/acpi/acpica/OsdMisc.c:1.10
--- src/sys/dev/acpi/acpica/OsdMisc.c:1.9	Sun Apr 11 08:58:43 2010
+++ src/sys/dev/acpi/acpica/OsdMisc.c	Thu Feb 17 07:34:42 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: OsdMisc.c,v 1.9 2010/04/11 08:58:43 jruoho Exp $	*/
+/*	$NetBSD: OsdMisc.c,v 1.10 2011/02/17 07:34:42 jruoho Exp $	*/
 
 /*
  * Copyright 2001 Wasabi Systems, Inc.
@@ -42,7 +42,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: OsdMisc.c,v 1.9 2010/04/11 08:58:43 jruoho Exp $);
+__KERNEL_RCSID(0, $NetBSD: OsdMisc.c,v 1.10 2011/02/17 07:34:42 jruoho Exp $);
 
 #include opt_acpi.h
 #include opt_ddb.h
@@ -58,9 +58,6 @@
 #include dev/acpi/acpica.h
 #include dev/acpi/acpi_osd.h
 
-#include external/intel-public/acpica/dist/include/accommon.h
-#include external/intel-public/acpica/dist/include/acdebug.h
-
 #ifdef ACPI_DSDT_OVERRIDE
 #ifndef ACPI_DSDT_FILE
 #define ACPI_DSDT_FILE dsdt.hex

Index: src/sys/dev/acpi/acpica/files.acpica
diff -u src/sys/dev/acpi/acpica/files.acpica:1.14 src/sys/dev/acpi/acpica/files.acpica:1.15
--- src/sys/dev/acpi/acpica/files.acpica:1.14	Tue Aug 18 16:41:02 2009
+++ src/sys/dev/acpi/acpica/files.acpica	Thu Feb 17 07:34:42 2011
@@ -1,4 +1,4 @@
-#	$NetBSD: files.acpica,v 1.14 2009/08/18 16:41:02 jmcneill Exp $
+#	$NetBSD: files.acpica,v 1.15 2011/02/17 07:34:42 jruoho Exp $
 
 file	dev/acpi/acpica/OsdEnvironment.c	acpica	needs-flag
 file	dev/acpi/acpica/OsdHardware.c		acpica
@@ -9,4 +9,4 @@
 file	dev/acpi/acpica/OsdStream.c		acpica
 file	dev/acpi/acpica/OsdSynch.c		acpica
 
-include	external/intel-public/acpica/conf/files.acpica
+include	external/bsd/acpica/conf/files.acpica



CVS commit: src/external/bsd/acpica

2011-02-16 Thread Jukka Ruohonen
Module Name:src
Committed By:   jruoho
Date:   Thu Feb 17 07:48:17 UTC 2011

Added Files:
src/external/bsd/acpica: Makefile
src/external/bsd/acpica/bin: Makefile
src/external/bsd/acpica/bin/iasl: Makefile iasl.8

Log Message:
Add the userspace portion of ACPICA to a new location.


To generate a diff of this commit:
cvs rdiff -u -r0 -r1.1 src/external/bsd/acpica/Makefile
cvs rdiff -u -r0 -r1.1 src/external/bsd/acpica/bin/Makefile
cvs rdiff -u -r0 -r1.1 src/external/bsd/acpica/bin/iasl/Makefile \
src/external/bsd/acpica/bin/iasl/iasl.8

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

Added files:

Index: src/external/bsd/acpica/Makefile
diff -u /dev/null src/external/bsd/acpica/Makefile:1.1
--- /dev/null	Thu Feb 17 07:48:17 2011
+++ src/external/bsd/acpica/Makefile	Thu Feb 17 07:48:16 2011
@@ -0,0 +1,5 @@
+#	$NetBSD: Makefile,v 1.1 2011/02/17 07:48:16 jruoho Exp $
+
+SUBDIR=		bin
+
+.include bsd.subdir.mk

Index: src/external/bsd/acpica/bin/Makefile
diff -u /dev/null src/external/bsd/acpica/bin/Makefile:1.1
--- /dev/null	Thu Feb 17 07:48:17 2011
+++ src/external/bsd/acpica/bin/Makefile	Thu Feb 17 07:48:16 2011
@@ -0,0 +1,5 @@
+# $NetBSD: Makefile,v 1.1 2011/02/17 07:48:16 jruoho Exp $
+
+SUBDIR=		iasl
+
+.include bsd.subdir.mk

Index: src/external/bsd/acpica/bin/iasl/Makefile
diff -u /dev/null src/external/bsd/acpica/bin/iasl/Makefile:1.1
--- /dev/null	Thu Feb 17 07:48:17 2011
+++ src/external/bsd/acpica/bin/iasl/Makefile	Thu Feb 17 07:48:16 2011
@@ -0,0 +1,166 @@
+# $NetBSD: Makefile,v 1.1 2011/02/17 07:48:16 jruoho Exp $
+
+.if (${MACHINE_ARCH} == i386 || ${MACHINE_ARCH} == x86_64)
+PROG=	iasl
+.endif
+BINDIR=	/usr/bin
+MAN=	iasl.8
+WARNS=	0
+TOPDIR=	${NETBSDSRCDIR}/sys/external/bsd/acpica/dist/compiler
+
+.include bsd.own.mk
+
+CPPFLAGS+=	-I${TOPDIR}/../include -I${TOPDIR} -I.
+CPPFLAGS+=	-D_LINUX -DACPI_ASL_COMPILER -DACPI_USE_ALTERNATE_TIMEOUT
+CPPFLAGS+=	-D_USE_BERKELEY_YACC
+LDADD+=		-ll -ly -lrt -lpthread
+DPADD+=		${LIBL} ${LIBY} ${LIBRT} ${LIBPTHREAD}
+
+DPSRCS=	aslcompilerparse.c
+DPSRCS+=aslcompilerlex.c
+
+.PATH:	${TOPDIR}
+SRCS=	aslcompilerparse.c
+SRCS+=	aslcompilerlex.c
+SRCS+=	aslanalyze.c
+SRCS+=	aslcodegen.c
+SRCS+=	aslcompile.c
+SRCS+=	aslerror.c
+SRCS+=	aslfiles.c
+SRCS+=	asllength.c
+SRCS+=	asllisting.c
+SRCS+=	aslload.c
+SRCS+=	asllookup.c
+SRCS+=	aslmain.c
+SRCS+=	aslmap.c
+SRCS+=	aslopcodes.c
+SRCS+=	asloperands.c
+SRCS+=	aslpredef.c
+SRCS+=	aslresource.c
+SRCS+=	aslrestype1.c
+SRCS+=	aslrestype1i.c
+SRCS+=	aslrestype2.c
+SRCS+=	aslrestype2d.c
+SRCS+=	aslrestype2e.c
+SRCS+=	aslrestype2q.c
+SRCS+=	aslrestype2w.c
+SRCS+=	aslstartup.c
+SRCS+=	asltree.c
+SRCS+=	aslutils.c
+SRCS+=	asltransform.c
+SRCS+=	aslfold.c
+SRCS+=	aslstubs.c
+SRCS+=	aslopt.c
+SRCS+=	dtcompile.c
+SRCS+=	dtfield.c
+SRCS+=	dtio.c
+SRCS+=	dtsubtable.c
+SRCS+=	dttable.c
+SRCS+=	dtutils.c
+.PATH: ${TOPDIR}/../common
+SRCS+=	getopt.c
+.PATH: ${TOPDIR}/../utilities
+SRCS+=	utalloc.c
+SRCS+=	utcache.c
+SRCS+=	utcopy.c
+SRCS+=	utdebug.c
+SRCS+=	utdelete.c
+SRCS+=	utglobal.c
+SRCS+=	utinit.c
+SRCS+=	utlock.c
+SRCS+=	utobject.c
+SRCS+=	utmisc.c
+SRCS+=	utmath.c
+SRCS+=	utmutex.c
+SRCS+=	utresrc.c
+SRCS+=	utstate.c
+SRCS+=	utxface.c
+.PATH: ${TOPDIR}/../namespace
+SRCS+=	nsaccess.c
+SRCS+=	nsalloc.c
+SRCS+=	nsdump.c
+SRCS+=	nsnames.c
+SRCS+=	nsobject.c
+SRCS+=	nsparse.c
+SRCS+=	nssearch.c
+SRCS+=	nsutils.c
+SRCS+=	nswalk.c
+SRCS+=	nsxfobj.c
+.PATH: ${TOPDIR}/../parser
+SRCS+=	psargs.c
+SRCS+=	psloop.c
+SRCS+=	psopcode.c
+SRCS+=	psparse.c
+SRCS+=	psscope.c
+SRCS+=	pstree.c
+SRCS+=	psutils.c
+SRCS+=	pswalk.c
+.PATH: ${TOPDIR}/../dispatcher
+SRCS+=	dmextern.c
+SRCS+=	dswscope.c
+SRCS+=	dswstate.c
+SRCS+=	dsfield.c
+SRCS+=	dsobject.c
+SRCS+=	dsopcode.c
+SRCS+=	dsutils.c
+SRCS+=	dswexec.c
+SRCS+=	dswload.c
+.PATH: ${TOPDIR}/../executer
+SRCS+=	exconvrt.c
+SRCS+=	excreate.c
+SRCS+=	exdump.c
+SRCS+=	exmisc.c
+SRCS+=	exmutex.c
+SRCS+=	exnames.c
+SRCS+=	exoparg1.c
+SRCS+=	exoparg2.c
+SRCS+=	exoparg3.c
+SRCS+=	exoparg6.c
+SRCS+=	exprep.c
+SRCS+=	exregion.c
+SRCS+=	exresnte.c
+SRCS+=	exresolv.c
+SRCS+=	exresop.c
+SRCS+=	exstore.c
+SRCS+=	exstoren.c
+SRCS+=	exstorob.c
+SRCS+=	exsystem.c
+SRCS+=	exutils.c
+.PATH: ${TOPDIR}/../common
+SRCS+=	adfile.c
+SRCS+=	adisasm.c
+SRCS+=	adwalk.c
+SRCS+=	dmrestag.c
+SRCS+=	dmtable.c
+SRCS+=	dmtbinfo.c
+SRCS+=	dmtbdump.c
+.PATH: ${TOPDIR}/../debugger
+SRCS+=	dbfileio.c
+.PATH: ${TOPDIR}/../disassembler
+SRCS+=	dmbuffer.c
+SRCS+=	dmnames.c
+SRCS+=	dmopcode.c
+SRCS+=	dmobject.c
+SRCS+=	dmresrc.c
+SRCS+=	dmresrcl.c
+SRCS+=	dmresrcs.c
+SRCS+=	dmutils.c
+SRCS+=	dmwalk.c
+.PATH: ${TOPDIR}/../tables
+SRCS+=	tbfadt.c
+SRCS+=	tbinstal.c
+SRCS+=	tbutils.c
+SRCS+=	tbxface.c
+.PATH: ${TOPDIR}/..
+SRCS+=	osunixxf.c
+
+aslcompilerparse.c: ${TOPDIR}/aslcompiler.y
+	${YACC} -v -d -o${.TARGET} -pAslCompiler ${.ALLSRC}
+	mv -f ${.PREFIX}.h aslcompiler.y.h
+
+aslcompilerlex.c: ${TOPDIR}/aslcompiler.l
+	${LEX} -i 

CVS commit: src/external

2011-02-16 Thread Jukka Ruohonen
Module Name:src
Committed By:   jruoho
Date:   Thu Feb 17 07:52:10 UTC 2011

Modified Files:
src/external: Makefile
src/external/bsd: Makefile

Log Message:
Switch the build to use the new location of ACPICA.


To generate a diff of this commit:
cvs rdiff -u -r1.15 -r1.16 src/external/Makefile
cvs rdiff -u -r1.27 -r1.28 src/external/bsd/Makefile

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

Modified files:

Index: src/external/Makefile
diff -u src/external/Makefile:1.15 src/external/Makefile:1.16
--- src/external/Makefile:1.15	Fri Dec  3 21:38:46 2010
+++ src/external/Makefile	Thu Feb 17 07:52:10 2011
@@ -1,6 +1,6 @@
-#	$NetBSD: Makefile,v 1.15 2010/12/03 21:38:46 plunky Exp $
+#	$NetBSD: Makefile,v 1.16 2011/02/17 07:52:10 jruoho Exp $
 
 SUBDIR+= apache2 atheros bsd intel-fw-eula intel-fw-public gpl2 gpl3 historical
-SUBDIR+= ibm-public intel-public public-domain cddl mit
+SUBDIR+= ibm-public public-domain cddl mit
 
 .include bsd.subdir.mk

Index: src/external/bsd/Makefile
diff -u src/external/bsd/Makefile:1.27 src/external/bsd/Makefile:1.28
--- src/external/bsd/Makefile:1.27	Sun Feb  6 01:13:43 2011
+++ src/external/bsd/Makefile	Thu Feb 17 07:52:10 2011
@@ -1,9 +1,9 @@
-#	$NetBSD: Makefile,v 1.27 2011/02/06 01:13:43 joerg Exp $
+#	$NetBSD: Makefile,v 1.28 2011/02/17 07:52:10 jruoho Exp $
 
 .include bsd.own.mk
 
-SUBDIR+= am-utils bind cron dhcpcd fetch file flex libarchive libevent liblzf \
-	libpcap mdocml openresolv top byacc wpa ntp tcpdump
+SUBDIR+= acpica am-utils bind cron dhcpcd fetch file flex libarchive \
+	libevent liblzf libpcap mdocml openresolv top byacc wpa ntp tcpdump
 
 .if (${MKATF} != no)
 SUBDIR+= atf



CVS commit: src/external/intel-public

2011-02-16 Thread Jukka Ruohonen
Module Name:src
Committed By:   jruoho
Date:   Thu Feb 17 07:56:37 UTC 2011

Removed Files:
src/external/intel-public: Makefile
src/external/intel-public/acpica: Makefile
src/external/intel-public/acpica/bin: Makefile
src/external/intel-public/acpica/bin/iasl: Makefile iasl.8

Log Message:
Retire src/external/intel-public.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r0 src/external/intel-public/Makefile
cvs rdiff -u -r1.1 -r0 src/external/intel-public/acpica/Makefile
cvs rdiff -u -r1.1 -r0 src/external/intel-public/acpica/bin/Makefile
cvs rdiff -u -r1.6 -r0 src/external/intel-public/acpica/bin/iasl/Makefile
cvs rdiff -u -r1.1 -r0 src/external/intel-public/acpica/bin/iasl/iasl.8

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