CVS commit: src/sbin/wsconsctl

2010-01-29 Thread Matthias Drochner
Module Name:src
Committed By:   drochner
Date:   Fri Jan 29 09:49:34 UTC 2010

Modified Files:
src/sbin/wsconsctl: keysym.c

Log Message:
follow KS_GROUP_Ascii-KS_GROUP_Plain rename in kernel,
noticed by Andreas Gustafsson


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/sbin/wsconsctl/keysym.c

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

Modified files:

Index: src/sbin/wsconsctl/keysym.c
diff -u src/sbin/wsconsctl/keysym.c:1.9 src/sbin/wsconsctl/keysym.c:1.10
--- src/sbin/wsconsctl/keysym.c:1.9	Mon Apr  6 12:35:20 2009
+++ src/sbin/wsconsctl/keysym.c	Fri Jan 29 09:49:34 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: keysym.c,v 1.9 2009/04/06 12:35:20 lukem Exp $ */
+/*	$NetBSD: keysym.c,v 1.10 2010/01/29 09:49:34 drochner Exp $ */
 
 /*-
  * Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -180,7 +180,7 @@
 	if (ksym = KS_f1  ksym = KS_f20)
 		return KS_F1 - KS_f1 + ksym;
 
-	if (KS_GROUP(ksym) == KS_GROUP_Ascii  ksym = 0xff 
+	if (KS_GROUP(ksym) == KS_GROUP_Plain  ksym = 0xff 
 	latin1_to_upper[ksym] != 0x00)
 		return latin1_to_upper[ksym];
 



CVS commit: src/share/man/man4

2010-01-29 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Fri Jan 29 10:48:45 UTC 2010

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

Log Message:
Bump date for more powerpc commands.


To generate a diff of this commit:
cvs rdiff -u -r1.132 -r1.133 src/share/man/man4/ddb.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/ddb.4
diff -u src/share/man/man4/ddb.4:1.132 src/share/man/man4/ddb.4:1.133
--- src/share/man/man4/ddb.4:1.132	Thu Jan 28 21:13:49 2010
+++ src/share/man/man4/ddb.4	Fri Jan 29 10:48:45 2010
@@ -1,4 +1,4 @@
-.\	$NetBSD: ddb.4,v 1.132 2010/01/28 21:13:49 phx Exp $
+.\	$NetBSD: ddb.4,v 1.133 2010/01/29 10:48:45 wiz Exp $
 .\
 .\ Copyright (c) 1997 - 2009 The NetBSD Foundation, Inc.
 .\ All rights reserved.
@@ -56,7 +56,7 @@
 .\ any improvements or extensions that they make and grant Carnegie Mellon
 .\ the rights to redistribute these changes.
 .\
-.Dd January 23, 2010
+.Dd January 28, 2010
 .Dt DDB 4
 .Os
 .Sh NAME



CVS commit: src/sys/dev/acpi

2010-01-29 Thread Jukka Ruohonen
Module Name:src
Committed By:   jruoho
Date:   Fri Jan 29 11:23:25 UTC 2010

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

Log Message:
Fix a memory leak in the resume handler.


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 src/sys/dev/acpi/asus_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/asus_acpi.c
diff -u src/sys/dev/acpi/asus_acpi.c:1.12 src/sys/dev/acpi/asus_acpi.c:1.13
--- src/sys/dev/acpi/asus_acpi.c:1.12	Fri Jan  8 20:40:41 2010
+++ src/sys/dev/acpi/asus_acpi.c	Fri Jan 29 11:23:25 2010
@@ -1,4 +1,4 @@
-/* $NetBSD: asus_acpi.c,v 1.12 2010/01/08 20:40:41 dyoung Exp $ */
+/* $NetBSD: asus_acpi.c,v 1.13 2010/01/29 11:23:25 jruoho Exp $ */
 
 /*-
  * Copyright (c) 2007, 2008, 2009 Jared D. McNeill jmcne...@invisible.ca
@@ -27,7 +27,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: asus_acpi.c,v 1.12 2010/01/08 20:40:41 dyoung Exp $);
+__KERNEL_RCSID(0, $NetBSD: asus_acpi.c,v 1.13 2010/01/29 11:23:25 jruoho Exp $);
 
 #include sys/types.h
 #include sys/param.h
@@ -312,6 +312,9 @@
 		aprint_error_dev(self, couldn't evaluate PBLS: %s\n,
 		AcpiFormatException(rv));
 
+	if (ret.Pointer != NULL)
+		ACPI_FREE(ret);
+
 	return true;
 }
 



CVS commit: src/share/man/man9

2010-01-29 Thread Jukka Ruohonen
Module Name:src
Committed By:   jruoho
Date:   Fri Jan 29 11:24:31 UTC 2010

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

Log Message:
Add couple instances of .Pp.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/share/man/man9/sysmon_pswitch.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/sysmon_pswitch.9
diff -u src/share/man/man9/sysmon_pswitch.9:1.2 src/share/man/man9/sysmon_pswitch.9:1.3
--- src/share/man/man9/sysmon_pswitch.9:1.2	Tue Jan 26 18:08:24 2010
+++ src/share/man/man9/sysmon_pswitch.9	Fri Jan 29 11:24:31 2010
@@ -1,4 +1,4 @@
-.\ $NetBSD: sysmon_pswitch.9,v 1.2 2010/01/26 18:08:24 pgoyette Exp $
+.\ $NetBSD: sysmon_pswitch.9,v 1.3 2010/01/29 11:24:31 jruoho Exp $
 .\
 .\ Copyright (c) 2010 The NetBSD Foundation, Inc.
 .\ All rights reserved.
@@ -67,6 +67,7 @@
 .Fa smpsw_type
 defines the type of it.
 The following types are defined:
+.Pp
 .Bl -tag -width PSWITCH_HK_VENDOR_BUTTON -compact -offset indent
 .It PSWITCH_TYPE_POWER
 .It PSWITCH_TYPE_SLEEP
@@ -80,6 +81,7 @@
 .Dv PSWITCH_TYPE_HOTKEY ,
 there are few predefined names that can be used for
 .Fa smpsw_name :
+.Pp
 .Bl -tag -width PSWITCH_HK_VENDOR_BUTTON -compact -offset indent
 .It PSWITCH_HK_DISPLAY_CYCLE
 .Em display-cycle



CVS commit: src/sys/dev/acpi

2010-01-29 Thread Jukka Ruohonen
Module Name:src
Committed By:   jruoho
Date:   Fri Jan 29 11:57:37 UTC 2010

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

Log Message:
Replace all AcpiEvaluateObject() calls with acpi_eval_set_integer().

(As the return buffers are not used for anything, no need to make
unnecessary temporary allocations.)

Compile tested only.

ok jmcneill@


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 src/sys/dev/acpi/asus_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/asus_acpi.c
diff -u src/sys/dev/acpi/asus_acpi.c:1.13 src/sys/dev/acpi/asus_acpi.c:1.14
--- src/sys/dev/acpi/asus_acpi.c:1.13	Fri Jan 29 11:23:25 2010
+++ src/sys/dev/acpi/asus_acpi.c	Fri Jan 29 11:57:37 2010
@@ -1,4 +1,4 @@
-/* $NetBSD: asus_acpi.c,v 1.13 2010/01/29 11:23:25 jruoho Exp $ */
+/* $NetBSD: asus_acpi.c,v 1.14 2010/01/29 11:57:37 jruoho Exp $ */
 
 /*-
  * Copyright (c) 2007, 2008, 2009 Jared D. McNeill jmcne...@invisible.ca
@@ -27,7 +27,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: asus_acpi.c,v 1.13 2010/01/29 11:23:25 jruoho Exp $);
+__KERNEL_RCSID(0, $NetBSD: asus_acpi.c,v 1.14 2010/01/29 11:57:37 jruoho Exp $);
 
 #include sys/types.h
 #include sys/param.h
@@ -242,29 +242,18 @@
 asus_init(device_t self)
 {
 	struct asus_softc *sc = device_private(self);
-	ACPI_STATUS rv;
-	ACPI_OBJECT param;
-	ACPI_OBJECT_LIST params;
-	ACPI_BUFFER ret;
 	ACPI_INTEGER cfv;
+	ACPI_STATUS rv;
 
-	ret.Pointer = NULL;
-	ret.Length = ACPI_ALLOCATE_LOCAL_BUFFER;
-	param.Type = ACPI_TYPE_INTEGER;
-	param.Integer.Value = 0x40;	/* disable ASL display switching */
-	params.Pointer = param;
-	params.Count = 1;
+	/* Disable ASL display switching. */
+	rv = acpi_eval_set_integer(sc-sc_node-ad_handle, INIT, 0x40);
 
