CVS commit: src/external/bsd/iscsi/dist

2010-04-14 Thread Alistair G. Crooks
Module Name:src
Committed By:   agc
Date:   Thu Apr 15 05:27:45 UTC 2010

Modified Files:
src/external/bsd/iscsi/dist: configure configure.ac
src/external/bsd/iscsi/dist/include: config.h config.h.in

Log Message:
Regen to pick up the new version number


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/external/bsd/iscsi/dist/configure \
src/external/bsd/iscsi/dist/configure.ac
cvs rdiff -u -r1.1 -r1.2 src/external/bsd/iscsi/dist/include/config.h \
src/external/bsd/iscsi/dist/include/config.h.in

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

Modified files:

Index: src/external/bsd/iscsi/dist/configure
diff -u src/external/bsd/iscsi/dist/configure:1.2 src/external/bsd/iscsi/dist/configure:1.3
--- src/external/bsd/iscsi/dist/configure:1.2	Wed Apr 14 19:52:20 2010
+++ src/external/bsd/iscsi/dist/configure	Thu Apr 15 05:27:45 2010
@@ -1,6 +1,6 @@
 #! /bin/sh
 # Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.63 for netbsd-iscsi 20090622.
+# Generated by GNU Autoconf 2.63 for netbsd-iscsi 20100415.
 #
 # Report bugs to >.
 #
@@ -750,8 +750,8 @@
 # Identity of this package.
 PACKAGE_NAME='netbsd-iscsi'
 PACKAGE_TARNAME='netbsd-iscsi'
-PACKAGE_VERSION='20090622'
-PACKAGE_STRING='netbsd-iscsi 20090622'
+PACKAGE_VERSION='20100415'
+PACKAGE_STRING='netbsd-iscsi 20100415'
 PACKAGE_BUGREPORT='Alistair Crooks '
 
 ac_unique_file="src/lib/protocol.c"
@@ -1480,7 +1480,7 @@
   # Omit some internal or obsolete options to make the list less imposing.
   # This message is too long to be a string in the A/UX 3.1 sh.
   cat <<_ACEOF
-\`configure' configures netbsd-iscsi 20090622 to adapt to many kinds of systems.
+\`configure' configures netbsd-iscsi 20100415 to adapt to many kinds of systems.
 
 Usage: $0 [OPTION]... [VAR=VALUE]...
 
@@ -1550,7 +1550,7 @@
 
 if test -n "$ac_init_help"; then
   case $ac_init_help in
- short | recursive ) echo "Configuration of netbsd-iscsi 20090622:";;
+ short | recursive ) echo "Configuration of netbsd-iscsi 20100415:";;
esac
   cat <<\_ACEOF
 
@@ -1657,7 +1657,7 @@
 test -n "$ac_init_help" && exit $ac_status
 if $ac_init_version; then
   cat <<\_ACEOF
-netbsd-iscsi configure 20090622
+netbsd-iscsi configure 20100415
 generated by GNU Autoconf 2.63
 
 Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
@@ -1671,7 +1671,7 @@
 This file contains any messages produced by compilers while
 running configure, to aid debugging if configure makes a mistake.
 
-It was created by netbsd-iscsi $as_me 20090622, which was
+It was created by netbsd-iscsi $as_me 20100415, which was
 generated by GNU Autoconf 2.63.  Invocation command line was
 
   $ $0 $@
@@ -2556,7 +2556,7 @@
 
 # Define the identity of the package.
  PACKAGE='netbsd-iscsi'
- VERSION='20090622'
+ VERSION='20100415'
 
 
 cat >>confdefs.h <<_ACEOF
@@ -23567,7 +23567,7 @@
 # report actual input values of CONFIG_FILES etc. instead of their
 # values after options handling.
 ac_log="
-This file was extended by netbsd-iscsi $as_me 20090622, which was
+This file was extended by netbsd-iscsi $as_me 20100415, which was
 generated by GNU Autoconf 2.63.  Invocation command line was
 
   CONFIG_FILES= $CONFIG_FILES
@@ -23630,7 +23630,7 @@
 _ACEOF
 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
 ac_cs_version="\\
-netbsd-iscsi config.status 20090622
+netbsd-iscsi config.status 20100415
 configured by $0, generated by GNU Autoconf 2.63,
   with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/&/g'`\\"
 
@@ -25024,7 +25024,7 @@
 # report actual input values of CONFIG_FILES etc. instead of their
 # values after options handling.
 ac_log="
-This file was extended by netbsd-iscsi $as_me 20090622, which was
+This file was extended by netbsd-iscsi $as_me 20100415, which was
 generated by GNU Autoconf 2.63.  Invocation command line was
 
   CONFIG_FILES= $CONFIG_FILES
@@ -25087,7 +25087,7 @@
 _ACEOF
 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
 ac_cs_version="\\
-netbsd-iscsi config.status 20090622
+netbsd-iscsi config.status 20100415
 configured by $0, generated by GNU Autoconf 2.63,
   with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/&/g'`\\"
 
@@ -26482,7 +26482,7 @@
 # report actual input values of CONFIG_FILES etc. instead of their
 # values after options handling.
 ac_log="
-This file was extended by netbsd-iscsi $as_me 20090622, which was
+This file was extended by netbsd-iscsi $as_me 20100415, which was
 generated by GNU Autoconf 2.63.  Invocation command line was
 
   CONFIG_FILES= $CONFIG_FILES
@@ -26545,7 +26545,7 @@
 _ACEOF
 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
 ac_cs_version="\\
-netbsd-iscsi config.status 20090622
+netbsd-iscsi config.status 20100415
 configured by $0, generated by GNU Autoconf 2.63,
   with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\

CVS commit: src/sys/dev/acpi

2010-04-14 Thread Jukka Ruohonen
Module Name:src
Committed By:   jruoho
Date:   Thu Apr 15 04:03:39 UTC 2010

Modified Files:
src/sys/dev/acpi: acpi.c acpi_util.c

Log Message:
Arrange some comments.


To generate a diff of this commit:
cvs rdiff -u -r1.173 -r1.174 src/sys/dev/acpi/acpi.c
cvs rdiff -u -r1.1 -r1.2 src/sys/dev/acpi/acpi_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/sys/dev/acpi/acpi.c
diff -u src/sys/dev/acpi/acpi.c:1.173 src/sys/dev/acpi/acpi.c:1.174
--- src/sys/dev/acpi/acpi.c:1.173	Wed Apr 14 19:27:28 2010
+++ src/sys/dev/acpi/acpi.c	Thu Apr 15 04:03:38 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: acpi.c,v 1.173 2010/04/14 19:27:28 jruoho Exp $	*/
+/*	$NetBSD: acpi.c,v 1.174 2010/04/15 04:03:38 jruoho Exp $	*/
 
 /*-
  * Copyright (c) 2003, 2007 The NetBSD Foundation, Inc.
@@ -65,7 +65,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: acpi.c,v 1.173 2010/04/14 19:27:28 jruoho Exp $");
+__KERNEL_RCSID(0, "$NetBSD: acpi.c,v 1.174 2010/04/15 04:03:38 jruoho Exp $");
 
 #include "opt_acpi.h"
 #include "opt_pcifixup.h"
@@ -325,7 +325,6 @@
 	 */
 	return 1;
 
-
 fail:
 	KASSERT(rv != AE_OK);
 	KASSERT(func != NULL);
@@ -345,6 +344,9 @@
 	return (config_search_ia(acpi_submatch, parent, ifattr, NULL) != NULL);
 }
 
+/*
+ * Autoconfiguration.
+ */
 static int
 acpi_match(device_t parent, cfdata_t match, void *aux)
 {
@@ -408,9 +410,6 @@
 
 	acpi_softc = sc;
 
-	/*
-	 * Register null power management handler.
-	 */
 	if (pmf_device_register(self, acpi_suspend, acpi_resume) != true)
 		aprint_error_dev(self, "couldn't establish power handler\n");
 
@@ -440,7 +439,9 @@
 	if (ACPI_FAILURE(rv))
 		goto fail;
 
-	/* Early EC handler initialization if ECDT table is available. */
+	/*
+	 * Early EC handler initialization if ECDT table is available.
+	 */
 	config_found_ia(self, "acpiecdtbus", aa, NULL);
 
 	rv = AcpiInitializeObjects(ACPI_FULL_INITIALIZATION);
@@ -760,8 +761,8 @@
 			xirq = (ACPI_RESOURCE_EXTENDED_IRQ *)&resn->Data;
 #if 0
 			/*
-			 * XXX not duplicating the interrupt logic above
-			 * because its not clear what it accomplishes.
+			 * XXX:	Not duplicating the interrupt logic above
+			 *	because its not clear what it accomplishes.
 			 */
 			xirq->Interrupts[0] =
 			((ACPI_RESOURCE_EXT_IRQ *)&resp->Data)->
@@ -867,18 +868,14 @@
 		aa.aa_pciflags = sc->sc_pciflags;
 		aa.aa_ic = sc->sc_ic;
 
+		/*
+		 * XXX:	We only attach devices which are present, enabled, and
+		 *	functioning properly. However, if a device is enabled,
+		 *	it is decoding resources and we should claim these,
+		 *	if possible. This requires changes to bus_space(9).
+		 */
 		if (ad->ad_devinfo->Type == ACPI_TYPE_DEVICE) {
-			/*
-			 * XXX We only attach devices which are:
-			 *
-			 *	- present
-			 *	- enabled
-			 *	- functioning properly
-			 *
-			 * However, if enabled, it's decoding resources,
-			 * so we should claim them, if possible.
-			 * Requires changes to bus_space(9).
-			 */
+
 			if ((ad->ad_devinfo->Valid & ACPI_VALID_STA) ==
 			ACPI_VALID_STA &&
 			(ad->ad_devinfo->CurrentStatus &
@@ -890,10 +887,9 @@
 		}
 
 		/*
-		 * XXX Same problem as above...
-		 *
-		 * Do this check only for devices, as e.g.
-		 * a Thermal Zone doesn't have a HID.
+		 * XXX:	The same problem as above. As for example
+		 *	thermal zones and power resources do not
+		 *	have a valid HID, only evaluate devices.
 		 */
 		if (ad->ad_devinfo->Type == ACPI_TYPE_DEVICE &&
 		(ad->ad_devinfo->Valid & ACPI_VALID_HID) == 0)

Index: src/sys/dev/acpi/acpi_util.c
diff -u src/sys/dev/acpi/acpi_util.c:1.1 src/sys/dev/acpi/acpi_util.c:1.2
--- src/sys/dev/acpi/acpi_util.c:1.1	Wed Apr 14 17:12:14 2010
+++ src/sys/dev/acpi/acpi_util.c	Thu Apr 15 04:03:39 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: acpi_util.c,v 1.1 2010/04/14 17:12:14 jruoho Exp $ */
+/*	$NetBSD: acpi_util.c,v 1.2 2010/04/15 04:03:39 jruoho Exp $ */
 
 /*-
  * Copyright (c) 2003, 2007 The NetBSD Foundation, Inc.
@@ -65,7 +65,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: acpi_util.c,v 1.1 2010/04/14 17:12:14 jruoho Exp $");
+__KERNEL_RCSID(0, "$NetBSD: acpi_util.c,v 1.2 2010/04/15 04:03:39 jruoho Exp $");
 
 #include 
 
@@ -76,9 +76,7 @@
 ACPI_MODULE_NAME		("acpi_util")
 
 /*
- * acpi_eval_integer:
- *
- *	Evaluate an integer object.
+ * Evaluate an integer object.
  */
 ACPI_STATUS
 acpi_eval_integer(ACPI_HANDLE handle, const char *path, ACPI_INTEGER *valp)
@@ -108,9 +106,7 @@
 }
 
 /*
- * acpi_eval_set_integer:
- *
- *	Evaluate an integer object with a single integer input parameter.
+ * Evaluate an integer object with a single integer input parameter.
  */
 ACPI_STATUS
 acpi_eval_set_integer(ACPI_HANDLE handle, const char *path, ACPI_INTEGER val)
@@ -131,9 +127,7 @@
 }
 
 /*
- * acpi_eval_string:
- *
- *	Evaluate a (Unicode) string object.
+ * Evaluate a (Unicode) string object.
  */
 ACPI_STATUS
 acpi_eval_string(ACPI_HANDLE handle, const char *path, char **stringp)
@@ -17

CVS commit: src/usr.bin/make

2010-04-14 Thread Simon J. Gerraty
Module Name:src
Committed By:   sjg
Date:   Thu Apr 15 03:48:39 UTC 2010

Modified Files:
src/usr.bin/make: make.1 var.c

Log Message:
Add :tA to attempt to resolve to absoute path using realpath().


To generate a diff of this commit:
cvs rdiff -u -r1.169 -r1.170 src/usr.bin/make/make.1
cvs rdiff -u -r1.155 -r1.156 src/usr.bin/make/var.c

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

Modified files:

Index: src/usr.bin/make/make.1
diff -u src/usr.bin/make/make.1:1.169 src/usr.bin/make/make.1:1.170
--- src/usr.bin/make/make.1:1.169	Wed Apr  7 06:45:21 2010
+++ src/usr.bin/make/make.1	Thu Apr 15 03:48:39 2010
@@ -1,4 +1,4 @@
-.\"	$NetBSD: make.1,v 1.169 2010/04/07 06:45:21 wiz Exp $
+.\"	$NetBSD: make.1,v 1.170 2010/04/15 03:48:39 sjg Exp $
 .\"
 .\" Copyright (c) 1990, 1993
 .\"	The Regents of the University of California.  All rights reserved.
@@ -29,7 +29,7 @@
 .\"
 .\"	from: @(#)make.1	8.4 (Berkeley) 3/19/94
 .\"
-.Dd April 6, 2010
+.Dd April 14, 2010
 .Dt MAKE 1
 .Os
 .Sh NAME
@@ -945,6 +945,10 @@
 .Nm .
 .It Cm \&:R
 Replaces each word in the variable with everything but its suffix.
+.It Cm \&:tA
+Attempt to convert variable to an absolute path using
+.Xr realpath 3 ,
+if that fails, the value is unchanged.
 .It Cm \&:tl
 Converts variable to lower-case letters.
 .It Cm \&:ts Ns Ar c
@@ -954,6 +958,7 @@
 If
 .Ar c
 is omitted, then no separator is used.
+The common escapes (including octal numeric codes), work as expected.
 .It Cm \&:tu
 Converts variable to upper-case letters.
 .It Cm \&:tW

Index: src/usr.bin/make/var.c
diff -u src/usr.bin/make/var.c:1.155 src/usr.bin/make/var.c:1.156
--- src/usr.bin/make/var.c:1.155	Thu Nov 19 00:30:25 2009
+++ src/usr.bin/make/var.c	Thu Apr 15 03:48:39 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: var.c,v 1.155 2009/11/19 00:30:25 sjg Exp $	*/
+/*	$NetBSD: var.c,v 1.156 2010/04/15 03:48:39 sjg Exp $	*/
 
 /*
  * Copyright (c) 1988, 1989, 1990, 1993
@@ -69,14 +69,14 @@
  */
 
 #ifndef MAKE_NATIVE
-static char rcsid[] = "$NetBSD: var.c,v 1.155 2009/11/19 00:30:25 sjg Exp $";
+static char rcsid[] = "$NetBSD: var.c,v 1.156 2010/04/15 03:48:39 sjg Exp $";
 #else
 #include 
 #ifndef lint
 #if 0
 static char sccsid[] = "@(#)var.c	8.3 (Berkeley) 3/19/94";
 #else
-__RCSID("$NetBSD: var.c,v 1.155 2009/11/19 00:30:25 sjg Exp $");
+__RCSID("$NetBSD: var.c,v 1.156 2010/04/15 03:48:39 sjg Exp $");
 #endif
 #endif /* not lint */
 #endif
@@ -1859,6 +1859,32 @@
 return Buf_Destroy(&buf, FALSE);
 }
 
+
+/*-
+ * VarRealpath --
+ *	Replace each word with the result of realpath()
+ *	if successful.
+ */
+static Boolean
+VarRealpath(GNode *ctx __unused, Var_Parse_State *vpstate,
+	char *word, Boolean addSpace, Buffer *buf,
+	void *patternp __unused)
+{
+	char rbuf[MAXPATHLEN];
+	char *rp;
+			
+	if (addSpace && vpstate->varSpace) {
+	Buf_AddByte(buf, vpstate->varSpace);
+	}
+	addSpace = TRUE;
+	rp = realpath(word, rbuf);
+	if (rp && *rp == '/')
+		word = rp;
+	
+	Buf_AddBytes(buf, strlen(word), word);
+	return(addSpace);
+}
+
 /*-
  *---
  * VarModify --
@@ -2849,7 +2875,12 @@
 			 * Check for two-character options:
 			 * ":tu", ":tl"
 			 */