-	rv = AcpiEvaluateObject(sc-sc_node-ad_handle, INIT,
-	params, ret);
 	if (ACPI_FAILURE(rv))
 		aprint_error_dev(self, couldn't evaluate INIT: %s\n,
 		AcpiFormatException(rv));
 
-	if (ret.Pointer)
-		ACPI_FREE(ret.Pointer);
-
 	rv = acpi_eval_integer(sc-sc_node-ad_handle, ASUS_METHOD_CFVG, cfv);
+
 	if (ACPI_FAILURE(rv))
 		return;
 
@@ -292,29 +281,17 @@
 {
 	struct asus_softc *sc = device_private(self);
 	ACPI_STATUS rv;
-	ACPI_OBJECT param;
-	ACPI_OBJECT_LIST params;
-	ACPI_BUFFER ret;
 
 	asus_init(self);
 
-	/* restore previous display brightness */
-	ret.Pointer = NULL;
-	ret.Length = ACPI_ALLOCATE_LOCAL_BUFFER;
-	param.Type = ACPI_TYPE_INTEGER;
-	param.Integer.Value = sc-sc_brightness;
-	params.Pointer = param;
-	params.Count = 1;
+	/* Restore previous display brightness. */
+	rv = acpi_eval_set_integer(sc-sc_node-ad_handle, ASUS_METHOD_PBLS,
+	sc-sc_brightness);
 
-	rv = AcpiEvaluateObject(sc-sc_node-ad_handle, ASUS_METHOD_PBLS,
-	params, ret);
 	if (ACPI_FAILURE(rv))
 		aprint_error_dev(self, couldn't evaluate PBLS: %s\n,
 		AcpiFormatException(rv));
 
-	if (ret.Pointer != NULL)
-		ACPI_FREE(ret);
-
 	return true;
 }
 
@@ -323,11 +300,8 @@
 {
 	struct sysctlnode node;
 	struct asus_softc *sc;
-	ACPI_STATUS rv;
 	ACPI_INTEGER cfv;
-	ACPI_OBJECT param, retval;
-	ACPI_OBJECT_LIST params;
-	ACPI_BUFFER ret;
+	ACPI_STATUS rv;
 	int err, tmp;
 
 	node = *rnode;
@@ -346,15 +320,9 @@
 		if (tmp  0 || tmp = sc-sc_cfvnum)
 			return EINVAL;
 
-		ret.Pointer = retval;
-		ret.Length = sizeof(retval);
-		param.Type = ACPI_TYPE_INTEGER;
-		param.Integer.Value = tmp;
-		params.Pointer = param;
-		params.Count = 1;
+		rv = acpi_eval_set_integer(sc-sc_node-ad_handle,
+		ASUS_METHOD_CFVS, tmp);
 
-		rv = AcpiEvaluateObject(sc-sc_node-ad_handle,
-		ASUS_METHOD_CFVS, params, ret);
 		if (ACPI_FAILURE(rv))
 			return ENXIO;
 	}



CVS commit: src/sys/dev/acpi

2010-01-29 Thread Jukka Ruohonen
Module Name:src
Committed By:   jruoho
Date:   Fri Jan 29 12:22:00 UTC 2010

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

Log Message:
If we failed to obtain the brightness level during suspend, do not try to
restore it with a possible garbage value during resume.


To generate a diff of this commit:
cvs rdiff -u -r1.14 -r1.15 src/sys/dev/acpi/asus_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/asus_acpi.c
diff -u src/sys/dev/acpi/asus_acpi.c:1.14 src/sys/dev/acpi/asus_acpi.c:1.15
--- src/sys/dev/acpi/asus_acpi.c:1.14	Fri Jan 29 11:57:37 2010
+++ src/sys/dev/acpi/asus_acpi.c	Fri Jan 29 12:22:00 2010
@@ -1,4 +1,4 @@
-/* $NetBSD: asus_acpi.c,v 1.14 2010/01/29 11:57:37 jruoho Exp $ */
+/* $NetBSD: asus_acpi.c,v 1.15 2010/01/29 12:22:00 jruoho Exp $ */
 
 /*-
  * Copyright (c) 2007, 2008, 2009 Jared D. McNeill jmcne...@invisible.ca
@@ -27,7 +27,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: asus_acpi.c,v 1.14 2010/01/29 11:57:37 jruoho Exp $);
+__KERNEL_RCSID(0, $NetBSD: asus_acpi.c,v 1.15 2010/01/29 12:22:00 jruoho Exp $);
 
 #include sys/types.h
 #include sys/param.h
@@ -58,7 +58,7 @@
 #define	ASUS_SENSOR_LAST	1
 	envsys_data_t		sc_sensor[ASUS_SENSOR_LAST];
 
-	ACPI_INTEGER		sc_brightness;
+	int32_t			sc_brightness;
 	ACPI_INTEGER		sc_cfvnum;
 
 	struct sysctllog	*sc_log;
@@ -264,14 +264,16 @@
 asus_suspend(device_t self, pmf_qual_t qual)
 {
 	struct asus_softc *sc = device_private(self);
+	ACPI_INTEGER val = 0;
 	ACPI_STATUS rv;
 
-	/* capture display brightness when we're sleeping */
-	rv = acpi_eval_integer(sc-sc_node-ad_handle, ASUS_METHOD_PBLG,
-	sc-sc_brightness);
-	if (ACPI_FAILURE(rv))
-		aprint_error_dev(sc-sc_dev, couldn't evaluate PBLG: %s\n,
-		AcpiFormatException(rv));
+	/* Capture display brightness. */
+	rv = acpi_eval_integer(sc-sc_node-ad_handle, ASUS_METHOD_PBLG, val);
+
+	if (ACPI_FAILURE(rv) || val  INT32_MAX)
+		sc-sc_brightness = -1;
+	else
+		sc-sc_brightness = val;
 
 	return true;
 }
@@ -284,6 +286,9 @@
 
 	asus_init(self);
 
+	if (sc-sc_brightness  0)
+		return true;
+
 	/* Restore previous display brightness. */
 	rv = acpi_eval_set_integer(sc-sc_node-ad_handle, ASUS_METHOD_PBLS,
 	sc-sc_brightness);



CVS commit: src/sys/rump/net/rumptest

2010-01-29 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Fri Jan 29 12:34:17 UTC 2010

Modified Files:
src/sys/rump/net/rumptest: rumptest_net.c

Log Message:
* add comment explaining why we randomize the last source ip octet
* fix bug in randomization (well, at least with the current configuration ..)


To generate a diff of this commit:
cvs rdiff -u -r1.18 -r1.19 src/sys/rump/net/rumptest/rumptest_net.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/net/rumptest/rumptest_net.c
diff -u src/sys/rump/net/rumptest/rumptest_net.c:1.18 src/sys/rump/net/rumptest/rumptest_net.c:1.19
--- src/sys/rump/net/rumptest/rumptest_net.c:1.18	Wed Jan 27 13:30:45 2010
+++ src/sys/rump/net/rumptest/rumptest_net.c	Fri Jan 29 12:34:17 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: rumptest_net.c,v 1.18 2010/01/27 13:30:45 martti Exp $	*/
+/*	$NetBSD: rumptest_net.c,v 1.19 2010/01/29 12:34:17 pooka Exp $	*/
 
 /*
  * Copyright (c) 2008 Antti Kantee.  All Rights Reserved.
@@ -114,9 +114,14 @@
 	if (s == -1)
 		err(1, configuration socket);
 
+	/*
+	 * Randomize last octet of source address.  This ~prevents
+	 * source/dest 4-tuple re-use if this program is run a few
+	 * times consecutively.
+	 */
 	srandom(time(NULL));
 	myaddr = inet_addr(MYADDR);
-	myaddr = htonl(ntohl(myaddr) + (random() % 126 + 1));
+	myaddr = htonl(ntohl(myaddr) + (random() % 126 + 2));
 
 	/* fill out struct ifaliasreq */
 	memset(ia, 0, sizeof(ia));



CVS commit: src/doc

2010-01-29 Thread Adam Hoka
Module Name:src
Committed By:   ahoka
Date:   Fri Jan 29 14:30:58 UTC 2010

Modified Files:
src/doc: CHANGES

Log Message:
Mention wscons font addition.


To generate a diff of this commit:
cvs rdiff -u -r1.1349 -r1.1350 src/doc/CHANGES

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

Modified files:

Index: src/doc/CHANGES
diff -u src/doc/CHANGES:1.1349 src/doc/CHANGES:1.1350
--- src/doc/CHANGES:1.1349	Wed Jan 20 12:12:09 2010
+++ src/doc/CHANGES	Fri Jan 29 14:30:58 2010
@@ -1,4 +1,4 @@
-# LIST OF CHANGES FROM LAST RELEASE:			$Revision: 1.1349 $
+# LIST OF CHANGES FROM LAST RELEASE:			$Revision: 1.1350 $
 #
 #
 # [Note: This file does not mention every change made to the NetBSD source tree.
@@ -524,6 +524,7 @@
 	tn3270: Removed from base [roy 20100116]	
 	macppc: Add support for new-style kernel modules.  [jmmv 20100118]
 	shark: Add support for new-style kernel modules.  [jmmv 20100118]
+	wscons(4): Add fonts for eastern european languages.  [ahoka 20100118]
 	daily.conf(5): Add fetch_pkg_vulnerabilities to keep the packages
 		vulnerabilities database up to date, if it exists.
 		[jmmv 20100119]



CVS commit: src/doc

2010-01-29 Thread Adam Hoka
Module Name:src
Committed By:   ahoka
Date:   Fri Jan 29 14:34:32 UTC 2010