-			if (tstr[1] == 'u' || tstr[1] == 'l') {
+			if (tstr[1] == 'A') { /* absolute path */
+			newStr = VarModify(ctxt, &parsestate, nstr,
+	   VarRealpath, NULL);
+			cp = tstr + 2;
+			termc = *cp;
+			} else if (tstr[1] == 'u' || tstr[1] == 'l') {
 			newStr = VarChangeCase(nstr, (tstr[1] == 'u'));
 			cp = tstr + 2;
 			termc = *cp;



CVS commit: src/share/man/man3

2010-04-14 Thread Jukka Ruohonen
Module Name:src
Committed By:   jruoho
Date:   Thu Apr 15 03:36:18 UTC 2010

Modified Files:
src/share/man/man3: fast_divide32.3 tgmath.3

Log Message:
Back and forth: gcc(1) -> GCC.


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

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

Modified files:

Index: src/share/man/man3/fast_divide32.3
diff -u src/share/man/man3/fast_divide32.3:1.5 src/share/man/man3/fast_divide32.3:1.6
--- src/share/man/man3/fast_divide32.3:1.5	Wed Apr 14 08:26:42 2010
+++ src/share/man/man3/fast_divide32.3	Thu Apr 15 03:36:18 2010
@@ -1,4 +1,4 @@
-.\"	$NetBSD: fast_divide32.3,v 1.5 2010/04/14 08:26:42 jruoho Exp $
+.\"	$NetBSD: fast_divide32.3,v 1.6 2010/04/15 03:36:18 jruoho Exp $
 .\"
 .\" Copyright (c) 2010 The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -76,7 +76,7 @@
 The code for constant
 .Fa div
 arguments should be equivalent to the assembly created by
-.Xr gcc 1 .
+.Tn GCC .
 .Sh EXAMPLES
 The following example computes
 .Va q = a / b

Index: src/share/man/man3/tgmath.3
diff -u src/share/man/man3/tgmath.3:1.3 src/share/man/man3/tgmath.3:1.4
--- src/share/man/man3/tgmath.3:1.3	Wed Apr 14 08:28:58 2010
+++ src/share/man/man3/tgmath.3	Thu Apr 15 03:36:18 2010
@@ -1,4 +1,4 @@
-.\" $NetBSD: tgmath.3,v 1.3 2010/04/14 08:28:58 jruoho Exp $
+.\" $NetBSD: tgmath.3,v 1.4 2010/04/15 03:36:18 jruoho Exp $
 .\"
 .\" Copyright (c) 2004 Stefan Farfeleder
 .\" All rights reserved.
@@ -145,7 +145,7 @@
 cannot be implemented with strictly conforming C code and needs
 special compiler support.
 The current implementation only works for
-.Xr gcc 1 .
+.Tn GCC .
 .Pp
 Many of the functions mentioned here are not prototyped in
 .In math.h



CVS commit: src/sys/arch/alpha/pci

2010-04-14 Thread Jonathan A. Kollasch
Module Name:src
Committed By:   jakllsch
Date:   Thu Apr 15 03:09:12 UTC 2010

Modified Files:
src/sys/arch/alpha/pci: tsc.c tsvar.h

Log Message:
Give tsc(4)/tsp(4) some attention.
 - Convert to CFATTACH_DECL_NEW().
 - Sprinkle static on functions.
 - Improve KNF conformance.
 - Use C99 integer types.
 - Recycle now-empty-and/or-unused softc structures.


To generate a diff of this commit:
cvs rdiff -u -r1.16 -r1.17 src/sys/arch/alpha/pci/tsc.c
cvs rdiff -u -r1.7 -r1.8 src/sys/arch/alpha/pci/tsvar.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/alpha/pci/tsc.c
diff -u src/sys/arch/alpha/pci/tsc.c:1.16 src/sys/arch/alpha/pci/tsc.c:1.17
--- src/sys/arch/alpha/pci/tsc.c:1.16	Sat Mar 14 21:04:02 2009
+++ src/sys/arch/alpha/pci/tsc.c	Thu Apr 15 03:09:12 2010
@@ -1,4 +1,4 @@
-/* $NetBSD: tsc.c,v 1.16 2009/03/14 21:04:02 dsl Exp $ */
+/* $NetBSD: tsc.c,v 1.17 2010/04/15 03:09:12 jakllsch Exp $ */
 
 /*-
  * Copyright (c) 1999 by Ross Harvey.  All rights reserved.
@@ -35,7 +35,7 @@
 
 #include 
 
-__KERNEL_RCSID(0, "$NetBSD: tsc.c,v 1.16 2009/03/14 21:04:02 dsl Exp $");
+__KERNEL_RCSID(0, "$NetBSD: tsc.c,v 1.17 2010/04/15 03:09:12 jakllsch Exp $");
 
 #include 
 #include 
@@ -59,11 +59,10 @@
 
 #define tsc() { Generate ctags(1) key. }
 
-int	tscmatch(struct device *, struct cfdata *, void *);
-void	tscattach(struct device *, struct device *, void *);
+static int tscmatch(device_t, cfdata_t, void *);
+static void tscattach(device_t, device_t, void *);
 
-CFATTACH_DECL(tsc, sizeof(struct tsc_softc),
-tscmatch, tscattach, NULL, NULL);
+CFATTACH_DECL_NEW(tsc, 0, tscmatch, tscattach, NULL, NULL);
 
 extern struct cfdriver tsc_cd;
 
@@ -71,11 +70,10 @@
 
 static int tscprint(void *, const char *pnp);
 
-int	tspmatch(struct device *, struct cfdata *, void *);
-void	tspattach(struct device *, struct device *, void *);
+static int tspmatch(device_t, cfdata_t, void *);
+static void tspattach(device_t, device_t, void *);
 
-CFATTACH_DECL(tsp, sizeof(struct tsp_softc),
-tspmatch, tspattach, NULL, NULL);
+CFATTACH_DECL_NEW(tsp, 0, tspmatch, tspattach, NULL, NULL);
 
 extern struct cfdriver tsp_cd;
 
@@ -88,8 +86,8 @@
 /* Which hose is the display console connected to? */
 int tsp_console_hose;
 
-int
-tscmatch(struct device *parent, struct cfdata *match, void *aux)
+static int
+tscmatch(device_t parent, cfdata_t match, void *aux)
 {
 	struct mainbus_attach_args *ma = aux;
 
@@ -98,13 +96,12 @@
 	&& !tscfound;
 }
 
-void tscattach(parent, self, aux)
-	struct device *parent, *self;
-	void *aux;
+static void
+tscattach(device_t parent, device_t self, void * aux)
 {
 	int i;
 	int nbus;
-	u_int64_t csc, aar;
+	uint64_t csc, aar;
 	struct tsp_attach_args tsp;
 	struct mainbus_attach_args *ma = aux;
 
@@ -148,8 +145,8 @@
 
 #define tsp() { Generate ctags(1) key. }
 
-int
-tspmatch(struct device *parent, struct cfdata *match, void *aux)
+static int
+tspmatch(device_t parent, cfdata_t match, void *aux)
 {
 	struct tsp_attach_args *t = aux;
 
@@ -157,8 +154,8 @@
 	&& strcmp(t->tsp_name, tsp_cd.cd_name) == 0;
 }
 
-void
-tspattach(struct device *parent, struct device *self, void *aux)
+static void
+tspattach(device_t parent, device_t self, void *aux)
 {
 	struct pcibus_attach_args pba;
 	struct tsp_attach_args *t = aux;
@@ -218,7 +215,8 @@
 }
 
 static int
-tsp_bus_get_window(int type, int window, struct alpha_bus_space_translation *abst)
+tsp_bus_get_window(int type, int window,
+struct alpha_bus_space_translation *abst)
 {
 	struct tsp_config *tsp = &tsp_configuration[tsp_console_hose];
 	bus_space_tag_t st;

Index: src/sys/arch/alpha/pci/tsvar.h
diff -u src/sys/arch/alpha/pci/tsvar.h:1.7 src/sys/arch/alpha/pci/tsvar.h:1.8
--- src/sys/arch/alpha/pci/tsvar.h:1.7	Fri Oct 30 18:55:45 2009
+++ src/sys/arch/alpha/pci/tsvar.h	Thu Apr 15 03:09:12 2010
@@ -1,4 +1,4 @@
-/* $NetBSD: tsvar.h,v 1.7 2009/10/30 18:55:45 mhitch Exp $ */
+/* $NetBSD: tsvar.h,v 1.8 2010/04/15 03:09:12 jakllsch Exp $ */
 
 /*-
  * Copyright (c) 1999 by Ross Harvey.  All rights reserved.
@@ -39,10 +39,6 @@
 
 #define	tsvar() { Generate ctags(1) key. }
 
-struct tsc_softc {
-	struct	device tsc_dev;
-};
-
 struct tsp_config {
 	int	pc_pslot;		/* Pchip 0 or 1 */
 	int	pc_initted;		/* Initialized */
@@ -66,11 +62,6 @@
 	int	pc_mallocsafe;
 };
 
-struct tsp_softc {
-	struct	device sc_dev;
-	struct	tsp_config *sc_ccp;
-};
-
 struct tsp_attach_args {
 	const char *tsp_name;
 	int	tsp_slot;



CVS commit: src/lib/libedit

2010-04-14 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Thu Apr 15 00:57:33 UTC 2010

Modified Files:
src/lib/libedit: chared.h makelist readline.c search.c

Log Message:
>From Jess Thrysoee
- Fix wint_t to Int confusion


To generate a diff of this commit:
cvs rdiff -u -r1.19 -r1.20 src/lib/libedit/chared.h
cvs rdiff -u -r1.14 -r1.15 src/lib/libedit/makelist
cvs rdiff -u -r1.88 -r1.89 src/lib/libedit/readline.c
cvs rdiff -u -r1.23 -r1.24 src/lib/libedit/search.c

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

Modified files:

Index: src/lib/libedit/chared.h
diff -u src/lib/libedit/chared.h:1.19 src/lib/libedit/chared.h:1.20
--- src/lib/libedit/chared.h:1.19	Wed Dec 30 17:37:40 2009
+++ src/lib/libedit/chared.h	Wed Apr 14 20:57:33 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: chared.h,v 1.19 2009/12/30 22:37:40 christos Exp $	*/
+/*	$NetBSD: chared.h,v 1.20 2010/04/15 00:57:33 christos Exp $	*/
 
 /*-
  * Copyright (c) 1992, 1993
@@ -139,17 +139,17 @@
 #include "fcns.h"
 
 
-protected int	 cv__isword(wint_t);
-protected int	 cv__isWord(wint_t);
+protected int	 cv__isword(Int);
+protected int	 cv__isWord(Int);
 protected void	 cv_delfini(EditLine *);
-protected Char	*cv__endword(Char *, Char *, int, int (*)(wint_t));
-protected int	 ce__isword(wint_t);
+protected Char	*cv__endword(Char *, Char *, int, int (*)(Int));
+protected int	 ce__isword(Int);
 protected void	 cv_undo(EditLine *);
 protected void	 cv_yank(EditLine *, const Char *, int);
-protected Char	*cv_next_word(EditLine*, Char *, Char *, int, int (*)(wint_t));
-protected Char	*cv_prev_word(Char *, Char *, int, int (*)(wint_t));
-protected Char	*c__next_word(Char *, Char *, int, int (*)(wint_t));
-protected Char	*c__prev_word(Char *, Char *, int, int (*)(wint_t));
+protected Char	*cv_next_word(EditLine*, Char *, Char *, int, int (*)(Int));
+protected Char	*cv_prev_word(Char *, Char *, int, int (*)(Int));
+protected Char	*c__next_word(Char *, Char *, int, int (*)(Int));
+protected Char	*c__prev_word(Char *, Char *, int, int (*)(Int));
 protected void	 c_insert(EditLine *, int);
 protected void	 c_delbefore(EditLine *, int);
 protected void	 c_delbefore1(EditLine *);

Index: src/lib/libedit/makelist
diff -u src/lib/libedit/makelist:1.14 src/lib/libedit/makelist:1.15
--- src/lib/libedit/makelist:1.14	Wed Dec 30 18:54:52 2009
+++ src/lib/libedit/makelist	Wed Apr 14 20:57:33 2010
@@ -1,5 +1,5 @@
 #!/bin/sh -
-#	$NetBSD: makelist,v 1.14 2009/12/30 23:54:52 christos Exp $
+#	$NetBSD: makelist,v 1.15 2010/04/15 00:57:33 christos Exp $
 #
 # Copyright (c) 1992, 1993
 #	The Regents of the University of California.  All rights reserved.
@@ -77,7 +77,7 @@
 # XXX:	need a space between name and prototype so that -fc and -fh
 #	parsing is much easier
 #
-		printf("protected el_action_t\t%s (EditLine *, wint_t);\n", name);
+		printf("protected el_action_t\t%s (EditLine *, Int);\n", name);
 	}
 	}
 	END {
@@ -161,7 +161,7 @@
 	END {
 	printf("#define\t%-30.30s\t%3d\n", "EL_NUM_FCNS", count);
 
-	printf("typedef el_action_t (*el_func_t)(EditLine *, wint_t);");
+	printf("typedef el_action_t (*el_func_t)(EditLine *, Int);");
 	printf("\nprotected const el_func_t* func__get(void);\n");
 	printf("#endif /* _h_fcns_c */\n");
 	}'

Index: src/lib/libedit/readline.c
diff -u src/lib/libedit/readline.c:1.88 src/lib/libedit/readline.c:1.89
--- src/lib/libedit/readline.c:1.88	Sun Jan  3 13:27:10 2010
+++ src/lib/libedit/readline.c	Wed Apr 14 20:57:33 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: readline.c,v 1.88 2010/01/03 18:27:10 christos Exp $	*/
+/*	$NetBSD: readline.c,v 1.89 2010/04/15 00:57:33 christos Exp $	*/
 
 /*-
  * Copyright (c) 1997 The NetBSD Foundation, Inc.
@@ -31,7 +31,7 @@
 
 #include "config.h"
 #if !defined(lint) && !defined(SCCSID)
-__RCSID("$NetBSD: readline.c,v 1.88 2010/01/03 18:27:10 christos Exp $");
+__RCSID("$NetBSD: readline.c,v 1.89 2010/04/15 00:57:33 christos Exp $");
 #endif /* not lint && not SCCSID */
 
 #include 
@@ -1364,11 +1364,14 @@
 add_history(const char *line)
 {
 	TYPE(HistEvent) ev;
+	const Char *wline;
 
 	if (h == NULL || e == NULL)
 		rl_initialize();
 
-	(void)FUNW(history)(h, &ev, H_ENTER, line);
+	wline = ct_decode_string(line, &conv);
+
+	(void)FUNW(history)(h, &ev, H_ENTER, wline);
 	if (FUNW(history)(h, &ev, H_GETSIZE) == 0)
 		history_length = ev.num;
 

Index: src/lib/libedit/search.c
diff -u src/lib/libedit/search.c:1.23 src/lib/libedit/search.c:1.24
--- src/lib/libedit/search.c:1.23	Wed Dec 30 18:54:52 2009
+++ src/lib/libedit/search.c	Wed Apr 14 20:57:33 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: search.c,v 1.23 2009/12/30 23:54:52 christos Exp $	*/
+/*	$NetBSD: search.c,v 1.24 2010/04/15 00:57:33 christos Exp $	*/
 
 /*-
  * Copyright (c) 1992, 1993
@@ -37,7 +37,7 @@
 #if 0
 static char sccsid[] = "@(#)search.c	8.1 (Berkeley) 6/4/93";
 #else
-__RCSID("$NetBSD: search.c,v 1.23 2009/12/30 23:54:52 christos Exp $");
+__RCSID("$NetBSD: search.c,v 1

CVS commit: src/lib/libedit

2010-04-14 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Thu Apr 15 00:56:40 UTC 2010

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

Log Message:
>From Jess Thrysoee
   - use nl_langinfo to test for UTF-8, because some locales are UTF-8 without
 reflecting it in their names.


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

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

Modified files:

Index: src/lib/libedit/el.c
diff -u src/lib/libedit/el.c:1.58 src/lib/libedit/el.c:1.59
--- src/lib/libedit/el.c:1.58	Thu Dec 31 10:58:26 2009
+++ src/lib/libedit/el.c	Wed Apr 14 20:56:40 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: el.c,v 1.58 2009/12/31 15:58:26 christos Exp $	*/
+/*	$NetBSD: el.c,v 1.59 2010/04/15 00:56:40 christos Exp $	*/
 
 /*-
  * Copyright (c) 1992, 1993
@@ -37,7 +37,7 @@
 #if 0
 static char sccsid[] = "@(#)el.c	8.2 (Berkeley) 1/3/94";
 #else
-__RCSID("$NetBSD: el.c,v 1.58 2009/12/31 15:58:26 christos Exp $");
+__RCSID("$NetBSD: el.c,v 1.59 2010/04/15 00:56:40 christos Exp $");
 #endif
 #endif /* not lint && not SCCSID */
 
@@ -51,6 +51,7 @@
 #include 
 #include 
 #include 
+#include 
 #include "el.h"
 
 /* el_init():
@@ -59,9 +60,6 @@
 public EditLine *
 el_init(const char *prog, FILE *fin, FILE *fout, FILE *ferr)
 {
-#ifdef WIDECHAR
-	char *locale;
-#endif
 	EditLine *el = (EditLine *) el_malloc(sizeof(EditLine));
 
 	if (el == NULL)
@@ -86,8 +84,8 @@
  */
 	el->el_flags = 0;
 #ifdef WIDECHAR
-	if ((locale = setlocale(LC_CTYPE, NULL)) != NULL){
-		if (strcasestr(locale, ".UTF-8") != NULL)
+	if (setlocale(LC_CTYPE, NULL) != NULL){
+		if (strcmp(nl_langinfo(CODESET), "UTF-8") == 0)
 			el->el_flags |= CHARSET_IS_UTF8;
 	}
 #endif
@@ -266,7 +264,8 @@
 		ptr_t ptr = va_arg(ap, ptr_t);
 
 		rv = hist_set(el, func, ptr);
-		el->el_flags &= ~NARROW_HISTORY;
+		if (!(el->el_flags & CHARSET_IS_UTF8))
+			el->el_flags &= ~NARROW_HISTORY;
 		break;
 	}
 



CVS commit: src/lib/libedit

2010-04-14 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Thu Apr 15 00:55:57 UTC 2010

Modified Files:
src/lib/libedit: chartype.c chartype.h

Log Message:
>From Jess Thrysoee
expose ct_enc_width()


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/lib/libedit/chartype.c
cvs rdiff -u -r1.4 -r1.5 src/lib/libedit/chartype.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/libedit/chartype.c
diff -u src/lib/libedit/chartype.c:1.3 src/lib/libedit/chartype.c:1.4
--- src/lib/libedit/chartype.c:1.3	Tue Jan 12 14:37:18 2010
+++ src/lib/libedit/chartype.c	Wed Apr 14 20:55:57 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: chartype.c,v 1.3 2010/01/12 19:37:18 christos Exp $	*/
+/*	$NetBSD: chartype.c,v 1.4 2010/04/15 00:55:57 christos Exp $	*/
 
 /*-
  * Copyright (c) 2009 The NetBSD Foundation, Inc.
@@ -38,14 +38,13 @@
  */
 #include "config.h"
 #if !defined(lint) && !defined(SCCSID)
-__RCSID("$NetBSD: chartype.c,v 1.3 2010/01/12 19:37:18 christos Exp $");
+__RCSID("$NetBSD: chartype.c,v 1.4 2010/04/15 00:55:57 christos Exp $");
 #endif /* not lint && not SCCSID */
 #include "el.h"
 #include 
 
 #define CT_BUFSIZ 1024
 
-
 #ifdef WIDECHAR
 protected void
 ct_conv_buff_resize(ct_buffer_t *conv, size_t mincsize, size_t minwsize)
@@ -177,8 +176,8 @@
 }
 
 
-private size_t
-enc_width(Char c)
+protected size_t
+ct_enc_width(Char c)
 {
 	/* UTF-8 encoding specific values */
 	if (c < 0x80)
@@ -197,7 +196,7 @@
 ct_encode_char(char *dst, size_t len, Char c)
 {
 	ssize_t l = 0;
-	if (len < enc_width(c))
+	if (len < ct_enc_width(c))
 		return -1;
 	l = ct_wctomb(dst, c);
 

Index: src/lib/libedit/chartype.h
diff -u src/lib/libedit/chartype.h:1.4 src/lib/libedit/chartype.h:1.5
--- src/lib/libedit/chartype.h:1.4	Sun Jan  3 13:27:10 2010
+++ src/lib/libedit/chartype.h	Wed Apr 14 20:55:57 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: chartype.h,v 1.4 2010/01/03 18:27:10 christos Exp $	*/
+/*	$NetBSD: chartype.h,v 1.5 2010/04/15 00:55:57 christos Exp $	*/
 
 /*-
  * Copyright (c) 2009 The NetBSD Foundation, Inc.
@@ -186,6 +186,7 @@
 /* Resizes the conversion buffer(s) if needed. */
 protected void ct_conv_buff_resize(ct_buffer_t *, size_t, size_t);
 protected ssize_t ct_encode_char(char *, size_t, Char);
+protected size_t ct_enc_width(Char);
 
 #define ct_free_argv(s)	el_free(s)
 



CVS commit: src/lib/libedit

2010-04-14 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Thu Apr 15 00:52:48 UTC 2010

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

Log Message:
>From Jess Thrysoee
- NARROW_HISTORY and IGNORE_EXTCHARS should not take effect if locale is UTF-8
- account for multi byte char length in


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

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

Modified files:

Index: src/lib/libedit/eln.c
diff -u src/lib/libedit/eln.c:1.6 src/lib/libedit/eln.c:1.7
--- src/lib/libedit/eln.c:1.6	Tue Jan 19 20:15:52 2010
+++ src/lib/libedit/eln.c	Wed Apr 14 20:52:48 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: eln.c,v 1.6 2010/01/20 01:15:52 christos Exp $	*/
+/*	$NetBSD: eln.c,v 1.7 2010/04/15 00:52:48 christos Exp $	*/
 
 /*-
  * Copyright (c) 2009 The NetBSD Foundation, Inc.
@@ -34,7 +34,7 @@
  */
 #include "config.h"
 #if !defined(lint) && !defined(SCCSID)
-__RCSID("$NetBSD: eln.c,v 1.6 2010/01/20 01:15:52 christos Exp $");
+__RCSID("$NetBSD: eln.c,v 1.7 2010/04/15 00:52:48 christos Exp $");
 #endif /* not lint && not SCCSID */
 
 #include "histedit.h"
@@ -50,9 +50,11 @@
 	int num_read;
 	wchar_t wc = 0;
 
-	el->el_flags |= IGNORE_EXTCHARS;
+	if (!(el->el_flags & CHARSET_IS_UTF8))
+		el->el_flags |= IGNORE_EXTCHARS;
 	num_read = el_wgetc (el, &wc);
-	el->el_flags &= ~IGNORE_EXTCHARS;
+	if (!(el->el_flags & CHARSET_IS_UTF8))
+		el->el_flags &= ~IGNORE_EXTCHARS;
 
 	if (num_read > 0)
 		*cp = (unsigned char)wc;
@@ -208,7 +210,8 @@
 		hist_fun_t fun = va_arg(ap, hist_fun_t);
 		ptr_t ptr = va_arg(ap, ptr_t);
 		ret = hist_set(el, fun, ptr);
-		el->el_flags |= NARROW_HISTORY;
+		if (!(el->el_flags & CHARSET_IS_UTF8))
+			el->el_flags |= NARROW_HISTORY;
 		break;
 	}
 	/* XXX: do we need to change el_rfunc_t? */
@@ -336,10 +339,21 @@
 {
 	const LineInfoW *winfo = el_wline(el);
 	LineInfo *info = &el->el_lgcylinfo;
+	size_t offset;
+	const Char *p;
 
 	info->buffer   = ct_encode_string(winfo->buffer, &el->el_lgcyconv);
-	info->cursor   = info->buffer + (winfo->cursor   - winfo->buffer);
-	info->lastchar = info->buffer + (winfo->lastchar - winfo->buffer);
+
+	offset = 0;
+	for (p = winfo->buffer; p < winfo->cursor; p++)
+		offset += ct_enc_width(*p);
+	info->cursor = info->buffer + offset;
+
+	offset = 0;
+	for (p = winfo->buffer; p < winfo->lastchar; p++)
+		offset += ct_enc_width(*p);
+	info->lastchar = info->buffer + offset;
+
 	return info;
 }
 



CVS commit: src/lib/libedit/TEST

2010-04-14 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Thu Apr 15 00:50:46 UTC 2010

Modified Files:
src/lib/libedit/TEST: tc1.c

Log Message:
>From Jess Thrysoee: call setlocale so we can test UTF-8


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/lib/libedit/TEST/tc1.c

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

Modified files:

Index: src/lib/libedit/TEST/tc1.c
diff -u src/lib/libedit/TEST/tc1.c:1.3 src/lib/libedit/TEST/tc1.c:1.4
--- src/lib/libedit/TEST/tc1.c:1.3	Fri Jul 17 08:25:52 2009
+++ src/lib/libedit/TEST/tc1.c	Wed Apr 14 20:50:46 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: tc1.c,v 1.3 2009/07/17 12:25:52 christos Exp $	*/
+/*	$NetBSD: tc1.c,v 1.4 2010/04/15 00:50:46 christos Exp $	*/
 
 /*-
  * Copyright (c) 1992, 1993
@@ -42,7 +42,7 @@
 #if 0
 static char sccsid[] = "@(#)test.c	8.1 (Berkeley) 6/4/93";
 #else
-__RCSID("$NetBSD: tc1.c,v 1.3 2009/07/17 12:25:52 christos Exp $");
+__RCSID("$NetBSD: tc1.c,v 1.4 2010/04/15 00:50:46 christos Exp $");
 #endif
 #endif /* not lint && not SCCSID */
 
@@ -57,6 +57,7 @@
 #include 
 #include 
 #include 
+#include 
 
 #include "histedit.h"
 
@@ -130,6 +131,7 @@
 	History *hist;
 	HistEvent ev;
 
+	(void) setlocale(LC_CTYPE, "");
 	(void) signal(SIGINT, sig);
 	(void) signal(SIGQUIT, sig);
 	(void) signal(SIGHUP, sig);



CVS commit: src/lib/libedit

2010-04-14 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Thu Apr 15 00:50:03 UTC 2010

Modified Files:
src/lib/libedit: histedit.h

Log Message:
>From Jess Thrysoee: add ifndef around def of _GNU_SOURCE


To generate a diff of this commit:
cvs rdiff -u -r1.45 -r1.46 src/lib/libedit/histedit.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/libedit/histedit.h
diff -u src/lib/libedit/histedit.h:1.45 src/lib/libedit/histedit.h:1.46
--- src/lib/libedit/histedit.h:1.45	Sun Jan  3 13:27:10 2010
+++ src/lib/libedit/histedit.h	Wed Apr 14 20:50:03 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: histedit.h,v 1.45 2010/01/03 18:27:10 christos Exp $	*/
+/*	$NetBSD: histedit.h,v 1.46 2010/04/15 00:50:03 christos Exp $	*/
 
 /*-
  * Copyright (c) 1992, 1993
@@ -248,8 +248,10 @@
  */
 #ifdef __linux__
 /* Apparently we need _GNU_SOURCE defined to get access to wcsdup on Linux */
+#ifndef _GNU_SOURCE
 #define _GNU_SOURCE
 #endif
+#endif
 
 #include 
 #include 



CVS commit: src/sys/dev/scsipi

2010-04-14 Thread Jonathan A. Kollasch
Module Name:src
Committed By:   jakllsch
Date:   Wed Apr 14 22:26:33 UTC 2010

Modified Files:
src/sys/dev/scsipi: sd.c

Log Message:
Implement DIOC[GS]STRATEGY for sd(4).


To generate a diff of this commit:
cvs rdiff -u -r1.292 -r1.293 src/sys/dev/scsipi/sd.c

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

Modified files:

Index: src/sys/dev/scsipi/sd.c
diff -u src/sys/dev/scsipi/sd.c:1.292 src/sys/dev/scsipi/sd.c:1.293
--- src/sys/dev/scsipi/sd.c:1.292	Wed Feb 24 22:38:08 2010
+++ src/sys/dev/scsipi/sd.c	Wed Apr 14 22:26:33 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: sd.c,v 1.292 2010/02/24 22:38:08 dyoung Exp $	*/
+/*	$NetBSD: sd.c,v 1.293 2010/04/14 22:26:33 jakllsch Exp $	*/
 
 /*-
  * Copyright (c) 1998, 2003, 2004 The NetBSD Foundation, Inc.
@@ -47,7 +47,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: sd.c,v 1.292 2010/02/24 22:38:08 dyoung Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sd.c,v 1.293 2010/04/14 22:26:33 jakllsch Exp $");
 
 #include "opt_scsi.h"
 #include "rnd.h"
@@ -994,6 +994,7 @@
 	struct scsipi_periph *periph = sd->sc_periph;
 	int part = SDPART(dev);
 	int error = 0;
+	int s;
 #ifdef __HAVE_OLD_DISKLABEL
 	struct disklabel *newlabel = NULL;
 #endif
@@ -1013,6 +1014,8 @@
 		case ODIOCEJECT:
 		case DIOCGCACHE:
 		case DIOCSCACHE:
+		case DIOCGSTRATEGY:
+		case DIOCSSTRATEGY:
 		case SCIOCIDENTIFY:
 		case OSCIOCIDENTIFY:
 		case SCIOCCOMMAND:
@@ -1231,6 +1234,48 @@
 		return (dkwedge_list(&sd->sc_dk, dkwl, l));
 	}
 
+	case DIOCGSTRATEGY:
+	{
+		struct disk_strategy *dks = addr;
+
+		s = splbio();
+		strlcpy(dks->dks_name, bufq_getstrategyname(sd->buf_queue),
+		sizeof(dks->dks_name));
+		splx(s);
+		dks->dks_paramlen = 0;
+
+		return 0;
+	}
+
+	case DIOCSSTRATEGY:
+	{
+		struct disk_strategy *dks = addr;
+		struct bufq_state *new;
+		struct bufq_state *old;
+
+		if ((flag & FWRITE) == 0) {
+			return EBADF;
+		}
+
+		if (dks->dks_param != NULL) {
+			return EINVAL;
+		}
+		dks->dks_name[sizeof(dks->dks_name) - 1] = 0; /* ensure term */
+		error = bufq_alloc(&new, dks->dks_name,
+		BUFQ_EXACT|BUFQ_SORT_RAWBLOCK);
+		if (error) {
+			return error;
+		}
+		s = splbio();
+		old = sd->buf_queue;
+		bufq_move(new, old);
+		sd->buf_queue = new;
+		splx(s);
+		bufq_free(old);
+		
+		return 0;
+	}
+
 	default:
 		if (part != RAW_PART)
 			return (ENOTTY);



CVS commit: src/usr.bin/gzip

2010-04-14 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Wed Apr 14 20:30:28 UTC 2010

Modified Files:
src/usr.bin/gzip: zdiff

Log Message:
Consistently use -- for all programs called. Drop some redundant flags
for the no file argument case.


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

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/gzip/zdiff
diff -u src/usr.bin/gzip/zdiff:1.4 src/usr.bin/gzip/zdiff:1.5
--- src/usr.bin/gzip/zdiff:1.4	Wed Apr 14 18:55:12 2010
+++ src/usr.bin/gzip/zdiff	Wed Apr 14 20:30:28 2010
@@ -1,6 +1,6 @@
 #!/bin/sh -
 #
-# $NetBSD: zdiff,v 1.4 2010/04/14 18:55:12 joerg Exp $
+# $NetBSD: zdiff,v 1.5 2010/04/14 20:30:28 joerg Exp $
 #
 # $OpenBSD: zdiff,v 1.2 2003/07/29 07:42:44 otto Exp $
 #
@@ -113,23 +113,23 @@
 		echo "z$prog: unknown suffix" 1>&2
 		exit 1
 	fi
-	$filt -cdfq "$1" | $prog $flags - "$files"
+	$filt -- "$1" | $prog $flags -- - "$files"
 	status=$?
 elif [ $# -eq 2 ]; then
 	# Two files given, compare the two uncompressing as needed
 	check_suffix "$1" files filt
 	check_suffix "$2" files2 filt2
 	if [ -z "$filt" -a -z "$filt2" ]; then
-		$prog $flags "$1" "$2"
+		$prog $flags -- "$1" "$2"
 	elif [ -z "$filt" -a -n "$filt2" -a "$1" != "-" ]; then
-		$filt2 "$2" | $prog $flags "$1" -
+		$filt2 -- "$2" | $prog $flags -- "$1" -
 	elif [ -n "$filt" -a -z "$filt2" -a "$2" != "-" ]; then
-		$filt "$1" | $prog $flags - "$2"
+		$filt -- "$1" | $prog $flags -- - "$2"
 	else
 		tmp=`mktemp -t z$prog.XX` || exit 1
 		trap "rm -f $tmp" 0 1 2 3 13 15
-		${filt2:-cat} "$2" > $tmp || exit $?
-		${filt:-cat} "$1" | $prog $flags - "$tmp"
+		${filt2:-cat} -- "$2" > $tmp || exit $?
+		${filt:-cat} -- "$1" | $prog $flags -- - "$tmp"
 	fi
 	status=$?
 else



CVS commit: src/sys/dev/acpi

2010-04-14 Thread Jukka Ruohonen
Module Name:src
Committed By:   jruoho
Date:   Wed Apr 14 20:08:56 UTC 2010

Modified Files:
src/sys/dev/acpi: acpi_wakedev.c

Log Message:
Simplify the setting of the GPEs. Add a debug-printf.


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/sys/dev/acpi/acpi_wakedev.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_wakedev.c
diff -u src/sys/dev/acpi/acpi_wakedev.c:1.10 src/sys/dev/acpi/acpi_wakedev.c:1.11
--- src/sys/dev/acpi/acpi_wakedev.c:1.10	Wed Apr 14 17:12:14 2010
+++ src/sys/dev/acpi/acpi_wakedev.c	Wed Apr 14 20:08:56 2010
@@ -1,7 +1,7 @@
-/* $NetBSD: acpi_wakedev.c,v 1.10 2010/04/14 17:12:14 jruoho Exp $ */
+/* $NetBSD: acpi_wakedev.c,v 1.11 2010/04/14 20:08:56 jruoho Exp $ */
 
 /*-
- * Copyright (c) 2009 Jared D. McNeill 
+ * Copyright (c) 2009, 2010 Jared D. McNeill 
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -27,7 +27,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: acpi_wakedev.c,v 1.10 2010/04/14 17:12:14 jruoho Exp $");
+__KERNEL_RCSID(0, "$NetBSD: acpi_wakedev.c,v 1.11 2010/04/14 20:08:56 jruoho Exp $");
 
 #include 
 #include 
@@ -52,8 +52,7 @@
 static const struct sysctlnode *rnode = NULL;
 
 static void	acpi_wakedev_prepare(struct acpi_devnode *, int, int);
-static void	acpi_wakedev_gpe(ACPI_HANDLE, bool);
-
+static void	acpi_wakedev_gpe(struct acpi_devnode *, int);
 
 SYSCTL_SETUP(sysctl_acpi_wakedev_setup, "sysctl hw.acpi.wake subtree setup")
 {
@@ -136,14 +135,7 @@
 		if ((ad->ad_flags & ACPI_DEVICE_WAKEUP) == 0)
 			continue;
 
-		if (ad->ad_wake == 0)
-			acpi_wakedev_gpe(ad->ad_handle, false);
-		else {
-			aprint_debug_dev(ad->ad_parent,
-			"set wake GPE for %s\n", ad->ad_name);
-			acpi_wakedev_gpe(ad->ad_handle, true);
-		}
-
+		acpi_wakedev_gpe(ad, ad->ad_wake);
 		acpi_wakedev_prepare(ad, ad->ad_wake, state);
 	}
 }
@@ -202,14 +194,14 @@
 }
 
 static void
-acpi_wakedev_gpe(ACPI_HANDLE handle, bool enable)
+acpi_wakedev_gpe(struct acpi_devnode *ad, int enable)
 {
 	ACPI_OBJECT *elm, *obj;
 	ACPI_INTEGER val;
 	ACPI_BUFFER buf;
 	ACPI_STATUS rv;
 
-	rv = acpi_eval_struct(handle, METHOD_NAME__PRW, &buf);
+	rv = acpi_eval_struct(ad->ad_handle, METHOD_NAME__PRW, &buf);
 
 	if (ACPI_FAILURE(rv))
 		return;
@@ -255,13 +247,16 @@
 	/*
 	 * Set or unset a GPE as both runtime and wake.
 	 */
-	if (enable != true)
+	if (enable == 0)
 		(void)AcpiDisableGpe(NULL, val, ACPI_NOT_ISR);
 	else {
 		(void)AcpiSetGpeType(NULL, val, ACPI_GPE_TYPE_WAKE_RUN);
 		(void)AcpiEnableGpe(NULL, val, ACPI_NOT_ISR);
 	}
 
+	ACPI_DEBUG_PRINT((ACPI_DB_INFO, "wake GPE %s for %s\n",
+		(enable != 0) ? "enabled" : "disabled", ad->ad_name));
+
 out:
 	ACPI_FREE(buf.Pointer);
 }



CVS commit: src/external/bsd/iscsi/dist

2010-04-14 Thread Stephen Borrill
Module Name:src
Committed By:   sborrill
Date:   Wed Apr 14 19:52:21 UTC 2010

Modified Files:
src/external/bsd/iscsi/dist: configure
src/external/bsd/iscsi/dist/src/initiator: Makefile.am Makefile.in
src/external/bsd/iscsi/dist/src/lib: Makefile.in

Log Message:
Update to reflect current source files. iscsi.c is now protocol.c
and initiator.c has been moved from initiator to lib.
With these changes a standard ./configure && make build completes


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/external/bsd/iscsi/dist/configure
cvs rdiff -u -r1.2 -r1.3 \
src/external/bsd/iscsi/dist/src/initiator/Makefile.am
cvs rdiff -u -r1.1 -r1.2 \
src/external/bsd/iscsi/dist/src/initiator/Makefile.in
cvs rdiff -u -r1.1 -r1.2 src/external/bsd/iscsi/dist/src/lib/Makefile.in

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

Modified files:

Index: src/external/bsd/iscsi/dist/configure
diff -u src/external/bsd/iscsi/dist/configure:1.1 src/external/bsd/iscsi/dist/configure:1.2
--- src/external/bsd/iscsi/dist/configure:1.1	Thu Jun 25 13:47:09 2009
+++ src/external/bsd/iscsi/dist/configure	Wed Apr 14 19:52:20 2010
@@ -754,7 +754,7 @@
 PACKAGE_STRING='netbsd-iscsi 20090622'
 PACKAGE_BUGREPORT='Alistair Crooks '
 
-ac_unique_file="src/lib/iscsi.c"
+ac_unique_file="src/lib/protocol.c"
 # Factoring default headers for most tests.
 ac_includes_default="\
 #include 

Index: src/external/bsd/iscsi/dist/src/initiator/Makefile.am
diff -u src/external/bsd/iscsi/dist/src/initiator/Makefile.am:1.2 src/external/bsd/iscsi/dist/src/initiator/Makefile.am:1.3
--- src/external/bsd/iscsi/dist/src/initiator/Makefile.am:1.2	Tue Jun 30 02:44:52 2009
+++ src/external/bsd/iscsi/dist/src/initiator/Makefile.am	Wed Apr 14 19:52:20 2010
@@ -1,10 +1,10 @@
-## $NetBSD: Makefile.am,v 1.2 2009/06/30 02:44:52 agc Exp $
+## $NetBSD: Makefile.am,v 1.3 2010/04/14 19:52:20 sborrill Exp $
 
 AM_CFLAGS		= $(WARNCFLAGS)
 
 bin_PROGRAMS		= iscsi-initiator
 
-iscsi_initiator_SOURCES	= iscsi-initiator.c initiator.c libkmod.c virtdir.c
+iscsi_initiator_SOURCES	= iscsi-initiator.c libkmod.c virtdir.c
 
 iscsi_initiator_CPPFLAGS= -I$(top_srcdir)/include
 

Index: src/external/bsd/iscsi/dist/src/initiator/Makefile.in
diff -u src/external/bsd/iscsi/dist/src/initiator/Makefile.in:1.1 src/external/bsd/iscsi/dist/src/initiator/Makefile.in:1.2
--- src/external/bsd/iscsi/dist/src/initiator/Makefile.in:1.1	Thu Jun 25 13:47:11 2009
+++ src/external/bsd/iscsi/dist/src/initiator/Makefile.in	Wed Apr 14 19:52:20 2010
@@ -49,7 +49,6 @@
 PROGRAMS = $(bin_PROGRAMS)
 am_iscsi_initiator_OBJECTS =  \
 	iscsi_initiator-iscsi-initiator.$(OBJEXT) \
-	iscsi_initiator-initiator.$(OBJEXT) \
 	iscsi_initiator-libkmod.$(OBJEXT) \
 	iscsi_initiator-virtdir.$(OBJEXT)
 iscsi_initiator_OBJECTS = $(am_iscsi_initiator_OBJECTS)
@@ -185,7 +184,7 @@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
 AM_CFLAGS = $(WARNCFLAGS)
-iscsi_initiator_SOURCES = iscsi-initiator.c initiator.c libkmod.c virtdir.c
+iscsi_initiator_SOURCES = iscsi-initiator.c libkmod.c virtdir.c
 iscsi_initiator_CPPFLAGS = -I$(top_srcdir)/include
 iscsi_initiator_LDADD = ../lib/libiscsi.la -lrefuse
 man1_MANS = iscsi-initiator.8
@@ -261,7 +260,6 @@
 distclean-compile:
 	-rm -f *.tab.c
 
-...@amdep_true@@am__include@ @am__qu...@./$(DEPDIR)/iscsi_initiator-initiator...@am__quote@
 @AMDEP_TRUE@@am__include@ @am__qu...@./$(DEPDIR)/iscsi_initiator-iscsi-initiator...@am__quote@
 @AMDEP_TRUE@@am__include@ @am__qu...@./$(DEPDIR)/iscsi_initiator-libkmod...@am__quote@
 @AMDEP_TRUE@@am__include@ @am__qu...@./$(DEPDIR)/iscsi_initiator-virtdir...@am__quote@
@@ -301,20 +299,6 @@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(iscsi_initiator_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o iscsi_initiator-iscsi-initiator.obj `if test -f 'iscsi-initiator.c'; then $(CYGPATH_W) 'iscsi-initiator.c'; else $(CYGPATH_W) '$(srcdir)/iscsi-initiator.c'; fi`
 
-iscsi_initiator-initiator.o: initiator.c
-...@am__fastdepcc_true@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(iscsi_initiator_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT iscsi_initiator-initiator.o -MD -MP -MF $(DEPDIR)/iscsi_initiator-initiator.Tpo -c -o iscsi_initiator-initiator.o `test -f 'initiator.c' || echo '$(srcdir)/'`initiator.c
-...@am__fastdepcc_true@	mv -f $(DEPDIR)/iscsi_initiator-initiator.Tpo $(DEPDIR)/iscsi_initiator-initiator.Po
-...@amdep_true@@am__fastdepCC_FALSE@	source='initiator.c' object='iscsi_initiator-initiator.o' libtool=no @AMDEPBACKSLASH@
-...@amdep_true@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-...@am__fastdepcc_false@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(iscsi_initiator_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o iscsi_initiator-initiator.o `test -f 'initiator.c' || 

CVS commit: src/usr.bin/gzip

2010-04-14 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Wed Apr 14 19:52:05 UTC 2010

Modified Files:
src/usr.bin/gzip: zdiff.1

Log Message:
Sort SEE ALSO, fix an xref.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/usr.bin/gzip/zdiff.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/gzip/zdiff.1
diff -u src/usr.bin/gzip/zdiff.1:1.4 src/usr.bin/gzip/zdiff.1:1.5
--- src/usr.bin/gzip/zdiff.1:1.4	Wed Apr 14 18:55:12 2010
+++ src/usr.bin/gzip/zdiff.1	Wed Apr 14 19:52:05 2010
@@ -1,4 +1,4 @@
-.\"	$NetBSD: zdiff.1,v 1.4 2010/04/14 18:55:12 joerg Exp $
+.\"	$NetBSD: zdiff.1,v 1.5 2010/04/14 19:52:05 wiz Exp $
 .\"	$OpenBSD: zdiff.1,v 1.2 2003/07/13 17:39:14 millert Exp $
 .\"
 .\" Copyright (c) 2003 Todd C. Miller 
@@ -76,7 +76,7 @@
 .El
 .Pp
 Extensions handled by
-.Xr bzip 1 :
+.Xr bzip2 1 :
 .Bl -bullet -compact
 .It
 bz,
@@ -120,8 +120,8 @@
 .Sh SEE ALSO
 .Xr bzip2 1 ,
 .Xr cmp 1 ,
-.Xr gzip 1 ,
 .Xr diff 1 ,
+.Xr gzip 1 ,
 .Xr xz 1
 .Sh CAVEATS
 .Nm zcmp



CVS commit: src/sys/arch/x86

2010-04-14 Thread Jukka Ruohonen
Module Name:src
Committed By:   jruoho
Date:   Wed Apr 14 19:32:35 UTC 2010

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

Log Message:
UINT32 -> uint32_t; UINT8 -> uint8_t.


To generate a diff of this commit:
cvs rdiff -u -r1.22 -r1.23 src/sys/arch/x86/acpi/acpi_wakeup.c
cvs rdiff -u -r1.25 -r1.26 src/sys/arch/x86/x86/acpi_machdep.c
cvs rdiff -u -r1.85 -r1.86 src/sys/arch/x86/x86/mpacpi.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.22 src/sys/arch/x86/acpi/acpi_wakeup.c:1.23
--- src/sys/arch/x86/acpi/acpi_wakeup.c:1.22	Sun Apr 11 09:52:09 2010
+++ src/sys/arch/x86/acpi/acpi_wakeup.c	Wed Apr 14 19:32:35 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: acpi_wakeup.c,v 1.22 2010/04/11 09:52:09 jruoho Exp $	*/
+/*	$NetBSD: acpi_wakeup.c,v 1.23 2010/04/14 19:32:35 jruoho Exp $	*/
 
 /*-
  * Copyright (c) 2002 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: acpi_wakeup.c,v 1.22 2010/04/11 09:52:09 jruoho Exp $");
+__KERNEL_RCSID(0, "$NetBSD: acpi_wakeup.c,v 1.23 2010/04/14 19:32:35 jruoho Exp $");
 
 /*-
  * Copyright (c) 2001 Takanori Watanabe 
@@ -190,7 +190,7 @@
 {
 	ACPI_OBJECT_LIST	ArgList;
 	ACPI_OBJECT		Arg;
-	UINT32			ret;
+	uint32_t		ret;
 	ACPI_STATUS		status;
 
 	/* run the _PTS and _GTS methods */

Index: src/sys/arch/x86/x86/acpi_machdep.c
diff -u src/sys/arch/x86/x86/acpi_machdep.c:1.25 src/sys/arch/x86/x86/acpi_machdep.c:1.26
--- src/sys/arch/x86/x86/acpi_machdep.c:1.25	Tue Aug 18 16:41:03 2009
+++ src/sys/arch/x86/x86/acpi_machdep.c	Wed Apr 14 19:32:35 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: acpi_machdep.c,v 1.25 2009/08/18 16:41:03 jmcneill Exp $	*/
+/*	$NetBSD: acpi_machdep.c,v 1.26 2010/04/14 19:32:35 jruoho Exp $	*/
 
 /*
  * Copyright 2001 Wasabi Systems, Inc.
@@ -40,7 +40,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: acpi_machdep.c,v 1.25 2009/08/18 16:41:03 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: acpi_machdep.c,v 1.26 2010/04/14 19:32:35 jruoho Exp $");
 
 #include 
 #include 
@@ -102,7 +102,7 @@
 }
 
 ACPI_STATUS
-acpi_md_OsInstallInterruptHandler(UINT32 InterruptNumber,
+acpi_md_OsInstallInterruptHandler(uint32_t InterruptNumber,
 ACPI_OSD_HANDLER ServiceRoutine, void *Context, void **cookiep)
 {
 	void *ih;
@@ -190,7 +190,7 @@
 
 ACPI_STATUS
 acpi_md_OsMapMemory(ACPI_PHYSICAL_ADDRESS PhysicalAddress,
-UINT32 Length, void **LogicalAddress)
+uint32_t Length, void **LogicalAddress)
 {
 
 	if (_x86_memio_map(X86_BUS_SPACE_MEM, PhysicalAddress, Length,
@@ -201,7 +201,7 @@
 }
 
 void
-acpi_md_OsUnmapMemory(void *LogicalAddress, UINT32 Length)
+acpi_md_OsUnmapMemory(void *LogicalAddress, uint32_t Length)
 {
 
 	(void) _x86_memio_unmap(X86_BUS_SPACE_MEM,
@@ -223,7 +223,7 @@
 }
 
 BOOLEAN
-acpi_md_OsReadable(void *Pointer, UINT32 Length)
+acpi_md_OsReadable(void *Pointer, uint32_t Length)
 {
 	BOOLEAN rv = TRUE;
 	vaddr_t sva, eva;
@@ -247,7 +247,7 @@
 }
 
 BOOLEAN
-acpi_md_OsWritable(void *Pointer, UINT32 Length)
+acpi_md_OsWritable(void *Pointer, uint32_t Length)
 {
 	BOOLEAN rv = FALSE;
 	vaddr_t sva, eva;

Index: src/sys/arch/x86/x86/mpacpi.c
diff -u src/sys/arch/x86/x86/mpacpi.c:1.85 src/sys/arch/x86/x86/mpacpi.c:1.86
--- src/sys/arch/x86/x86/mpacpi.c:1.85	Thu Apr  8 04:40:51 2010
+++ src/sys/arch/x86/x86/mpacpi.c	Wed Apr 14 19:32:35 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: mpacpi.c,v 1.85 2010/04/08 04:40:51 jruoho Exp $	*/
+/*	$NetBSD: mpacpi.c,v 1.86 2010/04/14 19:32:35 jruoho Exp $	*/
 
 /*
  * Copyright (c) 2003 Wasabi Systems, Inc.
@@ -36,7 +36,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: mpacpi.c,v 1.85 2010/04/08 04:40:51 jruoho Exp $");
+__KERNEL_RCSID(0, "$NetBSD: mpacpi.c,v 1.86 2010/04/14 19:32:35 jruoho Exp $");
 
 #include "acpica.h"
 #include "opt_acpi.h"
@@ -112,7 +112,7 @@
 
 #if NPCI > 0
 /* Callbacks for the ACPI namespace walk */
-static ACPI_STATUS mpacpi_pcibus_cb(ACPI_HANDLE, UINT32, void *, void **);
+static ACPI_STATUS mpacpi_pcibus_cb(ACPI_HANDLE, uint32_t, void *, void **);
 static int mpacpi_derive_bus(ACPI_HANDLE, struct acpi_softc *);
 
 static int mpacpi_pcircount(struct mpacpi_pcibus *);
@@ -689,7 +689,7 @@
  * PCI root and subordinate busses.
  */
 static ACPI_STATUS
-mpacpi_pcibus_cb(ACPI_HANDLE handle, UINT32 level, void *p,
+mpacpi_pcibus_cb(ACPI_HANDLE handle, uint32_t level, void *p,
 void **status)
 {
 	ACPI_STATUS rv;
@@ -901,7 +901,7 @@
 {
 	int count = 0;
 	ACPI_PCI_ROUTING_TABLE *PrtElement;
-	UINT8 *Buffer;
+	uint8_t *Buffer;
 
 	for (Buffer = mpr->mpr_buf.Pointer;; Buffer += PrtElement->Length) {
 		PrtElement = (ACPI_PCI_ROUTING_TABLE *)Buffer;



CVS commit: src/sys/dev/acpi

2010-04-14 Thread Jukka Ruohonen
Module Name:src
Committed By:   jruoho
Date:   Wed Apr 14 19:27:28 UTC 2010

Modified Files:
src/sys/dev/acpi: acpi.c acpi_bat.c acpi_ec.c acpi_lid.c
acpi_pci_link.c acpi_tz.c asus_acpi.c dalb_acpi.c fdc_acpi.c
sony_acpi.c thinkpad_acpi.c vald_acpi.c valz_acpi.c

Log Message:
No need to spread the ACPICA type system any more than is necessary:

UINT8 -> uint8_t and UINT32 -> uint32_t.


To generate a diff of this commit:
cvs rdiff -u -r1.172 -r1.173 src/sys/dev/acpi/acpi.c
cvs rdiff -u -r1.98 -r1.99 src/sys/dev/acpi/acpi_bat.c
cvs rdiff -u -r1.64 -r1.65 src/sys/dev/acpi/acpi_ec.c
cvs rdiff -u -r1.37 -r1.38 src/sys/dev/acpi/acpi_lid.c
cvs rdiff -u -r1.16 -r1.17 src/sys/dev/acpi/acpi_pci_link.c \
src/sys/dev/acpi/sony_acpi.c
cvs rdiff -u -r1.63 -r1.64 src/sys/dev/acpi/acpi_tz.c
cvs rdiff -u -r1.18 -r1.19 src/sys/dev/acpi/asus_acpi.c
cvs rdiff -u -r1.12 -r1.13 src/sys/dev/acpi/dalb_acpi.c
cvs rdiff -u -r1.39 -r1.40 src/sys/dev/acpi/fdc_acpi.c
cvs rdiff -u -r1.28 -r1.29 src/sys/dev/acpi/thinkpad_acpi.c
cvs rdiff -u -r1.2 -r1.3 src/sys/dev/acpi/vald_acpi.c
cvs rdiff -u -r1.1 -r1.2 src/sys/dev/acpi/valz_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.c
diff -u src/sys/dev/acpi/acpi.c:1.172 src/sys/dev/acpi/acpi.c:1.173
--- src/sys/dev/acpi/acpi.c:1.172	Wed Apr 14 18:39:56 2010
+++ src/sys/dev/acpi/acpi.c	Wed Apr 14 19:27:28 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: acpi.c,v 1.172 2010/04/14 18:39:56 jruoho Exp $	*/
+/*	$NetBSD: acpi.c,v 1.173 2010/04/14 19:27:28 jruoho Exp $	*/
 
 /*-
  * Copyright (c) 2003, 2007 The NetBSD Foundation, Inc.
@@ -65,7 +65,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: acpi.c,v 1.172 2010/04/14 18:39:56 jruoho Exp $");
+__KERNEL_RCSID(0, "$NetBSD: acpi.c,v 1.173 2010/04/14 19:27:28 jruoho Exp $");
 
 #include "opt_acpi.h"
 #include "opt_pcifixup.h"
@@ -784,13 +784,14 @@
 		resc = ACPI_NEXT_RESOURCE(resc);
 		resn = ACPI_NEXT_RESOURCE(resn);
 		resp = ACPI_NEXT_RESOURCE(resp);
-		delta = (UINT8 *)resn - (UINT8 *)bufn.Pointer;
+		delta = (uint8_t *)resn - (uint8_t *)bufn.Pointer;
 		if (delta >=
 		bufn.Length-ACPI_RS_SIZE(ACPI_RESOURCE_DATA)) {
 			bufn.Length *= 2;
 			bufn.Pointer = realloc(bufn.Pointer, bufn.Length,
 	   M_ACPI, M_WAITOK);
-			resn = (ACPI_RESOURCE *)((UINT8 *)bufn.Pointer + delta);
+			resn = (ACPI_RESOURCE *)((uint8_t *)bufn.Pointer +
+			delta);
 		}
 	}
 

Index: src/sys/dev/acpi/acpi_bat.c
diff -u src/sys/dev/acpi/acpi_bat.c:1.98 src/sys/dev/acpi/acpi_bat.c:1.99
--- src/sys/dev/acpi/acpi_bat.c:1.98	Sat Apr  3 16:29:22 2010
+++ src/sys/dev/acpi/acpi_bat.c	Wed Apr 14 19:27:28 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: acpi_bat.c,v 1.98 2010/04/03 16:29:22 jruoho Exp $	*/
+/*	$NetBSD: acpi_bat.c,v 1.99 2010/04/14 19:27:28 jruoho Exp $	*/
 
 /*-
  * Copyright (c) 2003 The NetBSD Foundation, Inc.
@@ -75,7 +75,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: acpi_bat.c,v 1.98 2010/04/03 16:29:22 jruoho Exp $");
+__KERNEL_RCSID(0, "$NetBSD: acpi_bat.c,v 1.99 2010/04/14 19:27:28 jruoho Exp $");
 
 #include 
 #include 
@@ -182,7 +182,7 @@
 static void acpibat_update_info(void *);
 static void acpibat_update_status(void *);
 static void acpibat_init_envsys(device_t);
-static void acpibat_notify_handler(ACPI_HANDLE, UINT32, void *);
+static void acpibat_notify_handler(ACPI_HANDLE, uint32_t, void *);
 static void acpibat_refresh(struct sysmon_envsys *, envsys_data_t *);
 static bool	acpibat_resume(device_t, const pmf_qual_t *);
 static void	acpibat_get_limits(struct sysmon_envsys *, envsys_data_t *,
@@ -652,7 +652,7 @@
  *	Callback from ACPI interrupt handler to notify us of an event.
  */
 static void
-acpibat_notify_handler(ACPI_HANDLE handle, UINT32 notify, void *context)
+acpibat_notify_handler(ACPI_HANDLE handle, uint32_t notify, void *context)
 {
 	static const int handler = OSL_NOTIFY_HANDLER;
 	device_t dv = context;

Index: src/sys/dev/acpi/acpi_ec.c
diff -u src/sys/dev/acpi/acpi_ec.c:1.64 src/sys/dev/acpi/acpi_ec.c:1.65
--- src/sys/dev/acpi/acpi_ec.c:1.64	Mon Mar 29 16:35:59 2010
+++ src/sys/dev/acpi/acpi_ec.c	Wed Apr 14 19:27:28 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: acpi_ec.c,v 1.64 2010/03/29 16:35:59 dyoung Exp $	*/
+/*	$NetBSD: acpi_ec.c,v 1.65 2010/04/14 19:27:28 jruoho Exp $	*/
 
 /*-
  * Copyright (c) 2007 Joerg Sonnenberger .
@@ -59,7 +59,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: acpi_ec.c,v 1.64 2010/03/29 16:35:59 dyoung Exp $");
+__KERNEL_RCSID(0, "$NetBSD: acpi_ec.c,v 1.65 2010/04/14 19:27:28 jruoho Exp $");
 
 #include 
 #include 
@@ -122,7 +122,7 @@
 	ACPI_HANDLE sc_ech;
 
 	ACPI_HANDLE sc_gpeh;
-	UINT8 sc_gpebit;
+	uint8_t sc_gpebit;
 
 	bus_space_tag_t sc_data_st;
 	bus_space_handle_t sc_data_sh;
@@ -131,7 +131,7 @@
 	bus_space_handle_t sc_csr_sh;
 
 	bool sc_need_global_lock;
-	UINT32 sc_global_lock;
+	ui

CVS commit: src/usr.bin/gzip

2010-04-14 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Wed Apr 14 18:55:12 UTC 2010

Modified Files:
src/usr.bin/gzip: zdiff zdiff.1

Log Message:
Refactor zdiff and extend functionality to the common suffixes for bzip2
and xz.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/usr.bin/gzip/zdiff src/usr.bin/gzip/zdiff.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/gzip/zdiff
diff -u src/usr.bin/gzip/zdiff:1.3 src/usr.bin/gzip/zdiff:1.4
--- src/usr.bin/gzip/zdiff:1.3	Mon Mar 29 10:01:00 2004
+++ src/usr.bin/gzip/zdiff	Wed Apr 14 18:55:12 2010
@@ -1,10 +1,11 @@
 #!/bin/sh -
 #
-# $NetBSD: zdiff,v 1.3 2004/03/29 10:01:00 wiz Exp $
+# $NetBSD: zdiff,v 1.4 2010/04/14 18:55:12 joerg Exp $
 #
 # $OpenBSD: zdiff,v 1.2 2003/07/29 07:42:44 otto Exp $
 #
 # Copyright (c) 2003 Todd C. Miller 
+# Copyright (c) 2010 Joerg Sonnenberger 
 #
 # Permission to use, copy, modify, and distribute this software for any
 # purpose with or without fee is hereby granted, provided that the above
@@ -30,7 +31,57 @@
 	*)	prog=diff
 		;;
 esac
-USAGE="usage: z$prog [options] file1 [file2]"
+USAGE="usage: $0 [options] file1 [file2]"
+
+check_suffix() {
+	case "$1" in
+	*[._-][Zz])
+		setvar $2 "${1%??}"
+		setvar $3 "gzip -cdqf"
+		;;
+	*[._-]bz)
+		setvar $2 "${1%???}"
+		setvar $3 "bzip2 -cdqf"
+		;;
+	*[._-]gz)
+		setvar $2 "${1%???}"
+		setvar $3 "gzip -cdqf"
+		;;
+	*[._-]xz)
+		setvar $2 "${1%???}"
+		setvar $3 "xz -cdqf"
+		;;
+	*[._-]bz2)
+		setvar $2 "${1%}"
+		setvar $3 "bzip2 -cdqf"
+		;;
+	*[._-]lzma)
+		setvar $2 "${1%?}"
+		setvar $3 "xz -cdqf"
+		;;
+	*.t[ag]z)
+		setvar $2 "${1%??}"ar
+		setvar $3 "gzip -cdqf"
+		;;
+	*.tbz)
+		setvar $2 "${1%??}"ar
+		setvar $3 "bzip2 -cdqf"
+		;;
+	*.tbz2)
+		setvar $2 "${1%???}"ar
+		setvar $3 "bzip2 -cdqf"
+		;;
+	*.t[lx]z)
+		setvar $2 "${1%??}"ar
+		setvar $3 "xz -cdqf"
+		;;
+	*)
+		setvar $2 "$1"
+		setvar $3 ""
+		;;
+	esac
+}
+
 
 # Pull out any command line flags so we can pass them to diff/cmp
 # XXX - assumes there is no optarg
@@ -41,6 +92,9 @@
 			shift
 			break
 			;;
+		-)
+			break
+			;;
 		-*)
 			flags="$flags $1"
 			shift
@@ -54,52 +108,28 @@
 if [ $# -eq 1 ]; then
 	# One file given, compare compressed to uncompressed
 	files="$1"
-	case "$1" in
-		*[._-][Zz])
-			files="${1%??}"
-			;;
-		*[._-]gz)
-			files="${1%???}"
-			;;
-		*.t[ag]z)
-			files="${1%??}"ar
-			;;
-		*)	echo "z$prog: unknown suffix" 1>&2
-			exit 1
-	esac
-	gzip -cdfq "$1" | $prog $flags - "$files"
+	check_suffix "$1" files filt
+	if [ -z "$filt" ]; then
+		echo "z$prog: unknown suffix" 1>&2
+		exit 1
+	fi
+	$filt -cdfq "$1" | $prog $flags - "$files"
 	status=$?
 elif [ $# -eq 2 ]; then
 	# Two files given, compare the two uncompressing as needed
-	case "$1" in
-		*[._-][Zz]|*[._-]gz|*.t[ag]z)
-			files=-
-			filt="gzip -cdfq $1"
-			;;
-		*)
-			files="$1"
-			;;
-	esac
-	case "$2" in
-		*[._-][Zz]|*[._-]gz|*.t[ag]z)
-			if [ "$files" = "-" ]; then
-tmp=`mktemp -t z$prog.XX` || exit 1
-trap "rm -f $tmp" 0 1 2 3 13 15
-gzip -cdfq "$2" > $tmp
-files="$files $tmp"
-			else
-files="$files -"
-filt="gzip -cdfq $2"
-			fi
-			;;
-		*)
-			files="$files $2"
-			;;
-	esac
-	if [ -n "$filt" ]; then
-		$filt | $prog $flags $files
+	check_suffix "$1" files filt
+	check_suffix "$2" files2 filt2
+	if [ -z "$filt" -a -z "$filt2" ]; then
+		$prog $flags "$1" "$2"
+	elif [ -z "$filt" -a -n "$filt2" -a "$1" != "-" ]; then
+		$filt2 "$2" | $prog $flags "$1" -
+	elif [ -n "$filt" -a -z "$filt2" -a "$2" != "-" ]; then
+		$filt "$1" | $prog $flags - "$2"
 	else
-		$prog $flags $files
+		tmp=`mktemp -t z$prog.XX` || exit 1
+		trap "rm -f $tmp" 0 1 2 3 13 15
+		${filt2:-cat} "$2" > $tmp || exit $?
+		${filt:-cat} "$1" | $prog $flags - "$tmp"
 	fi
 	status=$?
 else
Index: src/usr.bin/gzip/zdiff.1
diff -u src/usr.bin/gzip/zdiff.1:1.3 src/usr.bin/gzip/zdiff.1:1.4
--- src/usr.bin/gzip/zdiff.1:1.3	Sun Dec 28 12:48:03 2003
+++ src/usr.bin/gzip/zdiff.1	Wed Apr 14 18:55:12 2010
@@ -1,7 +1,8 @@
-.\"	$NetBSD: zdiff.1,v 1.3 2003/12/28 12:48:03 wiz Exp $
+.\"	$NetBSD: zdiff.1,v 1.4 2010/04/14 18:55:12 joerg Exp $
 .\"	$OpenBSD: zdiff.1,v 1.2 2003/07/13 17:39:14 millert Exp $
 .\"
 .\" Copyright (c) 2003 Todd C. Miller 
+.\" Copyright (c) 2010 Joerg Sonnenberger 
 .\"
 .\" Permission to use, copy, modify, and distribute this software for any
 .\" purpose with or without fee is hereby granted, provided that the above
@@ -19,7 +20,7 @@
 .\" Agency (DARPA) and Air Force Research Laboratory, Air Force
 .\" Materiel Command, USAF, under agreement number F39502-99-1-0512.
 .\"
-.Dd June 23, 2003
+.Dd April 14, 2010
 .Dt ZDIFF 1
 .Os
 .Sh NAME
@@ -44,15 +45,6 @@
 or
 .Xr diff 1
 respectively to compare compressed files.
-Such files generally have a
-.Dq Z
-or
-.Dq gz
-extension (both the
-.Xr compress 1
-and
-.Xr gzip 1
-formats are supported).
 Any
 .Ar opt

CVS commit: src/sys/dev/acpi

2010-04-14 Thread Jukka Ruohonen
Module Name:src
Committed By:   jruoho
Date:   Wed Apr 14 18:39:56 UTC 2010

Modified Files:
src/sys/dev/acpi: acpi.c

Log Message:
Simplify error reporting, remove casts, KNF.


To generate a diff of this commit:
cvs rdiff -u -r1.171 -r1.172 src/sys/dev/acpi/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.c
diff -u src/sys/dev/acpi/acpi.c:1.171 src/sys/dev/acpi/acpi.c:1.172
--- src/sys/dev/acpi/acpi.c:1.171	Wed Apr 14 17:20:19 2010
+++ src/sys/dev/acpi/acpi.c	Wed Apr 14 18:39:56 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: acpi.c,v 1.171 2010/04/14 17:20:19 jruoho Exp $	*/
+/*	$NetBSD: acpi.c,v 1.172 2010/04/14 18:39:56 jruoho Exp $	*/
 
 /*-
  * Copyright (c) 2003, 2007 The NetBSD Foundation, Inc.
@@ -65,7 +65,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: acpi.c,v 1.171 2010/04/14 17:20:19 jruoho Exp $");
+__KERNEL_RCSID(0, "$NetBSD: acpi.c,v 1.172 2010/04/14 18:39:56 jruoho Exp $");
 
 #include "opt_acpi.h"
 #include "opt_pcifixup.h"
@@ -204,13 +204,17 @@
 acpi_probe(void)
 {
 	ACPI_TABLE_HEADER *rsdt;
-	ACPI_STATUS rv;
+	const char *func;
 	static int once;
+	bool initialized;
+	ACPI_STATUS rv;
 
 	if (once != 0)
 		panic("%s: already probed", __func__);
 
 	once = 1;
+	func = NULL;
+	initialized = false;
 
 	mutex_init(&acpi_interrupt_list_mtx, MUTEX_DEFAULT, IPL_NONE);
 
@@ -222,32 +226,30 @@
 		acpi_osd_debugger();
 #endif
 
-	AcpiGbl_AllMethodsSerialized = FALSE;
-	AcpiGbl_EnableInterpreterSlack = TRUE;
+	AcpiGbl_AllMethodsSerialized = false;
+	AcpiGbl_EnableInterpreterSlack = true;
 
 	rv = AcpiInitializeSubsystem();
-	if (ACPI_FAILURE(rv)) {
-		printf("ACPI: unable to initialize ACPICA: %s\n",
-		AcpiFormatException(rv));
-		return 0;
+
+	if (ACPI_SUCCESS(rv))
+		initialized = true;
+	else {
+		func = "AcpiInitializeSubsystem()";
+		goto fail;
 	}
 
 	rv = AcpiInitializeTables(acpi_initial_tables, 128, 0);
+
 	if (ACPI_FAILURE(rv)) {
-#ifdef ACPI_DEBUG
-		printf("ACPI: unable to initialize ACPI tables: %s\n",
-		AcpiFormatException(rv));
-#endif
-		AcpiTerminate();
-		return 0;
+		func = "AcpiInitializeTables()";
+		goto fail;
 	}
 
 	rv = AcpiReallocateRootTable();
+
 	if (ACPI_FAILURE(rv)) {
-		printf("ACPI: unable to reallocate root table: %s\n",
-		AcpiFormatException(rv));
-		AcpiTerminate();
-		return 0;
+		func = "AcpiReallocateRootTable()";
+		goto fail;
 	}
 
 #ifdef ACPI_DEBUGGER
@@ -256,29 +258,29 @@
 #endif
 
 	rv = AcpiLoadTables();
+
 	if (ACPI_FAILURE(rv)) {
-		printf("ACPI: unable to load tables: %s\n",
-		AcpiFormatException(rv));
-		AcpiTerminate();
-		return 0;
+		func = "AcpiLoadTables()";
+		goto fail;
 	}
 
 	rsdt = acpi_map_rsdt();
+
 	if (rsdt == NULL) {
-		printf("ACPI: unable to map RSDT\n");
-		AcpiTerminate();
-		return 0;
+		func = "acpi_map_rsdt()";
+		rv = AE_ERROR;
+		goto fail;
 	}
 
-	if (!acpi_force_load && (acpi_find_quirks() & ACPI_QUIRK_BROKEN)) {
-		printf("ACPI: BIOS implementation in listed as broken:\n");
-		printf("ACPI: X/RSDT: OemId <%6.6s,%8.8s,%08x>, "
+	if (acpi_force_load == 0 && (acpi_find_quirks() & ACPI_QUIRK_BROKEN)) {
+		aprint_normal("ACPI: BIOS is listed as broken:\n");
+		aprint_normal("ACPI: X/RSDT: OemId <%6.6s,%8.8s,%08x>, "
 		   "AslId <%4.4s,%08x>\n",
 			rsdt->OemId, rsdt->OemTableId,
 		rsdt->OemRevision,
 			rsdt->AslCompilerId,
 		rsdt->AslCompilerRevision);
-		printf("ACPI: not used. set acpi_force_load to use anyway.\n");
+		aprint_normal("ACPI: Not used. Set acpi_force_load to use.\n");
 		acpi_unmap_rsdt(rsdt);
 		AcpiTerminate();
 		return 0;
@@ -290,43 +292,51 @@
 	/*
 	 * Install the default address space handlers.
 	 */
+	func = "AcpiInstallAddressSpaceHandler()";
+
 	rv = AcpiInstallAddressSpaceHandler(ACPI_ROOT_OBJECT,
 	ACPI_ADR_SPACE_SYSTEM_MEMORY, ACPI_DEFAULT_HANDLER, NULL, NULL);
-	if (ACPI_FAILURE(rv)) {
-		printf("ACPI: unable to initialize SystemMemory handler: %s\n",
-		AcpiFormatException(rv));
-		AcpiTerminate();
-		return 0;
-	}
+
+	if (ACPI_FAILURE(rv))
+		goto fail;
+
 	rv = AcpiInstallAddressSpaceHandler(ACPI_ROOT_OBJECT,
 	ACPI_ADR_SPACE_SYSTEM_IO, ACPI_DEFAULT_HANDLER, NULL, NULL);
-	if (ACPI_FAILURE(rv)) {
-		printf("ACPI: unable to initialize SystemIO handler: %s\n",
-		 AcpiFormatException(rv));
-		AcpiTerminate();
-		return 0;
-	}
+
+	if (ACPI_FAILURE(rv))
+		goto fail;
+
 	rv = AcpiInstallAddressSpaceHandler(ACPI_ROOT_OBJECT,
 	ACPI_ADR_SPACE_PCI_CONFIG, ACPI_DEFAULT_HANDLER, NULL, NULL);
-	if (ACPI_FAILURE(rv)) {
-		printf("ACPI: unable to initialize PciConfig handler: %s\n",
-		AcpiFormatException(rv));
-		AcpiTerminate();
-		return 0;
-	}
+
+	if (ACPI_FAILURE(rv))
+		goto fail;
 #endif
 
 	rv = AcpiEnableSubsystem(~(ACPI_NO_HARDWARE_INIT|ACPI_NO_ACPI_ENABLE));
+
 	if (ACPI_FAILURE(rv)) {
-		printf("ACPI: unable to enable: %s\n", AcpiFormatException(rv));
-		AcpiTerminate();
-		return 0;
+		func = "AcpiEnabl

CVS commit: src/sys/dev/acpi

2010-04-14 Thread Jukka Ruohonen
Module Name:src
Committed By:   jruoho
Date:   Wed Apr 14 17:20:19 UTC 2010

Modified Files:
src/sys/dev/acpi: acpi.c

Log Message:
Remove the code that was copy-pasted to acpi_detach() from the attachment
routine. Add a note that the detachment is incomplete.


To generate a diff of this commit:
cvs rdiff -u -r1.170 -r1.171 src/sys/dev/acpi/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.c
diff -u src/sys/dev/acpi/acpi.c:1.170 src/sys/dev/acpi/acpi.c:1.171
--- src/sys/dev/acpi/acpi.c:1.170	Wed Apr 14 17:14:45 2010
+++ src/sys/dev/acpi/acpi.c	Wed Apr 14 17:20:19 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: acpi.c,v 1.170 2010/04/14 17:14:45 jruoho Exp $	*/
+/*	$NetBSD: acpi.c,v 1.171 2010/04/14 17:20:19 jruoho Exp $	*/
 
 /*-
  * Copyright (c) 2003, 2007 The NetBSD Foundation, Inc.
@@ -65,7 +65,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: acpi.c,v 1.170 2010/04/14 17:14:45 jruoho Exp $");
+__KERNEL_RCSID(0, "$NetBSD: acpi.c,v 1.171 2010/04/14 17:20:19 jruoho Exp $");
 
 #include "opt_acpi.h"
 #include "opt_pcifixup.h"
@@ -481,79 +481,26 @@
 #endif
 }
 
+/*
+ * XXX: This is incomplete.
+ */
 static int
 acpi_detach(device_t self, int flags)
 {
 	struct acpi_softc *sc = device_private(self);
 	int rc;
 
-#ifdef ACPI_DEBUGGER
-	if (acpi_dbgr & ACPI_DBGR_RUNNING)
-		acpi_osd_debugger();
-#endif
-
 	if ((rc = config_detach_children(self, flags)) != 0)
 		return rc;
 
-#ifdef ACPI_DEBUGGER
-	if (acpi_dbgr & ACPI_DBGR_PROBE)
-		acpi_osd_debugger();
-#endif
-
 	if ((rc = acpitimer_detach()) != 0)
 		return rc;
 
-#if 0
-	/*
-	 * Bring ACPI on-line.
-	 */
-#ifdef ACPI_DEBUGGER
-	if (acpi_dbgr & ACPI_DBGR_ENABLE)
-		acpi_osd_debugger();
-#endif
-
-#define ACPI_ENABLE_PHASE1 \
-(ACPI_NO_HANDLER_INIT | ACPI_NO_EVENT_INIT)
-#define ACPI_ENABLE_PHASE2 \
-(ACPI_NO_HARDWARE_INIT | ACPI_NO_ACPI_ENABLE | \
- ACPI_NO_ADDRESS_SPACE_INIT)
-
-	rv = AcpiEnableSubsystem(ACPI_ENABLE_PHASE1);
-	if (ACPI_FAILURE(rv)) {
-		aprint_error_dev(self, "unable to enable ACPI: %s\n",
-		AcpiFormatException(rv));
-		return;
-	}
-
-	rv = AcpiEnableSubsystem(ACPI_ENABLE_PHASE2);
-	if (ACPI_FAILURE(rv)) {
-		aprint_error_dev(self, "unable to enable ACPI: %s\n",
-		AcpiFormatException(rv));
-		return;
-	}
-
-	/* Early EC handler initialization if ECDT table is available. */
-	config_found_ia(self, "acpiecdtbus", aa, NULL);
-
-	rv = AcpiInitializeObjects(ACPI_FULL_INITIALIZATION);
-	if (ACPI_FAILURE(rv)) {
-		aprint_error_dev(self,
-		"unable to initialize ACPI objects: %s\n",
-		AcpiFormatException(rv));
-		return;
-	}
-
-	acpi_active = 1;
-#endif
-
 	acpi_deregister_fixed_button(sc, ACPI_EVENT_POWER_BUTTON);
 	acpi_deregister_fixed_button(sc, ACPI_EVENT_SLEEP_BUTTON);
 
 	pmf_device_deregister(self);
 
-#if 0
-	sysmon_power_settype("acpi");
-#endif
 	acpi_softc = NULL;
 
 	return 0;



CVS commit: src/sys/dev/acpi

2010-04-14 Thread Jukka Ruohonen
Module Name:src
Committed By:   jruoho
Date:   Wed Apr 14 17:14:45 UTC 2010

Modified Files:
src/sys/dev/acpi: acpi.c

Log Message:
Remove the #if 0'ed acpi_disable().


To generate a diff of this commit:
cvs rdiff -u -r1.169 -r1.170 src/sys/dev/acpi/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.c
diff -u src/sys/dev/acpi/acpi.c:1.169 src/sys/dev/acpi/acpi.c:1.170
--- src/sys/dev/acpi/acpi.c:1.169	Wed Apr 14 17:12:14 2010
+++ src/sys/dev/acpi/acpi.c	Wed Apr 14 17:14:45 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: acpi.c,v 1.169 2010/04/14 17:12:14 jruoho Exp $	*/
+/*	$NetBSD: acpi.c,v 1.170 2010/04/14 17:14:45 jruoho Exp $	*/
 
 /*-
  * Copyright (c) 2003, 2007 The NetBSD Foundation, Inc.
@@ -65,7 +65,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: acpi.c,v 1.169 2010/04/14 17:12:14 jruoho Exp $");
+__KERNEL_RCSID(0, "$NetBSD: acpi.c,v 1.170 2010/04/14 17:14:45 jruoho Exp $");
 
 #include "opt_acpi.h"
 #include "opt_pcifixup.h"
@@ -596,26 +596,6 @@
 	return true;
 }
 
-#if 0
-/*
- * acpi_disable:
- *
- *	Disable ACPI.
- */
-static ACPI_STATUS
-acpi_disable(struct acpi_softc *sc)
-{
-	ACPI_STATUS rv = AE_OK;
-
-	if (acpi_active) {
-		rv = AcpiDisable();
-		if (ACPI_SUCCESS(rv))
-			acpi_active = 0;
-	}
-	return rv;
-}
-#endif
-
 /*
  * Namespace scan.
  */



CVS commit: src/share/man/man3

2010-04-14 Thread Nicolas Joly
Module Name:src
Committed By:   njoly
Date:   Wed Apr 14 16:30:50 UTC 2010

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

Log Message:
Add missing .El directive.


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

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

Modified files:

Index: src/share/man/man3/rb.3
diff -u src/share/man/man3/rb.3:1.3 src/share/man/man3/rb.3:1.4
--- src/share/man/man3/rb.3:1.3	Sat Mar 20 11:18:59 2010
+++ src/share/man/man3/rb.3	Wed Apr 14 16:30:50 2010
@@ -1,4 +1,4 @@
-.\" $NetBSD: rb.3,v 1.3 2010/03/20 11:18:59 wiz Exp $
+.\" $NetBSD: rb.3,v 1.4 2010/04/14 16:30:50 njoly Exp $
 .\"
 .\" Copyright (c) 2010 The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -96,6 +96,7 @@
 .Ed
 .It Vt struct rb_node
 A node in a red-black tree.
+.El
 .Sh FUNCTIONS
 .Bl -tag -width compact
 .It Fn rb_tree_init "rbt" "ops"



CVS commit: src/usr.bin/make

2010-04-14 Thread Simon J. Gerraty
Module Name:src
Committed By:   sjg
Date:   Wed Apr 14 16:16:18 UTC 2010

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

Log Message:
If argv[0] is not an absolute path, attempt to resolve it
using realpath() for setting .MAKE


To generate a diff of this commit:
cvs rdiff -u -r1.177 -r1.178 src/usr.bin/make/main.c

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

Modified files:

Index: src/usr.bin/make/main.c
diff -u src/usr.bin/make/main.c:1.177 src/usr.bin/make/main.c:1.178
--- src/usr.bin/make/main.c:1.177	Thu Apr  8 17:41:29 2010
+++ src/usr.bin/make/main.c	Wed Apr 14 16:16:17 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: main.c,v 1.177 2010/04/08 17:41:29 sjg Exp $	*/
+/*	$NetBSD: main.c,v 1.178 2010/04/14 16:16:17 sjg Exp $	*/
 
 /*
  * Copyright (c) 1988, 1989, 1990, 1993
@@ -69,7 +69,7 @@
  */
 
 #ifndef MAKE_NATIVE
-static char rcsid[] = "$NetBSD: main.c,v 1.177 2010/04/08 17:41:29 sjg Exp $";
+static char rcsid[] = "$NetBSD: main.c,v 1.178 2010/04/14 16:16:17 sjg Exp $";
 #else
 #include 
 #ifndef lint
@@ -81,7 +81,7 @@
 #if 0
 static char sccsid[] = "@(#)main.c	8.3 (Berkeley) 3/19/94";
 #else
-__RCSID("$NetBSD: main.c,v 1.177 2010/04/08 17:41:29 sjg Exp $");
+__RCSID("$NetBSD: main.c,v 1.178 2010/04/14 16:16:17 sjg Exp $");
 #endif
 #endif /* not lint */
 #endif
@@ -895,8 +895,16 @@
 	 *	MFLAGS also gets initialized empty, for compatibility.
 	 */
 	Parse_Init();
-	Var_Set("MAKE", argv[0], VAR_GLOBAL, 0);
-	Var_Set(".MAKE", argv[0], VAR_GLOBAL, 0);
+	if (argv[0][0] == '/') {
+	p1 = argv[0];
+	} else {
+	p1 = realpath(argv[0], mdpath);
+	if (!p1 || *p1 != '/') {
+		p1 = argv[0];		/* realpath failed */
+	}
+	}
+	Var_Set("MAKE", p1, VAR_GLOBAL, 0);
+	Var_Set(".MAKE", p1, VAR_GLOBAL, 0);
 	Var_Set(MAKEFLAGS, "", VAR_GLOBAL, 0);
 	Var_Set(MAKEOVERRIDES, "", VAR_GLOBAL, 0);
 	Var_Set("MFLAGS", "", VAR_GLOBAL, 0);



CVS commit: src/sys/rump/librump/rumpvfs

2010-04-14 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Wed Apr 14 16:05:53 UTC 2010

Modified Files:
src/sys/rump/librump/rumpvfs: rump_vfs_private.h rumpblk.c rumpfs.c

Log Message:
Use reserved major for rumpblk instead of picking something which
may conflict.


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/sys/rump/librump/rumpvfs/rump_vfs_private.h
cvs rdiff -u -r1.37 -r1.38 src/sys/rump/librump/rumpvfs/rumpblk.c
cvs rdiff -u -r1.38 -r1.39 src/sys/rump/librump/rumpvfs/rumpfs.c

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

Modified files:

Index: src/sys/rump/librump/rumpvfs/rump_vfs_private.h
diff -u src/sys/rump/librump/rumpvfs/rump_vfs_private.h:1.10 src/sys/rump/librump/rumpvfs/rump_vfs_private.h:1.11
--- src/sys/rump/librump/rumpvfs/rump_vfs_private.h:1.10	Thu Dec 17 00:29:46 2009
+++ src/sys/rump/librump/rumpvfs/rump_vfs_private.h	Wed Apr 14 16:05:53 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: rump_vfs_private.h,v 1.10 2009/12/17 00:29:46 pooka Exp $	*/
+/*	$NetBSD: rump_vfs_private.h,v 1.11 2010/04/14 16:05:53 pooka Exp $	*/
 
 /*
  * Copyright (c) 2008 Antti Kantee.  All Rights Reserved.
@@ -37,7 +37,7 @@
 
 int		rump_devnull_init(void);
 
-#define RUMPBLK	254
+#define RUMPBLK_DEVMAJOR 197 /* from conf/majors, XXX: not via config yet */
 #define RUMPBLK_SIZENOTSET ((uint64_t)-1)
 int	rumpblk_register(const char *, devminor_t *, uint64_t, uint64_t);
 int	rumpblk_init(void);

Index: src/sys/rump/librump/rumpvfs/rumpblk.c
diff -u src/sys/rump/librump/rumpvfs/rumpblk.c:1.37 src/sys/rump/librump/rumpvfs/rumpblk.c:1.38
--- src/sys/rump/librump/rumpvfs/rumpblk.c:1.37	Sun Jan 31 13:15:08 2010
+++ src/sys/rump/librump/rumpvfs/rumpblk.c	Wed Apr 14 16:05:53 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: rumpblk.c,v 1.37 2010/01/31 13:15:08 pooka Exp $	*/
+/*	$NetBSD: rumpblk.c,v 1.38 2010/04/14 16:05:53 pooka Exp $	*/
 
 /*
  * Copyright (c) 2009 Antti Kantee.  All Rights Reserved.
@@ -52,7 +52,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: rumpblk.c,v 1.37 2010/01/31 13:15:08 pooka Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rumpblk.c,v 1.38 2010/04/14 16:05:53 pooka Exp $");
 
 #include 
 #include 
@@ -297,7 +297,7 @@
 rumpblk_init(void)
 {
 	char buf[64];
-	int rumpblk = RUMPBLK;
+	devmajor_t rumpblkmaj = RUMPBLK_DEVMAJOR;
 	unsigned tmp;
 	int error, i;
 
@@ -374,11 +374,13 @@
 	"rumpblk", "memblk all windows busy");
 
 	if (blkfail) {
-		return devsw_attach("rumpblk", &rumpblk_bdevsw_fail, &rumpblk,
-		&rumpblk_cdevsw, &rumpblk);
+		return devsw_attach("rumpblk",
+		&rumpblk_bdevsw_fail, &rumpblkmaj,
+		&rumpblk_cdevsw, &rumpblkmaj);
 	} else {
-		return devsw_attach("rumpblk", &rumpblk_bdevsw, &rumpblk,
-		&rumpblk_cdevsw, &rumpblk);
+		return devsw_attach("rumpblk",
+		&rumpblk_bdevsw, &rumpblkmaj,
+		&rumpblk_cdevsw, &rumpblkmaj);
 	}
 }
 

Index: src/sys/rump/librump/rumpvfs/rumpfs.c
diff -u src/sys/rump/librump/rumpvfs/rumpfs.c:1.38 src/sys/rump/librump/rumpvfs/rumpfs.c:1.39
--- src/sys/rump/librump/rumpvfs/rumpfs.c:1.38	Mon Apr 12 21:37:44 2010
+++ src/sys/rump/librump/rumpvfs/rumpfs.c	Wed Apr 14 16:05:53 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: rumpfs.c,v 1.38 2010/04/12 21:37:44 pooka Exp $	*/
+/*	$NetBSD: rumpfs.c,v 1.39 2010/04/14 16:05:53 pooka Exp $	*/
 
 /*
  * Copyright (c) 2009  Antti Kantee.  All Rights Reserved.
@@ -26,7 +26,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: rumpfs.c,v 1.38 2010/04/12 21:37:44 pooka Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rumpfs.c,v 1.39 2010/04/14 16:05:53 pooka Exp $");
 
 #include 
 #include 
@@ -234,7 +234,7 @@
 		if (error != 0) {
 			return error;
 		}
-		rdev = makedev(RUMPBLK, dmin);
+		rdev = makedev(RUMPBLK_DEVMAJOR, dmin);
 	}
 
 	et = kmem_alloc(sizeof(*et), KM_SLEEP);



CVS commit: src/sys/conf

2010-04-14 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Wed Apr 14 16:05:23 UTC 2010

Modified Files:
src/sys/conf: majors

Log Message:
Steal a static major number for rumpblk.


To generate a diff of this commit:
cvs rdiff -u -r1.48 -r1.49 src/sys/conf/majors

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

Modified files:

Index: src/sys/conf/majors
diff -u src/sys/conf/majors:1.48 src/sys/conf/majors:1.49
--- src/sys/conf/majors:1.48	Sat Mar  6 23:45:38 2010
+++ src/sys/conf/majors	Wed Apr 14 16:05:23 2010
@@ -1,4 +1,4 @@
-# $NetBSD: majors,v 1.48 2010/03/06 23:45:38 plunky Exp $
+# $NetBSD: majors,v 1.49 2010/04/14 16:05:23 pooka Exp $
 #
 # Device majors for Machine-Independent drivers.
 #
@@ -42,3 +42,4 @@
 device-major	dm		char 194 block 169	dm
 device-major	hdaudio		char 195		hdaudio
 device-major	uhso		char 196		uhso
+device-major	rumpblk		char 197 block 197	rumpblk



CVS commit: src/sys/kern

2010-04-14 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Wed Apr 14 15:15:37 UTC 2010

Modified Files:
src/sys/kern: kern_stub.c kern_syscall.c

Log Message:
Need a few funny #defines in kern_syscall.c too.


To generate a diff of this commit:
cvs rdiff -u -r1.24 -r1.25 src/sys/kern/kern_stub.c
cvs rdiff -u -r1.2 -r1.3 src/sys/kern/kern_syscall.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/kern_stub.c
diff -u src/sys/kern/kern_stub.c:1.24 src/sys/kern/kern_stub.c:1.25
--- src/sys/kern/kern_stub.c:1.24	Wed Apr 14 15:12:44 2010
+++ src/sys/kern/kern_stub.c	Wed Apr 14 15:15:37 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: kern_stub.c,v 1.24 2010/04/14 15:12:44 pooka Exp $	*/
+/*	$NetBSD: kern_stub.c,v 1.25 2010/04/14 15:15:37 pooka Exp $	*/
 
 /*-
  * Copyright (c) 2007, 2008 The NetBSD Foundation, Inc.
@@ -62,17 +62,12 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: kern_stub.c,v 1.24 2010/04/14 15:12:44 pooka Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_stub.c,v 1.25 2010/04/14 15:15:37 pooka Exp $");
 
 #include "opt_ptrace.h"
 #include "opt_ktrace.h"
 #include "opt_sa.h"
 
-/* XXX To get syscall prototypes. */
-#define SYSVSHM
-#define SYSVSEM
-#define SYSVMSG
-
 #include 
 #include 
 #include 

Index: src/sys/kern/kern_syscall.c
diff -u src/sys/kern/kern_syscall.c:1.2 src/sys/kern/kern_syscall.c:1.3
--- src/sys/kern/kern_syscall.c:1.2	Wed Apr 14 15:12:44 2010
+++ src/sys/kern/kern_syscall.c	Wed Apr 14 15:15:37 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: kern_syscall.c,v 1.2 2010/04/14 15:12:44 pooka Exp $	*/
+/*	$NetBSD: kern_syscall.c,v 1.3 2010/04/14 15:15:37 pooka Exp $	*/
 
 /*-
  * Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -30,10 +30,15 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: kern_syscall.c,v 1.2 2010/04/14 15:12:44 pooka Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_syscall.c,v 1.3 2010/04/14 15:15:37 pooka Exp $");
 
 #include "opt_modular.h"
 
+/* XXX To get syscall prototypes. */
+#define SYSVSHM
+#define SYSVSEM
+#define SYSVMSG
+
 #include 
 #include 
 #include 



CVS commit: src/sys/kern

2010-04-14 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Wed Apr 14 15:12:44 UTC 2010

Modified Files:
src/sys/kern: kern_stub.c kern_syscall.c

Log Message:
need opt_modular.h in kern_syscall


To generate a diff of this commit:
cvs rdiff -u -r1.23 -r1.24 src/sys/kern/kern_stub.c
cvs rdiff -u -r1.1 -r1.2 src/sys/kern/kern_syscall.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/kern_stub.c
diff -u src/sys/kern/kern_stub.c:1.23 src/sys/kern/kern_stub.c:1.24
--- src/sys/kern/kern_stub.c:1.23	Wed Apr 14 14:46:59 2010
+++ src/sys/kern/kern_stub.c	Wed Apr 14 15:12:44 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: kern_stub.c,v 1.23 2010/04/14 14:46:59 pooka Exp $	*/
+/*	$NetBSD: kern_stub.c,v 1.24 2010/04/14 15:12:44 pooka Exp $	*/
 
 /*-
  * Copyright (c) 2007, 2008 The NetBSD Foundation, Inc.
@@ -62,11 +62,10 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: kern_stub.c,v 1.23 2010/04/14 14:46:59 pooka Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_stub.c,v 1.24 2010/04/14 15:12:44 pooka Exp $");
 
 #include "opt_ptrace.h"
 #include "opt_ktrace.h"
-#include "opt_modular.h"
 #include "opt_sa.h"
 
 /* XXX To get syscall prototypes. */

Index: src/sys/kern/kern_syscall.c
diff -u src/sys/kern/kern_syscall.c:1.1 src/sys/kern/kern_syscall.c:1.2
--- src/sys/kern/kern_syscall.c:1.1	Wed Apr 14 14:46:59 2010
+++ src/sys/kern/kern_syscall.c	Wed Apr 14 15:12:44 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: kern_syscall.c,v 1.1 2010/04/14 14:46:59 pooka Exp $	*/
+/*	$NetBSD: kern_syscall.c,v 1.2 2010/04/14 15:12:44 pooka Exp $	*/
 
 /*-
  * Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -30,7 +30,9 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: kern_syscall.c,v 1.1 2010/04/14 14:46:59 pooka Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_syscall.c,v 1.2 2010/04/14 15:12:44 pooka Exp $");
+
+#include "opt_modular.h"
 
 #include 
 #include 



CVS commit: src/sys/rump/librump/rumpkern

2010-04-14 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Wed Apr 14 14:49:05 UTC 2010

Modified Files:
src/sys/rump/librump/rumpkern: Makefile.rumpkern emul.c

Log Message:
Use kern_syscall.c instead of homegrown syscall dis/establishment routines.


To generate a diff of this commit:
cvs rdiff -u -r1.76 -r1.77 src/sys/rump/librump/rumpkern/Makefile.rumpkern
cvs rdiff -u -r1.125 -r1.126 src/sys/rump/librump/rumpkern/emul.c

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

Modified files:

Index: src/sys/rump/librump/rumpkern/Makefile.rumpkern
diff -u src/sys/rump/librump/rumpkern/Makefile.rumpkern:1.76 src/sys/rump/librump/rumpkern/Makefile.rumpkern:1.77
--- src/sys/rump/librump/rumpkern/Makefile.rumpkern:1.76	Wed Apr 14 10:27:53 2010
+++ src/sys/rump/librump/rumpkern/Makefile.rumpkern	Wed Apr 14 14:49:05 2010
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.rumpkern,v 1.76 2010/04/14 10:27:53 pooka Exp $
+#	$NetBSD: Makefile.rumpkern,v 1.77 2010/04/14 14:49:05 pooka Exp $
 #
 
 .include "${RUMPTOP}/Makefile.rump"
@@ -40,8 +40,9 @@
 SRCS+=	init_sysctl_base.c kern_auth.c kern_descrip.c kern_event.c	\
 	kern_hook.c kern_ksyms.c kern_malloc_stdtype.c kern_module.c	\
 	kern_mutex_obj.c kern_ntptime.c kern_rate.c kern_stub.c		\
-	kern_sysctl.c kern_tc.c kern_timeout.c kern_uidinfo.c param.c	\
-	sys_descrip.c sys_generic.c sys_pipe.c sys_select.c syscalls.c
+	kern_syscall.c kern_sysctl.c kern_tc.c kern_timeout.c		\
+	kern_uidinfo.c param.c sys_descrip.c sys_generic.c sys_pipe.c	\
+	sys_select.c syscalls.c
 
 # sys/kern subr (misc)
 SRCS+=	subr_devsw.c subr_callback.c subr_copy.c subr_device.c		\

Index: src/sys/rump/librump/rumpkern/emul.c
diff -u src/sys/rump/librump/rumpkern/emul.c:1.125 src/sys/rump/librump/rumpkern/emul.c:1.126
--- src/sys/rump/librump/rumpkern/emul.c:1.125	Wed Apr 14 10:27:53 2010
+++ src/sys/rump/librump/rumpkern/emul.c	Wed Apr 14 14:49:05 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: emul.c,v 1.125 2010/04/14 10:27:53 pooka Exp $	*/
+/*	$NetBSD: emul.c,v 1.126 2010/04/14 14:49:05 pooka Exp $	*/
 
 /*
  * Copyright (c) 2007 Antti Kantee.  All Rights Reserved.
@@ -28,7 +28,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: emul.c,v 1.125 2010/04/14 10:27:53 pooka Exp $");
+__KERNEL_RCSID(0, "$NetBSD: emul.c,v 1.126 2010/04/14 14:49:05 pooka Exp $");
 
 #include 
 #include 
@@ -72,7 +72,6 @@
 int hardclock_ticks;
 bool mp_online = false;
 struct timeval boottime;
-struct emul emul_netbsd;
 int cold = 1;
 int boothowto = AB_SILENT;
 struct tty *constty;
@@ -124,6 +123,11 @@
 	FSCALE,
 };
 
+struct emul emul_netbsd = {
+	.e_name = "netbsd-rump",
+	.e_sysent = rump_sysent,
+};
+
 struct proc *
 p_find(pid_t pid, uint flags)
 {
@@ -387,27 +391,6 @@
 	rumpuser_exit(0);
 }
 
-int
-syscall_establish(const struct emul *em, const struct syscall_package *sp)
-{
-	extern struct sysent rump_sysent[];
-	int i;
-
-	KASSERT(em == NULL || em == &emul_netbsd);
-
-	for (i = 0; sp[i].sp_call; i++)
-		rump_sysent[sp[i].sp_code].sy_call = sp[i].sp_call;
-
-	return 0;
-}
-
-int
-syscall_disestablish(const struct emul *em, const struct syscall_package *sp)
-{
-
-	return 0;
-}
-
 void
 calcru(struct proc *p, struct timeval *up, struct timeval *sp,
 	struct timeval *ip, struct timeval *rp)



CVS commit: src/sys

2010-04-14 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Wed Apr 14 14:46:59 UTC 2010

Modified Files:
src/sys/conf: files
src/sys/kern: kern_stub.c kern_subr.c
Added Files:
src/sys/kern: kern_syscall.c

Log Message:
Move routines related to syscall establishment from kern_subr.c and
kern_stub.c to kern_syscall.c.


To generate a diff of this commit:
cvs rdiff -u -r1.986 -r1.987 src/sys/conf/files
cvs rdiff -u -r1.22 -r1.23 src/sys/kern/kern_stub.c
cvs rdiff -u -r1.206 -r1.207 src/sys/kern/kern_subr.c
cvs rdiff -u -r0 -r1.1 src/sys/kern/kern_syscall.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/conf/files
diff -u src/sys/conf/files:1.986 src/sys/conf/files:1.987
--- src/sys/conf/files:1.986	Mon Apr 12 22:15:32 2010
+++ src/sys/conf/files	Wed Apr 14 14:46:59 2010
@@ -1,4 +1,4 @@
-#	$NetBSD: files,v 1.986 2010/04/12 22:15:32 pooka Exp $
+#	$NetBSD: files,v 1.987 2010/04/14 14:46:59 pooka Exp $
 #	@(#)files.newconf	7.5 (Berkeley) 5/10/93
 
 version 	20090313
@@ -1477,6 +1477,7 @@
 file	kern/kern_stub.c
 file	kern/kern_subr.c
 file	kern/kern_synch.c
+file	kern/kern_syscall.c
 file	kern/kern_sysctl.c
 file	kern/kern_tc.c
 file	kern/kern_time.c

Index: src/sys/kern/kern_stub.c
diff -u src/sys/kern/kern_stub.c:1.22 src/sys/kern/kern_stub.c:1.23
--- src/sys/kern/kern_stub.c:1.22	Wed Mar  3 00:49:39 2010
+++ src/sys/kern/kern_stub.c	Wed Apr 14 14:46:59 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: kern_stub.c,v 1.22 2010/03/03 00:49:39 pooka Exp $	*/
+/*	$NetBSD: kern_stub.c,v 1.23 2010/04/14 14:46:59 pooka Exp $	*/
 
 /*-
  * Copyright (c) 2007, 2008 The NetBSD Foundation, Inc.
@@ -62,7 +62,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: kern_stub.c,v 1.22 2010/03/03 00:49:39 pooka Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_stub.c,v 1.23 2010/04/14 14:46:59 pooka Exp $");
 
 #include "opt_ptrace.h"
 #include "opt_ktrace.h"
@@ -80,8 +80,6 @@
 #include 
 #include 
 #include 
-#include 
-#include 
 #include 
 #include 
 #include 
@@ -190,193 +188,6 @@
 	return ENOSYS;
 }
 
-int
-sys_nomodule(struct lwp *l, const void *v, register_t *retval)
-{
-#ifdef MODULAR
-	static struct {
-		u_int		al_code;
-		const char	*al_module;
-	} const autoload[] = {
-	{ SYS_aio_cancel, "aio" },
-	{ SYS_aio_error, "aio" },
-	{ SYS_aio_fsync, "aio" },
-	{ SYS_aio_read, "aio" },
-	{ SYS_aio_return, "aio" },
-	{ SYS___aio_suspend50, "aio" },
-	{ SYS_aio_write, "aio" },
-	{ SYS_lio_listio, "aio" },
-	{ SYS_mq_open, "mqueue" },
-	{ SYS_mq_close, "mqueue" },
-	{ SYS_mq_unlink, "mqueue" },
-	{ SYS_mq_getattr, "mqueue" },
-	{ SYS_mq_setattr, "mqueue" },
-	{ SYS_mq_notify, "mqueue" },
-	{ SYS_mq_send, "mqueue" },
-	{ SYS_mq_receive, "mqueue" },
-	{ SYS___mq_timedsend50, "mqueue" },
-	{ SYS___mq_timedreceive50, "mqueue" },
-	{ SYS_compat_43_fstat43, "compat" },
-	{ SYS_compat_43_lstat43, "compat" },
-	{ SYS_compat_43_oaccept, "compat" },
-	{ SYS_compat_43_ocreat, "compat" },
-	{ SYS_compat_43_oftruncate, "compat" },
-	{ SYS_compat_43_ogetdirentries, "compat" },
-	{ SYS_compat_43_ogetdtablesize, "compat" },
-	{ SYS_compat_43_ogethostid, "compat" },
-	{ SYS_compat_43_ogethostname, "compat" },
-	{ SYS_compat_43_ogetkerninfo, "compat" },
-	{ SYS_compat_43_ogetpagesize, "compat" },
-	{ SYS_compat_43_ogetpeername, "compat" },
-	{ SYS_compat_43_ogetrlimit, "compat" },
-	{ SYS_compat_43_ogetsockname, "compat" },
-	{ SYS_compat_43_okillpg, "compat" },
-	{ SYS_compat_43_olseek, "compat" },
-	{ SYS_compat_43_ommap, "compat" },
-	{ SYS_compat_43_oquota, "compat" },
-	{ SYS_compat_43_orecv, "compat" },
-	{ SYS_compat_43_orecvfrom, "compat" },
-	{ SYS_compat_43_orecvmsg, "compat" },
-	{ SYS_compat_43_osend, "compat" },
-	{ SYS_compat_43_osendmsg, "compat" },
-	{ SYS_compat_43_osethostid, "compat" },
-	{ SYS_compat_43_osethostname, "compat" },
-	{ SYS_compat_43_osetrlimit, "compat" },
-	{ SYS_compat_43_osigblock, "compat" },
-	{ SYS_compat_43_osigsetmask, "compat" },
-	{ SYS_compat_43_osigstack, "compat" },
-	{ SYS_compat_43_osigvec, "compat" },
-	{ SYS_compat_43_otruncate, "compat" },
-	{ SYS_compat_43_owait, "compat" },
-	{ SYS_compat_43_stat43, "compat" },
-	{ SYS_compat_09_ogetdomainname, "compat" },
-	{ SYS_compat_09_osetdomainname, "compat" },
-	{ SYS_compat_09_ouname, "compat" },
-#ifndef _LP64
-	{ SYS_compat_10_omsgsys, "compat" },
-	{ SYS_compat_10_osemsys, "compat" },
-	{ SYS_compat_10_oshmsys, "compat" },
-#endif
-	{ SYS_compat_12_fstat12, "compat" },
-	{ SYS_compat_12_getdirentries, "compat" },
-	{ SYS_compat_12_lstat12, "compat" },
-	{ SYS_compat_12_msync, "compat" },
-	{ SYS_compat_12_oreboot, "compat" },
-	{ SYS_compat_12_oswapon, "compat" },
-	{ SYS_compat_12_stat12, "compat" },
-

CVS commit: src/lib

2010-04-14 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Wed Apr 14 14:15:48 UTC 2010

Modified Files:
src/lib/libp2k: p2k.c
src/lib/libukfs: ukfs.c

Log Message:
Some _t purification.  no functional change.


To generate a diff of this commit:
cvs rdiff -u -r1.33 -r1.34 src/lib/libp2k/p2k.c
cvs rdiff -u -r1.49 -r1.50 src/lib/libukfs/ukfs.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/libp2k/p2k.c
diff -u src/lib/libp2k/p2k.c:1.33 src/lib/libp2k/p2k.c:1.34
--- src/lib/libp2k/p2k.c:1.33	Wed Dec 23 01:15:11 2009
+++ src/lib/libp2k/p2k.c	Wed Apr 14 14:15:48 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: p2k.c,v 1.33 2009/12/23 01:15:11 pooka Exp $	*/
+/*	$NetBSD: p2k.c,v 1.34 2010/04/14 14:15:48 pooka Exp $	*/
 
 /*
  * Copyright (c) 2007, 2008, 2009  Antti Kantee.  All Rights Reserved.
@@ -97,7 +97,7 @@
 static int haswizard;
 static uid_t wizarduid;
 
-static kauth_cred_t
+static struct kauth_cred *
 cred_create(const struct puffs_cred *pcr)
 {
 	gid_t groups[NGROUPS];
@@ -120,7 +120,7 @@
 }
 
 static __inline void
-cred_destroy(kauth_cred_t cred)
+cred_destroy(struct kauth_cred *cred)
 {
 
 	rump_pub_cred_put(cred);
@@ -129,7 +129,7 @@
 static struct componentname *
 makecn(const struct puffs_cn *pcn, int myflags)
 {
-	kauth_cred_t cred;
+	struct kauth_cred *cred;
 
 	cred = cred_create(pcn->pcn_cred);
 	/* LINTED: prehistoric types in first two args */
@@ -544,11 +544,11 @@
 	const struct puffs_cred *pcr)
 {
 	struct mount *mp = ukfs_getmp(puffs_getspecific(pu));
-	kauth_cred_t cred;
+	struct kauth_cred *cred;
 	int rv;
 
 	cred = cred_create(pcr);
-	rv = rump_pub_vfs_sync(mp, waitfor, (kauth_cred_t)cred);
+	rv = rump_pub_vfs_sync(mp, waitfor, cred);
 	cred_destroy(cred);
 
 	return rv;
@@ -792,7 +792,7 @@
 	const struct puffs_cred *pcr)
 {
 	struct vnode *vp = OPC2VP(opc);
-	kauth_cred_t cred;
+	struct kauth_cred *cred;
 	int rv;
 
 	cred = cred_create(pcr);
@@ -810,7 +810,7 @@
 	const struct puffs_cred *pcr)
 {
 	struct vnode *vp = OPC2VP(opc);
-	kauth_cred_t cred;
+	struct kauth_cred *cred;
 
 	cred = cred_create(pcr);
 	RUMP_VOP_LOCK(vp, LK_EXCLUSIVE);
@@ -827,7 +827,7 @@
 	const struct puffs_cred *pcr)
 {
 	struct vnode *vp = OPC2VP(opc);
-	kauth_cred_t cred;
+	struct kauth_cred *cred;
 	int rv;
 
 	cred = cred_create(pcr);
@@ -845,7 +845,7 @@
 	struct vattr *vap, const struct puffs_cred *pcr)
 {
 	struct vnode *vp = OPC2VP(opc);
-	kauth_cred_t cred;
+	struct kauth_cred *cred;
 	struct vattr *va_x;
 	int rv;
 
@@ -879,7 +879,7 @@
 	const struct vattr *vap, const struct puffs_cred *pcr)
 {
 	struct vnode *vp = OPC2VP(opc);
-	kauth_cred_t cred;
+	struct kauth_cred *cred;
 	struct vattr *va_x;
 	int rv;
 
@@ -906,7 +906,7 @@
 	const struct puffs_cred *pcr, int flags, off_t offlo, off_t offhi)
 {
 	struct vnode *vp = OPC2VP(opc);
-	kauth_cred_t cred;
+	struct kauth_cred *cred;
 	int rv;
 
 	/* "deadfs" */
@@ -927,7 +927,7 @@
 p2k_node_mmap(struct puffs_usermount *pu, puffs_cookie_t opc, vm_prot_t flags,
 	const struct puffs_cred *pcr)
 {
-	kauth_cred_t cred;
+	struct kauth_cred *cred;
 	int rv;
 
 	cred = cred_create(pcr);
@@ -943,7 +943,7 @@
 	off_t oldoff, off_t newoff, const struct puffs_cred *pcr)
 {
 	struct vnode *vp = OPC2VP(opc);
-	kauth_cred_t cred;
+	struct kauth_cred *cred;
 	int rv;
 
 	cred = cred_create(pcr);
@@ -1133,7 +1133,7 @@
 	off_t *cookies, size_t *ncookies)
 {
 	struct vnode *vp = OPC2VP(opc);
-	kauth_cred_t cred;
+	struct kauth_cred *cred;
 	struct uio *uio;
 	off_t *vop_cookies;
 	int vop_ncookies;
@@ -1168,7 +1168,7 @@
 	const struct puffs_cred *pcr, char *linkname, size_t *linklen)
 {
 	struct vnode *vp = OPC2VP(opc);
-	kauth_cred_t cred;
+	struct kauth_cred *cred;
 	struct uio *uio;
 	int rv;
 
@@ -1190,7 +1190,7 @@
 	const struct puffs_cred *pcr, int ioflag)
 {
 	struct vnode *vp = OPC2VP(opc);
-	kauth_cred_t cred;
+	struct kauth_cred *cred;
 	struct uio *uio;
 	int rv;
 
@@ -1212,7 +1212,7 @@
 	const struct puffs_cred *pcr, int ioflag)
 {
 	struct vnode *vp = OPC2VP(opc);
-	kauth_cred_t cred;
+	struct kauth_cred *cred;
 	struct uio *uio;
 	int rv;
 

Index: src/lib/libukfs/ukfs.c
diff -u src/lib/libukfs/ukfs.c:1.49 src/lib/libukfs/ukfs.c:1.50
--- src/lib/libukfs/ukfs.c:1.49	Mon Mar  8 12:38:14 2010
+++ src/lib/libukfs/ukfs.c	Wed Apr 14 14:15:48 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: ukfs.c,v 1.49 2010/03/08 12:38:14 pooka Exp $	*/
+/*	$NetBSD: ukfs.c,v 1.50 2010/04/14 14:15:48 pooka Exp $	*/
 
 /*
  * Copyright (c) 2007, 2008, 2009  Antti Kantee.  All Rights Reserved.
@@ -770,7 +770,7 @@
 	struct uio *uio;
 	size_t resid;
 	int rv, eofflag;
-	kauth_cred_t cred;
+	struct kauth_cred *cred;
 	
 	uio = rump_pub_uio_setup(buf, bufsize, *off, RUMPUIO_READ);
 	cred = rump_pub_cred_suserget();



CVS commit: src/sys/rump

2010-04-14 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Wed Apr 14 14:14:53 UTC 2010

Modified Files:
src/sys/rump/include/rump: rumpkern_if_pub.h rumpvfs_if_pub.h
src/sys/rump/librump/rumpkern: rumpkern_if_priv.h
rumpkern_if_wrappers.c
src/sys/rump/librump/rumpvfs: rumpvfs_if_priv.h rumpvfs_if_wrappers.c

Log Message:
regen: kauth_cred_t -> struct kauth_cred *


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/sys/rump/include/rump/rumpkern_if_pub.h
cvs rdiff -u -r1.3 -r1.4 src/sys/rump/include/rump/rumpvfs_if_pub.h
cvs rdiff -u -r1.6 -r1.7 src/sys/rump/librump/rumpkern/rumpkern_if_priv.h \
src/sys/rump/librump/rumpkern/rumpkern_if_wrappers.c
cvs rdiff -u -r1.3 -r1.4 src/sys/rump/librump/rumpvfs/rumpvfs_if_priv.h \
src/sys/rump/librump/rumpvfs/rumpvfs_if_wrappers.c

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

Modified files:

Index: src/sys/rump/include/rump/rumpkern_if_pub.h
diff -u src/sys/rump/include/rump/rumpkern_if_pub.h:1.6 src/sys/rump/include/rump/rumpkern_if_pub.h:1.7
--- src/sys/rump/include/rump/rumpkern_if_pub.h:1.6	Fri Mar  5 18:43:58 2010
+++ src/sys/rump/include/rump/rumpkern_if_pub.h	Wed Apr 14 14:14:53 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: rumpkern_if_pub.h,v 1.6 2010/03/05 18:43:58 pooka Exp $	*/
+/*	$NetBSD: rumpkern_if_pub.h,v 1.7 2010/04/14 14:14:53 pooka Exp $	*/
 
 /*
  * Automatically generated.  DO NOT EDIT.
@@ -15,9 +15,9 @@
 size_t rump_pub_uio_getresid(struct uio *);
 off_t rump_pub_uio_getoff(struct uio *);
 size_t rump_pub_uio_free(struct uio *);
-kauth_cred_t rump_pub_cred_create(uid_t, gid_t, size_t, gid_t *);
-kauth_cred_t rump_pub_cred_suserget(void);
-void rump_pub_cred_put(kauth_cred_t);
+struct kauth_cred* rump_pub_cred_create(uid_t, gid_t, size_t, gid_t *);
+struct kauth_cred* rump_pub_cred_suserget(void);
+void rump_pub_cred_put(struct kauth_cred *);
 struct lwp * rump_pub_newproc_switch(void);
 struct lwp * rump_pub_lwp_alloc(pid_t, lwpid_t);
 struct lwp * rump_pub_lwp_alloc_and_switch(pid_t, lwpid_t);

Index: src/sys/rump/include/rump/rumpvfs_if_pub.h
diff -u src/sys/rump/include/rump/rumpvfs_if_pub.h:1.3 src/sys/rump/include/rump/rumpvfs_if_pub.h:1.4
--- src/sys/rump/include/rump/rumpvfs_if_pub.h:1.3	Thu Oct 15 00:31:25 2009
+++ src/sys/rump/include/rump/rumpvfs_if_pub.h	Wed Apr 14 14:14:53 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: rumpvfs_if_pub.h,v 1.3 2009/10/15 00:31:25 pooka Exp $	*/
+/*	$NetBSD: rumpvfs_if_pub.h,v 1.4 2010/04/14 14:14:53 pooka Exp $	*/
 
 /*
  * Automatically generated.  DO NOT EDIT.
@@ -24,11 +24,11 @@
 void rump_pub_freecn(struct componentname *, int);
 int rump_pub_checksavecn(struct componentname *);
 int rump_pub_namei(uint32_t, uint32_t, const char *, struct vnode **, struct vnode **, struct componentname **);
-struct componentname * rump_pub_makecn(u_long, u_long, const char *, size_t, kauth_cred_t, struct lwp *);
+struct componentname * rump_pub_makecn(u_long, u_long, const char *, size_t, struct kauth_cred *, struct lwp *);
 int rump_pub_vfs_unmount(struct mount *, int);
 int rump_pub_vfs_root(struct mount *, struct vnode **, int);
 int rump_pub_vfs_statvfs(struct mount *, struct statvfs *);
-int rump_pub_vfs_sync(struct mount *, int, kauth_cred_t);
+int rump_pub_vfs_sync(struct mount *, int, struct kauth_cred *);
 int rump_pub_vfs_fhtovp(struct mount *, struct fid *, struct vnode **);
 int rump_pub_vfs_vptofh(struct vnode *, struct fid *, size_t *);
 void rump_pub_vfs_syncwait(struct mount *);

Index: src/sys/rump/librump/rumpkern/rumpkern_if_priv.h
diff -u src/sys/rump/librump/rumpkern/rumpkern_if_priv.h:1.6 src/sys/rump/librump/rumpkern/rumpkern_if_priv.h:1.7
--- src/sys/rump/librump/rumpkern/rumpkern_if_priv.h:1.6	Fri Mar  5 18:43:59 2010
+++ src/sys/rump/librump/rumpkern/rumpkern_if_priv.h	Wed Apr 14 14:14:52 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: rumpkern_if_priv.h,v 1.6 2010/03/05 18:43:59 pooka Exp $	*/
+/*	$NetBSD: rumpkern_if_priv.h,v 1.7 2010/04/14 14:14:52 pooka Exp $	*/
 
 /*
  * Automatically generated.  DO NOT EDIT.
@@ -15,9 +15,9 @@
 size_t rump_uio_getresid(struct uio *);
 off_t rump_uio_getoff(struct uio *);
 size_t rump_uio_free(struct uio *);
-kauth_cred_t rump_cred_create(uid_t, gid_t, size_t, gid_t *);
-kauth_cred_t rump_cred_suserget(void);
-void rump_cred_put(kauth_cred_t);
+struct kauth_cred* rump_cred_create(uid_t, gid_t, size_t, gid_t *);
+struct kauth_cred* rump_cred_suserget(void);
+void rump_cred_put(struct kauth_cred *);
 struct lwp * rump_newproc_switch(void);
 struct lwp * rump_lwp_alloc(pid_t, lwpid_t);
 struct lwp * rump_lwp_alloc_and_switch(pid_t, lwpid_t);
Index: src/sys/rump/librump/rumpkern/rumpkern_if_wrappers.c
diff -u src/sys/rump/librump/rumpkern/rumpkern_if_wrappers.c:1.6 src/sys/rump/librump/rumpkern/rumpkern_if_wrappers.c:1.7
--- src/sys/rump/librump/rumpkern/rumpkern_if_wrappers.c:1.6	Fri Mar  5 18:43:59 2010
+++ src/sys/rump/librump/rumpkern/rumpkern_if_wrappers.c	Wed Apr 14

CVS commit: src/sys/rump

2010-04-14 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Wed Apr 14 14:12:48 UTC 2010

Modified Files:
src/sys/rump/include/rump: rump.h
src/sys/rump/librump/rumpkern: rumpkern.ifspec
src/sys/rump/librump/rumpvfs: rumpvfs.ifspec

Log Message:
Use "struct kauth_cred *" instead of kauth_cred_t in all exported
interfaces.  Allows to remove hairbrained _t typedef dance.


To generate a diff of this commit:
cvs rdiff -u -r1.37 -r1.38 src/sys/rump/include/rump/rump.h
cvs rdiff -u -r1.4 -r1.5 src/sys/rump/librump/rumpkern/rumpkern.ifspec
cvs rdiff -u -r1.1 -r1.2 src/sys/rump/librump/rumpvfs/rumpvfs.ifspec

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

Modified files:

Index: src/sys/rump/include/rump/rump.h
diff -u src/sys/rump/include/rump/rump.h:1.37 src/sys/rump/include/rump/rump.h:1.38
--- src/sys/rump/include/rump/rump.h:1.37	Wed Feb 24 14:56:04 2010
+++ src/sys/rump/include/rump/rump.h	Wed Apr 14 14:12:48 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: rump.h,v 1.37 2010/02/24 14:56:04 pooka Exp $	*/
+/*	$NetBSD: rump.h,v 1.38 2010/04/14 14:12:48 pooka Exp $	*/
 
 /*
  * Copyright (c) 2007 Antti Kantee.  All Rights Reserved.
@@ -43,12 +43,11 @@
 struct fid;
 struct statvfs;
 struct stat;
+struct kauth_cred;
+struct lwp;
+struct modinfo;
 
 /* yetch */
-#if !defined(_RUMPKERNEL) && !defined(__NetBSD__)
-struct kauth_cred;
-typedef struct kauth_cred *kauth_cred_t;
-#endif
 #if defined(__NetBSD__)
 #include 
 #else
@@ -59,9 +58,6 @@
 #endif
 #endif /* __NetBSD__ */
 
-struct lwp;
-struct modinfo;
-
 #include 
 #include 
 

Index: src/sys/rump/librump/rumpkern/rumpkern.ifspec
diff -u src/sys/rump/librump/rumpkern/rumpkern.ifspec:1.4 src/sys/rump/librump/rumpkern/rumpkern.ifspec:1.5
--- src/sys/rump/librump/rumpkern/rumpkern.ifspec:1.4	Fri Mar  5 18:41:46 2010
+++ src/sys/rump/librump/rumpkern/rumpkern.ifspec	Wed Apr 14 14:12:48 2010
@@ -1,4 +1,4 @@
-;	$NetBSD: rumpkern.ifspec,v 1.4 2010/03/05 18:41:46 pooka Exp $
+;	$NetBSD: rumpkern.ifspec,v 1.5 2010/04/14 14:12:48 pooka Exp $
 
 NAME|kern
 PUBHDR|include/rump/rumpkern_if_pub.h
@@ -20,9 +20,9 @@
 off_t		|uio_getoff	|struct uio *
 size_t		|uio_free	|struct uio *
 
-kauth_cred_t	|cred_create	|uid_t, gid_t, size_t, gid_t *
-kauth_cred_t	|cred_suserget	|void
-void		|cred_put	|kauth_cred_t
+struct kauth_cred*|cred_create	|uid_t, gid_t, size_t, gid_t *
+struct kauth_cred*|cred_suserget|void
+void		  |cred_put	|struct kauth_cred *
 
 ; lwp interfaces.  these need much love
 struct lwp *	|newproc_switch		|void

Index: src/sys/rump/librump/rumpvfs/rumpvfs.ifspec
diff -u src/sys/rump/librump/rumpvfs/rumpvfs.ifspec:1.1 src/sys/rump/librump/rumpvfs/rumpvfs.ifspec:1.2
--- src/sys/rump/librump/rumpvfs/rumpvfs.ifspec:1.1	Wed Oct 14 17:17:00 2009
+++ src/sys/rump/librump/rumpvfs/rumpvfs.ifspec	Wed Apr 14 14:12:48 2010
@@ -1,4 +1,4 @@
-;   $NetBSD: rumpvfs.ifspec,v 1.1 2009/10/14 17:17:00 pooka Exp $
+;   $NetBSD: rumpvfs.ifspec,v 1.2 2010/04/14 14:12:48 pooka Exp $
 
 NAME|vfs
 PUBHDR|include/rump/rumpvfs_if_pub.h
@@ -38,12 +38,12 @@
  struct vnode **, struct vnode **,	\
  struct componentname **
 struct componentname *|makecn	|u_long, u_long, const char *, size_t,	\
- kauth_cred_t, struct lwp *
+ struct kauth_cred *, struct lwp *
 
 int		|vfs_unmount	|struct mount *, int
 int		|vfs_root	|struct mount *, struct vnode **, int
 int		|vfs_statvfs	|struct mount *, struct statvfs *
-int		|vfs_sync	|struct mount *, int, kauth_cred_t
+int		|vfs_sync	|struct mount *, int, struct kauth_cred *
 int		|vfs_fhtovp	|struct mount *, struct fid *, struct vnode **
 int		|vfs_vptofh	|struct vnode *, struct fid *, size_t *
 void		|vfs_syncwait	|struct mount *



CVS commit: src/sys/kern

2010-04-14 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Wed Apr 14 13:58:51 UTC 2010

Modified Files:
src/sys/kern: vnode_if.sh

Log Message:
Make rump vnode interface lightweight: the only things we
really need are:

  0) provide VOP_OP in the alternate RUMP_VOP_OP namespace

  and for each op:
  1) schedule rump cpu
  2) call VOP_OP
  3) unschedule rump cpu

While here, take the opportunity to get rid of _t lossage in the
rump-exported interfaces.


To generate a diff of this commit:
cvs rdiff -u -r1.55 -r1.56 src/sys/kern/vnode_if.sh

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/vnode_if.sh
diff -u src/sys/kern/vnode_if.sh:1.55 src/sys/kern/vnode_if.sh:1.56
--- src/sys/kern/vnode_if.sh:1.55	Wed Apr 14 12:19:50 2010
+++ src/sys/kern/vnode_if.sh	Wed Apr 14 13:58:51 2010
@@ -29,7 +29,7 @@
  * SUCH DAMAGE.
  */
 "
-SCRIPT_ID='$NetBSD: vnode_if.sh,v 1.55 2010/04/14 12:19:50 pooka Exp $'
+SCRIPT_ID='$NetBSD: vnode_if.sh,v 1.56 2010/04/14 13:58:51 pooka Exp $'
 
 # Script to produce VFS front-end sugar.
 #
@@ -96,7 +96,7 @@
 /^#/	{ next; }
 # First line of description
 /^vop_/	{
-	name=rump $1;
+	name=$1;
 	argc=0;
 	willmake=-1;
 	next;
@@ -143,11 +143,13 @@
 	# nuke the types from the kernel, but that is a battle for
 	# another day.
 	at = $i;
-	if (length(rump) != 0) {
+	if (rump) {
 		if (at == "vm_prot_t")
 			at = "int";
 		if (at == "voff_t")
 			at = "off_t";
+		if (at == "kauth_cred_t")
+			at = "struct kauth_cred *"
 	}
 	argtype[argc] = at;
 	i++;
@@ -205,23 +207,27 @@
 	echo '#include "opt_vnode_lockdebug.h"'
 	echo '#endif /* _KERNEL_OPT */'
 fi
-echo "
-extern const struct vnodeop_desc ${rump}vop_default_desc;
-"
+[ -z "${rump}" ] && echo "
+extern const struct vnodeop_desc ${rump}vop_default_desc;"
+echo
 
 # Body stuff
 # This awk program needs toupper() so define it if necessary.
 sed -e "$sed_prep" $src | $awk -v rump=${rump} "$toupper"'
 function doit() {
+	name = rump name
 	# Declare arg struct, descriptor.
-	printf("\n#define %s_DESCOFFSET %d\n", toupper(name), vop_offset++);
-	printf("struct %s_args {\n", name);
-	printf("\tconst struct vnodeop_desc * a_desc;\n");
-	for (i=0; i\n#endif\n");
+	printf("struct buf;\n");
+	if (rump) {
+		printf("struct flock;\n");
+		printf("struct knote;\n");
+		printf("struct vm_page;\n");
+	}
+	printf("\n#ifndef _KERNEL\n#include \n#endif\n");
+	printf("\n/* Special cases: */\n");
 
 	argc=1;
 	argtype[0]="struct buf *";
 	argname[0]="bp";
 	lockstate[0] = -1;
 	arg0special="->b_vp";
-	name=rump "vop_bwrite";
+	name="vop_bwrite";
 	doit();
 	printf("\n/* End of special cases */\n");
+	if (rump)
+		printf("\n");
 }
 END	{
-	printf("\n#define VNODE_OPS_COUNT\t%d\n", vop_offset);
+	if (!rump) {
+		printf("\n#define VNODE_OPS_COUNT\t%d\n", vop_offset);
+	}
 }
 '"$awk_parser" | sed -e "$anal_retentive"
 
@@ -295,8 +311,9 @@
 [ ! -z "${rump}" ] && echo '#include '		\
 	&& echo '#include "rump_private.h"'
 
-echo "
-const struct vnodeop_desc ${rump}vop_default_desc = {"
+if [ -z "${rump}" ] ; then
+	echo "
+const struct vnodeop_desc vop_default_desc = {"
 echo '	0,
 	"default",
 	0,
@@ -306,6 +323,7 @@
 	VDESC_NO_OFFSET,
 };
 '
+fi
 
 # Body stuff
 sed -e "$sed_prep" $src | $awk -v rump=${rump} -v lockdebug=${lockdebug} '
@@ -321,9 +339,9 @@
 	return -1;
 }
 
-function doit() {
+function offsets() {
 	# Define offsets array
-	printf("\nconst int %s_vp_offsets[] = {\n", name);
+	printf("const int %s_vp_offsets[] = {\n", name);
 	for (i=0; iv_vflag & VV_MPSAFE);\n", argname[0], arg0special);
-	if (rump)
-		printf("\trump_schedule();\n");
 	printf("\tif (!mpsafe) { KERNEL_LOCK(1, curlwp); }\n");
 	printf("\terror = (VCALL(%s%s, VOFFSET(%s), &a));\n",
 		argname[0], arg0special, name);
 	printf("\tif (!mpsafe) { KERNEL_UNLOCK_ONE(curlwp); }\n");
-	if (rump)
-		printf("\trump_unschedule();\n");
 	if (willmake != -1) {
 		printf("#ifdef DIAGNOSTIC\n");
 		printf("\tif (error == 0)\n"\
@@ -417,6 +439,30 @@
 	}
 	printf("\treturn error;\n}\n");
 }
+
+function doit() {
+	printf("\n");
+	if (!rump)
+		offsets();
+
+	if (rump)
+		extname = "RUMP_" toupper(name);
+	else
+		extname = toupper(name);
+
+	# Define function.
+	printf("int\n%s(", extname);
+	for (i=0; i

CVS commit: src/sys/net

2010-04-14 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Wed Apr 14 13:31:33 UTC 2010

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

Log Message:
Add a little comment on how bpf can be made unloadable, per pointer from ad.


To generate a diff of this commit:
cvs rdiff -u -r1.157 -r1.158 src/sys/net/bpf.c

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

Modified files:

Index: src/sys/net/bpf.c
diff -u src/sys/net/bpf.c:1.157 src/sys/net/bpf.c:1.158
--- src/sys/net/bpf.c:1.157	Mon Apr  5 07:22:22 2010
+++ src/sys/net/bpf.c	Wed Apr 14 13:31:33 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: bpf.c,v 1.157 2010/04/05 07:22:22 joerg Exp $	*/
+/*	$NetBSD: bpf.c,v 1.158 2010/04/14 13:31:33 pooka Exp $	*/
 
 /*
  * Copyright (c) 1990, 1991, 1993
@@ -39,7 +39,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: bpf.c,v 1.157 2010/04/05 07:22:22 joerg Exp $");
+__KERNEL_RCSID(0, "$NetBSD: bpf.c,v 1.158 2010/04/14 13:31:33 pooka Exp $");
 
 #if defined(_KERNEL_OPT)
 #include "opt_bpf.h"
@@ -1976,8 +1976,24 @@
 
 	case MODULE_CMD_FINI:
 		/*
-		 * bpf_ops is not (yet) referenced in the callers before
-		 * attach.  maybe other issues too.  "safety first".
+		 * While there is no reference counting for bpf callers,
+		 * unload could at least in theory be done similarly to 
+		 * system call disestablishment.  This should even be
+		 * a little simpler:
+		 * 
+		 * 1) replace op vector with stubs
+		 * 2) post update to all cpus with xc
+		 * 3) check that nobody is in bpf anymore
+		 *(it's doubtful we'd want something like l_sysent,
+		 * but we could do something like *signed* percpu
+		 * counters.  if the sum is 0, we're good).
+		 * 4) if fail, unroll changes
+		 *
+		 * NOTE: change won't be atomic to the outside.  some
+		 * packets may be not captured even if unload is
+		 * not succesful.  I think packet capture not working
+		 * is a perfectly logical consequence of trying to
+		 * disable packet capture.
 		 */
 		error = EOPNOTSUPP;
 		break;



CVS commit: src/lib/libc/string

2010-04-14 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Wed Apr 14 13:07:51 UTC 2010

Modified Files:
src/lib/libc/string: strlcpy.3

Log Message:
Join URL.


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

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

Modified files:

Index: src/lib/libc/string/strlcpy.3
diff -u src/lib/libc/string/strlcpy.3:1.12 src/lib/libc/string/strlcpy.3:1.13
--- src/lib/libc/string/strlcpy.3:1.12	Wed Apr 14 11:07:20 2010
+++ src/lib/libc/string/strlcpy.3	Wed Apr 14 13:07:51 2010
@@ -1,4 +1,4 @@
-.\"	$NetBSD: strlcpy.3,v 1.12 2010/04/14 11:07:20 jruoho Exp $
+.\"	$NetBSD: strlcpy.3,v 1.13 2010/04/14 13:07:51 wiz Exp $
 .\" from OpenBSD: strlcpy.3,v 1.11 2000/11/16 23:27:41 angelos Exp
 .\"
 .\" Copyright (c) 1998, 2000 Todd C. Miller 
@@ -197,8 +197,7 @@
 .%I USENIX Association
 .%B Proceedings of the FREENIX Track: 1999 USENIX Annual Technical Conference
 .%D June 6-11, 1999
-.%U http://www.usenix.org/publications/library/proceedings/usenix99/
-.%U full_papers/millert/millert.pdf
+.%U http://www.usenix.org/publications/library/proceedings/usenix99/full_papers/millert/millert.pdf
 .Re
 .Sh HISTORY
 The



CVS commit: src/share/man/man8

2010-04-14 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Wed Apr 14 13:07:19 UTC 2010

Modified Files:
src/share/man/man8: rc.8

Log Message:
Join URL.


To generate a diff of this commit:
cvs rdiff -u -r1.34 -r1.35 src/share/man/man8/rc.8

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

Modified files:

Index: src/share/man/man8/rc.8
diff -u src/share/man/man8/rc.8:1.34 src/share/man/man8/rc.8:1.35
--- src/share/man/man8/rc.8:1.34	Wed Apr 14 10:03:18 2010
+++ src/share/man/man8/rc.8	Wed Apr 14 13:07:19 2010
@@ -1,4 +1,4 @@
-.\" 	$NetBSD: rc.8,v 1.34 2010/04/14 10:03:18 jruoho Exp $
+.\" 	$NetBSD: rc.8,v 1.35 2010/04/14 13:07:19 wiz Exp $
 .\"
 .\" Copyright (c) 2000-2004 The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -349,8 +349,7 @@
 .%I USENIX Association
 .%B Proceedings of the FREENIX Track: 2001 USENIX Annual Technical Conference
 .%D June 25-30, 2001
-.%U http://www.usenix.org/publications/
-.%U library/proceedings/usenix01/freenix01/full_papers/mewburn/mewburn.pdf
+.%U http://www.usenix.org/publications/library/proceedings/usenix01/freenix01/full_papers/mewburn/mewburn.pdf
 .Re
 .Sh HISTORY
 The



CVS commit: src/share/man/man4

2010-04-14 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Wed Apr 14 13:06:45 UTC 2010

Modified Files:
src/share/man/man4: cgd.4

Log Message:
Join URL; sort SEE ALSO.


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 src/share/man/man4/cgd.4

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

Modified files:

Index: src/share/man/man4/cgd.4
diff -u src/share/man/man4/cgd.4:1.13 src/share/man/man4/cgd.4:1.14
--- src/share/man/man4/cgd.4:1.13	Wed Apr 14 11:52:39 2010
+++ src/share/man/man4/cgd.4	Wed Apr 14 13:06:45 2010
@@ -1,4 +1,4 @@
-.\" $NetBSD: cgd.4,v 1.13 2010/04/14 11:52:39 jruoho Exp $
+.\" $NetBSD: cgd.4,v 1.14 2010/04/14 13:06:45 wiz Exp $
 .\"
 .\" Copyright (c) 2002, 2003 The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -141,8 +141,8 @@
 .Xr config 1 ,
 .Xr ioctl 2 ,
 .Xr sd 4 ,
-.Xr MAKEDEV 8 ,
-.Xr cgdconfig 8
+.Xr cgdconfig 8 ,
+.Xr MAKEDEV 8
 .Rs
 .%A Roland C. Dowdeswell
 .%A John Ioannidis
@@ -151,8 +151,7 @@
 .%B Proceedings of the FREENIX Track: 2003 USENIX Annual Technical Conference
 .%P 179-186
 .%D June 9-14, 2003
-.%U http://www.usenix.org/event/usenix03/
-.%U tech/freenix03/full_papers/dowdeswell/dowdeswell.pdf
+.%U http://www.usenix.org/event/usenix03/tech/freenix03/full_papers/dowdeswell/dowdeswell.pdf
 .Re
 .Sh HISTORY
 The



CVS commit: src/share/man/man9

2010-04-14 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Wed Apr 14 13:06:10 UTC 2010

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

Log Message:
Join URL.


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

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

Modified files:

Index: src/share/man/man9/ubc.9
diff -u src/share/man/man9/ubc.9:1.4 src/share/man/man9/ubc.9:1.5
--- src/share/man/man9/ubc.9:1.4	Wed Apr 14 11:33:59 2010
+++ src/share/man/man9/ubc.9	Wed Apr 14 13:06:10 2010
@@ -1,4 +1,4 @@
-.\"	$NetBSD: ubc.9,v 1.4 2010/04/14 11:33:59 jruoho Exp $
+.\"	$NetBSD: ubc.9,v 1.5 2010/04/14 13:06:10 wiz Exp $
 .\"
 .\" Copyright (c) 1998 Matthew R. Green
 .\" All rights reserved.
@@ -140,8 +140,7 @@
 .%B Proceedings of the FREENIX Track: 2000 USENIX Annual Technical Conference
 .%P 285-290
 .%D June 18-23, 2000
-.%U http://www.usenix.org/
-.%U event/usenix2000/freenix/full_papers/silvers/silvers.pdf
+.%U http://www.usenix.org/event/usenix2000/freenix/full_papers/silvers/silvers.pdf
 .Re
 .Sh HISTORY
 UBC first appeared in



CVS commit: src/share/man/man9

2010-04-14 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Wed Apr 14 13:05:43 UTC 2010

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

Log Message:
Join URL.


To generate a diff of this commit:
cvs rdiff -u -r1.51 -r1.52 src/share/man/man9/bus_dma.9

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

Modified files:

Index: src/share/man/man9/bus_dma.9
diff -u src/share/man/man9/bus_dma.9:1.51 src/share/man/man9/bus_dma.9:1.52
--- src/share/man/man9/bus_dma.9:1.51	Wed Apr 14 11:11:29 2010
+++ src/share/man/man9/bus_dma.9	Wed Apr 14 13:05:43 2010
@@ -1,4 +1,4 @@
-.\" $NetBSD: bus_dma.9,v 1.51 2010/04/14 11:11:29 jruoho Exp $
+.\" $NetBSD: bus_dma.9,v 1.52 2010/04/14 13:05:43 wiz Exp $
 .\"
 .\" Copyright (c) 1996, 1997, 1998, 2001, 2005, 2006 The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -817,8 +817,7 @@
 .%B Proceedings of the FREENIX Track: 1998 USENIX Annual Technical Conference
 .%P 1-12
 .%D June 15-19, 1998
-.%U http://www.usenix.org/publications/
-.%U library/proceedings/usenix98/freenix/thorpe_dma.pdf
+.%U http://www.usenix.org/publications/library/proceedings/usenix98/freenix/thorpe_dma.pdf
 .Re
 .Sh HISTORY
 The



CVS commit: src/sys

2010-04-14 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Wed Apr 14 12:21:05 UTC 2010

Modified Files:
src/sys/kern: vnode_if.c
src/sys/rump/include/rump: rumpvnode_if.h
src/sys/rump/librump/rumpvfs: rumpvnode_if.c
src/sys/sys: vnode_if.h

Log Message:
regenefactor for comment and whitespace changes


To generate a diff of this commit:
cvs rdiff -u -r1.82 -r1.83 src/sys/kern/vnode_if.c
cvs rdiff -u -r1.5 -r1.6 src/sys/rump/include/rump/rumpvnode_if.h
cvs rdiff -u -r1.4 -r1.5 src/sys/rump/librump/rumpvfs/rumpvnode_if.c
cvs rdiff -u -r1.76 -r1.77 src/sys/sys/vnode_if.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/kern/vnode_if.c
diff -u src/sys/kern/vnode_if.c:1.82 src/sys/kern/vnode_if.c:1.83
--- src/sys/kern/vnode_if.c:1.82	Sat Apr 10 19:44:02 2010
+++ src/sys/kern/vnode_if.c	Wed Apr 14 12:21:04 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: vnode_if.c,v 1.82 2010/04/10 19:44:02 pooka Exp $	*/
+/*	$NetBSD: vnode_if.c,v 1.83 2010/04/14 12:21:04 pooka Exp $	*/
 
 /*
  * Warning: DO NOT EDIT! This file is automatically generated!
@@ -7,7 +7,7 @@
  * Created from the file:
  *	NetBSD: vnode_if.src,v 1.58 2008/11/15 19:08:12 pooka Exp
  * by the script:
- *	NetBSD: vnode_if.sh,v 1.54 2010/04/10 19:41:54 pooka Exp
+ *	NetBSD: vnode_if.sh,v 1.55 2010/04/14 12:19:50 pooka Exp
  */
 
 /*
@@ -40,7 +40,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: vnode_if.c,v 1.82 2010/04/10 19:44:02 pooka Exp $");
+__KERNEL_RCSID(0, "$NetBSD: vnode_if.c,v 1.83 2010/04/14 12:21:04 pooka Exp $");
 
 #include 
 #include 
@@ -1639,8 +1639,6 @@
 	return error;
 }
 
-/* End of special cases. */
-
 const struct vnodeop_desc * const vfs_op_descs[] = {
 	&vop_default_desc,	/* MUST BE FIRST */
 	&vop_bwrite_desc,	/* XXX: SPECIAL CASE */
@@ -1693,4 +1691,3 @@
 	&vop_setextattr_desc,
 	NULL
 };
-

Index: src/sys/rump/include/rump/rumpvnode_if.h
diff -u src/sys/rump/include/rump/rumpvnode_if.h:1.5 src/sys/rump/include/rump/rumpvnode_if.h:1.6
--- src/sys/rump/include/rump/rumpvnode_if.h:1.5	Sat Apr 10 19:44:02 2010
+++ src/sys/rump/include/rump/rumpvnode_if.h	Wed Apr 14 12:21:05 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: rumpvnode_if.h,v 1.5 2010/04/10 19:44:02 pooka Exp $	*/
+/*	$NetBSD: rumpvnode_if.h,v 1.6 2010/04/14 12:21:05 pooka Exp $	*/
 
 /*
  * Warning: DO NOT EDIT! This file is automatically generated!
@@ -7,7 +7,7 @@
  * Created from the file:
  *	NetBSD: vnode_if.src,v 1.58 2008/11/15 19:08:12 pooka Exp
  * by the script:
- *	NetBSD: vnode_if.sh,v 1.54 2010/04/10 19:41:54 pooka Exp
+ *	NetBSD: vnode_if.sh,v 1.55 2010/04/14 12:19:50 pooka Exp
  */
 
 /*
@@ -44,14 +44,13 @@
 
 extern const struct vnodeop_desc rump_vop_default_desc;
 
-
 /* Special cases: */
+
 struct buf;
 #ifndef _KERNEL
 #include 
 #endif
 
-
 #define RUMP_VOP_BWRITE_DESCOFFSET 1
 struct rump_vop_bwrite_args {
 	const struct vnodeop_desc *a_desc;
@@ -59,6 +58,7 @@
 };
 extern const struct vnodeop_desc rump_vop_bwrite_desc;
 int RUMP_VOP_BWRITE(struct buf *);
+
 /* End of special cases */
 
 #define RUMP_VOP_LOOKUP_DESCOFFSET 2
@@ -556,6 +556,4 @@
 
 #define VNODE_OPS_COUNT	48
 
-/* End of special cases. */
-
 #endif /* !_RUMP_RUMPVNODE_IF_H_ */

Index: src/sys/rump/librump/rumpvfs/rumpvnode_if.c
diff -u src/sys/rump/librump/rumpvfs/rumpvnode_if.c:1.4 src/sys/rump/librump/rumpvfs/rumpvnode_if.c:1.5
--- src/sys/rump/librump/rumpvfs/rumpvnode_if.c:1.4	Sat Apr 10 19:44:02 2010
+++ src/sys/rump/librump/rumpvfs/rumpvnode_if.c	Wed Apr 14 12:21:05 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: rumpvnode_if.c,v 1.4 2010/04/10 19:44:02 pooka Exp $	*/
+/*	$NetBSD: rumpvnode_if.c,v 1.5 2010/04/14 12:21:05 pooka Exp $	*/
 
 /*
  * Warning: DO NOT EDIT! This file is automatically generated!
@@ -7,7 +7,7 @@
  * Created from the file:
  *	NetBSD: vnode_if.src,v 1.58 2008/11/15 19:08:12 pooka Exp
  * by the script:
- *	NetBSD: vnode_if.sh,v 1.54 2010/04/10 19:41:54 pooka Exp
+ *	NetBSD: vnode_if.sh,v 1.55 2010/04/14 12:19:50 pooka Exp
  */
 
 /*
@@ -40,7 +40,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: rumpvnode_if.c,v 1.4 2010/04/10 19:44:02 pooka Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rumpvnode_if.c,v 1.5 2010/04/14 12:21:05 pooka Exp $");
 
 #include 
 #include 
@@ -1735,8 +1735,6 @@
 	return error;
 }
 
-/* End of special cases. */
-
 const struct vnodeop_desc * const rump_vfs_op_descs[] = {
 	&rump_vop_default_desc,	/* MUST BE FIRST */
 	&rump_vop_bwrite_desc,	/* XXX: SPECIAL CASE */
@@ -1789,4 +1787,3 @@
 	&rump_vop_setextattr_desc,
 	NULL
 };
-

Index: src/sys/sys/vnode_if.h
diff -u src/sys/sys/vnode_if.h:1.76 src/sys/sys/vnode_if.h:1.77
--- src/sys/sys/vnode_if.h:1.76	Sat Apr 10 19:44:02 2010
+++ src/sys/sys/vnode_if.h	Wed Apr 14 12:21:05 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: vnode_if.h,v 1.76 2010/04/10 19:44:02 pooka Exp $	*/
+/*	$NetBSD: vnode_if.h,v 1.77 2010/04/14 12:21:05 pooka Exp $	*/
 
 /*
  * Warning: DO NOT EDIT! This file is automatically generated!
@@ -7,7 +7

CVS commit: src/sys/kern

2010-04-14 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Wed Apr 14 12:19:50 UTC 2010

Modified Files:
src/sys/kern: vnode_if.sh

Log Message:
Print "end of special cases" only where special cases end and not
a second time at the end of the file.  Adjust whitespace for the
sheer functional joy of it.

(i hope i didn't ruin someone's joke by missing a humorous implication
that all vnode operations are considered a little special)


To generate a diff of this commit:
cvs rdiff -u -r1.54 -r1.55 src/sys/kern/vnode_if.sh

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/vnode_if.sh
diff -u src/sys/kern/vnode_if.sh:1.54 src/sys/kern/vnode_if.sh:1.55
--- src/sys/kern/vnode_if.sh:1.54	Sat Apr 10 19:41:54 2010
+++ src/sys/kern/vnode_if.sh	Wed Apr 14 12:19:50 2010
@@ -29,7 +29,7 @@
  * SUCH DAMAGE.
  */
 "
-SCRIPT_ID='$NetBSD: vnode_if.sh,v 1.54 2010/04/10 19:41:54 pooka Exp $'
+SCRIPT_ID='$NetBSD: vnode_if.sh,v 1.55 2010/04/14 12:19:50 pooka Exp $'
 
 # Script to produce VFS front-end sugar.
 #
@@ -244,8 +244,8 @@
 	arg0special="";
 	vop_offset = 1; # start at 1, to count the 'default' op
 
-	printf("\n/* Special cases: */\nstruct buf;\n");
-	printf("#ifndef _KERNEL\n#include \n#endif\n\n");
+	printf("/* Special cases: */\n\nstruct buf;\n");
+	printf("#ifndef _KERNEL\n#include \n#endif\n");
 
 	argc=1;
 	argtype[0]="struct buf *";
@@ -254,7 +254,7 @@
 	arg0special="->b_vp";
 	name=rump "vop_bwrite";
 	doit();
-	printf("/* End of special cases */\n");
+	printf("\n/* End of special cases */\n");
 }
 END	{
 	printf("\n#define VNODE_OPS_COUNT\t%d\n", vop_offset);
@@ -262,8 +262,6 @@
 '"$awk_parser" | sed -e "$anal_retentive"
 
 # End stuff
-echo '
-/* End of special cases. */'
 echo ''
 echo "#endif /* !_${SYS}VNODE_IF_H_ */"
 }
@@ -439,8 +437,6 @@
 '"$awk_parser" | sed -e "$anal_retentive"
 
 # End stuff
-echo '
-/* End of special cases. */'
 
 # Add the vfs_op_descs array to the C file.
 # Begin stuff
@@ -459,8 +455,7 @@
 
 # End stuff
 echo '	NULL
-};
-'
+};'
 }
 do_cfile $out_c ''
 do_cfile $out_rumpc 'rump_'



CVS commit: src/share/man/man4

2010-04-14 Thread Jukka Ruohonen
Module Name:src
Committed By:   jruoho
Date:   Wed Apr 14 11:52:40 UTC 2010

Modified Files:
src/share/man/man4: cgd.4

Log Message:
Add the USENIX paper to SEE ALSO.


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 src/share/man/man4/cgd.4

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

Modified files:

Index: src/share/man/man4/cgd.4
diff -u src/share/man/man4/cgd.4:1.12 src/share/man/man4/cgd.4:1.13
--- src/share/man/man4/cgd.4:1.12	Sat Sep 13 09:13:14 2008
+++ src/share/man/man4/cgd.4	Wed Apr 14 11:52:39 2010
@@ -1,4 +1,4 @@
-.\" $NetBSD: cgd.4,v 1.12 2008/09/13 09:13:14 wiz Exp $
+.\" $NetBSD: cgd.4,v 1.13 2010/04/14 11:52:39 jruoho Exp $
 .\"
 .\" Copyright (c) 2002, 2003 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 September 12, 2008
+.Dd April 14, 2010
 .Dt CGD 4
 .Os
 .Sh NAME
@@ -143,6 +143,17 @@
 .Xr sd 4 ,
 .Xr MAKEDEV 8 ,
 .Xr cgdconfig 8
+.Rs
+.%A Roland C. Dowdeswell
+.%A John Ioannidis
+.%T The CryptoGraphic Disk Driver
+.%I USENIX Association
+.%B Proceedings of the FREENIX Track: 2003 USENIX Annual Technical Conference
+.%P 179-186
+.%D June 9-14, 2003
+.%U http://www.usenix.org/event/usenix03/
+.%U tech/freenix03/full_papers/dowdeswell/dowdeswell.pdf
+.Re
 .Sh HISTORY
 The
 .Nm



CVS commit: src/share/man/man9

2010-04-14 Thread Jukka Ruohonen
Module Name:src
Committed By:   jruoho
Date:   Wed Apr 14 11:33:59 UTC 2010

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

Log Message:
Add the USENIX paper of the author to SEE ALSO.


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

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

Modified files:

Index: src/share/man/man9/ubc.9
diff -u src/share/man/man9/ubc.9:1.3 src/share/man/man9/ubc.9:1.4
--- src/share/man/man9/ubc.9:1.3	Mon Sep 28 14:11:56 2009
+++ src/share/man/man9/ubc.9	Wed Apr 14 11:33:59 2010
@@ -1,4 +1,4 @@
-.\"	$NetBSD: ubc.9,v 1.3 2009/09/28 14:11:56 joerg Exp $
+.\"	$NetBSD: ubc.9,v 1.4 2010/04/14 11:33:59 jruoho Exp $
 .\"
 .\" Copyright (c) 1998 Matthew R. Green
 .\" All rights reserved.
@@ -24,7 +24,7 @@
 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 .\" SUCH DAMAGE.
 .\"
-.Dd August 3, 2009
+.Dd April 14, 2010
 .Dt UBC 9
 .Os
 .Sh NAME
@@ -133,6 +133,16 @@
 .Xr uvm 9 ,
 .Xr vnode 9 ,
 .Xr vnodeops 9
+.Rs
+.%A Chuck Silvers
+.%T "UBC: An Efficient Unified I/O and Memory Caching Subsystem for NetBSD"
+.%I USENIX Association
+.%B Proceedings of the FREENIX Track: 2000 USENIX Annual Technical Conference
+.%P 285-290
+.%D June 18-23, 2000
+.%U http://www.usenix.org/
+.%U event/usenix2000/freenix/full_papers/silvers/silvers.pdf
+.Re
 .Sh HISTORY
 UBC first appeared in
 .Nx 1.6 .



CVS commit: src/share/man/man9

2010-04-14 Thread Jukka Ruohonen
Module Name:src
Committed By:   jruoho
Date:   Wed Apr 14 11:11:30 UTC 2010

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

Log Message:
Now that all USENIX papers are available online, add URL to SEE ALSO.


To generate a diff of this commit:
cvs rdiff -u -r1.50 -r1.51 src/share/man/man9/bus_dma.9

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

Modified files:

Index: src/share/man/man9/bus_dma.9
diff -u src/share/man/man9/bus_dma.9:1.50 src/share/man/man9/bus_dma.9:1.51
--- src/share/man/man9/bus_dma.9:1.50	Mon Apr  5 18:24:24 2010
+++ src/share/man/man9/bus_dma.9	Wed Apr 14 11:11:29 2010
@@ -1,4 +1,4 @@
-.\" $NetBSD: bus_dma.9,v 1.50 2010/04/05 18:24:24 dyoung Exp $
+.\" $NetBSD: bus_dma.9,v 1.51 2010/04/14 11:11:29 jruoho Exp $
 .\"
 .\" Copyright (c) 1996, 1997, 1998, 2001, 2005, 2006 The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -28,7 +28,7 @@
 .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 .\" POSSIBILITY OF SUCH DAMAGE.
 .\"
-.Dd April 5, 2010
+.Dd April 14, 2010
 .Dt BUS_DMA 9
 .Os
 .Sh NAME
@@ -813,9 +813,12 @@
 .Rs
 .%A Jason Thorpe
 .%T "A Machine-Independent DMA Framework for NetBSD"
-.%J "Proceedings of the FREENIX track: 1998 USENIX Annual Technical Conference"
-.%P pp. 1-12
-.%D 1998
+.%I USENIX Association
+.%B Proceedings of the FREENIX Track: 1998 USENIX Annual Technical Conference
+.%P 1-12
+.%D June 15-19, 1998
+.%U http://www.usenix.org/publications/
+.%U library/proceedings/usenix98/freenix/thorpe_dma.pdf
 .Re
 .Sh HISTORY
 The



CVS commit: src/lib/libc/string

2010-04-14 Thread Jukka Ruohonen
Module Name:src
Committed By:   jruoho
Date:   Wed Apr 14 11:07:20 UTC 2010

Modified Files:
src/lib/libc/string: strlcpy.3

Log Message:
Add the USENIX paper of Miller and de Raadt to SEE ALSO.


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

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

Modified files:

Index: src/lib/libc/string/strlcpy.3
diff -u src/lib/libc/string/strlcpy.3:1.11 src/lib/libc/string/strlcpy.3:1.12
--- src/lib/libc/string/strlcpy.3:1.11	Thu Jun 26 12:25:22 2003
+++ src/lib/libc/string/strlcpy.3	Wed Apr 14 11:07:20 2010
@@ -1,4 +1,4 @@
-.\"	$NetBSD: strlcpy.3,v 1.11 2003/06/26 12:25:22 wiz Exp $
+.\"	$NetBSD: strlcpy.3,v 1.12 2010/04/14 11:07:20 jruoho Exp $
 .\" from OpenBSD: strlcpy.3,v 1.11 2000/11/16 23:27:41 angelos Exp
 .\"
 .\" Copyright (c) 1998, 2000 Todd C. Miller 
@@ -190,11 +190,22 @@
 .Xr snprintf 3 ,
 .Xr strncat 3 ,
 .Xr strncpy 3
+.Rs
+.%A Todd C. Miller
+.%A Theo de Raadt
+.%T strlcpy and strlcat -- Consistent, Safe, String Copy and Concatenation
+.%I USENIX Association
+.%B Proceedings of the FREENIX Track: 1999 USENIX Annual Technical Conference
+.%D June 6-11, 1999
+.%U http://www.usenix.org/publications/library/proceedings/usenix99/
+.%U full_papers/millert/millert.pdf
+.Re
 .Sh HISTORY
+The
 .Fn strlcpy
 and
 .Fn strlcat
-first appeared in
+functions first appeared in
 .Ox 2.4 ,
 then in
 .Nx 1.4.3



CVS commit: src/sys/rump/librump/rumpkern

2010-04-14 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Wed Apr 14 10:34:55 UTC 2010

Modified Files:
src/sys/rump/librump/rumpkern: locks.c

Log Message:
Add comment about clock mismatch.


To generate a diff of this commit:
cvs rdiff -u -r1.38 -r1.39 src/sys/rump/librump/rumpkern/locks.c

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

Modified files:

Index: src/sys/rump/librump/rumpkern/locks.c
diff -u src/sys/rump/librump/rumpkern/locks.c:1.38 src/sys/rump/librump/rumpkern/locks.c:1.39
--- src/sys/rump/librump/rumpkern/locks.c:1.38	Sun Jan 31 00:54:22 2010
+++ src/sys/rump/librump/rumpkern/locks.c	Wed Apr 14 10:34:54 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: locks.c,v 1.38 2010/01/31 00:54:22 snj Exp $	*/
+/*	$NetBSD: locks.c,v 1.39 2010/04/14 10:34:54 pooka Exp $	*/
 
 /*
  * Copyright (c) 2007, 2008 Antti Kantee.  All Rights Reserved.
@@ -29,7 +29,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: locks.c,v 1.38 2010/01/31 00:54:22 snj Exp $");
+__KERNEL_RCSID(0, "$NetBSD: locks.c,v 1.39 2010/04/14 10:34:54 pooka Exp $");
 
 #include 
 #include 
@@ -225,6 +225,10 @@
 	struct timespec ts, tick;
 	extern int hz;
 
+	/*
+	 * XXX: this fetches rump kernel time, but rumpuser_cv_timedwait
+	 * uses host time.
+	 */
 	nanotime(&ts);
 	tick.tv_sec = ticks / hz;
 	tick.tv_nsec = (ticks % hz) * (10/hz);



CVS commit: src/sys/rump/librump/rumpkern

2010-04-14 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Wed Apr 14 10:27:53 UTC 2010

Modified Files:
src/sys/rump/librump/rumpkern: Makefile.rumpkern emul.c intr.c rump.c

Log Message:
Include kern_tc and use a timecounter driver instead of homerolled
kern_tc implementation.


To generate a diff of this commit:
cvs rdiff -u -r1.75 -r1.76 src/sys/rump/librump/rumpkern/Makefile.rumpkern
cvs rdiff -u -r1.124 -r1.125 src/sys/rump/librump/rumpkern/emul.c
cvs rdiff -u -r1.23 -r1.24 src/sys/rump/librump/rumpkern/intr.c
cvs rdiff -u -r1.159 -r1.160 src/sys/rump/librump/rumpkern/rump.c

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

Modified files:

Index: src/sys/rump/librump/rumpkern/Makefile.rumpkern
diff -u src/sys/rump/librump/rumpkern/Makefile.rumpkern:1.75 src/sys/rump/librump/rumpkern/Makefile.rumpkern:1.76
--- src/sys/rump/librump/rumpkern/Makefile.rumpkern:1.75	Mon Apr 12 22:17:23 2010
+++ src/sys/rump/librump/rumpkern/Makefile.rumpkern	Wed Apr 14 10:27:53 2010
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.rumpkern,v 1.75 2010/04/12 22:17:23 pooka Exp $
+#	$NetBSD: Makefile.rumpkern,v 1.76 2010/04/14 10:27:53 pooka Exp $
 #
 
 .include "${RUMPTOP}/Makefile.rump"
@@ -39,8 +39,8 @@
 # sys/kern
 SRCS+=	init_sysctl_base.c kern_auth.c kern_descrip.c kern_event.c	\
 	kern_hook.c kern_ksyms.c kern_malloc_stdtype.c kern_module.c	\
-	kern_mutex_obj.c kern_rate.c kern_stub.c kern_sysctl.c		\
-	kern_timeout.c kern_uidinfo.c param.c\
+	kern_mutex_obj.c kern_ntptime.c kern_rate.c kern_stub.c		\
+	kern_sysctl.c kern_tc.c kern_timeout.c kern_uidinfo.c param.c	\
 	sys_descrip.c sys_generic.c sys_pipe.c sys_select.c syscalls.c
 
 # sys/kern subr (misc)

Index: src/sys/rump/librump/rumpkern/emul.c
diff -u src/sys/rump/librump/rumpkern/emul.c:1.124 src/sys/rump/librump/rumpkern/emul.c:1.125
--- src/sys/rump/librump/rumpkern/emul.c:1.124	Wed Mar 31 14:08:33 2010
+++ src/sys/rump/librump/rumpkern/emul.c	Wed Apr 14 10:27:53 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: emul.c,v 1.124 2010/03/31 14:08:33 pooka Exp $	*/
+/*	$NetBSD: emul.c,v 1.125 2010/04/14 10:27:53 pooka Exp $	*/
 
 /*
  * Copyright (c) 2007 Antti Kantee.  All Rights Reserved.
@@ -28,7 +28,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: emul.c,v 1.124 2010/03/31 14:08:33 pooka Exp $");
+__KERNEL_RCSID(0, "$NetBSD: emul.c,v 1.125 2010/04/14 10:27:53 pooka Exp $");
 
 #include 
 #include 
@@ -62,8 +62,6 @@
 
 #include "rump_private.h"
 
-time_t time_second = 1;
-
 kmutex_t *proc_lock;
 struct lwp lwp0;
 struct vnode *rootvp;
@@ -112,6 +110,8 @@
 kmutex_t tty_lock;
 krwlock_t exec_lock;
 
+struct lwplist alllwp = LIST_HEAD_INITIALIZER(alllwp);
+
 /* sparc doesn't sport constant page size */
 #ifdef __sparc__
 int nbpg = 4096;
@@ -124,73 +124,6 @@
 	FSCALE,
 };
 
-void
-getnanouptime(struct timespec *ts)
-{
-
-	rump_getuptime(ts);
-}
-
-void
-getmicrouptime(struct timeval *tv)
-{
-	struct timespec ts;
-
-	getnanouptime(&ts);
-	TIMESPEC_TO_TIMEVAL(tv, &ts);
-}
-
-static void
-gettime(struct timespec *ts)
-{
-	uint64_t sec, nsec;
-	int error;
-
-	rumpuser_gettime(&sec, &nsec, &error);
-	ts->tv_sec = sec;
-	ts->tv_nsec = nsec;
-}
-
-void
-nanotime(struct timespec *ts)
-{
-
-	if (rump_threads) {
-		rump_gettime(ts);
-	} else {
-		gettime(ts);
-	}
-}
-
-/* hooray for mick, so what if I do */
-void
-getnanotime(struct timespec *ts)
-{
-
-	nanotime(ts);
-}
-
-void
-microtime(struct timeval *tv)
-{
-	struct timespec ts;
-
-	if (rump_threads) {
-		rump_gettime(&ts);
-		TIMESPEC_TO_TIMEVAL(tv, &ts);
-	} else {
-		gettime(&ts);
-		TIMESPEC_TO_TIMEVAL(tv, &ts);
-	}
-}
-
-void
-getmicrotime(struct timeval *tv)
-{
-
-	microtime(tv);
-}
-
 struct proc *
 p_find(pid_t pid, uint flags)
 {
@@ -317,13 +250,6 @@
 	/* always sleepable, although we should improve this */
 }
 
-void
-tc_setclock(const struct timespec *ts)
-{
-
-	panic("%s: not implemented", __func__);
-}
-
 int
 proc_uidmatch(kauth_cred_t cred, kauth_cred_t target)
 {

Index: src/sys/rump/librump/rumpkern/intr.c
diff -u src/sys/rump/librump/rumpkern/intr.c:1.23 src/sys/rump/librump/rumpkern/intr.c:1.24
--- src/sys/rump/librump/rumpkern/intr.c:1.23	Sat Dec  5 22:44:08 2009
+++ src/sys/rump/librump/rumpkern/intr.c	Wed Apr 14 10:27:53 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: intr.c,v 1.23 2009/12/05 22:44:08 pooka Exp $	*/
+/*	$NetBSD: intr.c,v 1.24 2010/04/14 10:27:53 pooka Exp $	*/
 
 /*
  * Copyright (c) 2008 Antti Kantee.  All Rights Reserved.
@@ -26,13 +26,15 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: intr.c,v 1.23 2009/12/05 22:44:08 pooka Exp $");
+__KERNEL_RCSID(0, "$NetBSD: intr.c,v 1.24 2010/04/14 10:27:53 pooka Exp $");
 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
+#include 
 
 #include 
 
@@ -42,8 +44,6 @@
  * Interrupt simulator.  It executes hardclock() and softintrs.
  */
 
-time_t time_uptime = 0;
-
 #define SI_MPSAFE 0x01
 #define SI_ONLIST 0x02
 #define SI_KILLME 0x04
@@ -67,51 +67,45 @@
 static struct rumpuser_cv *clock

CVS commit: src/share/man/man8

2010-04-14 Thread Jukka Ruohonen
Module Name:src
Committed By:   jruoho
Date:   Wed Apr 14 10:03:18 UTC 2010

Modified Files:
src/share/man/man8: rc.8

Log Message:
Add the USENIX paper of the author to SEE ALSO.


To generate a diff of this commit:
cvs rdiff -u -r1.33 -r1.34 src/share/man/man8/rc.8

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

Modified files:

Index: src/share/man/man8/rc.8
diff -u src/share/man/man8/rc.8:1.33 src/share/man/man8/rc.8:1.34
--- src/share/man/man8/rc.8:1.33	Fri Sep 11 19:47:27 2009
+++ src/share/man/man8/rc.8	Wed Apr 14 10:03:18 2010
@@ -1,4 +1,4 @@
-.\" 	$NetBSD: rc.8,v 1.33 2009/09/11 19:47:27 wiz Exp $
+.\" 	$NetBSD: rc.8,v 1.34 2010/04/14 10:03:18 jruoho Exp $
 .\"
 .\" Copyright (c) 2000-2004 The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -27,7 +27,7 @@
 .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 .\" POSSIBILITY OF SUCH DAMAGE.
 .\"
-.Dd September 11, 2009
+.Dd April 14, 2010
 .Dt RC 8
 .Os
 .Sh NAME
@@ -343,6 +343,15 @@
 .Xr rcorder 8 ,
 .Xr reboot 8 ,
 .Xr shutdown 8
+.Rs
+.%A Luke Mewburn
+.%T The Design and Implementation of the NetBSD rc.d system
+.%I USENIX Association
+.%B Proceedings of the FREENIX Track: 2001 USENIX Annual Technical Conference
+.%D June 25-30, 2001
+.%U http://www.usenix.org/publications/
+.%U library/proceedings/usenix01/freenix01/full_papers/mewburn/mewburn.pdf
+.Re
 .Sh HISTORY
 The
 .Nm



CVS commit: src/share/man/man9

2010-04-14 Thread Jukka Ruohonen
Module Name:src
Committed By:   jruoho
Date:   Wed Apr 14 09:43:54 UTC 2010

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

Log Message:
Add the USENIX paper of Gregory McGarry to SEE ALSO.


To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.12 src/share/man/man9/ras.9

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

Modified files:

Index: src/share/man/man9/ras.9
diff -u src/share/man/man9/ras.9:1.11 src/share/man/man9/ras.9:1.12
--- src/share/man/man9/ras.9:1.11	Wed Apr 14 09:34:35 2010
+++ src/share/man/man9/ras.9	Wed Apr 14 09:43:54 2010
@@ -1,4 +1,4 @@
-.\" $NetBSD: ras.9,v 1.11 2010/04/14 09:34:35 jruoho Exp $
+.\" $NetBSD: ras.9,v 1.12 2010/04/14 09:43:54 jruoho Exp $
 .\"
 .\" Copyright (c) 2002 The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -133,6 +133,17 @@
 .Xr rasctl 2 ,
 .Xr cpu_switchto 9 ,
 .Xr fork1 9
+.Rs
+.%A Gregory McGarry
+.%T "An Implementation of User-level Restartable \
+Atomic Sequences on the NetBSD Operating System"
+.%I USENIX Association
+.%B Proceedings of the FREENIX Track: 2003 USENIX Annual Technical Conference
+.%P 311-322
+.%D June 9-14, 2003
+.%U http://www.usenix.org/publications/library/proceedings/usenix03/
+.%U tech/freenix03/full_papers/mcgarry/mcgarry.pdf
+.Re
 .Sh HISTORY
 The RAS functionality first appeared in
 .Nx 2.0 .



CVS commit: src/share/man/man9

2010-04-14 Thread Jukka Ruohonen
Module Name:src
Committed By:   jruoho
Date:   Wed Apr 14 09:34:35 UTC 2010

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

Log Message:
Refer to cpu_switchto(9) instead of nonexistent cpu_switch(9).
In addition, small markup changes.


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/share/man/man9/ras.9

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

Modified files:

Index: src/share/man/man9/ras.9
diff -u src/share/man/man9/ras.9:1.10 src/share/man/man9/ras.9:1.11
--- src/share/man/man9/ras.9:1.10	Wed Apr 30 13:10:58 2008
+++ src/share/man/man9/ras.9	Wed Apr 14 09:34:35 2010
@@ -1,4 +1,4 @@
-.\" $NetBSD: ras.9,v 1.10 2008/04/30 13:10:58 martin Exp $
+.\" $NetBSD: ras.9,v 1.11 2010/04/14 09:34:35 jruoho Exp $
 .\"
 .\" Copyright (c) 2002 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 August 12, 2002
+.Dd April 14, 2010
 .Dt RAS 9
 .Os
 .Sh NAME
@@ -50,19 +50,22 @@
 guaranteed to execute without preemption.
 This property is assured by checking the set of restartable atomic
 sequences registered for a process during
-.Xr cpu_switch 9 .
+.Xr cpu_switchto 9 .
 If a process is found to have been preempted during a restartable
 sequence, then its execution is rolled-back to the start of the
-sequence by resetting its program counter saved in its process control
-block (PCB).
+sequence by resetting its program counter saved in its process control block
+.Pq Tn PCB .
 .Pp
-The RAS functionality is provided by a combination of the
+The
+.Tn RAS
+functionality is provided by a combination of the
 machine-independent routines discussed in this page and
 a machine-dependent component in
-.Xr cpu_switch 9 .
+.Xr cpu_switchto 9 .
 A port which supports restartable atomic sequences will define
-__HAVE_RAS in
-.Pa machine/types.h
+.Dv __HAVE_RAS
+in
+.In machine/types.h
 for machine-independent code to conditionally provide RAS support.
 .Pp
 A complicated side-effect of restartable atomic sequences is their
@@ -85,8 +88,11 @@
 .Fa addr .
 If the address
 .Fa addr
-is found within a RAS, then the restart address of the RAS is
-returned, otherwise \-1 is returned.
+is found within a
+.Tn RAS ,
+then the restart address of the
+.Tn RAS
+is returned, otherwise \-1 is returned.
 .It Fn ras_fork "p1" "p2"
 This function is used to copy all registered restartable atomic
 sequences for process
@@ -118,14 +124,14 @@
 .Pa sys/kern/kern_ras.c .
 Data structures and function prototypes for the framework are located
 in
-.Pa sys/sys/ras.h .
+.In sys/sys/ras.h .
 Machine-dependent portions are implemented within
-.Xr cpu_switch 9
+.Xr cpu_switchto 9
 in the machine-dependent file
 .Pa sys/arch/\*[Lt]arch\*[Gt]/\*[Lt]arch\*[Gt]/locore.S .
 .Sh SEE ALSO
 .Xr rasctl 2 ,
-.Xr cpu_switch 9 ,
+.Xr cpu_switchto 9 ,
 .Xr fork1 9
 .Sh HISTORY
 The RAS functionality first appeared in



CVS commit: src/lib/libc/sys

2010-04-14 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Wed Apr 14 09:10:31 UTC 2010

Modified Files:
src/lib/libc/sys: getdents.2

Log Message:
Sort ERRORS.


To generate a diff of this commit:
cvs rdiff -u -r1.19 -r1.20 src/lib/libc/sys/getdents.2

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/sys/getdents.2
diff -u src/lib/libc/sys/getdents.2:1.19 src/lib/libc/sys/getdents.2:1.20
--- src/lib/libc/sys/getdents.2:1.19	Wed Apr 14 09:06:00 2010
+++ src/lib/libc/sys/getdents.2	Wed Apr 14 09:10:30 2010
@@ -1,4 +1,4 @@
-.\"	$NetBSD: getdents.2,v 1.19 2010/04/14 09:06:00 jruoho Exp $
+.\"	$NetBSD: getdents.2,v 1.20 2010/04/14 09:10:30 wiz Exp $
 .\"
 .\" Copyright (c) 1989, 1991, 1993
 .\"	The Regents of the University of California.  All rights reserved.
@@ -156,13 +156,13 @@
 Either
 .Fa buf
 points outside the allocated address space.
+.It Bq Er EINVAL
+A directory was being read on NFS, but it was modified on the server while
+it was being read.
 .It Bq Er EIO
 An
 .Tn I/O
 error occurred while reading from or writing to the file system.
-.It Bq Er EINVAL
-A directory was being read on NFS, but it was modified on the server while
-it was being read.
 .El
 .Sh SEE ALSO
 .Xr lseek 2 ,



CVS commit: src/lib/libc/sys

2010-04-14 Thread Jukka Ruohonen
Module Name:src
Committed By:   jruoho
Date:   Wed Apr 14 09:06:00 UTC 2010

Modified Files:
src/lib/libc/sys: getdents.2

Log Message:
Use a list and sort it by the entries in the structure.


To generate a diff of this commit:
cvs rdiff -u -r1.18 -r1.19 src/lib/libc/sys/getdents.2

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/sys/getdents.2
diff -u src/lib/libc/sys/getdents.2:1.18 src/lib/libc/sys/getdents.2:1.19
--- src/lib/libc/sys/getdents.2:1.18	Mon Dec 26 19:40:15 2005
+++ src/lib/libc/sys/getdents.2	Wed Apr 14 09:06:00 2010
@@ -1,4 +1,4 @@
-.\"	$NetBSD: getdents.2,v 1.18 2005/12/26 19:40:15 perry Exp $
+.\"	$NetBSD: getdents.2,v 1.19 2010/04/14 09:06:00 jruoho Exp $
 .\"
 .\" Copyright (c) 1989, 1991, 1993
 .\"	The Regents of the University of California.  All rights reserved.
@@ -29,7 +29,7 @@
 .\"
 .\"	@(#)getdirentries.2	8.1 (Berkeley) 6/9/93
 .\"
-.Dd September 6, 2005
+.Dd April 14, 2010
 .Dt GETDENTS 2
 .Os
 .Sh NAME
@@ -68,10 +68,13 @@
 ino_t		d_fileno;
 uint16_t	d_reclen;
 uint16_t	d_namlen;
-uint8_t	d_type;
-char	d_name[MAXNAMLEN + 1]; /* see below */
+uint8_t		d_type;
+char	d_name[MAXNAMLEN + 1];
 .Ed
 .Pp
+These are:
+.Bl -enum -offset indent
+.It
 The
 .Fa d_fileno
 entry is a number which is unique for each
@@ -83,11 +86,20 @@
 If
 .Fa d_fileno
 is zero, the entry refers to a deleted file.
-.Pp
+.It
 The
 .Fa d_reclen
 entry is the length, in bytes, of the directory record.
-.Pp
+.It
+The
+.Fa d_namlen
+entry specifies the length of the file name excluding the NUL.
+Thus the actual size of
+.Fa d_name
+may vary from 1 to
+.Dv MAXNAMLEN
+\&+ 1.
+.It
 The
 .Fa d_type
 is the type of file, where the following are possible types:
@@ -101,19 +113,11 @@
 .Dv DT_SOCK ,
 and
 .Dv DT_WHT .
-.Pp
+.It
 The
-.Fa d_namlen
-entry specifies the length of the file name excluding the null byte.
-Thus the actual size of
 .Fa d_name
-may vary from 1 to
-.Dv MAXNAMLEN
-\&+ 1.
-.Pp
-The
-.Fa d_name
-entry contains a null terminated file name.
+entry contains a NUL-terminated file name.
+.El
 .Pp
 Entries may be separated by extra space.
 The
@@ -144,7 +148,7 @@
 .Sh ERRORS
 .Fn getdents
 will fail if:
-.Bl -tag -width Er
+.Bl -tag -width "[EINVAL]"
 .It Bq Er EBADF
 .Fa fd
 is not a valid file descriptor open for reading.



CVS commit: src/lib/libc/sys

2010-04-14 Thread Jukka Ruohonen
Module Name:src
Committed By:   jruoho
Date:   Wed Apr 14 08:57:21 UTC 2010

Modified Files:
src/lib/libc/sys: ptrace.2

Log Message:
Add offsets to the indentation in couple of places.


To generate a diff of this commit:
cvs rdiff -u -r1.33 -r1.34 src/lib/libc/sys/ptrace.2

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/sys/ptrace.2
diff -u src/lib/libc/sys/ptrace.2:1.33 src/lib/libc/sys/ptrace.2:1.34
--- src/lib/libc/sys/ptrace.2:1.33	Tue Apr  6 14:26:59 2010
+++ src/lib/libc/sys/ptrace.2	Wed Apr 14 08:57:21 2010
@@ -1,7 +1,7 @@
-.\"	$NetBSD: ptrace.2,v 1.33 2010/04/06 14:26:59 wiz Exp $
+.\"	$NetBSD: ptrace.2,v 1.34 2010/04/14 08:57:21 jruoho Exp $
 .\"
 .\" This file is in the public domain.
-.Dd April 6, 2010
+.Dd April 14, 2010
 .Dt PTRACE 2
 .Os
 .Sh NAME
@@ -217,9 +217,9 @@
 The
 .Fa piod_op
 field specifies which type of I/O operation to perform.
-Possible
-values are:
-.Bl -tag -width 18n
+Possible values are:
+.Pp
+.Bl -tag -width 18n -offset indent -compact
 .It Dv PIOD_READ_D
 .It Dv PIOD_WRITE_D
 .It Dv PIOD_READ_I
@@ -288,9 +288,9 @@
 no thread after the one whose LWP ID was supplied in the call.
 .Fa pl_event
 contains the event that stopped the thread.
-Possible
-values are:
-.Bl -tag -width 30n
+Possible values are:
+.Pp
+.Bl -tag -width 30n -offset indent -compact
 .It Dv PL_EVENT_NONE
 .It Dv PL_EVENT_SIGNAL
 .El
@@ -504,7 +504,7 @@
 .Va errno
 can be set to 0 before the call and checked afterwards.
 The possible errors are:
-.Bl -tag -width 4n
+.Bl -tag -width "[EINVAL]"
 .It Bq Er EAGAIN
 Process is currently exec'ing and cannot be traced.
 .It Bq Er EBUSY



CVS commit: src/lib/libc/atomic

2010-04-14 Thread Jukka Ruohonen
Module Name:src
Committed By:   jruoho
Date:   Wed Apr 14 08:49:49 UTC 2010

Modified Files:
src/lib/libc/atomic: atomic_ops.3

Log Message:
Bump date for previous. (How hard can it be to remember this.)


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

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

Modified files:

Index: src/lib/libc/atomic/atomic_ops.3
diff -u src/lib/libc/atomic/atomic_ops.3:1.4 src/lib/libc/atomic/atomic_ops.3:1.5
--- src/lib/libc/atomic/atomic_ops.3:1.4	Wed Apr 14 08:47:19 2010
+++ src/lib/libc/atomic/atomic_ops.3	Wed Apr 14 08:49:49 2010
@@ -1,4 +1,4 @@
-.\"	$NetBSD: atomic_ops.3,v 1.4 2010/04/14 08:47:19 jruoho Exp $
+.\"	$NetBSD: atomic_ops.3,v 1.5 2010/04/14 08:49:49 jruoho Exp $
 .\"
 .\" Copyright (c) 2007, 2008 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 February 11, 2007
+.Dd April 14, 2010
 .Dt ATOMIC_OPS 3
 .Os
 .Sh NAME



CVS commit: src/lib/libc/atomic

2010-04-14 Thread Jukka Ruohonen
Module Name:src
Committed By:   jruoho
Date:   Wed Apr 14 08:47:19 UTC 2010

Modified Files:
src/lib/libc/atomic: atomic_ops.3

Log Message:
Use subtitles instead of a list.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/lib/libc/atomic/atomic_ops.3

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

Modified files:

Index: src/lib/libc/atomic/atomic_ops.3
diff -u src/lib/libc/atomic/atomic_ops.3:1.3 src/lib/libc/atomic/atomic_ops.3:1.4
--- src/lib/libc/atomic/atomic_ops.3:1.3	Mon May 18 12:40:21 2009
+++ src/lib/libc/atomic/atomic_ops.3	Wed Apr 14 08:47:19 2010
@@ -1,4 +1,4 @@
-.\"	$NetBSD: atomic_ops.3,v 1.3 2009/05/18 12:40:21 wiz Exp $
+.\"	$NetBSD: atomic_ops.3,v 1.4 2010/04/14 08:47:19 jruoho Exp $
 .\"
 .\" Copyright (c) 2007, 2008 The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -43,7 +43,7 @@
 family of functions provide atomic memory operations.
 There are 7 classes of atomic memory operations available:
 .Pp
-.Bl -tag -width "atomic_swap(3)"
+.Bl -tag -width "atomic_swap(3)" -offset indent
 .It Xr atomic_add 3
 These functions perform atomic addition.
 .It Xr atomic_and 3
@@ -61,9 +61,7 @@
 .It Xr atomic_swap 3
 These functions perform atomic swap.
 .El
-.Pp
-.Bl -tag -width aa
-.It Synchronization mechanisms
+.Ss Synchronization Mechanisms
 Where the architecture does not provide hardware support for atomic compare
 and swap (CAS), atomicity is provided by a restartable sequence or by a
 spinlock.
@@ -71,7 +69,7 @@
 of the interface.
 The following architectures can be assumed to provide CAS in hardware:
 alpha, amd64, i386, powerpc, powerpc64, sparc64.
-.It Scope and restrictions
+.Ss Scope and Restrictions
 If hardware CAS is available, the atomic operations are globally atomic:
 operations within a memory region shared between processes are
 guaranteed to be performed atomically.
@@ -93,7 +91,7 @@
 some other synchronization mechanism.
 Intermixing of atomic operations with other synchronization mechanisms
 for the same memory location results in undefined behavior.
-.It Visibility and ordering of memory accesses
+.Ss Visibility and Ordering of Memory Accesses
 If hardware CAS is available, stores to the target memory location by an
 atomic operation will reach global visibility before the operation
 completes.
@@ -110,12 +108,11 @@
 to an atomic operation must use memory barriers.
 See
 .Xr membar_ops 3 .
-.It Performance
+.Ss Performance
 Because atomic memory operations require expensive synchronization at the
 hardware level, applications should take care to minimize their use.
 In certain cases, it may be more appropriate to use a mutex, especially
 if more than one memory location will be modified.
-.El
 .Sh SEE ALSO
 .Xr atomic_add 3 ,
 .Xr atomic_and 3 ,



CVS commit: src/share/man/man3

2010-04-14 Thread Jukka Ruohonen
Module Name:src
Committed By:   jruoho
Date:   Wed Apr 14 08:28:58 UTC 2010

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

Log Message:
GCC -> gcc(1).


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

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

Modified files:

Index: src/share/man/man3/tgmath.3
diff -u src/share/man/man3/tgmath.3:1.2 src/share/man/man3/tgmath.3:1.3
--- src/share/man/man3/tgmath.3:1.2	Mon Mar  1 21:37:18 2010
+++ src/share/man/man3/tgmath.3	Wed Apr 14 08:28:58 2010
@@ -1,4 +1,4 @@
-.\" $NetBSD: tgmath.3,v 1.2 2010/03/01 21:37:18 wiz Exp $
+.\" $NetBSD: tgmath.3,v 1.3 2010/04/14 08:28:58 jruoho Exp $
 .\"
 .\" Copyright (c) 2004 Stefan Farfeleder
 .\" All rights reserved.
@@ -26,7 +26,7 @@
 .\"
 .\" $FreeBSD: src/share/man/man3/tgmath.3,v 1.3 2007/12/15 02:40:10 das Exp $
 .\"
-.Dd March 1, 2010
+.Dd April 14, 2010
 .Os
 .Dt TGMATH 3
 .Sh NAME
@@ -144,7 +144,8 @@
 .In tgmath.h
 cannot be implemented with strictly conforming C code and needs
 special compiler support.
-The current implementation only works for GCC.
+The current implementation only works for
+.Xr gcc 1 .
 .Pp
 Many of the functions mentioned here are not prototyped in
 .In math.h



CVS commit: src/share/man/man3

2010-04-14 Thread Jukka Ruohonen
Module Name:src
Committed By:   jruoho
Date:   Wed Apr 14 08:26:42 UTC 2010

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

Log Message:
EXAMPLE -> EXAMPLES, GCC -> gcc(1), and minor markup changes.


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

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

Modified files:

Index: src/share/man/man3/fast_divide32.3
diff -u src/share/man/man3/fast_divide32.3:1.4 src/share/man/man3/fast_divide32.3:1.5
--- src/share/man/man3/fast_divide32.3:1.4	Sat Mar 20 14:45:18 2010
+++ src/share/man/man3/fast_divide32.3	Wed Apr 14 08:26:42 2010
@@ -1,4 +1,4 @@
-.\"	$NetBSD: fast_divide32.3,v 1.4 2010/03/20 14:45:18 jruoho Exp $
+.\"	$NetBSD: fast_divide32.3,v 1.5 2010/04/14 08:26:42 jruoho Exp $
 .\"
 .\" Copyright (c) 2010 The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -27,7 +27,7 @@
 .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 .\" POSSIBILITY OF SUCH DAMAGE.
 .\"
-.Dd March 19, 2010
+.Dd April 14, 2010
 .Dt FAST_DIVIDE32 3
 .Os
 .Sh NAME
@@ -55,7 +55,9 @@
 .Fa v / Fa div
 and
 .Fa v % Fa div
-using optimised CPU instructions.
+using optimised
+.Tn CPU
+instructions.
 The constants
 .Fa m ,
 .Fa s1 ,
@@ -73,10 +75,14 @@
 a plain division instruction, but requires less time to execute.
 The code for constant
 .Fa div
-arguments should be equivalent to the assembly created by GCC.
-.Sh EXAMPLE
-The following example computes q=a/b and r=a%b:
-.Bd -literal
+arguments should be equivalent to the assembly created by
+.Xr gcc 1 .
+.Sh EXAMPLES
+The following example computes
+.Va q = a / b
+and
+.Va r = a % b :
+.Bd -literal -offset indent
 uint32_t a, b, q, r, m;
 uint8_t s1, s2;
 



CVS commit: src/crypto/external/bsd/netpgp/dist/src/netpgpkeys

2010-04-14 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Wed Apr 14 08:14:26 UTC 2010

Modified Files:
src/crypto/external/bsd/netpgp/dist/src/netpgpkeys: netpgpkeys.1

Log Message:
Remove trailing whitespace; use standard section headers.


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 \
src/crypto/external/bsd/netpgp/dist/src/netpgpkeys/netpgpkeys.1

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

Modified files:

Index: src/crypto/external/bsd/netpgp/dist/src/netpgpkeys/netpgpkeys.1
diff -u src/crypto/external/bsd/netpgp/dist/src/netpgpkeys/netpgpkeys.1:1.7 src/crypto/external/bsd/netpgp/dist/src/netpgpkeys/netpgpkeys.1:1.8
--- src/crypto/external/bsd/netpgp/dist/src/netpgpkeys/netpgpkeys.1:1.7	Wed Apr 14 04:01:55 2010
+++ src/crypto/external/bsd/netpgp/dist/src/netpgpkeys/netpgpkeys.1	Wed Apr 14 08:14:26 2010
@@ -1,4 +1,4 @@
-.\" $NetBSD: netpgpkeys.1,v 1.7 2010/04/14 04:01:55 agc Exp $
+.\" $NetBSD: netpgpkeys.1,v 1.8 2010/04/14 08:14:26 wiz Exp $
 .\"
 .\" Copyright (c) 2009, 2010 The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -292,12 +292,12 @@
 utility will return 0 for success,
 1 if the file's signature does not match what was expected,
 or 2 if any other error occurs.
-.Sh EXAMPLE
+.Sh EXAMPLES
 .Bd -literal
 % netpgpkeys --ssh-keys --sshkeyfile=/etc/ssh/ssh_host_rsa_key.pub --list-keys
 1 key
 pub 1024/RSA (Encrypt or Sign) 040180871e00404a 2008-08-11
-Key fingerprint: c4aa b385 4796 e6ce 606c f0c2 0401 8087 1e00 404a 
+Key fingerprint: c4aa b385 4796 e6ce 606c f0c2 0401 8087 1e00 404a
 uid  netbsd-vm1.crowthorne.alistaircrooks.co.uk (/etc/ssh/ssh_host_rsa_key.pub) \*[lt]r...@netbsd-vm1.crowthorne.alistaircrooks.co.uk\*[gt]
 %
 .Ed
@@ -306,8 +306,8 @@
 .Bd -literal
 % netpgpkeys --generate-key
 netpgp: default key set to "C0596823"
-pub 2048/RSA (Encrypt or Sign) 5bc707d1b495aaf2 2010-04-14 
-Key fingerprint: 08cb 4867 eeed 454c ce30 610d 5bc7 07d1 b495 aaf2 
+pub 2048/RSA (Encrypt or Sign) 5bc707d1b495aaf2 2010-04-14
+Key fingerprint: 08cb 4867 eeed 454c ce30 610d 5bc7 07d1 b495 aaf2
 uid  RSA 2048-bit key \*[lt]...@localhost\*[gt]
 netpgp: generated keys in directory /home/agc/.gnupg/5bc707d1b495aaf2
 % ls -al /home/agc/.gnupg/5bc707d1b495aaf2
@@ -319,8 +319,8 @@
 %
 % netpgpkeys --list-keys --home ~/.gnupg/5bc707d1b495aaf2
 1 key
-pub 2048/RSA (Encrypt or Sign) 5bc707d1b495aaf2 2010-04-14 
-Key fingerprint: 08cb 4867 eeed 454c ce30 610d 5bc7 07d1 b495 aaf2 
+pub 2048/RSA (Encrypt or Sign) 5bc707d1b495aaf2 2010-04-14
+Key fingerprint: 08cb 4867 eeed 454c ce30 610d 5bc7 07d1 b495 aaf2
 uid  RSA 2048-bit key \*[lt]...@localhost\*[gt]
 
 %



CVS commit: src/lib/libc/gen

2010-04-14 Thread Nicolas Joly
Module Name:src
Committed By:   njoly
Date:   Wed Apr 14 07:20:28 UTC 2010

Modified Files:
src/lib/libc/gen: psignal.3

Log Message:
Add missing double quote.


To generate a diff of this commit:
cvs rdiff -u -r1.15 -r1.16 src/lib/libc/gen/psignal.3

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

Modified files:

Index: src/lib/libc/gen/psignal.3
diff -u src/lib/libc/gen/psignal.3:1.15 src/lib/libc/gen/psignal.3:1.16
--- src/lib/libc/gen/psignal.3:1.15	Thu Aug  7 16:42:55 2003
+++ src/lib/libc/gen/psignal.3	Wed Apr 14 07:20:27 2010
@@ -1,4 +1,4 @@
-.\"	$NetBSD: psignal.3,v 1.15 2003/08/07 16:42:55 agc Exp $
+.\"	$NetBSD: psignal.3,v 1.16 2010/04/14 07:20:27 njoly Exp $
 .\"
 .\" Copyright (c) 1983, 1991, 1993
 .\"	The Regents of the University of California.  All rights reserved.
@@ -63,7 +63,7 @@
 If the signal number is not recognized
 .Pq Xr sigaction 2 ,
 the string
-.Dq "Unknown signal
+.Dq "Unknown signal"
 is produced.
 .Pp
 The message strings can be accessed directly using the external array