Modified Files:
src/doc: CHANGES

Log Message:
Mention new sysinst defaults for cypher selection.


To generate a diff of this commit:
cvs rdiff -u -r1.1350 -r1.1351 src/doc/CHANGES

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

Modified files:

Index: src/doc/CHANGES
diff -u src/doc/CHANGES:1.1350 src/doc/CHANGES:1.1351
--- src/doc/CHANGES:1.1350	Fri Jan 29 14:30:58 2010
+++ src/doc/CHANGES	Fri Jan 29 14:34:32 2010
@@ -1,4 +1,4 @@
-# LIST OF CHANGES FROM LAST RELEASE:			$Revision: 1.1350 $
+# LIST OF CHANGES FROM LAST RELEASE:			$Revision: 1.1351 $
 #
 #
 # [Note: This file does not mention every change made to the NetBSD source tree.
@@ -504,6 +504,7 @@
 		[pooka 20091205]
 	ntp:	Import ntp-4-2-4p8. [kardel 20091208]
 	zaurus: Add support Xorg. [nonaka 20091213]
+	sysinst: Make SHA1 the default option for cyphers.  [ahoka 20091216]
 	atf(7): Import 0.7.  [jmmv 20091222]
 	dhcpcd(8): Import dhcpcd-5.1.4. [roy 20091223]
 	bind: Update to 9.7.0-rc1. [christos 20091226]



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

2010-01-29 Thread Frank Wille
Module Name:src
Committed By:   phx
Date:   Fri Jan 29 19:56:41 UTC 2010

Modified Files:
src/sys/arch/amiga/dev: siop.c siop2.c

Log Message:
Define DCIAS() for amigappc.


To generate a diff of this commit:
cvs rdiff -u -r1.64 -r1.65 src/sys/arch/amiga/dev/siop.c
cvs rdiff -u -r1.36 -r1.37 src/sys/arch/amiga/dev/siop2.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/amiga/dev/siop.c
diff -u src/sys/arch/amiga/dev/siop.c:1.64 src/sys/arch/amiga/dev/siop.c:1.65
--- src/sys/arch/amiga/dev/siop.c:1.64	Mon Oct 26 19:16:54 2009
+++ src/sys/arch/amiga/dev/siop.c	Fri Jan 29 19:56:41 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: siop.c,v 1.64 2009/10/26 19:16:54 cegger Exp $ */
+/*	$NetBSD: siop.c,v 1.65 2010/01/29 19:56:41 phx Exp $ */
 
 /*
  * Copyright (c) 1990 The Regents of the University of California.
@@ -70,7 +70,7 @@
 #include opt_ddb.h
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: siop.c,v 1.64 2009/10/26 19:16:54 cegger Exp $);
+__KERNEL_RCSID(0, $NetBSD: siop.c,v 1.65 2010/01/29 19:56:41 phx Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -89,6 +89,8 @@
 #include machine/cpu.h
 #ifdef __m68k__
 #include m68k/cacheops.h
+#else
+#define DCIAS(pa)
 #endif
 #include amiga/amiga/custom.h
 #include amiga/amiga/isr.h

Index: src/sys/arch/amiga/dev/siop2.c
diff -u src/sys/arch/amiga/dev/siop2.c:1.36 src/sys/arch/amiga/dev/siop2.c:1.37
--- src/sys/arch/amiga/dev/siop2.c:1.36	Mon Oct 26 19:16:54 2009
+++ src/sys/arch/amiga/dev/siop2.c	Fri Jan 29 19:56:41 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: siop2.c,v 1.36 2009/10/26 19:16:54 cegger Exp $ */
+/*	$NetBSD: siop2.c,v 1.37 2010/01/29 19:56:41 phx Exp $ */
 
 /*
  * Copyright (c) 1990 The Regents of the University of California.
@@ -70,7 +70,7 @@
 #include opt_ddb.h
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: siop2.c,v 1.36 2009/10/26 19:16:54 cegger Exp $);
+__KERNEL_RCSID(0, $NetBSD: siop2.c,v 1.37 2010/01/29 19:56:41 phx Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -89,6 +89,8 @@
 #include machine/cpu.h
 #ifdef __m68k__
 #include m68k/include/cacheops.h
+#else
+#define DCIAS(pa)
 #endif
 #include amiga/amiga/custom.h
 #include amiga/amiga/isr.h



CVS commit: src/lib/libc/net

2010-01-29 Thread Ignatios Souvatzis
Module Name:src
Committed By:   is
Date:   Fri Jan 29 22:26:48 UTC 2010

Modified Files:
src/lib/libc/net: getnameinfo.c

Log Message:
Print AppleTalk phase 2 range, too, if available.


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

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

Modified files:

Index: src/lib/libc/net/getnameinfo.c
diff -u src/lib/libc/net/getnameinfo.c:1.48 src/lib/libc/net/getnameinfo.c:1.49
--- src/lib/libc/net/getnameinfo.c:1.48	Tue Jan 26 21:27:54 2010
+++ src/lib/libc/net/getnameinfo.c	Fri Jan 29 22:26:48 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: getnameinfo.c,v 1.48 2010/01/26 21:27:54 is Exp $	*/
+/*	$NetBSD: getnameinfo.c,v 1.49 2010/01/29 22:26:48 is Exp $	*/
 /*	$KAME: getnameinfo.c,v 1.45 2000/09/25 22:43:56 itojun Exp $	*/
 
 /*
@@ -47,7 +47,7 @@
 
 #include sys/cdefs.h
 #if defined(LIBC_SCCS)  !defined(lint)
-__RCSID($NetBSD: getnameinfo.c,v 1.48 2010/01/26 21:27:54 is Exp $);
+__RCSID($NetBSD: getnameinfo.c,v 1.49 2010/01/29 22:26:48 is Exp $);
 #endif /* LIBC_SCCS and not lint */
 
 #include namespace.h
@@ -150,7 +150,7 @@
 int flags)
 {
 	char numserv[8];
-	int n;
+	int n, m=0;
 
 	const struct sockaddr_at *sat =
 	(const struct sockaddr_at *)(const void *)sa;
@@ -162,21 +162,41 @@
 		strlcpy(serv, numserv, servlen);
 	}
 
+n = snprintf(host, hostlen, %u.%u,
+	ntohs(sat-sat_addr.s_net), sat-sat_addr.s_node);
+
+	if (n  0 || (socklen_t)(m+n) = hostlen)
+		goto errout;
+
+	m += n;
+
 	if (sat-sat_range.r_netrange.nr_phase) {
-	n = snprintf(host, hostlen, %u.%u phase %u,
-		ntohs(sat-sat_addr.s_net), sat-sat_addr.s_node,
+	n = snprintf(host+m, hostlen-m,  phase %u,
 			sat-sat_range.r_netrange.nr_phase);
-	} else {
-	n = snprintf(host, hostlen, %u.%u,
-		ntohs(sat-sat_addr.s_net), sat-sat_addr.s_node);
+
+		if (n  0 || (socklen_t)(m+n) = hostlen)
+			goto errout;
+
+		m += n;
 	}
+	if (sat-sat_range.r_netrange.nr_firstnet) {
+	n = snprintf(host+m, hostlen-m,  range %u - %u,
+			ntohs(sat-sat_range.r_netrange.nr_firstnet),
+			ntohs(sat-sat_range.r_netrange.nr_lastnet ));
+
+		if (n  0 || (socklen_t)(m+n) = hostlen)
+			goto errout;
 
-	if (n  0 || (socklen_t) n = hostlen) {
-		if (host != NULL  hostlen  0)
-			*host = '\0';	/* XXX ??? */
-		return EAI_MEMORY;
+		m += n;
 	}
+
 	return 0;
+
+errout:
+	if (host  hostlen0)
+		host[m] = '\0';	/* XXX ??? */
+
+	return EAI_MEMORY;
 }
 
 /*



CVS commit: src/sys/dev/sbus

2010-01-29 Thread Michael Lorenz
Module Name:src
Committed By:   macallan
Date:   Fri Jan 29 23:50:01 UTC 2010

Modified Files:
src/sys/dev/sbus: agten.c

Log Message:
avoid using PAGE_SIZE directly so sparc/GENERIC builds again


To generate a diff of this commit:
cvs rdiff -u -r1.23 -r1.24 src/sys/dev/sbus/agten.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/sbus/agten.c
diff -u src/sys/dev/sbus/agten.c:1.23 src/sys/dev/sbus/agten.c:1.24
--- src/sys/dev/sbus/agten.c:1.23	Wed Jan 27 21:02:22 2010
+++ src/sys/dev/sbus/agten.c	Fri Jan 29 23:50:01 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: agten.c,v 1.23 2010/01/27 21:02:22 macallan Exp $ */
+/*	$NetBSD: agten.c,v 1.24 2010/01/29 23:50:01 macallan Exp $ */
 
 /*-
  * Copyright (c) 2007 Michael Lorenz
@@ -27,7 +27,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: agten.c,v 1.23 2010/01/27 21:02:22 macallan Exp $);
+__KERNEL_RCSID(0, $NetBSD: agten.c,v 1.24 2010/01/29 23:50:01 macallan Exp $);
 
 /*
  * a driver for the Fujitsu AG-10e SBus framebuffer
@@ -74,7 +74,7 @@
 #include dev/ic/i128reg.h
 #include dev/ic/i128var.h
 
-#include machine/vmparam.h
+#include uvm/uvm_extern.h
 
 #include opt_agten.h
 #include ioconf.h
@@ -248,7 +248,7 @@
 	sc-sc_i128_fbsz = prom_getpropint(node, i128_fb_size, -1);
 	if (sbus_bus_map(sc-sc_bustag,
 	sa-sa_reg[0].oa_space, sa-sa_reg[0].oa_base + reg,
-	(sc-sc_stride * sc-sc_height + PAGE_MASK)  ~PAGE_MASK,
+	round_page(sc-sc_stride * sc-sc_height),
 	BUS_SPACE_MAP_LINEAR | BUS_SPACE_MAP_LARGE, 
 	sc-sc_i128_fbh) != 0) {
 



CVS commit: src/sys/dev/sysmon

2010-01-29 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Sat Jan 30 02:46:53 UTC 2010

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

Log Message:
Validate limit-based monitoring in one place, so we can apply the
constraints to both driver-requested and user-requested monitoring.

While here, clean up some of the debugging DPRINTFs.


To generate a diff of this commit:
cvs rdiff -u -r1.90 -r1.91 src/sys/dev/sysmon/sysmon_envsys.c
cvs rdiff -u -r1.76 -r1.77 src/sys/dev/sysmon/sysmon_envsys_events.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/sysmon/sysmon_envsys.c
diff -u src/sys/dev/sysmon/sysmon_envsys.c:1.90 src/sys/dev/sysmon/sysmon_envsys.c:1.91
--- src/sys/dev/sysmon/sysmon_envsys.c:1.90	Fri Jul 10 13:09:09 2009
+++ src/sys/dev/sysmon/sysmon_envsys.c	Sat Jan 30 02:46:52 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: sysmon_envsys.c,v 1.90 2009/07/10 13:09:09 pgoyette Exp $	*/
+/*	$NetBSD: sysmon_envsys.c,v 1.91 2010/01/30 02:46:52 pgoyette Exp $	*/
 
 /*-
  * Copyright (c) 2007, 2008 Juan Romero Pardines.
@@ -64,7 +64,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: sysmon_envsys.c,v 1.90 2009/07/10 13:09:09 pgoyette Exp $);
+__KERNEL_RCSID(0, $NetBSD: sysmon_envsys.c,v 1.91 2010/01/30 02:46:52 pgoyette Exp $);
 
 #include sys/param.h
 #include sys/types.h
@@ -1791,12 +1791,6 @@
 		obj2 = prop_dictionary_get(udict, critical-capacity);
 		if (obj2  prop_object_type(obj2) == PROP_TYPE_NUMBER) {
 			targetfound = true;
-			if ((edata-flags  ENVSYS_FMONNOTSUPP) ||
-			(edata-flags  ENVSYS_FPERCENT) == 0) {
-error = ENOTSUP;
-goto out;
-			}
-
 			lims.sel_critmin = prop_number_integer_value(obj2);
 			lims.sel_flags |= PROP_BATTCAP;
 		}
@@ -1807,12 +1801,6 @@
 		obj2 = prop_dictionary_get(udict, warning-capacity);
 		if (obj2  prop_object_type(obj2) == PROP_TYPE_NUMBER) {
 			targetfound = true;
-			if ((edata-flags  ENVSYS_FMONNOTSUPP) ||
-			(edata-flags  ENVSYS_FPERCENT) == 0) {
-error = ENOTSUP;
-goto out;
-			}
-
 			lims.sel_warnmin = prop_number_integer_value(obj2);
 			lims.sel_flags |= PROP_BATTWARN;
 		}
@@ -1823,13 +1811,6 @@
 		obj2 = prop_dictionary_get(udict, critical-max);
 		if (obj2  prop_object_type(obj2) == PROP_TYPE_NUMBER) {
 			targetfound = true;
-			if (edata-units == ENVSYS_INDICATOR ||
-			edata-flags 
-(ENVSYS_FPERCENT | ENVSYS_FMONNOTSUPP)) {
-error = ENOTSUP;
-goto out;
-			}
-
 			lims.sel_critmax = prop_number_integer_value(obj2);
 			lims.sel_flags |= PROP_CRITMAX;
 		}
@@ -1840,13 +1821,6 @@
 		obj2 = prop_dictionary_get(udict, warning-max);
 		if (obj2  prop_object_type(obj2) == PROP_TYPE_NUMBER) {
 			targetfound = true;
-			if (edata-units == ENVSYS_INDICATOR ||
-			edata-flags 
-(ENVSYS_FPERCENT | ENVSYS_FMONNOTSUPP)) {
-error = ENOTSUP;
-goto out;
-			}
-
 			lims.sel_warnmax = prop_number_integer_value(obj2);
 			lims.sel_flags |= PROP_WARNMAX;
 		}
@@ -1857,13 +1831,6 @@
 		obj2 = prop_dictionary_get(udict, critical-min);
 		if (obj2  prop_object_type(obj2) == PROP_TYPE_NUMBER) {
 			targetfound = true;
-			if (edata-units == ENVSYS_INDICATOR ||
-			edata-flags 
-(ENVSYS_FPERCENT | ENVSYS_FMONNOTSUPP)) {
-error = ENOTSUP;
-goto out;
-			}
-
 			lims.sel_critmin = prop_number_integer_value(obj2);
 			lims.sel_flags |= PROP_CRITMIN;
 		}
@@ -1874,18 +1841,15 @@
 		obj2 = prop_dictionary_get(udict, warning-min);
 		if (obj2  prop_object_type(obj2) == PROP_TYPE_NUMBER) {
 			targetfound = true;
-			if (edata-units == ENVSYS_INDICATOR ||
-			edata-flags 
-(ENVSYS_FPERCENT | ENVSYS_FMONNOTSUPP)) {
-error = ENOTSUP;
-goto out;
-			}
-
 			lims.sel_warnmin = prop_number_integer_value(obj2);
 			lims.sel_flags |= PROP_WARNMIN;
 		}
 
 		if (lims.sel_flags) {
+			if (edata-flags  ENVSYS_FMONNOTSUPP) {
+error = ENOTSUP;
+goto out;
+			}
 			error = sme_event_register(dict, edata, sme, lims,
 	  (edata-flags  ENVSYS_FPERCENT)?
 		PENVSYS_EVENT_CAPACITY:

Index: src/sys/dev/sysmon/sysmon_envsys_events.c
diff -u src/sys/dev/sysmon/sysmon_envsys_events.c:1.76 src/sys/dev/sysmon/sysmon_envsys_events.c:1.77
--- src/sys/dev/sysmon/sysmon_envsys_events.c:1.76	Tue Jan 26 14:22:00 2010
+++ src/sys/dev/sysmon/sysmon_envsys_events.c	Sat Jan 30 02:46:52 2010
@@ -1,4 +1,4 @@
-/* $NetBSD: sysmon_envsys_events.c,v 1.76 2010/01/26 14:22:00 pgoyette Exp $ */
+/* $NetBSD: sysmon_envsys_events.c,v 1.77 2010/01/30 02:46:52 pgoyette Exp $ */
 
 /*-
  * Copyright (c) 2007, 2008 Juan Romero Pardines.
@@ -30,7 +30,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: sysmon_envsys_events.c,v 1.76 2010/01/26 14:22:00 pgoyette Exp $);
+__KERNEL_RCSID(0, $NetBSD: sysmon_envsys_events.c,v 1.77 2010/01/30 02:46:52 pgoyette Exp $);
 
 #include sys/param.h
 #include sys/types.h
@@ -93,6 +93,27 @@
 	KASSERT(sdict != NULL);
 	

CVS commit: src/usr.sbin/envstat

2010-01-29 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Sat Jan 30 02:56:39 UTC 2010

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

Log Message:
Since we never have both a limit value and a limit %capacity value,
remove the Capacity column.

Reduce inter-column spacing, and display all four limits on one page,
rather than using the -W command line option to switch between critical
and warning limits.  (The -W option is still permitted, but has no
effect.)

%capacity limits are displayed in the WarnMin and CritMin columns, but
have a trailing % sign.


To generate a diff of this commit:
cvs rdiff -u -r1.51 -r1.52 src/usr.sbin/envstat/envstat.8
cvs rdiff -u -r1.72 -r1.73 src/usr.sbin/envstat/envstat.c

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

Modified files:

Index: src/usr.sbin/envstat/envstat.8
diff -u src/usr.sbin/envstat/envstat.8:1.51 src/usr.sbin/envstat/envstat.8:1.52
--- src/usr.sbin/envstat/envstat.8:1.51	Mon May  4 22:31:36 2009
+++ src/usr.sbin/envstat/envstat.8	Sat Jan 30 02:56:39 2010
@@ -1,4 +1,4 @@
-.\	$NetBSD: envstat.8,v 1.51 2009/05/04 22:31:36 wiz Exp $
+.\	$NetBSD: envstat.8,v 1.52 2010/01/30 02:56:39 pgoyette Exp $
 .\
 .\ Copyright (c) 2000, 2007, 2008, 2009 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 14, 2009
+.Dd January 29, 2010
 .Dt ENVSTAT 8
 .Os
 .Sh NAME
@@ -131,8 +131,7 @@
 Each column is additionally separated by a single space.
 The default is the length of the longest sensor name.
 .It Fl W
-Display the warning alarm minimum and maximum levels instead of the critical
-alarm levels.
+This option has no effect.  It is retained for historical reasons.
 .It Fl x
 Shows the property list used by the
 .Xr sysmon_envsys 9

Index: src/usr.sbin/envstat/envstat.c
diff -u src/usr.sbin/envstat/envstat.c:1.72 src/usr.sbin/envstat/envstat.c:1.73
--- src/usr.sbin/envstat/envstat.c:1.72	Sat Apr  4 18:43:01 2009
+++ src/usr.sbin/envstat/envstat.c	Sat Jan 30 02:56:39 2010
@@ -1,4 +1,4 @@
-/* $NetBSD: envstat.c,v 1.72 2009/04/04 18:43:01 christos Exp $ */
+/* $NetBSD: envstat.c,v 1.73 2010/01/30 02:56:39 pgoyette Exp $ */
 
 /*-
  * Copyright (c) 2007, 2008 Juan Romero Pardines.
@@ -27,7 +27,7 @@
 
 #include sys/cdefs.h
 #ifndef lint
-__RCSID($NetBSD: envstat.c,v 1.72 2009/04/04 18:43:01 christos Exp $);
+__RCSID($NetBSD: envstat.c,v 1.73 2010/01/30 02:56:39 pgoyette Exp $);
 #endif /* not lint */
 
 #include stdio.h
@@ -55,7 +55,6 @@
 #define ENVSYS_IFLAG 	0x0010	/* skip invalid sensors */
 #define ENVSYS_SFLAG	0x0020	/* remove all properties set */
 #define ENVSYS_TFLAG	0x0040	/* make statistics */
-#define ENVSYS_WFLAG	0x0080	/* print warn{min,max} values */
 #define ENVSYS_KFLAG	0x0100	/* show temp in kelvin */
 
 /* Sensors */
@@ -175,9 +174,6 @@
 		case 'T':	/* make statistics */
 			flags |= ENVSYS_TFLAG;
 			break;
-		case 'W':	/* print warn{max,min} vs crit{max,min} */
-			flags |= ENVSYS_WFLAG;
-			break;
 		case 'w':	/* width value for the lines */
 			width = (unsigned int)strtoul(optarg, endptr, 10);
 			if (*endptr != '\0')
@@ -186,6 +182,8 @@
 		case 'x':	/* print the dictionary in raw format */
 			flags |= ENVSYS_XFLAG;
 			break;
+		case 'W':	/* No longer used, retained for campatability */
+			break;
 		case '?':
 		default:
 			usage();
@@ -204,9 +202,6 @@
 		if (!interval)
 			errx(EXIT_FAILURE,
 			-T cannot be used without an interval (-i));
-		if (flags  ENVSYS_WFLAG)
-			errx(EXIT_FAILURE,
-			-T cannot be used with -W);
 		else
 			statistics = true;
 	}
@@ -440,11 +435,9 @@
 			goto out;
 		}
 		rval = check_sensors(str);
-		if (rval) {
-			free(str);
-			goto out;
-		}
 		free(str);
+		if (rval)
+			free(str);
 	}
 	if ((flags  ENVSYS_LFLAG) == 0  (flags  ENVSYS_DFLAG) == 0)
 		print_sensors();
@@ -718,12 +711,12 @@
 {
 	sensor_t sensor;
 	sensor_stats_t stats = NULL;
-	size_t maxlen = 0, ilen = 32 + 3;
+	size_t maxlen = 0, ilen;
 	double temp = 0;
 	const char *invalid = N/A, *degrees, *tmpstr, *stype;
-	const char *a, *b, *c, *d, *units;
+	const char *a, *b, *c, *d, *e, *units;
 
-	tmpstr = stype = d = NULL;
+	tmpstr = stype = d = e = NULL;
 
 	/* find the longest description */
 	SIMPLEQ_FOREACH(sensor, sensors_list, entries)
@@ -747,21 +740,18 @@
 		b = Max;
 		c = Min;
 		d = Avg;
-	} else if (flags  ENVSYS_WFLAG) {
-		b = WarnMax;
-		c = WarnMin;
-		d = WarnCap;
 	} else {
 		b = CritMax;
-		c = CritMin;
-		d = CritCap;
+		c = WarnMax;
+		d = WarnMin;
+		e = CritMin;
 	}
 
 	if (!sensors || (!header_passes  sensors) ||
 	(header_passes == 10  sensors)) {
-		(void)printf(%s%*s  %10s %8s %8s %8s %8s\n,
+		(void)printf(%s%*s  %9s %8s %8s %8s %8s %4s\n,
 		mydevname ?  :   , (int)maxlen,
-		, a, b, c, d, units);
+		, a, b, c, d, e, units);
 		if (sensors  header_passes 

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

2010-01-29 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Sat Jan 30 05:09:24 UTC 2010

Removed Files:
src/sys/rump/dev/lib/libdisk: dummy.c

Log Message:
no longer used


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r0 src/sys/rump/dev/lib/libdisk/dummy.c

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



CVS commit: src/sys/miscfs/genfs

2010-01-29 Thread Masao Uebayashi
Module Name:src
Committed By:   uebayasi
Date:   Sat Jan 30 05:19:20 UTC 2010

Modified Files:
src/sys/miscfs/genfs: genfs_io.c

Log Message:
Slightly more descriptive local variable names.


To generate a diff of this commit:
cvs rdiff -u -r1.34 -r1.35 src/sys/miscfs/genfs/genfs_io.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/miscfs/genfs/genfs_io.c
diff -u src/sys/miscfs/genfs/genfs_io.c:1.34 src/sys/miscfs/genfs/genfs_io.c:1.35
--- src/sys/miscfs/genfs/genfs_io.c:1.34	Fri Jan 29 04:36:20 2010
+++ src/sys/miscfs/genfs/genfs_io.c	Sat Jan 30 05:19:20 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: genfs_io.c,v 1.34 2010/01/29 04:36:20 uebayasi Exp $	*/
+/*	$NetBSD: genfs_io.c,v 1.35 2010/01/30 05:19:20 uebayasi Exp $	*/
 
 /*
  * Copyright (c) 1982, 1986, 1989, 1993
@@ -31,7 +31,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: genfs_io.c,v 1.34 2010/01/29 04:36:20 uebayasi Exp $);
+__KERNEL_RCSID(0, $NetBSD: genfs_io.c,v 1.35 2010/01/30 05:19:20 uebayasi Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -113,10 +113,10 @@
 	struct uvm_object * const uobj = vp-v_uobj;
 	kauth_cred_t const cred = curlwp-l_cred;		/* XXXUBC curlwp */
 	const bool async = (flags  PGO_SYNCIO) == 0;
-	const bool write = (ap-a_access_type  VM_PROT_WRITE) != 0;
+	const bool memwrite = (ap-a_access_type  VM_PROT_WRITE) != 0;
 	bool has_trans = false;
 	const bool overwrite = (flags  PGO_OVERWRITE) != 0;
-	const bool blockalloc = write  (flags  PGO_NOBLOCKALLOC) == 0;
+	const bool blockalloc = memwrite  (flags  PGO_NOBLOCKALLOC) == 0;
 	UVMHIST_FUNC(genfs_getpages); UVMHIST_CALLED(ubchist);
 
 	UVMHIST_LOG(ubchist, vp %p off 0x%x/%x count %d,
@@ -178,7 +178,7 @@
 		if ((vp-v_mount-mnt_flag  MNT_NOATIME) == 0) {
 			updflags = GOP_UPDATE_ACCESSED;
 		}
-		if (write) {
+		if (memwrite) {
 			updflags |= GOP_UPDATE_MODIFIED;
 		}
 		if (updflags != 0) {
@@ -186,7 +186,7 @@
 		}
 	}
 
-	if (write) {
+	if (memwrite) {
 		gp-g_dirtygen++;
 		if ((vp-v_iflag  VI_ONWORKLST) == 0) {
 			vn_syncer_add_to_worklist(vp, filedelay);
@@ -212,7 +212,7 @@
 		}
 #endif /* defined(DEBUG) */
 		nfound = uvn_findpages(uobj, origoffset, npages,
-		ap-a_m, UFP_NOWAIT|UFP_NOALLOC|(write ? UFP_NORDONLY : 0));
+		ap-a_m, UFP_NOWAIT|UFP_NOALLOC|(memwrite ? UFP_NORDONLY : 0));
 		KASSERT(npages == *ap-a_count);
 		if (nfound == 0) {
 			error = EBUSY;
@@ -532,7 +532,7 @@
 			skipbytes += iobytes;
 
 			for (i = 0; i  holepages; i++) {
-if (write) {
+if (memwrite) {
 	pgs[pidx + i]-flags = ~PG_CLEAN;
 }
 if (!blockalloc) {
@@ -672,7 +672,7 @@
 			pg-flags = ~(PG_FAKE);
 			pmap_clear_modify(pgs[i]);
 		}
-		KASSERT(!write || !blockalloc || (pg-flags  PG_RDONLY) == 0);
+		KASSERT(!memwrite || !blockalloc || (pg-flags  PG_RDONLY) == 0);
 		if (i  ridx || i = ridx + orignmempages || async) {
 			UVMHIST_LOG(ubchist, unbusy pg %p offset 0x%x,
 			pg, pg-offset,0,0);
@@ -1290,9 +1290,9 @@
 	daddr_t lbn, blkno;
 	struct buf *mbp, *bp;
 	struct vnode *devvp;
-	bool async = (flags  PGO_SYNCIO) == 0;
-	bool write = rw == UIO_WRITE;
-	int brw = write ? B_WRITE : B_READ;
+	const bool async = (flags  PGO_SYNCIO) == 0;
+	const bool iowrite = rw == UIO_WRITE;
+	const int brw = iowrite ? B_WRITE : B_READ;
 	UVMHIST_FUNC(__func__); UVMHIST_CALLED(ubchist);
 
 	UVMHIST_LOG(ubchist, vp %p kva %p len 0x%x flags 0x%x,
@@ -1313,7 +1313,7 @@
 	skipbytes = 0;
 	KASSERT(bytes != 0);
 
-	if (write) {
+	if (iowrite) {
 		mutex_enter(vp-v_interlock);
 		vp-v_numoutput += 2;
 		mutex_exit(vp-v_interlock);
@@ -1355,7 +1355,7 @@
 		iobytes = MINoff_t)lbn + 1 + run)  fs_bshift) - offset,
 		bytes);
 		if (blkno == (daddr_t)-1) {
-			if (!write) {
+			if (!iowrite) {
 memset((char *)kva + (offset - startoffset), 0,
    iobytes);
 			}
@@ -1423,19 +1423,19 @@
 	struct iovec iov;
 	struct uio uio;
 	kauth_cred_t cred = curlwp-l_cred;
-	bool write = (ap-a_access_type  VM_PROT_WRITE) != 0;
+	const bool memwrite = (ap-a_access_type  VM_PROT_WRITE) != 0;
 
 	error = 0;
 	origoffset = ap-a_offset;
 	orignpages = *ap-a_count;
 	pgs = ap-a_m;
 
-	if (write  (vp-v_iflag  VI_ONWORKLST) == 0) {
+	if (memwrite  (vp-v_iflag  VI_ONWORKLST) == 0) {
 		vn_syncer_add_to_worklist(vp, filedelay);
 	}
 	if (ap-a_flags  PGO_LOCKED) {
 		uvn_findpages(uobj, origoffset, ap-a_count, ap-a_m,
-		UFP_NOWAIT|UFP_NOALLOC| (write ? UFP_NORDONLY : 0));
+		UFP_NOWAIT|UFP_NOALLOC| (memwrite ? UFP_NORDONLY : 0));
 
 		return (ap-a_m[ap-a_centeridx] == NULL ? EBUSY : 0);
 	}