CVS commit: src/sys/fs/udf

2011-01-14 Thread Reinoud Zandijk
Module Name:src
Committed By:   reinoud
Date:   Fri Jan 14 09:09:18 UTC 2011

Modified Files:
src/sys/fs/udf: udf_allocation.c

Log Message:
Metadata partition (v2.50+) bugfix commit :

* fix copying of the extents of the metadata node to the metadatamirror node;
  it was not copying all extents.

* fix truncing metadata partition:
   * fix endian conversions
   * fix information length calculation so its truncated to the right length!

* allow for setting maximum extent length in extent merging. This is needed
  since extents in the metadata partition files are only to be in allocation
  unit sizes.

* adjust grow and shrink node to set the granularity of the maximum length of
  an extent when encountering a metadatafile or metadatamirror file.


To generate a diff of this commit:
cvs rdiff -u -r1.30 -r1.31 src/sys/fs/udf/udf_allocation.c

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

Modified files:

Index: src/sys/fs/udf/udf_allocation.c
diff -u src/sys/fs/udf/udf_allocation.c:1.30 src/sys/fs/udf/udf_allocation.c:1.31
--- src/sys/fs/udf/udf_allocation.c:1.30	Wed Dec 22 12:15:02 2010
+++ src/sys/fs/udf/udf_allocation.c	Fri Jan 14 09:09:18 2011
@@ -1,4 +1,4 @@
-/* $NetBSD: udf_allocation.c,v 1.30 2010/12/22 12:15:02 reinoud Exp $ */
+/* $NetBSD: udf_allocation.c,v 1.31 2011/01/14 09:09:18 reinoud Exp $ */
 
 /*
  * Copyright (c) 2006, 2008 Reinoud Zandijk
@@ -28,7 +28,7 @@
 
 #include sys/cdefs.h
 #ifndef lint
-__KERNEL_RCSID(0, $NetBSD: udf_allocation.c,v 1.30 2010/12/22 12:15:02 reinoud Exp $);
+__KERNEL_RCSID(0, $NetBSD: udf_allocation.c,v 1.31 2011/01/14 09:09:18 reinoud Exp $);
 #endif /* not lint */
 
 
@@ -76,15 +76,10 @@
 static void udf_collect_free_space_for_vpart(struct udf_mount *ump,
 	uint16_t vpart_num, uint32_t num_lb);
 
+static int udf_ads_merge(uint32_t max_len, uint32_t lb_size, struct long_ad *a1, struct long_ad *a2);
 static void udf_wipe_adslots(struct udf_node *udf_node);
 static void udf_count_alloc_exts(struct udf_node *udf_node);
 
-/*
- * IDEA/BUSY: Each udf_node gets its own extentwalker state for all operations;
- * this will hopefully/likely reduce O(nlog(n)) to O(1) for most functionality
- * since actions are most likely sequencial and thus seeking doesn't need
- * searching for the same or adjacent position again.
- */
 
 /* - */
 
@@ -1407,10 +1402,12 @@
  * no-op since they describe different extents on the disc.
  */
 
-void udf_synchronise_metadatamirror_node(struct udf_mount *ump)
+void
+udf_synchronise_metadatamirror_node(struct udf_mount *ump)
 {
 	struct udf_node *meta_node, *metamirror_node;
 	struct long_ad s_ad;
+	uint32_t len, flags;
 	int slot, cpy_slot;
 	int error, eof;
 
@@ -1430,11 +1427,21 @@
 		udf_get_adslot(meta_node, slot, s_ad, eof);
 		if (eof)
 			break;
+		len   = udf_rw32(s_ad.len);
+		flags = UDF_EXT_FLAGS(len);
+		len   = UDF_EXT_LEN(len);
+
+		if (flags == UDF_EXT_REDIRECT) {
+			slot++;
+			continue;
+		}
+
 		error = udf_append_adslot(metamirror_node, cpy_slot, s_ad);
 		if (error) {
 			/* WTF, this shouldn't happen, what to do now? */
 			panic(udf_synchronise_metadatamirror_node failed!);
 		}
+		cpy_slot++;
 		slot++;
 	}
 
@@ -1466,6 +1473,7 @@
  * and a metadata partition.
  */
 
+/* implementation limit: ump-datapart is the companion partition */
 static uint32_t
 udf_trunc_metadatapart(struct udf_mount *ump, uint32_t num_lb)
 {
@@ -1474,9 +1482,9 @@
 	struct space_bitmap_desc *sbd, *new_sbd;
 	struct logvol_int_desc *lvid;
 	uint64_t inf_len;
-	uint64_t meta_free_lbs, data_free_lbs;
+	uint64_t meta_free_lbs, data_free_lbs, to_trunc;
 	uint32_t *freepos, *sizepos;
-	uint32_t unit, lb_size, to_trunc;
+	uint32_t unit, lb_size;
 	uint16_t meta_vpart_num, data_vpart_num, num_vpart;
 	int err;
 
@@ -1484,6 +1492,13 @@
 	lb_size = udf_rw32(ump-logical_vol-lb_size);
 	lvid = ump-logvol_integrity;
 
+	/* XXX
+	 *
+	 * the following checks will fail for BD-R UDF 2.60! but they are
+	 * read-only for now anyway! Its even doubtfull if it is to be allowed
+	 * for these discs.
+	 */
+
 	/* lookup vpart for metadata partition */
 	meta_vpart_num = ump-node_part;
 	KASSERT(ump-vtop_alloc[meta_vpart_num] == UDF_ALLOC_METABITMAP);
@@ -1514,7 +1529,7 @@
 	if (to_trunc == 0)
 		return num_lb;
 
-	DPRINTF(RESERVE, (\ttruncating %d lbs from the metadata bitmap\n,
+	DPRINTF(RESERVE, (\ttruncating %PRIu64 lbs from the metadata bitmap\n,
 		to_trunc));
 
 	/* get length of the metadata bitmap node file */
@@ -1530,8 +1545,8 @@
 	/* as per [UDF 2.60/2.2.13.6] : */
 	/* 1) update the SBD in the metadata bitmap file */
 	sbd = (struct space_bitmap_desc *) bitmap-blob;
-	sbd-num_bits  = udf_rw32(sbd-num_bits)  - to_trunc;
-	sbd-num_bytes = udf_rw32(sbd-num_bytes) - to_trunc/8;
+	sbd-num_bits  = udf_rw32(udf_rw32(sbd-num_bits)  - to_trunc);
+	sbd-num_bytes = udf_rw32(udf_rw32(sbd-num_bytes) - to_trunc/8);
 	

CVS commit: src/share/man/man4/man4.x86

2011-01-14 Thread Jukka Ruohonen
Module Name:src
Committed By:   jruoho
Date:   Fri Jan 14 10:01:03 UTC 2011

Modified Files:
src/share/man/man4/man4.x86: balloon.4

Log Message:
Xref xenbus(4).


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/share/man/man4/man4.x86/balloon.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/man4.x86/balloon.4
diff -u src/share/man/man4/man4.x86/balloon.4:1.3 src/share/man/man4/man4.x86/balloon.4:1.4
--- src/share/man/man4/man4.x86/balloon.4:1.3	Wed Aug  4 11:39:14 2010
+++ src/share/man/man4/man4.x86/balloon.4	Fri Jan 14 10:01:03 2011
@@ -1,4 +1,4 @@
-.\	$NetBSD: balloon.4,v 1.3 2010/08/04 11:39:14 jruoho Exp $
+.\	$NetBSD: balloon.4,v 1.4 2011/01/14 10:01:03 jruoho Exp $
 .\
 .\ Copyright (c) 2010 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 July 6, 2010
+.Dd January 14, 2011
 .Dt BALLOON 4 xen
 .Os
 .Sh NAME
@@ -61,7 +61,7 @@
 .Nm
 driver of memory allocation change requests.
 .Bl -tag -width Xr sysctl 3 -offset indent
-.It xenbus
+.It Xr xenbus 4
 In the xenbus method, the change notification originates outside the
 VM, presumable from the Hypervisor, and is communicated over the
 xenbus interface.



CVS commit: src/sys/arch/amiga

2011-01-14 Thread Frank Wille
Module Name:src
Committed By:   phx
Date:   Fri Jan 14 10:01:13 UTC 2011

Modified Files:
src/sys/arch/amiga/conf: GENERIC.in MDINSTALL files.amiga
Added Files:
src/sys/arch/amiga/dev: bppcsc.c

Log Message:
Driver for BlizzardPPC 603e+ SCSI host adatper.
Patch submitted by Radoslaw Kujawa.


To generate a diff of this commit:
cvs rdiff -u -r1.76 -r1.77 src/sys/arch/amiga/conf/GENERIC.in
cvs rdiff -u -r1.28 -r1.29 src/sys/arch/amiga/conf/MDINSTALL
cvs rdiff -u -r1.142 -r1.143 src/sys/arch/amiga/conf/files.amiga
cvs rdiff -u -r0 -r1.1 src/sys/arch/amiga/dev/bppcsc.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/conf/GENERIC.in
diff -u src/sys/arch/amiga/conf/GENERIC.in:1.76 src/sys/arch/amiga/conf/GENERIC.in:1.77
--- src/sys/arch/amiga/conf/GENERIC.in:1.76	Sat May  8 22:16:25 2010
+++ src/sys/arch/amiga/conf/GENERIC.in	Fri Jan 14 10:01:12 2011
@@ -1,4 +1,4 @@
-# $NetBSD: GENERIC.in,v 1.76 2010/05/08 22:16:25 mrg Exp $
+# $NetBSD: GENERIC.in,v 1.77 2011/01/14 10:01:12 phx Exp $
 #
 # GENERIC machine description file
 #
@@ -56,7 +56,7 @@
 
 options 	INCLUDE_CONFIG_FILE	# embed config file in kernel binary
 
-#ident 		GENERIC-$Revision: 1.76 $
+#ident 		GENERIC-$Revision: 1.77 $
 
 m4_ifdef(`INSTALL_CONFIGURATION', `m4_dnl
 makeoptions	COPTS=-Os
@@ -501,6 +501,8 @@
 scsibus*	at mgnsc0
 wesc0		at zbus0		# Warp Engine scsi
 scsibus*	at wesc0
+bppcsc0		at zbus0		# BlizzardPPC 603e+ scsi
+scsibus*	at bppcsc0
 afsc0		at zbus0		# A4091 scsi
 scsibus*	at afsc0
 aftsc0		at mainbus0		# A4000T scsi

Index: src/sys/arch/amiga/conf/MDINSTALL
diff -u src/sys/arch/amiga/conf/MDINSTALL:1.28 src/sys/arch/amiga/conf/MDINSTALL:1.29
--- src/sys/arch/amiga/conf/MDINSTALL:1.28	Tue Nov 23 11:13:54 2010
+++ src/sys/arch/amiga/conf/MDINSTALL	Fri Jan 14 10:01:12 2011
@@ -1,4 +1,4 @@
-#	$NetBSD: MDINSTALL,v 1.28 2010/11/23 11:13:54 hannken Exp $
+#	$NetBSD: MDINSTALL,v 1.29 2011/01/14 10:01:12 phx Exp $
 
 #
 # INSTALL kernel for ramdisk installation
@@ -237,6 +237,8 @@
 scsibus*	at mgnsc0
 wesc0		at zbus0		# Warp Engine scsi
 scsibus*	at wesc0
+bppcsc0		at zbus0		# BlizzardPPC 603e+ scsi
+scsibus*	at bppcsc0
 afsc0		at zbus0		# A4091 scsi
 scsibus*	at afsc0
 aftsc0		at mainbus0		# A4000T scsi

Index: src/sys/arch/amiga/conf/files.amiga
diff -u src/sys/arch/amiga/conf/files.amiga:1.142 src/sys/arch/amiga/conf/files.amiga:1.143
--- src/sys/arch/amiga/conf/files.amiga:1.142	Sun Dec  6 06:46:25 2009
+++ src/sys/arch/amiga/conf/files.amiga	Fri Jan 14 10:01:12 2011
@@ -1,4 +1,4 @@
-#	$NetBSD: files.amiga,v 1.142 2009/12/06 06:46:25 tsutsui Exp $
+#	$NetBSD: files.amiga,v 1.143 2011/01/14 10:01:12 phx Exp $
 
 # maxpartitions must be first item in files.${ARCH}.newconf
 maxpartitions 16			# NOTE THAT AMIGA IS SPECIAL!
@@ -354,6 +354,11 @@
 attach	wesc at zbus
 file	arch/amiga/dev/wesc.c		wesc needs-flag
 
+# Phase5 Blizzard 603e+ SCSI
+device	bppcsc: scsi, asiop
+attach	bppcsc at zbus
+file	arch/amiga/dev/bppcsc.c		bppcsc needs-flag
+
 # C= A4091  A4000T
 device	afsc: scsi, asiop
 attach	afsc at zbus

Added files:

Index: src/sys/arch/amiga/dev/bppcsc.c
diff -u /dev/null src/sys/arch/amiga/dev/bppcsc.c:1.1
--- /dev/null	Fri Jan 14 10:01:13 2011
+++ src/sys/arch/amiga/dev/bppcsc.c	Fri Jan 14 10:01:12 2011
@@ -0,0 +1,216 @@
+/*	$NetBSD: bppcsc.c,v 1.1 2011/01/14 10:01:12 phx Exp $ */
+
+/*
+ * Copyright (c) 1982, 1990 The Regents of the University of California.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *notice, this list of conditions and the following disclaimer in the
+ *documentation and/or other materials provided with the distribution.
+ * 3. Neither the name of the University nor the names of its contributors
+ *may be used to endorse or promote products derived from this software
+ *without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS 

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

2011-01-14 Thread Frank Wille
Module Name:src
Committed By:   phx
Date:   Fri Jan 14 10:03:44 UTC 2011

Modified Files:
src/sys/arch/amiga/conf: DRACO GENERIC INSTALL

Log Message:
regen


To generate a diff of this commit:
cvs rdiff -u -r1.135 -r1.136 src/sys/arch/amiga/conf/DRACO
cvs rdiff -u -r1.264 -r1.265 src/sys/arch/amiga/conf/GENERIC
cvs rdiff -u -r1.88 -r1.89 src/sys/arch/amiga/conf/INSTALL

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

Modified files:

Index: src/sys/arch/amiga/conf/DRACO
diff -u src/sys/arch/amiga/conf/DRACO:1.135 src/sys/arch/amiga/conf/DRACO:1.136
--- src/sys/arch/amiga/conf/DRACO:1.135	Sat May  8 22:18:24 2010
+++ src/sys/arch/amiga/conf/DRACO	Fri Jan 14 10:03:44 2011
@@ -1,9 +1,9 @@
-# $NetBSD: DRACO,v 1.135 2010/05/08 22:18:24 mrg Exp $
+# $NetBSD: DRACO,v 1.136 2011/01/14 10:03:44 phx Exp $
 #
 # This file was automatically created.
 # Changes will be lost when make is run in this directory.
 #
-# Created from: # NetBSD: GENERIC.in,v 1.76 2010/05/08 22:16:25 mrg Exp $
+# Created from: # NetBSD: GENERIC.in,v 1.77 2011/01/14 10:01:12 phx Exp $
 #
 # GENERIC machine description file
 #
@@ -28,7 +28,7 @@
 
 options 	INCLUDE_CONFIG_FILE	# embed config file in kernel binary
 
-#ident 		GENERIC-$Revision: 1.135 $
+#ident 		GENERIC-$Revision: 1.136 $
 
 
 maxusers	8

Index: src/sys/arch/amiga/conf/GENERIC
diff -u src/sys/arch/amiga/conf/GENERIC:1.264 src/sys/arch/amiga/conf/GENERIC:1.265
--- src/sys/arch/amiga/conf/GENERIC:1.264	Sat May  8 22:18:24 2010
+++ src/sys/arch/amiga/conf/GENERIC	Fri Jan 14 10:03:44 2011
@@ -1,9 +1,9 @@
-# $NetBSD: GENERIC,v 1.264 2010/05/08 22:18:24 mrg Exp $
+# $NetBSD: GENERIC,v 1.265 2011/01/14 10:03:44 phx Exp $
 #
 # This file was automatically created.
 # Changes will be lost when make is run in this directory.
 #
-# Created from: # NetBSD: GENERIC.in,v 1.76 2010/05/08 22:16:25 mrg Exp $
+# Created from: # NetBSD: GENERIC.in,v 1.77 2011/01/14 10:01:12 phx Exp $
 #
 # GENERIC machine description file
 #
@@ -28,7 +28,7 @@
 
 options 	INCLUDE_CONFIG_FILE	# embed config file in kernel binary
 
-#ident 		GENERIC-$Revision: 1.264 $
+#ident 		GENERIC-$Revision: 1.265 $
 
 
 maxusers	8
@@ -400,6 +400,8 @@
 scsibus*	at mgnsc0
 wesc0		at zbus0		# Warp Engine scsi
 scsibus*	at wesc0
+bppcsc0		at zbus0		# BlizzardPPC 603e+ scsi
+scsibus*	at bppcsc0
 afsc0		at zbus0		# A4091 scsi
 scsibus*	at afsc0
 aftsc0		at mainbus0		# A4000T scsi

Index: src/sys/arch/amiga/conf/INSTALL
diff -u src/sys/arch/amiga/conf/INSTALL:1.88 src/sys/arch/amiga/conf/INSTALL:1.89
--- src/sys/arch/amiga/conf/INSTALL:1.88	Sat May  8 22:18:24 2010
+++ src/sys/arch/amiga/conf/INSTALL	Fri Jan 14 10:03:44 2011
@@ -1,9 +1,9 @@
-# $NetBSD: INSTALL,v 1.88 2010/05/08 22:18:24 mrg Exp $
+# $NetBSD: INSTALL,v 1.89 2011/01/14 10:03:44 phx Exp $
 #
 # This file was automatically created.
 # Changes will be lost when make is run in this directory.
 #
-# Created from: # NetBSD: GENERIC.in,v 1.76 2010/05/08 22:16:25 mrg Exp $
+# Created from: # NetBSD: GENERIC.in,v 1.77 2011/01/14 10:01:12 phx Exp $
 #
 # GENERIC machine description file
 #
@@ -28,7 +28,7 @@
 
 options 	INCLUDE_CONFIG_FILE	# embed config file in kernel binary
 
-#ident 		GENERIC-$Revision: 1.88 $
+#ident 		GENERIC-$Revision: 1.89 $
 
 makeoptions	COPTS=-Os
 
@@ -347,6 +347,8 @@
 scsibus*	at mgnsc0
 wesc0		at zbus0		# Warp Engine scsi
 scsibus*	at wesc0
+bppcsc0		at zbus0		# BlizzardPPC 603e+ scsi
+scsibus*	at bppcsc0
 afsc0		at zbus0		# A4091 scsi
 scsibus*	at afsc0
 aftsc0		at mainbus0		# A4000T scsi



CVS commit: src/sys/dev

2011-01-14 Thread Frank Wille
Module Name:src
Committed By:   phx
Date:   Fri Jan 14 10:05:14 UTC 2011

Modified Files:
src/sys/dev: DEVNAMES

Log Message:
bppcsc(4)


To generate a diff of this commit:
cvs rdiff -u -r1.264 -r1.265 src/sys/dev/DEVNAMES

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/DEVNAMES
diff -u src/sys/dev/DEVNAMES:1.264 src/sys/dev/DEVNAMES:1.265
--- src/sys/dev/DEVNAMES:1.264	Fri Jan  7 00:31:34 2011
+++ src/sys/dev/DEVNAMES	Fri Jan 14 10:05:14 2011
@@ -1,4 +1,4 @@
-#	$NetBSD: DEVNAMES,v 1.264 2011/01/07 00:31:34 jakllsch Exp $
+#	$NetBSD: DEVNAMES,v 1.265 2011/01/14 10:05:14 phx Exp $
 #
 # This file contains all used device names and defined attributes in
 # alphabetical order. New devices added to the system somewhere should first
@@ -175,6 +175,8 @@
 boca			MI
 bonito			algor
 bpp			MI
+bppcsc			amiga
+bppcsc			amigappc
 brgphy			MI
 bt3c			MI
 btbc			MI



CVS commit: src/lib/libc/gen

2011-01-14 Thread Jukka Ruohonen
Module Name:src
Committed By:   jruoho
Date:   Fri Jan 14 10:08:58 UTC 2011

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

Log Message:
Xref strsuftoll(3) and orders(7).


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/lib/libc/gen/humanize_number.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/humanize_number.3
diff -u src/lib/libc/gen/humanize_number.3:1.8 src/lib/libc/gen/humanize_number.3:1.9
--- src/lib/libc/gen/humanize_number.3:1.8	Wed Apr 30 13:10:50 2008
+++ src/lib/libc/gen/humanize_number.3	Fri Jan 14 10:08:57 2011
@@ -1,4 +1,4 @@
-.\	$NetBSD: humanize_number.3,v 1.8 2008/04/30 13:10:50 martin Exp $
+.\	$NetBSD: humanize_number.3,v 1.9 2011/01/14 10:08:57 jruoho Exp $
 .\
 .\ Copyright (c) 1999, 2002, 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 9, 2008
+.Dd January 14, 2011
 .Dt HUMANIZE_NUMBER 3
 .Os
 .Sh NAME
@@ -155,6 +155,8 @@
 .Fa result .
 .El
 .Sh SEE ALSO
+.Xr strsuftoll 3 ,
+.Xr orders 7 ,
 .Xr humanize_number 9
 .Sh HISTORY
 .Fn humanize_number



CVS commit: src/sys/kern

2011-01-14 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Fri Jan 14 10:18:21 UTC 2011

Modified Files:
src/sys/kern: kern_module.c subr_autoconf.c

Log Message:
Using int variables with sysctl's CTLTYPE_BOOL is a simple receipt to
loose on big endian machines. So make the variables bool.


To generate a diff of this commit:
cvs rdiff -u -r1.74 -r1.75 src/sys/kern/kern_module.c
cvs rdiff -u -r1.209 -r1.210 src/sys/kern/subr_autoconf.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_module.c
diff -u src/sys/kern/kern_module.c:1.74 src/sys/kern/kern_module.c:1.75
--- src/sys/kern/kern_module.c:1.74	Wed Dec 29 15:07:36 2010
+++ src/sys/kern/kern_module.c	Fri Jan 14 10:18:21 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: kern_module.c,v 1.74 2010/12/29 15:07:36 pooka Exp $	*/
+/*	$NetBSD: kern_module.c,v 1.75 2011/01/14 10:18:21 martin Exp $	*/
 
 /*-
  * Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -34,7 +34,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: kern_module.c,v 1.74 2010/12/29 15:07:36 pooka Exp $);
+__KERNEL_RCSID(0, $NetBSD: kern_module.c,v 1.75 2011/01/14 10:18:21 martin Exp $);
 
 #define _MODULE_INTERNAL
 
@@ -67,8 +67,8 @@
 static struct modlist module_bootlist = TAILQ_HEAD_INITIALIZER(module_bootlist);
 
 static module_t	*module_active;
-static int	module_verbose_on;
-static int	module_autoload_on = 1;
+static bool	module_verbose_on;
+static bool	module_autoload_on = true;
 u_int		module_count;
 u_int		module_builtinlist;
 u_int		module_autotime = 10;

Index: src/sys/kern/subr_autoconf.c
diff -u src/sys/kern/subr_autoconf.c:1.209 src/sys/kern/subr_autoconf.c:1.210
--- src/sys/kern/subr_autoconf.c:1.209	Mon Aug 16 17:29:52 2010
+++ src/sys/kern/subr_autoconf.c	Fri Jan 14 10:18:21 2011
@@ -1,4 +1,4 @@
-/* $NetBSD: subr_autoconf.c,v 1.209 2010/08/16 17:29:52 jruoho Exp $ */
+/* $NetBSD: subr_autoconf.c,v 1.210 2011/01/14 10:18:21 martin Exp $ */
 
 /*
  * Copyright (c) 1996, 2000 Christopher G. Demetriou
@@ -77,7 +77,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: subr_autoconf.c,v 1.209 2010/08/16 17:29:52 jruoho Exp $);
+__KERNEL_RCSID(0, $NetBSD: subr_autoconf.c,v 1.210 2011/01/14 10:18:21 martin Exp $);
 
 #ifdef _KERNEL_OPT
 #include opt_ddb.h
@@ -228,7 +228,7 @@
 static kmutex_t config_misc_lock;
 static kcondvar_t config_misc_cv;
 
-static int detachall = 0;
+static bool detachall = false;
 
 #define	STREQ(s1, s2)			\
 	(*(s1) == *(s2)  strcmp((s1), (s2)) == 0)



CVS commit: src

2011-01-14 Thread Frank Wille
Module Name:src
Committed By:   phx
Date:   Fri Jan 14 10:25:14 UTC 2011

Modified Files:
src/distrib/sets/lists/man: mi
src/share/man/man4/man4.amiga: Makefile
Added Files:
src/share/man/man4/man4.amiga: bppcsc.4

Log Message:
bppcsc(4) man page


To generate a diff of this commit:
cvs rdiff -u -r1.1276 -r1.1277 src/distrib/sets/lists/man/mi
cvs rdiff -u -r1.16 -r1.17 src/share/man/man4/man4.amiga/Makefile
cvs rdiff -u -r0 -r1.1 src/share/man/man4/man4.amiga/bppcsc.4

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

Modified files:

Index: src/distrib/sets/lists/man/mi
diff -u src/distrib/sets/lists/man/mi:1.1276 src/distrib/sets/lists/man/mi:1.1277
--- src/distrib/sets/lists/man/mi:1.1276	Thu Jan 13 21:05:49 2011
+++ src/distrib/sets/lists/man/mi	Fri Jan 14 10:25:14 2011
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.1276 2011/01/13 21:05:49 jruoho Exp $
+# $NetBSD: mi,v 1.1277 2011/01/14 10:25:14 phx Exp $
 #
 # Note: don't delete entries from here - mark them as obsolete instead.
 #
@@ -709,6 +709,7 @@
 ./usr/share/man/cat4/amiga/atzsc.0		man-sys-catman		.cat
 ./usr/share/man/cat4/amiga/autoconf.0		man-sys-catman		.cat
 ./usr/share/man/cat4/amiga/bah.0		man-sys-catman		.cat
+./usr/share/man/cat4/amiga/bppcsc.0		man-sys-catman		.cat
 ./usr/share/man/cat4/amiga/console.0		man-sys-catman		.cat
 ./usr/share/man/cat4/amiga/ed.0			man-sys-catman		.cat
 ./usr/share/man/cat4/amiga/es.0			man-sys-catman		.cat
@@ -3484,6 +3485,7 @@
 ./usr/share/man/html4/amiga/atzsc.html		man-sys-htmlman		html
 ./usr/share/man/html4/amiga/autoconf.html	man-sys-htmlman		html
 ./usr/share/man/html4/amiga/bah.html		man-sys-htmlman		html
+./usr/share/man/html4/amiga/bppcsc.html		man-sys-htmlman		html
 ./usr/share/man/html4/amiga/console.html	man-sys-htmlman		html
 ./usr/share/man/html4/amiga/ed.html		man-sys-htmlman		html
 ./usr/share/man/html4/amiga/es.html		man-sys-htmlman		html
@@ -5959,6 +5961,7 @@
 ./usr/share/man/man4/amiga/atzsc.4		man-sys-man		.man
 ./usr/share/man/man4/amiga/autoconf.4		man-sys-man		.man
 ./usr/share/man/man4/amiga/bah.4		man-sys-man		.man
+./usr/share/man/man4/amiga/bppcsc.4		man-sys-man		.man
 ./usr/share/man/man4/amiga/console.4		man-sys-man		.man
 ./usr/share/man/man4/amiga/ed.4			man-sys-man		.man
 ./usr/share/man/man4/amiga/es.4			man-sys-man		.man

Index: src/share/man/man4/man4.amiga/Makefile
diff -u src/share/man/man4/man4.amiga/Makefile:1.16 src/share/man/man4/man4.amiga/Makefile:1.17
--- src/share/man/man4/man4.amiga/Makefile:1.16	Sat Oct  4 14:10:41 2003
+++ src/share/man/man4/man4.amiga/Makefile	Fri Jan 14 10:25:14 2011
@@ -1,8 +1,8 @@
 # 	from: @(#)Makefile	8.2 (Berkeley) 2/16/94
-#	$NetBSD: Makefile,v 1.16 2003/10/04 14:10:41 jdolecek Exp $
+#	$NetBSD: Makefile,v 1.17 2011/01/14 10:25:14 phx Exp $
 
 MAN=	afsc.4 ahsc.4 amidisplaycc.4 atzsc.4 autoconf.4 console.4 bah.4 \
-	ed.4 es.4 fdc.4 grf.4 \
+	bppcsc.4 ed.4 es.4 fdc.4 grf.4 \
 	grfcl.4 grfcv.4 grfcv3d.4 grfet.4 grfrh.4 grfrt.4 grful.4 \
 	gtsc.4 intro.4 ite.4 mem.4 mfcs.4 mgnsc.4 qn.4 ser.4 \
 	wesc.4 zssc.4

Added files:

Index: src/share/man/man4/man4.amiga/bppcsc.4
diff -u /dev/null src/share/man/man4/man4.amiga/bppcsc.4:1.1
--- /dev/null	Fri Jan 14 10:25:14 2011
+++ src/share/man/man4/man4.amiga/bppcsc.4	Fri Jan 14 10:25:14 2011
@@ -0,0 +1,37 @@
+.Dd January 8, 2011
+.Dt BPPCSC 4 amiga
+.Os
+.Sh NAME
+.Nm bppcsc 
+.Nd BlizzardPPC 603e+ SCSI host adapter device driver
+.Sh SYNOPSIS
+.Cd bppcsc0 at zbus0
+.Cd scsibus* at bppcsc?
+.Sh DESCRIPTION
+The
+.Nm
+driver provides support for the SCSI controller present on Blizzard PPC 603e+ cards.
+.Sh HARDWARE
+The
+.Nm
+driver supports the following hardware:
+.Bl -tag -width BLIZZARDPPC -offset indent
+.It Em BLIZZARDPPC 
+Phase5 BlizzardPPC 603e+ on-board SCSI, manufacturer\ 8512, product\ 110, serial number staring with I
+.El
+.Sh SEE ALSO
+.Xr scsibus 4 ,
+.Xr wesc 4
+.Sh HISTORY
+The
+.Nm
+device first appeared in
+.Nx 6.0 .
+.Sh AUTHORS
+The
+.Nm
+driver was written by
+.An Radoslaw Kujawa Aq radoslaw.kuj...@gmail.com . 
+It was heavily based on the
+.Xr wesc 4 
+driver and uses the siop machine-dependent backend, both written by Michael L. Hitch.



CVS commit: src/distrib

2011-01-14 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Fri Jan 14 10:26:38 UTC 2011

Modified Files:
src/distrib/acorn26/instkernel: list
src/distrib/acorn32/ramdisk: list
src/distrib/alpha/instkernel/ramdisk: list
src/distrib/amd64/ramdisks/ramdisk: list
src/distrib/amiga/floppies/inst-common: list
src/distrib/arc/ramdisk: list
src/distrib/atari/floppies/install: list
src/distrib/atari/floppies/prepare: list
src/distrib/bebox/ramdisk: list
src/distrib/cats/ramdisk: list
src/distrib/cobalt/ramdisk: list
src/distrib/dreamcast/ramdisk: list
src/distrib/evbarm/instkernel/ramdisk: list
src/distrib/evbmips/instkernel/ramdisk: list
src/distrib/evbppc/ramdisk: list
src/distrib/evbsh3/instkernel/ramdisk: list
src/distrib/evbsh3/rom/ramdiskcommon: list ramdiskbin.conf
src/distrib/ews4800mips/floppies/ramdisk: list
src/distrib/hp300/ramdisk: list
src/distrib/hp700/ramdisk: list
src/distrib/i386/cdroms: Makefile.cdrom
src/distrib/i386/ramdisks/common: list.ramdisk
src/distrib/ibmnws/netboot/ramdisk: list
src/distrib/landisk/ramdisk: list
src/distrib/mac68k/instkernel/ramdisk: list
src/distrib/macppc/floppies/ramdisk: list
src/distrib/miniroot: list
src/distrib/mipsco/ramdisk: list
src/distrib/news68k/floppies/ramdisk: list
src/distrib/newsmips/floppies/ramdisk: list
src/distrib/ofppc/ramdisks/ramdisk: list
src/distrib/pmax/ramdisk: list
src/distrib/prep/floppies/ramdisk: list
src/distrib/rs6000/ramdisk: list
src/distrib/sandpoint/ramdisk: list
src/distrib/sgimips/ramdisk: list
src/distrib/shark/instkernel/ramdisk: list
src/distrib/sparc64/cdroms/installcd: Makefile
src/distrib/sparc64/instfs: list
src/distrib/sun2/miniroot: list
src/distrib/sun3/miniroot: list
src/distrib/vax/inst-common: list
src/distrib/vax/ramdisk: list
src/distrib/x68k/floppies/ramdisk: list
src/distrib/zaurus/ramdisk: list

Log Message:
Adjust file lists for recent move:
 usr/sbin/chown - sbin/chown
 usr/bin/chgrp  - bin/chgrp


To generate a diff of this commit:
cvs rdiff -u -r1.16 -r1.17 src/distrib/acorn26/instkernel/list
cvs rdiff -u -r1.23 -r1.24 src/distrib/acorn32/ramdisk/list
cvs rdiff -u -r1.37 -r1.38 src/distrib/alpha/instkernel/ramdisk/list
cvs rdiff -u -r1.11 -r1.12 src/distrib/amd64/ramdisks/ramdisk/list
cvs rdiff -u -r1.19 -r1.20 src/distrib/amiga/floppies/inst-common/list
cvs rdiff -u -r1.19 -r1.20 src/distrib/arc/ramdisk/list
cvs rdiff -u -r1.15 -r1.16 src/distrib/atari/floppies/install/list
cvs rdiff -u -r1.9 -r1.10 src/distrib/atari/floppies/prepare/list
cvs rdiff -u -r1.1 -r1.2 src/distrib/bebox/ramdisk/list
cvs rdiff -u -r1.20 -r1.21 src/distrib/cats/ramdisk/list
cvs rdiff -u -r1.9 -r1.10 src/distrib/cobalt/ramdisk/list
cvs rdiff -u -r1.13 -r1.14 src/distrib/dreamcast/ramdisk/list
cvs rdiff -u -r1.17 -r1.18 src/distrib/evbarm/instkernel/ramdisk/list
cvs rdiff -u -r1.12 -r1.13 src/distrib/evbmips/instkernel/ramdisk/list
cvs rdiff -u -r1.14 -r1.15 src/distrib/evbppc/ramdisk/list
cvs rdiff -u -r1.1 -r1.2 src/distrib/evbsh3/instkernel/ramdisk/list
cvs rdiff -u -r1.9 -r1.10 src/distrib/evbsh3/rom/ramdiskcommon/list
cvs rdiff -u -r1.6 -r1.7 src/distrib/evbsh3/rom/ramdiskcommon/ramdiskbin.conf
cvs rdiff -u -r1.9 -r1.10 src/distrib/ews4800mips/floppies/ramdisk/list
cvs rdiff -u -r1.23 -r1.24 src/distrib/hp300/ramdisk/list
cvs rdiff -u -r1.14 -r1.15 src/distrib/hp700/ramdisk/list
cvs rdiff -u -r1.21 -r1.22 src/distrib/i386/cdroms/Makefile.cdrom
cvs rdiff -u -r1.15 -r1.16 src/distrib/i386/ramdisks/common/list.ramdisk
cvs rdiff -u -r1.12 -r1.13 src/distrib/ibmnws/netboot/ramdisk/list
cvs rdiff -u -r1.16 -r1.17 src/distrib/landisk/ramdisk/list
cvs rdiff -u -r1.29 -r1.30 src/distrib/mac68k/instkernel/ramdisk/list
cvs rdiff -u -r1.37 -r1.38 src/distrib/macppc/floppies/ramdisk/list
cvs rdiff -u -r1.31 -r1.32 src/distrib/miniroot/list
cvs rdiff -u -r1.16 -r1.17 src/distrib/mipsco/ramdisk/list
cvs rdiff -u -r1.27 -r1.28 src/distrib/news68k/floppies/ramdisk/list
cvs rdiff -u -r1.25 -r1.26 src/distrib/newsmips/floppies/ramdisk/list
cvs rdiff -u -r1.5 -r1.6 src/distrib/ofppc/ramdisks/ramdisk/list
cvs rdiff -u -r1.27 -r1.28 src/distrib/pmax/ramdisk/list
cvs rdiff -u -r1.18 -r1.19 src/distrib/prep/floppies/ramdisk/list
cvs rdiff -u -r1.6 -r1.7 src/distrib/rs6000/ramdisk/list
cvs rdiff -u -r1.9 -r1.10 src/distrib/sandpoint/ramdisk/list
cvs rdiff -u -r1.17 -r1.18 src/distrib/sgimips/ramdisk/list
cvs rdiff -u -r1.20 -r1.21 src/distrib/shark/instkernel/ramdisk/list
cvs rdiff -u -r1.8 -r1.9 src/distrib/sparc64/cdroms/installcd/Makefile
cvs rdiff -u -r1.19 -r1.20 src/distrib/sparc64/instfs/list
cvs rdiff -u -r1.16 -r1.17 src/distrib/sun2/miniroot/list
cvs rdiff -u -r1.25 -r1.26 

CVS commit: src/share/man/man4/man4.amiga

2011-01-14 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Fri Jan 14 10:30:02 UTC 2011

Modified Files:
src/share/man/man4/man4.amiga: bppcsc.4

Log Message:
Remove trailing whitespace, use more markup.
XXX: License missing.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/share/man/man4/man4.amiga/bppcsc.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/man4.amiga/bppcsc.4
diff -u src/share/man/man4/man4.amiga/bppcsc.4:1.1 src/share/man/man4/man4.amiga/bppcsc.4:1.2
--- src/share/man/man4/man4.amiga/bppcsc.4:1.1	Fri Jan 14 10:25:14 2011
+++ src/share/man/man4/man4.amiga/bppcsc.4	Fri Jan 14 10:30:02 2011
@@ -1,8 +1,9 @@
+.\ $NetBSD: bppcsc.4,v 1.2 2011/01/14 10:30:02 wiz Exp $
 .Dd January 8, 2011
 .Dt BPPCSC 4 amiga
 .Os
 .Sh NAME
-.Nm bppcsc 
+.Nm bppcsc
 .Nd BlizzardPPC 603e+ SCSI host adapter device driver
 .Sh SYNOPSIS
 .Cd bppcsc0 at zbus0
@@ -10,14 +11,16 @@
 .Sh DESCRIPTION
 The
 .Nm
-driver provides support for the SCSI controller present on Blizzard PPC 603e+ cards.
+driver provides support for the SCSI controller present on Blizzard
+PPC 603e+ cards.
 .Sh HARDWARE
 The
 .Nm
 driver supports the following hardware:
 .Bl -tag -width BLIZZARDPPC -offset indent
-.It Em BLIZZARDPPC 
-Phase5 BlizzardPPC 603e+ on-board SCSI, manufacturer\ 8512, product\ 110, serial number staring with I
+.It Em BLIZZARDPPC
+Phase5 BlizzardPPC 603e+ on-board SCSI, manufacturer 8512,
+product 110, serial number staring with I
 .El
 .Sh SEE ALSO
 .Xr scsibus 4 ,
@@ -28,10 +31,13 @@
 device first appeared in
 .Nx 6.0 .
 .Sh AUTHORS
+.An -nosplit
 The
 .Nm
 driver was written by
-.An Radoslaw Kujawa Aq radoslaw.kuj...@gmail.com . 
+.An Radoslaw Kujawa Aq radoslaw.kuj...@gmail.com .
 It was heavily based on the
-.Xr wesc 4 
-driver and uses the siop machine-dependent backend, both written by Michael L. Hitch.
+.Xr wesc 4
+driver and uses the siop machine-dependent backend, both written
+by
+.An Michael L. Hitch .



CVS commit: src/doc

2011-01-14 Thread Frank Wille
Module Name:src
Committed By:   phx
Date:   Fri Jan 14 10:34:15 UTC 2011

Modified Files:
src/doc: CHANGES

Log Message:
Add driver for BlizzardPPC SCSI.


To generate a diff of this commit:
cvs rdiff -u -r1.1488 -r1.1489 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.1488 src/doc/CHANGES:1.1489
--- src/doc/CHANGES:1.1488	Mon Jan 10 04:43:48 2011
+++ src/doc/CHANGES	Fri Jan 14 10:34:15 2011
@@ -1,4 +1,4 @@
-# LIST OF CHANGES FROM LAST RELEASE:			$Revision: 1.1488 $
+# LIST OF CHANGES FROM LAST RELEASE:			$Revision: 1.1489 $
 #
 #
 # [Note: This file does not mention every change made to the NetBSD source tree.
@@ -823,3 +823,4 @@
 	amd64, i386: Booting from a disk with a GUID Partition Table is
 		now possible. [jakllsch 20110106]
 	sigqueue(2): Implement sigqueue/sigqueueinfo [christos 20110109]
+	amiga: Add a driver for BlizzardPPC 603e+ SCSI [phx 20110114]



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

2011-01-14 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Fri Jan 14 11:07:42 UTC 2011

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

Log Message:
Release etfs node's backing vnode before freeing the etfs node.

spotted from the LOCKDEBUG run that martin accidentally did


To generate a diff of this commit:
cvs rdiff -u -r1.88 -r1.89 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/rumpfs.c
diff -u src/sys/rump/librump/rumpvfs/rumpfs.c:1.88 src/sys/rump/librump/rumpvfs/rumpfs.c:1.89
--- src/sys/rump/librump/rumpvfs/rumpfs.c:1.88	Thu Jan 13 10:26:47 2011
+++ src/sys/rump/librump/rumpvfs/rumpfs.c	Fri Jan 14 11:07:42 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: rumpfs.c,v 1.88 2011/01/13 10:26:47 pooka Exp $	*/
+/*	$NetBSD: rumpfs.c,v 1.89 2011/01/14 11:07:42 pooka Exp $	*/
 
 /*
  * Copyright (c) 2009, 2010 Antti Kantee.  All Rights Reserved.
@@ -26,7 +26,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: rumpfs.c,v 1.88 2011/01/13 10:26:47 pooka Exp $);
+__KERNEL_RCSID(0, $NetBSD: rumpfs.c,v 1.89 2011/01/14 11:07:42 pooka Exp $);
 
 #include sys/param.h
 #include sys/atomic.h
@@ -213,6 +213,10 @@
 	struct vnode *rfsmp_rvp;
 };
 
+#define INO_WHITEOUT 1
+static int lastino = 2;
+static kmutex_t reclock;
+
 static struct rumpfs_node *makeprivate(enum vtype, dev_t, off_t, bool);
 
 /*
@@ -478,8 +482,18 @@
 	mutex_exit(etfs_lock);
 
 	/* node is unreachable, safe to nuke all device copies */
-	if (et-et_blkmin != -1)
+	if (et-et_blkmin != -1) {
 		vdevgone(RUMPBLK_DEVMAJOR, et-et_blkmin, et-et_blkmin, VBLK);
+	} else {
+		struct vnode *vp;
+
+		mutex_enter(reclock);
+		if ((vp = et-et_rn-rn_vp) != NULL)
+			mutex_enter(vp-v_interlock);
+		mutex_exit(reclock);
+		if (vp  vget(vp, 0) == 0)
+			vgone(vp);
+	}
 
 	if (et-et_rn-rn_hostpath != NULL)
 		free(et-et_rn-rn_hostpath, M_TEMP);
@@ -493,10 +507,6 @@
  * rumpfs
  */
 
-#define INO_WHITEOUT 1
-static int lastino = 2;
-static kmutex_t reclock;
-
 static struct rumpfs_node *
 makeprivate(enum vtype vt, dev_t rdev, off_t size, bool et)
 {



CVS commit: src/share/man/man4/man4.amiga

2011-01-14 Thread Frank Wille
Module Name:src
Committed By:   phx
Date:   Fri Jan 14 11:14:02 UTC 2011

Modified Files:
src/share/man/man4/man4.amiga: bppcsc.4

Log Message:
Fixed typo: staring - starting


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/share/man/man4/man4.amiga/bppcsc.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/man4.amiga/bppcsc.4
diff -u src/share/man/man4/man4.amiga/bppcsc.4:1.2 src/share/man/man4/man4.amiga/bppcsc.4:1.3
--- src/share/man/man4/man4.amiga/bppcsc.4:1.2	Fri Jan 14 10:30:02 2011
+++ src/share/man/man4/man4.amiga/bppcsc.4	Fri Jan 14 11:14:02 2011
@@ -1,4 +1,4 @@
-.\ $NetBSD: bppcsc.4,v 1.2 2011/01/14 10:30:02 wiz Exp $
+.\ $NetBSD: bppcsc.4,v 1.3 2011/01/14 11:14:02 phx Exp $
 .Dd January 8, 2011
 .Dt BPPCSC 4 amiga
 .Os
@@ -20,7 +20,7 @@
 .Bl -tag -width BLIZZARDPPC -offset indent
 .It Em BLIZZARDPPC
 Phase5 BlizzardPPC 603e+ on-board SCSI, manufacturer 8512,
-product 110, serial number staring with I
+product 110, serial number starting with I
 .El
 .Sh SEE ALSO
 .Xr scsibus 4 ,



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

2011-01-14 Thread Frank Wille
Module Name:src
Committed By:   phx
Date:   Fri Jan 14 12:54:39 UTC 2011

Modified Files:
src/sys/arch/amigappc/conf: GENERIC NULL files.amigappc

Log Message:
Include new bppcsc(4) driver from amiga.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/sys/arch/amigappc/conf/GENERIC
cvs rdiff -u -r1.28 -r1.29 src/sys/arch/amigappc/conf/NULL
cvs rdiff -u -r1.23 -r1.24 src/sys/arch/amigappc/conf/files.amigappc

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/amigappc/conf/GENERIC
diff -u src/sys/arch/amigappc/conf/GENERIC:1.5 src/sys/arch/amigappc/conf/GENERIC:1.6
--- src/sys/arch/amigappc/conf/GENERIC:1.5	Sat May  8 22:16:25 2010
+++ src/sys/arch/amigappc/conf/GENERIC	Fri Jan 14 12:54:39 2011
@@ -1,4 +1,4 @@
-# $NetBSD: GENERIC,v 1.5 2010/05/08 22:16:25 mrg Exp $
+# $NetBSD: GENERIC,v 1.6 2011/01/14 12:54:39 phx Exp $
 #
 # GENERIC machine description file
 # 
@@ -22,7 +22,7 @@
 
 options 	INCLUDE_CONFIG_FILE # embed config file in kernel binary
 
-#ident  GENERIC-$Revision: 1.5 $
+#ident  GENERIC-$Revision: 1.6 $
 
 maxusers	8
 
@@ -315,6 +315,8 @@
 scsibus*	at mgnsc0
 wesc0		at zbus0		# Warp Engine scsi
 scsibus*	at wesc0
+bppcsc0		at zbus0		# BlizzardPPC 603e+ scsi
+scsibus*	at bppcsc0
 afsc0		at zbus0		# A4091 scsi
 scsibus*	at afsc0
 aftsc0		at mainbus0		# A4000T scsi

Index: src/sys/arch/amigappc/conf/NULL
diff -u src/sys/arch/amigappc/conf/NULL:1.28 src/sys/arch/amigappc/conf/NULL:1.29
--- src/sys/arch/amigappc/conf/NULL:1.28	Fri Apr 16 13:48:29 2010
+++ src/sys/arch/amigappc/conf/NULL	Fri Jan 14 12:54:39 2011
@@ -1,4 +1,4 @@
-# $NetBSD: NULL,v 1.28 2010/04/16 13:48:29 pooka Exp $
+# $NetBSD: NULL,v 1.29 2011/01/14 12:54:39 phx Exp $
 #
 # NULL machine description file
 # 
@@ -7,7 +7,7 @@
 
 #options 	INCLUDE_CONFIG_FILE # embed config file in kernel binary
 
-#ident  GENERIC-$Revision: 1.28 $
+#ident  GENERIC-$Revision: 1.29 $
 
 maxusers	8
 
@@ -301,6 +301,8 @@
 #scsibus*	at mgnsc0
 #wesc0		at zbus0		# Warp Engine scsi
 #scsibus*	at wesc0
+#bppcsc0 	at zbus0		# BlizzardPPC 603e+ scsi
+#scsibus*	at bppcsc0
 #afsc0		at zbus0		# A4091 scsi
 #scsibus*	at afsc0
 #aftsc0		at mainbus0		# A4000T scsi

Index: src/sys/arch/amigappc/conf/files.amigappc
diff -u src/sys/arch/amigappc/conf/files.amigappc:1.23 src/sys/arch/amigappc/conf/files.amigappc:1.24
--- src/sys/arch/amigappc/conf/files.amigappc:1.23	Mon Oct 18 22:00:47 2010
+++ src/sys/arch/amigappc/conf/files.amigappc	Fri Jan 14 12:54:39 2011
@@ -1,4 +1,4 @@
-#	$NetBSD: files.amigappc,v 1.23 2010/10/18 22:00:47 phx Exp $
+#	$NetBSD: files.amigappc,v 1.24 2011/01/14 12:54:39 phx Exp $
 
 # maxpartitions must be first item in files.${ARCH}.newconf
 maxpartitions 16			# NOTE THAT AMIGA IS SPECIAL!
@@ -354,6 +354,11 @@
 attach	wesc at zbus
 file	arch/amiga/dev/wesc.c		wesc needs-flag
 
+# Phase5 Blizzard 603e+ SCSI
+device	bppcsc: scsi, asiop
+attach	bppcsc at zbus
+file	arch/amiga/dev/bppcsc.c		bppcsc needs-flag
+
 # C= A4091  A4000T
 device	afsc: scsi, asiop
 attach	afsc at zbus



CVS commit: src/tests/rump

2011-01-14 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Fri Jan 14 13:08:00 UTC 2011

Modified Files:
src/tests/rump/kernspace: Makefile kernspace.h
src/tests/rump/rumpkern: Makefile
Added Files:
src/tests/rump/kernspace: sendsig.c
src/tests/rump/rumpkern: t_signals.c

Log Message:
elementary tests for rump sigmodels


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/tests/rump/kernspace/Makefile
cvs rdiff -u -r1.3 -r1.4 src/tests/rump/kernspace/kernspace.h
cvs rdiff -u -r0 -r1.1 src/tests/rump/kernspace/sendsig.c
cvs rdiff -u -r1.12 -r1.13 src/tests/rump/rumpkern/Makefile
cvs rdiff -u -r0 -r1.1 src/tests/rump/rumpkern/t_signals.c

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

Modified files:

Index: src/tests/rump/kernspace/Makefile
diff -u src/tests/rump/kernspace/Makefile:1.4 src/tests/rump/kernspace/Makefile:1.5
--- src/tests/rump/kernspace/Makefile:1.4	Thu Jan  6 13:12:52 2011
+++ src/tests/rump/kernspace/Makefile	Fri Jan 14 13:08:00 2011
@@ -1,10 +1,10 @@
-#	$NetBSD: Makefile,v 1.4 2011/01/06 13:12:52 pooka Exp $
+#	$NetBSD: Makefile,v 1.5 2011/01/14 13:08:00 pooka Exp $
 #
 
 .include bsd.own.mk
 
 LIB=	kernspace
-SRCS=	thread.c busypage.c tsleep.c alloc.c lockme.c
+SRCS=	thread.c busypage.c tsleep.c alloc.c lockme.c sendsig.c
 
 RUMPTOP=${NETBSDSRCDIR}/sys/rump
 

Index: src/tests/rump/kernspace/kernspace.h
diff -u src/tests/rump/kernspace/kernspace.h:1.3 src/tests/rump/kernspace/kernspace.h:1.4
--- src/tests/rump/kernspace/kernspace.h:1.3	Thu Jan  6 13:12:52 2011
+++ src/tests/rump/kernspace/kernspace.h	Fri Jan 14 13:08:00 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: kernspace.h,v 1.3 2011/01/06 13:12:52 pooka Exp $	*/
+/*	$NetBSD: kernspace.h,v 1.4 2011/01/14 13:08:00 pooka Exp $	*/
 
 /*-
  * Copyright (c) 2010 The NetBSD Foundation, Inc.
@@ -41,4 +41,7 @@
 void rumptest_alloc(size_t);
 void rumptest_lockme(enum locktest);
 
+void rumptest_sendsig(char *);
+void rumptest_localsig(int);
+
 #endif /* _TESTS_RUMP_KERNSPACE_KERNSPACE_H_ */

Index: src/tests/rump/rumpkern/Makefile
diff -u src/tests/rump/rumpkern/Makefile:1.12 src/tests/rump/rumpkern/Makefile:1.13
--- src/tests/rump/rumpkern/Makefile:1.12	Thu Jan  6 13:12:52 2011
+++ src/tests/rump/rumpkern/Makefile	Fri Jan 14 13:08:00 2011
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.12 2011/01/06 13:12:52 pooka Exp $
+# $NetBSD: Makefile,v 1.13 2011/01/14 13:08:00 pooka Exp $
 
 .include bsd.own.mk
 
@@ -9,6 +9,7 @@
 TESTS_C+=	t_lwproc
 TESTS_C+=	t_modcmd
 TESTS_C+=	t_modlinkset
+TESTS_C+=	t_signals
 TESTS_C+=	t_threads
 TESTS_C+=	t_tsleep
 TESTS_C+=	t_vm

Added files:

Index: src/tests/rump/kernspace/sendsig.c
diff -u /dev/null src/tests/rump/kernspace/sendsig.c:1.1
--- /dev/null	Fri Jan 14 13:08:00 2011
+++ src/tests/rump/kernspace/sendsig.c	Fri Jan 14 13:08:00 2011
@@ -0,0 +1,82 @@
+/*	$NetBSD: sendsig.c,v 1.1 2011/01/14 13:08:00 pooka Exp $	*/
+
+/*-
+ * Copyright (c) 2011 The NetBSD Foundation, Inc.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *notice, this list of conditions and the following disclaimer in the
+ *documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND
+ * CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
+ * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
+ * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
+ * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+ * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
+ * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include sys/cdefs.h
+#if !defined(lint)
+__RCSID($NetBSD: sendsig.c,v 1.1 2011/01/14 13:08:00 pooka Exp $);
+#endif /* !lint */
+
+#include sys/param.h
+#include sys/proc.h
+
+#include rump/rump.h
+
+#include kernspace.h
+
+/*
+ * loop until a non-system process appears and we can send it a signal
+ */
+void
+rumptest_sendsig(char *signo)
+{
+	struct proc *p;
+	bool sent = false;
+	int sig;
+
+	sig = strtoull(signo, NULL, 10);
+	rump_boot_setsigmodel(RUMP_SIGMODEL_RAISE);
+
+	mutex_enter(proc_lock);
+	while (!sent) {
+		PROCLIST_FOREACH(p, allproc) {
+			if (p-p_pid  1) {
+mutex_enter(p-p_lock);
+

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

2011-01-14 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Fri Jan 14 13:09:13 UTC 2011

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

Log Message:
+tp


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

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

Modified files:

Index: src/distrib/sets/lists/tests/mi
diff -u src/distrib/sets/lists/tests/mi:1.238 src/distrib/sets/lists/tests/mi:1.239
--- src/distrib/sets/lists/tests/mi:1.238	Thu Jan 13 14:34:16 2011
+++ src/distrib/sets/lists/tests/mi	Fri Jan 14 13:09:12 2011
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.238 2011/01/13 14:34:16 pgoyette Exp $
+# $NetBSD: mi,v 1.239 2011/01/14 13:09:12 pooka Exp $
 #
 # Note: don't delete entries from here - mark them as obsolete instead.
 #
@@ -512,6 +512,7 @@
 ./usr/libdata/debug/usr/tests/rump/rumpkern/t_lwproc.debug		tests-syscall-debug	debug,atf
 ./usr/libdata/debug/usr/tests/rump/rumpkern/t_modcmd.debug		tests-syscall-debug	debug,atf
 ./usr/libdata/debug/usr/tests/rump/rumpkern/t_modlinkset.debug		tests-syscall-debug	debug,atf
+./usr/libdata/debug/usr/tests/rump/rumpkern/t_signals.debug		tests-syscall-debug	debug,atf
 ./usr/libdata/debug/usr/tests/rump/rumpkern/t_threads.debug		tests-syscall-debug	debug,atf
 ./usr/libdata/debug/usr/tests/rump/rumpkern/t_tsleep.debug		tests-syscall-debug	debug,atf
 ./usr/libdata/debug/usr/tests/rump/rumpkern/t_vm.debug			tests-syscall-debug	debug,atf
@@ -1948,6 +1949,7 @@
 ./usr/tests/rump/rumpkern/t_modcmd		tests-rump-tests	atf
 ./usr/tests/rump/rumpkern/t_modlinkset		tests-rump-tests	atf
 ./usr/tests/rump/rumpkern/t_sp			tests-rump-tests	atf
+./usr/tests/rump/rumpkern/t_signals		tests-rump-tests	atf
 ./usr/tests/rump/rumpkern/t_threads		tests-rump-tests	atf
 ./usr/tests/rump/rumpkern/t_tsleep		tests-rump-tests	atf
 ./usr/tests/rump/rumpkern/t_vm			tests-rump-tests	atf



CVS commit: src/sys/rump

2011-01-14 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Fri Jan 14 13:11:08 UTC 2011

Modified Files:
src/sys/rump/include/rump: rumpuser.h
src/sys/rump/librump/rumpkern: signals.c

Log Message:
Support SIGMODEL_RAISE for non-local clients.


To generate a diff of this commit:
cvs rdiff -u -r1.62 -r1.63 src/sys/rump/include/rump/rumpuser.h
cvs rdiff -u -r1.6 -r1.7 src/sys/rump/librump/rumpkern/signals.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/rumpuser.h
diff -u src/sys/rump/include/rump/rumpuser.h:1.62 src/sys/rump/include/rump/rumpuser.h:1.63
--- src/sys/rump/include/rump/rumpuser.h:1.62	Wed Jan 12 12:51:47 2011
+++ src/sys/rump/include/rump/rumpuser.h	Fri Jan 14 13:11:08 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: rumpuser.h,v 1.62 2011/01/12 12:51:47 pooka Exp $	*/
+/*	$NetBSD: rumpuser.h,v 1.63 2011/01/14 13:11:08 pooka Exp $	*/
 
 /*
  * Copyright (c) 2007 Antti Kantee.  All Rights Reserved.
@@ -36,7 +36,7 @@
 #include stdint.h
 #endif
 
-#define RUMPUSER_VERSION 9
+#define RUMPUSER_VERSION 10
 int rumpuser_getversion(void);
 
 int rumpuser_daemonize_begin(void);
@@ -229,6 +229,7 @@
 int	rumpuser_sp_copyout(void *, const void *, void *, size_t);
 int	rumpuser_sp_copyoutstr(void *, const void *, void *, size_t *);
 int	rumpuser_sp_anonmmap(void *, size_t, void **);
+int	rumpuser_sp_raise(void *, int);
 void	rumpuser_sp_fini(void);
 
 #endif /* _RUMP_RUMPUSER_H_ */

Index: src/sys/rump/librump/rumpkern/signals.c
diff -u src/sys/rump/librump/rumpkern/signals.c:1.6 src/sys/rump/librump/rumpkern/signals.c:1.7
--- src/sys/rump/librump/rumpkern/signals.c:1.6	Sat Jan  8 14:01:04 2011
+++ src/sys/rump/librump/rumpkern/signals.c	Fri Jan 14 13:11:08 2011
@@ -1,7 +1,7 @@
-/*	$NetBSD: signals.c,v 1.6 2011/01/08 14:01:04 pooka Exp $	*/
+/*	$NetBSD: signals.c,v 1.7 2011/01/14 13:11:08 pooka Exp $	*/
 
-/*
- * Copyright (c) 2010 Antti Kantee.  All Rights Reserved.
+/*-
+ * Copyright (c) 2010, 2011 Antti Kantee.  All Rights Reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -26,7 +26,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: signals.c,v 1.6 2011/01/08 14:01:04 pooka Exp $);
+__KERNEL_RCSID(0, $NetBSD: signals.c,v 1.7 2011/01/14 13:11:08 pooka Exp $);
 
 #include sys/param.h
 #include sys/atomic.h
@@ -37,6 +37,7 @@
 #include rump/rump.h
 #include rump/rumpuser.h
 
+#include rump_private.h
 #include rumpkern_if_priv.h
 
 const struct filterops sig_filtops = {
@@ -45,10 +46,24 @@
 
 sigset_t sigcantmask;
 
+static void
+pgrp_apply(struct pgrp *pgrp, int signo, void (*apply)(struct proc *p, int))
+{
+	struct proc *p;
+
+	KASSERT(mutex_owned(proc_lock));
+
+	LIST_FOREACH(p, pgrp-pg_members, p_pglist) {
+		mutex_enter(p-p_lock);
+		apply(p, signo);
+		mutex_exit(p-p_lock);
+	}
+}
+
 /* RUMP_SIGMODEL_PANIC */
 
 static void
-rumpsig_panic(pid_t target, int signo)
+rumpsig_panic(struct proc *p, int signo)
 {
 
 	switch (signo) {
@@ -63,7 +78,7 @@
 /* RUMP_SIGMODEL_IGNORE */
 
 static void
-rumpsig_ignore(pid_t target, int signo)
+rumpsig_ignore(struct proc *p, int signo)
 {
 
 	return;
@@ -72,57 +87,39 @@
 /* RUMP_SIGMODEL_HOST */
 
 static void
-rumpsig_host(pid_t target, int signo)
+rumpsig_host(struct proc *p, int signo)
 {
 	int error;
 
-	rumpuser_kill(target, signo, error);
+	rumpuser_kill(p-p_pid, signo, error);
 }
 
 /* RUMP_SIGMODEL_RAISE */
 
 static void
-rumpsig_raise(pid_t target, int signo)
+rumpsig_raise(struct proc *p, int signo)
 {
-	int error;
+	int error = 0;
 
-	rumpuser_kill(RUMPUSER_PID_SELF, signo, error);
+	if (RUMP_LOCALPROC_P(p)) {
+		rumpuser_kill(RUMPUSER_PID_SELF, signo, error);
+	} else {
+		rumpuser_sp_raise(p-p_vmspace-vm_map.pmap, signo);
+	}
 }
 
 static void
-rumpsig_record(pid_t target, int sig)
+rumpsig_record(struct proc *p, int signo)
 {
-	struct proc *p = NULL;
-	struct pgrp *pgrp = NULL;
-
-	/* well this is a little silly */
-	mutex_enter(proc_lock);
-	if (target = 0)
-		p = proc_find_raw(target);
-	else
-		pgrp = pgrp_find(target);
 
-	if (p) {
-		mutex_enter(p-p_lock);
-		if (!sigismember(p-p_sigctx.ps_sigignore, sig)) {
-			sigaddset(p-p_sigpend.sp_set, sig);
-		}
-		mutex_exit(p-p_lock);
-	} else if (pgrp) {
-		LIST_FOREACH(p, pgrp-pg_members, p_pglist) {
-			mutex_enter(p-p_lock);
-			if (!sigismember(p-p_sigctx.ps_sigignore, sig)) {
-sigaddset(p-p_sigpend.sp_set, sig);
-			}
-			mutex_exit(p-p_lock);
-		}
+	if (!sigismember(p-p_sigctx.ps_sigignore, signo)) {
+		sigaddset(p-p_sigpend.sp_set, signo);
 	}
-	mutex_exit(proc_lock);
 }
 
-typedef void (*rumpsig_fn)(pid_t pid, int sig);
+typedef void (*rumpsig_fn)(struct proc *, int);
 
-rumpsig_fn rumpsig = rumpsig_panic;
+static rumpsig_fn rumpsig = rumpsig_panic;
 
 /*
  * Set signal delivery model.  It would be nice if we could
@@ -160,28 +157,28 @@
 psignal(struct proc *p, 

CVS commit: src/lib

2011-01-14 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Fri Jan 14 13:12:15 UTC 2011

Modified Files:
src/lib/librumpclient: rumpclient.c
src/lib/librumpuser: rumpuser_sp.c sp_common.c

Log Message:
Add RUMPSP_RAISE: the kernel sends a signal to the client.


To generate a diff of this commit:
cvs rdiff -u -r1.15 -r1.16 src/lib/librumpclient/rumpclient.c
cvs rdiff -u -r1.35 -r1.36 src/lib/librumpuser/rumpuser_sp.c
cvs rdiff -u -r1.23 -r1.24 src/lib/librumpuser/sp_common.c

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

Modified files:

Index: src/lib/librumpclient/rumpclient.c
diff -u src/lib/librumpclient/rumpclient.c:1.15 src/lib/librumpclient/rumpclient.c:1.16
--- src/lib/librumpclient/rumpclient.c:1.15	Mon Jan 10 19:49:43 2011
+++ src/lib/librumpclient/rumpclient.c	Fri Jan 14 13:12:15 2011
@@ -1,4 +1,4 @@
-/*  $NetBSD: rumpclient.c,v 1.15 2011/01/10 19:49:43 pooka Exp $	*/
+/*  $NetBSD: rumpclient.c,v 1.16 2011/01/14 13:12:15 pooka Exp $	*/
 
 /*
  * Copyright (c) 2010, 2011 Antti Kantee.  All Rights Reserved.
@@ -343,6 +343,7 @@
 handlereq(struct spclient *spc)
 {
 	struct rsp_copydata *copydata;
+	struct rsp_hdr *rhdr = spc-spc_hdr;
 	void *mapaddr;
 	size_t maplen;
 	int reqtype = spc-spc_hdr.rsp_type;
@@ -378,6 +379,14 @@
 		DPRINTF((rump_sp handlereq: anonmmap: %p\n, mapaddr));
 		send_anonmmap_resp(spc, spc-spc_hdr.rsp_reqno, mapaddr);
 		break;
+	case RUMPSP_RAISE:
+		DPRINTF((rump_sp handlereq: raise sig %d\n, rhdr-rsp_signo));
+		raise(rhdr-rsp_signo);
+		/*
+		 * We most likely have signals blocked, but the signal
+		 * will be handled soon enough when we return.
+		 */
+		break;
 	default:
 		printf(PANIC: INVALID TYPE %d\n, reqtype);
 		abort();

Index: src/lib/librumpuser/rumpuser_sp.c
diff -u src/lib/librumpuser/rumpuser_sp.c:1.35 src/lib/librumpuser/rumpuser_sp.c:1.36
--- src/lib/librumpuser/rumpuser_sp.c:1.35	Wed Jan 12 12:52:16 2011
+++ src/lib/librumpuser/rumpuser_sp.c	Fri Jan 14 13:12:14 2011
@@ -1,4 +1,4 @@
-/*  $NetBSD: rumpuser_sp.c,v 1.35 2011/01/12 12:52:16 pooka Exp $	*/
+/*  $NetBSD: rumpuser_sp.c,v 1.36 2011/01/14 13:12:14 pooka Exp $	*/
 
 /*
  * Copyright (c) 2010, 2011 Antti Kantee.  All Rights Reserved.
@@ -35,7 +35,7 @@
  */
 
 #include sys/cdefs.h
-__RCSID($NetBSD: rumpuser_sp.c,v 1.35 2011/01/12 12:52:16 pooka Exp $);
+__RCSID($NetBSD: rumpuser_sp.c,v 1.36 2011/01/14 13:12:14 pooka Exp $);
 
 #include sys/types.h
 #include sys/atomic.h
@@ -411,6 +411,24 @@
 	return rv;
 }
 
+static int
+send_raise_req(struct spclient *spc, int signo)
+{
+	struct rsp_hdr rhdr;
+	int rv;
+
+	rhdr.rsp_len = sizeof(rhdr);
+	rhdr.rsp_class = RUMPSP_REQ;
+	rhdr.rsp_type = RUMPSP_RAISE;
+	rhdr.rsp_signo = signo;
+
+	sendlock(spc);
+	rv = dosend(spc, rhdr, sizeof(rhdr));
+	sendunlock(spc);
+
+	return rv;
+}
+
 static void
 spcref(struct spclient *spc)
 {
@@ -718,6 +736,19 @@
 	return 0;
 }
 
+int
+rumpuser_sp_raise(void *arg, int signo)
+{
+	struct spclient *spc = arg;
+	int rv, nlocks;
+
+	rumpuser__kunlock(0, nlocks, NULL);
+	rv = send_raise_req(spc, signo);
+	rumpuser__klock(nlocks, NULL);
+
+	return rv;
+}
+
 /*
  *
  * Startup routines and mainloop for server.

Index: src/lib/librumpuser/sp_common.c
diff -u src/lib/librumpuser/sp_common.c:1.23 src/lib/librumpuser/sp_common.c:1.24
--- src/lib/librumpuser/sp_common.c:1.23	Mon Jan 10 19:49:43 2011
+++ src/lib/librumpuser/sp_common.c	Fri Jan 14 13:12:14 2011
@@ -1,4 +1,4 @@
-/*  $NetBSD: sp_common.c,v 1.23 2011/01/10 19:49:43 pooka Exp $	*/
+/*  $NetBSD: sp_common.c,v 1.24 2011/01/14 13:12:14 pooka Exp $	*/
 
 /*
  * Copyright (c) 2010, 2011 Antti Kantee.  All Rights Reserved.
@@ -88,7 +88,8 @@
 	RUMPSP_COPYIN, RUMPSP_COPYINSTR,
 	RUMPSP_COPYOUT, RUMPSP_COPYOUTSTR,
 	RUMPSP_ANONMMAP,
-	RUMPSP_PREFORK };
+	RUMPSP_PREFORK,
+	RUMPSP_RAISE };
 
 enum { HANDSHAKE_GUEST, HANDSHAKE_AUTH, HANDSHAKE_FORK };
 
@@ -107,12 +108,14 @@
 		uint32_t sysnum;
 		uint32_t error;
 		uint32_t handshake;
+		uint32_t signo;
 	} u;
 };
 #define HDRSZ sizeof(struct rsp_hdr)
 #define rsp_sysnum u.sysnum
 #define rsp_error u.error
 #define rsp_handshake u.handshake
+#define rsp_signo u.signo
 
 #define MAXBANNER 96
 



CVS commit: src/tests/rump/rumpkern

2011-01-14 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Fri Jan 14 13:23:16 UTC 2011

Modified Files:
src/tests/rump/rumpkern: Makefile t_sp.sh
src/tests/rump/rumpkern/h_client: h_simplecli.c
Added Files:
src/tests/rump/rumpkern/h_server: Makefile h_simpleserver.c

Log Message:
test remove signal delivery


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 src/tests/rump/rumpkern/Makefile
cvs rdiff -u -r1.8 -r1.9 src/tests/rump/rumpkern/t_sp.sh
cvs rdiff -u -r1.1 -r1.2 src/tests/rump/rumpkern/h_client/h_simplecli.c
cvs rdiff -u -r0 -r1.3 src/tests/rump/rumpkern/h_server/Makefile \
src/tests/rump/rumpkern/h_server/h_simpleserver.c

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

Modified files:

Index: src/tests/rump/rumpkern/Makefile
diff -u src/tests/rump/rumpkern/Makefile:1.13 src/tests/rump/rumpkern/Makefile:1.14
--- src/tests/rump/rumpkern/Makefile:1.13	Fri Jan 14 13:08:00 2011
+++ src/tests/rump/rumpkern/Makefile	Fri Jan 14 13:23:15 2011
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.13 2011/01/14 13:08:00 pooka Exp $
+# $NetBSD: Makefile,v 1.14 2011/01/14 13:23:15 pooka Exp $
 
 .include bsd.own.mk
 
@@ -16,7 +16,7 @@
 
 TESTS_SH=	t_sp
 
-SUBDIR+=	h_client
+SUBDIR+=	h_client h_server
 
 ADD_TO_LD=	-lrumpvfs -lrump -lrumpuser -lpthread
 LDADD.t_modlinkset+=	-lukfs -lrumpdev_disk -lrumpdev -lrumpfs_msdos 

Index: src/tests/rump/rumpkern/t_sp.sh
diff -u src/tests/rump/rumpkern/t_sp.sh:1.8 src/tests/rump/rumpkern/t_sp.sh:1.9
--- src/tests/rump/rumpkern/t_sp.sh:1.8	Wed Jan 12 12:32:53 2011
+++ src/tests/rump/rumpkern/t_sp.sh	Fri Jan 14 13:23:15 2011
@@ -1,4 +1,4 @@
-#	$NetBSD: t_sp.sh,v 1.8 2011/01/12 12:32:53 pooka Exp $
+#	$NetBSD: t_sp.sh,v 1.9 2011/01/14 13:23:15 pooka Exp $
 #
 # Copyright (c) 2010 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -48,6 +48,7 @@
 test_case fork_pipecomm fork pipecomm
 test_case fork_fakeauth fork fakeauth
 test_case sigsafe sigsafe sigsafe
+test_case signal signal
 
 basic()
 {
@@ -79,6 +80,16 @@
 	export RUMP_SERVER=unix://commsock
 	atf_check -s exit:0 rump_server ${RUMP_SERVER}
 	atf_check -s exit:0 $(atf_get_srcdir)/h_client/h_sigcli
+
+}
+
+signal()
+{
+
+	export RUMP_SERVER=unix://commsock
+	atf_check -s exit:0 $(atf_get_srcdir)/h_server/h_simpleserver \
+	${RUMP_SERVER} sendsig 27
+	atf_check -s signal:27 $(atf_get_srcdir)/h_client/h_simplecli block
 }
 
 atf_init_test_cases()
@@ -92,4 +103,5 @@
 	atf_add_test_case fork_pipecomm
 	atf_add_test_case fork_fakeauth
 	atf_add_test_case sigsafe
+	atf_add_test_case signal
 }

Index: src/tests/rump/rumpkern/h_client/h_simplecli.c
diff -u src/tests/rump/rumpkern/h_client/h_simplecli.c:1.1 src/tests/rump/rumpkern/h_client/h_simplecli.c:1.2
--- src/tests/rump/rumpkern/h_client/h_simplecli.c:1.1	Tue Nov 30 22:09:15 2010
+++ src/tests/rump/rumpkern/h_client/h_simplecli.c	Fri Jan 14 13:23:15 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: h_simplecli.c,v 1.1 2010/11/30 22:09:15 pooka Exp $	*/
+/*	$NetBSD: h_simplecli.c,v 1.2 2011/01/14 13:23:15 pooka Exp $	*/
 
 #include sys/types.h
 
@@ -11,13 +11,20 @@
 #include rump/rumpclient.h
 
 int
-main(void)
+main(int argc, char *argv[])
 {
 
 	if (rumpclient_init() == -1)
 		err(1, rumpclient init);
 
-	if (rump_sys_getpid()  0)
-		exit(0);
-	err(1, getpid);
+	if (argc  1) {
+		for (;;) {
+			rump_sys_getpid();
+			usleep(1);
+		}
+	} else {
+		if (rump_sys_getpid()  0)
+			exit(0);
+		err(1, getpid);
+	}
 }

Added files:

Index: src/tests/rump/rumpkern/h_server/Makefile
diff -u /dev/null src/tests/rump/rumpkern/h_server/Makefile:1.3
--- /dev/null	Fri Jan 14 13:23:16 2011
+++ src/tests/rump/rumpkern/h_server/Makefile	Fri Jan 14 13:23:15 2011
@@ -0,0 +1,20 @@
+#	$NetBSD: Makefile,v 1.3 2011/01/14 13:23:15 pooka Exp $
+#
+
+.include bsd.own.mk
+
+TESTSDIR=	${TESTSBASE}/rump/rumpkern/h_server
+
+TESTS_C=	h_simpleserver
+
+ATFFILE=	no
+
+LDADD+=	-lrump -lrumpuser -lpthread
+
+WARNS=	4
+NOMAN=
+
+KERNSPACE != cd ${.CURDIR}/../../kernspace  ${PRINTOBJDIR}
+LDADD+= -L${KERNSPACE} -lkernspace
+
+.include bsd.test.mk
Index: src/tests/rump/rumpkern/h_server/h_simpleserver.c
diff -u /dev/null src/tests/rump/rumpkern/h_server/h_simpleserver.c:1.3
--- /dev/null	Fri Jan 14 13:23:16 2011
+++ src/tests/rump/rumpkern/h_server/h_simpleserver.c	Fri Jan 14 13:23:15 2011
@@ -0,0 +1,63 @@
+/*	$NetBSD: h_simpleserver.c,v 1.3 2011/01/14 13:23:15 pooka Exp $	*/
+
+#include sys/types.h
+
+#include rump/rump.h
+
+#include err.h
+#include stdio.h
+#include stdlib.h
+#include string.h
+#include unistd.h
+
+#include ../../kernspace/kernspace.h
+
+#define NOFAIL(e) do { int rv = e; if (rv) err(1, #e); } while (/*CONSTCOND*/0)
+
+struct {
+	const char *str;
+	void (*dofun)(char *);
+} actions[] = {
+	{ sendsig, rumptest_sendsig },
+};
+
+int
+main(int argc, char *argv[])
+{
+	unsigned i;
+	bool match;
+
+	if (argc  2)
+		exit(1);
+
+	NOFAIL(rump_daemonize_begin());
+	NOFAIL(rump_init());
+	

CVS commit: src

2011-01-14 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Fri Jan 14 13:24:46 UTC 2011

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

Log Message:
h_server is back, now testier than ever


To generate a diff of this commit:
cvs rdiff -u -r1.239 -r1.240 src/distrib/sets/lists/tests/mi
cvs rdiff -u -r1.22 -r1.23 src/etc/mtree/NetBSD.dist.tests

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

Modified files:

Index: src/distrib/sets/lists/tests/mi
diff -u src/distrib/sets/lists/tests/mi:1.239 src/distrib/sets/lists/tests/mi:1.240
--- src/distrib/sets/lists/tests/mi:1.239	Fri Jan 14 13:09:12 2011
+++ src/distrib/sets/lists/tests/mi	Fri Jan 14 13:24:45 2011
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.239 2011/01/14 13:09:12 pooka Exp $
+# $NetBSD: mi,v 1.240 2011/01/14 13:24:45 pooka Exp $
 #
 # Note: don't delete entries from here - mark them as obsolete instead.
 #
@@ -522,8 +522,8 @@
 ./usr/libdata/debug/usr/tests/rump/rumpkern/h_client/h_sigcli.debug			tests-syscall-debug	debug,atf
 ./usr/libdata/debug/usr/tests/rump/rumpkern/h_client/h_simplecli.debug			tests-syscall-debug	debug,atf
 ./usr/libdata/debug/usr/tests/rump/rumpkern/h_client/h_stresscli.debug			tests-syscall-debug	debug,atf
-./usr/libdata/debug/usr/tests/rump/rumpkern/h_server			tests-obsolete	obsolete
-./usr/libdata/debug/usr/tests/rump/rumpkern/h_server/h_simpleserver.debug			tests-obsolete	obsolete
+./usr/libdata/debug/usr/tests/rump/rumpkern/h_server			tests-syscall-debug
+./usr/libdata/debug/usr/tests/rump/rumpkern/h_server/h_simpleserver.debug			tests-syscall-debug	debug,atf
 ./usr/libdata/debug/usr/tests/rump/rumpvfstests-syscall-debug
 ./usr/libdata/debug/usr/tests/rump/rumpvfs/t_etfs.debug		tests-syscall-debug	debug,atf
 ./usr/libdata/debug/usr/tests/rump/rumpvfs/t_p2kifs.debug		tests-syscall-debug	debug,atf
@@ -1959,8 +1959,8 @@
 ./usr/tests/rump/rumpkern/h_client/h_sigcli		tests-rump-tests	atf
 ./usr/tests/rump/rumpkern/h_client/h_simplecli		tests-rump-tests	atf
 ./usr/tests/rump/rumpkern/h_client/h_stresscli		tests-rump-tests	atf
-./usr/tests/rump/rumpkern/h_server			tests-obsolete	obsolete
-./usr/tests/rump/rumpkern/h_server/h_simpleserver		tests-obsolete	obsolete
+./usr/tests/rump/rumpkern/h_server			tests-rump-tests
+./usr/tests/rump/rumpkern/h_server/h_simpleserver		tests-rump-tests atf
 ./usr/tests/rump/rumpvfs			tests-rump-tests
 ./usr/tests/rump/rumpvfs/Atffile		tests-rump-tests	atf
 ./usr/tests/rump/rumpvfs/t_etfs		tests-rump-tests	atf

Index: src/etc/mtree/NetBSD.dist.tests
diff -u src/etc/mtree/NetBSD.dist.tests:1.22 src/etc/mtree/NetBSD.dist.tests:1.23
--- src/etc/mtree/NetBSD.dist.tests:1.22	Thu Jan 13 13:54:23 2011
+++ src/etc/mtree/NetBSD.dist.tests	Fri Jan 14 13:24:45 2011
@@ -1,4 +1,4 @@
-#	$NetBSD: NetBSD.dist.tests,v 1.22 2011/01/13 13:54:23 pgoyette Exp $
+#	$NetBSD: NetBSD.dist.tests,v 1.23 2011/01/14 13:24:45 pooka Exp $
 
 ./usr/libdata/debug/usr/tests
 ./usr/libdata/debug/usr/tests/atf
@@ -92,6 +92,7 @@
 ./usr/libdata/debug/usr/tests/rump/modautoload
 ./usr/libdata/debug/usr/tests/rump/rumpkern
 ./usr/libdata/debug/usr/tests/rump/rumpkern/h_client
+./usr/libdata/debug/usr/tests/rump/rumpkern/h_server
 ./usr/libdata/debug/usr/tests/rump/rumpvfs
 ./usr/libdata/debug/usr/tests/sbin
 ./usr/libdata/debug/usr/tests/sbin/resize_ffs
@@ -201,6 +202,7 @@
 ./usr/tests/rump/modautoload
 ./usr/tests/rump/rumpkern
 ./usr/tests/rump/rumpkern/h_client
+./usr/tests/rump/rumpkern/h_server
 ./usr/tests/rump/rumpvfs
 ./usr/tests/sbin
 ./usr/tests/sbin/resize_ffs



CVS commit: src/usr.sbin/memswitch

2011-01-14 Thread Minoura Makoto
Module Name:src
Committed By:   minoura
Date:   Fri Jan 14 13:25:16 UTC 2011

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

Log Message:
Fix restore() (-r option).  It didn't read the input file.
Apparently I did not test that code.
Pointed out by wiz@, thanks.


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/usr.sbin/memswitch/memswitch.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/memswitch/memswitch.c
diff -u src/usr.sbin/memswitch/memswitch.c:1.10 src/usr.sbin/memswitch/memswitch.c:1.11
--- src/usr.sbin/memswitch/memswitch.c:1.10	Mon Apr 28 20:24:16 2008
+++ src/usr.sbin/memswitch/memswitch.c	Fri Jan 14 13:25:16 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: memswitch.c,v 1.10 2008/04/28 20:24:16 martin Exp $	*/
+/*	$NetBSD: memswitch.c,v 1.11 2011/01/14 13:25:16 minoura Exp $	*/
 
 /*-
  * Copyright (c) 1999 The NetBSD Foundation, Inc.
@@ -467,7 +467,13 @@
 			err (1, Opening input file);
 	}
 
-	sramfd = open (_PATH_DEVSRAM, O_RDONLY);
+	if (read (fd, modified_values, 256) != 256)
+		err (1, Reading input file);
+
+	if (fd != 0)
+		close (fd);
+
+	sramfd = open (_PATH_DEVSRAM, O_RDWR);
 	if (sramfd  0)
 		err (1, Opening %s, _PATH_DEVSRAM);
 



CVS commit: src/usr.sbin/memswitch

2011-01-14 Thread Minoura Makoto
Module Name:src
Committed By:   minoura
Date:   Fri Jan 14 13:31:48 UTC 2011

Modified Files:
src/usr.sbin/memswitch: memswitch.c methods.c

Log Message:
Whitespace.


To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.12 src/usr.sbin/memswitch/memswitch.c
cvs rdiff -u -r1.6 -r1.7 src/usr.sbin/memswitch/methods.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/memswitch/memswitch.c
diff -u src/usr.sbin/memswitch/memswitch.c:1.11 src/usr.sbin/memswitch/memswitch.c:1.12
--- src/usr.sbin/memswitch/memswitch.c:1.11	Fri Jan 14 13:25:16 2011
+++ src/usr.sbin/memswitch/memswitch.c	Fri Jan 14 13:31:47 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: memswitch.c,v 1.11 2011/01/14 13:25:16 minoura Exp $	*/
+/*	$NetBSD: memswitch.c,v 1.12 2011/01/14 13:31:47 minoura Exp $	*/
 
 /*-
  * Copyright (c) 1999 The NetBSD Foundation, Inc.
@@ -63,10 +63,10 @@
 void
 usage(void)
 {
-	fprintf (stderr, usage: %s -a\n, progname);
-	fprintf (stderr,%s [-h] variable ...\n, progname);
-	fprintf (stderr,%s -w variable=value ...\n, progname);
-	fprintf (stderr,%s [-rs] filename\n, progname);
+	fprintf(stderr, usage: %s -a\n, progname);
+	fprintf(stderr,%s [-h] variable ...\n, progname);
+	fprintf(stderr,%s -w variable=value ...\n, progname);
+	fprintf(stderr,%s [-rs] filename\n, progname);
 	exit(1);
 }
 
@@ -112,7 +112,7 @@
 		if (argc == 0)
 			usage();
 		while (argv[0]) {
-			show_single (argv[0]);
+			show_single(argv[0]);
 			argv++;
 		}
 		break;
@@ -128,13 +128,13 @@
 			modify_single (argv[0]);
 			argv++;
 		}
-		flush ();
+		flush();
 		break;
 	case MD_HELP:
 		if (argc == 0)
 			usage();
 		while (argv[0]) {
-			help_single (argv[0]);
+			help_single(argv[0]);
 			argv++;
 		}
 		break;
@@ -165,16 +165,16 @@
 
 	for (i = 0; i  number_of_props; i++) {
 		snprintf(fullname, sizeof(fullname), %s.%s,
-		properties[i].class, properties[i].node);
+			 properties[i].class, properties[i].node);
 		if (strcmp(name, fullname) == 0 || strcmp(name, properties[i].class) == 0) {
-			properties[i].print (properties[i], valuestr);
+			properties[i].print(properties[i], valuestr);
 			if (!nflag)
-printf (%s=%s\n, fullname, valuestr);
+printf(%s=%s\n, fullname, valuestr);
 			n++;
 		}
 	}
 	if (n == 0) {
-		errx (1, No such %s: %s, strstr(name, .)?property:class, name);
+		errx(1, No such %s: %s, strstr(name, .)?property:class, name);
 	}
 
 	return;
@@ -187,11 +187,11 @@
 	char valuestr[MAXVALUELEN];
 
 	for (i = 0; i  number_of_props; i++) {
-		properties[i].print (properties[i], valuestr);
+		properties[i].print(properties[i], valuestr);
 		if (!nflag)
-			printf (%s.%s=,
-properties[i].class, properties[i].node);
-		printf (%s\n, valuestr);
+			printf(%s.%s=,
+			   properties[i].class, properties[i].node);
+		printf(%s\n, valuestr);
 	}
 
 	return;
@@ -213,27 +213,27 @@
 			l = i + 1;
 			class = alloca(l);
 			if (class == 0)
-err (1, alloca);
-			strncpy (class, expr, i);
+err(1, alloca);
+			strncpy(class, expr, i);
 			class[i] = 0;
 			break;
 		}
 	}
 	if (i = n)
-		errx (1, Invalid expression: %s, expr);
+		errx(1, Invalid expression: %s, expr);
 
 	for ( ; i  n; i++) {
 		if (expr[i] == '=') {
 			node = alloca(i - l + 1);
 			if (node == 0)
-err (1, alloca);
-			strncpy (node, (expr[l]), i - l);
+err(1, alloca);
+			strncpy(node, (expr[l]), i - l);
 			node[i - l] = 0;
 			break;
 		}
 	}
 	if (i = n)
-		errx (1, Invalid expression: %s, expr);
+		errx(1, Invalid expression: %s, expr);
 
 	value = (expr[++i]);
 
@@ -243,14 +243,14 @@
 			if (properties[i].parse(properties[i], value)  0) {
 /* error: do nothing */
 			} else {
-properties[i].print (properties[i], valuestr);
+properties[i].print(properties[i], valuestr);
 printf(%s.%s - %s\n, class, node, valuestr);
 			}
 			break;
 		}
 	}
 	if (i = number_of_props) {
-		errx (1, No such property: %s.%s, class, node);
+		errx(1, No such property: %s.%s, class, node);
 	}
 
 	return;
@@ -268,16 +268,16 @@
 		snprintf(fullname, sizeof(fullname), %s.%s,
 		properties[i].class, properties[i].node);
 		if (strcmp(name, fullname) == 0) {
-			properties[i].print (properties[i], valuestr);
+			properties[i].print(properties[i], valuestr);
 			if (!nflag)
-printf (%s=, fullname);
-			printf (%s\n, valuestr);
-			printf (%s, properties[i].descr);
+printf(%s=, fullname);
+			printf(%s\n, valuestr);
+			printf(%s, properties[i].descr);
 			break;
 		}
 	}
 	if (i = number_of_props) {
-		errx (1, No such property: %s, name);
+		errx(1, No such property: %s, name);
 	}
 
 	return;
@@ -288,10 +288,10 @@
 {
 	if (current_values == 0)
 		alloc_current_values();
-	modified_values = malloc (256);
+	modified_values = malloc(256);
 	if (modified_values == 0)
-		err (1, malloc);
-	memcpy (modified_values, current_values, 256);
+		err(1, malloc);
+	memcpy(modified_values, 

CVS commit: src/usr.bin/infocmp

2011-01-14 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Fri Jan 14 14:21:37 UTC 2011

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

Log Message:
Fix spelling, mark up NULL. Closes PR 44381 by Ryo HAYASAKA.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/usr.bin/infocmp/infocmp.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/infocmp/infocmp.1
diff -u src/usr.bin/infocmp/infocmp.1:1.4 src/usr.bin/infocmp/infocmp.1:1.5
--- src/usr.bin/infocmp/infocmp.1:1.4	Fri May 14 17:02:01 2010
+++ src/usr.bin/infocmp/infocmp.1	Fri Jan 14 14:21:36 2011
@@ -1,4 +1,4 @@
-.\	$NetBSD: infocmp.1,v 1.4 2010/05/14 17:02:01 joerg Exp $
+.\	$NetBSD: infocmp.1,v 1.5 2011/01/14 14:21:36 wiz Exp $
 .\
 .\ Copyright (c) 2009 The NetBSD Foundation, Inc.
 .\ All rights reserved.
@@ -45,17 +45,17 @@
 .Nm
 reconstructs the first available
 .Xr terminfo 5
-definiton found for
+definition found for
 .Ar term
 and prints the result in a
 .Xr terminfo 5
 format.
-Capabilty types are grouped together and new types start new lines,
+Capability types are grouped together and new types start new lines,
 first flags, then numbers, then strings.
 Capabilities are sorted by their name.
 If a second
 .Ar term
-is given then the capabilies are compared against each other.
+is given then the capabilities are compared against each other.
 .Pp
 The following options are available:
 .Bl -tag -width Ev
@@ -77,12 +77,13 @@
 .Nm
 retains commented out capabilities as non standard.
 .It Fl c
-Print capabilites common to each definition.
+Print capabilities common to each definition.
 .It Fl n
-Print capabilites that do not exist in either definition.
+Print capabilities that do not exist in either definition.
 .It Fl q
 Make the comparison listing shorter by omitting subheadings and using
-- for absent capabilities, @ for cancelled capapbilites rather than NULL.
+- for absent capabilities, @ for canceled capabilities rather than
+.Dv NULL .
 .It Fl u
 Build a new terminal description for the first terminal description,
 using subsequent terminal descriptions.
@@ -108,7 +109,7 @@
 Override columns returned by the output terminal.
 .Fl w
 .Ar cols
-supercedes this.
+supersedes this.
 .It Ev TERM
 .Nm
 uses the contents of the



CVS commit: src/external/mit/xorg/lib/libpciaccess

2011-01-14 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Fri Jan 14 16:04:50 UTC 2011

Modified Files:
src/external/mit/xorg/lib/libpciaccess: Makefile

Log Message:
only define HAVE_MTRR on x86


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

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

Modified files:

Index: src/external/mit/xorg/lib/libpciaccess/Makefile
diff -u src/external/mit/xorg/lib/libpciaccess/Makefile:1.5 src/external/mit/xorg/lib/libpciaccess/Makefile:1.6
--- src/external/mit/xorg/lib/libpciaccess/Makefile:1.5	Wed Jan 12 19:04:19 2011
+++ src/external/mit/xorg/lib/libpciaccess/Makefile	Fri Jan 14 16:04:49 2011
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.5 2011/01/12 19:04:19 jmcneill Exp $
+#	$NetBSD: Makefile,v 1.6 2011/01/14 16:04:49 jmcneill Exp $
 
 .include bsd.own.mk
 
@@ -17,8 +17,7 @@
 	common_vgaarb_stub.c \
 	netbsd_pci.c
 
-CPPFLAGS+=	${X11FLAGS} -I${X11SRCDIR.${LIB}}/include \
-		-DHAVE_MTRR -DHAVE_ZLIB \
+CPPFLAGS+=	${X11FLAGS} -I${X11SRCDIR.${LIB}}/include -DHAVE_ZLIB \
 		-DHAVE_STRING_H -DHAVE_STDINT_H -DHAVE_INTTYPES_H \
 		-DPCIIDS_PATH=\${X11ROOTDIR}/share/pciids\
 
@@ -32,6 +31,10 @@
 LDADD+=	-lpci -lz
 DPADD+=	${LIBPCI} ${LIBZ}
 
+.if ${MACHINE_ARCH} == i386 || ${MACHINE_ARCH} == x86_64
+CPPFLAGS+=	-DHAVE_MTRR
+.endif
+
 .if ${MACHINE_ARCH} == i386
 LDADD+=	-li386
 DPADD+=	${LIBI386}



CVS commit: src/sys/arch/hp700/hp700

2011-01-14 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Fri Jan 14 16:37:11 UTC 2011

Modified Files:
src/sys/arch/hp700/hp700: autoconf.c

Log Message:
Copy the pdc_iodc_read data when creating a device.


To generate a diff of this commit:
cvs rdiff -u -r1.36 -r1.37 src/sys/arch/hp700/hp700/autoconf.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/hp700/hp700/autoconf.c
diff -u src/sys/arch/hp700/hp700/autoconf.c:1.36 src/sys/arch/hp700/hp700/autoconf.c:1.37
--- src/sys/arch/hp700/hp700/autoconf.c:1.36	Thu Jan 13 21:15:14 2011
+++ src/sys/arch/hp700/hp700/autoconf.c	Fri Jan 14 16:37:11 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: autoconf.c,v 1.36 2011/01/13 21:15:14 skrll Exp $	*/
+/*	$NetBSD: autoconf.c,v 1.37 2011/01/14 16:37:11 skrll Exp $	*/
 
 /*	$OpenBSD: autoconf.c,v 1.15 2001/06/25 00:43:10 mickey Exp $	*/
 
@@ -86,7 +86,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: autoconf.c,v 1.36 2011/01/13 21:15:14 skrll Exp $);
+__KERNEL_RCSID(0, $NetBSD: autoconf.c,v 1.37 2011/01/14 16:37:11 skrll Exp $);
 
 #include opt_kgdb.h
 #include opt_useleds.h
@@ -669,6 +669,7 @@
 	nhm = kmem_zalloc(sizeof(*nhm), KM_SLEEP);
 
 	nhm-hm_registered = false;
+	nhm-hm_pir = hm-hm_pir;
 	nhm-hm_type = hm-hm_type;
 	nhm-hm_dp = hm-hm_dp;
 	nhm-hm_hpa = hm-hm_hpa;



CVS commit: src/sys/arch/hp700/hp700

2011-01-14 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Fri Jan 14 16:48:15 UTC 2011

Modified Files:
src/sys/arch/hp700/hp700: autoconf.c

Log Message:
Tweak aprint_verbose output.


To generate a diff of this commit:
cvs rdiff -u -r1.37 -r1.38 src/sys/arch/hp700/hp700/autoconf.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/hp700/hp700/autoconf.c
diff -u src/sys/arch/hp700/hp700/autoconf.c:1.37 src/sys/arch/hp700/hp700/autoconf.c:1.38
--- src/sys/arch/hp700/hp700/autoconf.c:1.37	Fri Jan 14 16:37:11 2011
+++ src/sys/arch/hp700/hp700/autoconf.c	Fri Jan 14 16:48:15 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: autoconf.c,v 1.37 2011/01/14 16:37:11 skrll Exp $	*/
+/*	$NetBSD: autoconf.c,v 1.38 2011/01/14 16:48:15 skrll Exp $	*/
 
 /*	$OpenBSD: autoconf.c,v 1.15 2001/06/25 00:43:10 mickey Exp $	*/
 
@@ -86,7 +86,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: autoconf.c,v 1.37 2011/01/14 16:37:11 skrll Exp $);
+__KERNEL_RCSID(0, $NetBSD: autoconf.c,v 1.38 2011/01/14 16:48:15 skrll Exp $);
 
 #include opt_kgdb.h
 #include opt_useleds.h
@@ -525,10 +525,8 @@
 		}
 
 		/* If we've found the module move onto the next one. */
-		if (hm) {
-			aprint_verbose(\n);
+		if (hm)
 			continue;
-		}
 
 		/* Expect PDC to report devices of the following types */
 		if (nhm.hm_type.iodc_type == HPPA_TYPE_FIO) {



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

2011-01-14 Thread Nicolas Joly
Module Name:src
Committed By:   njoly
Date:   Fri Jan 14 18:12:47 UTC 2011

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

Log Message:
Add usr/sbin/chown.debug entry back, but obsolete it.


To generate a diff of this commit:
cvs rdiff -u -r1.1566 -r1.1567 src/distrib/sets/lists/comp/mi

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

Modified files:

Index: src/distrib/sets/lists/comp/mi
diff -u src/distrib/sets/lists/comp/mi:1.1566 src/distrib/sets/lists/comp/mi:1.1567
--- src/distrib/sets/lists/comp/mi:1.1566	Thu Jan 13 22:28:37 2011
+++ src/distrib/sets/lists/comp/mi	Fri Jan 14 18:12:47 2011
@@ -1,4 +1,4 @@
-#	$NetBSD: mi,v 1.1566 2011/01/13 22:28:37 haad Exp $
+#	$NetBSD: mi,v 1.1567 2011/01/14 18:12:47 njoly Exp $
 #
 # Note: don't delete entries from here - mark them as obsolete instead.
 #
@@ -3598,6 +3598,7 @@
 ./usr/libdata/debug/usr/sbin/btuartd.debug	comp-obsolete		obsolete
 ./usr/libdata/debug/usr/sbin/catman.debug	comp-man-debug		debug
 ./usr/libdata/debug/usr/sbin/chat.debug		comp-ppp-debug		debug
+./usr/libdata/debug/usr/sbin/chown.debug	comp-obsolete		obsolete
 ./usr/libdata/debug/usr/sbin/chroot.debug	comp-sysutil-debug	debug
 ./usr/libdata/debug/usr/sbin/chrtbl.debug	comp-sysutil-debug	debug
 ./usr/libdata/debug/usr/sbin/cnwctl.debug	comp-netutil-debug	debug



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

2011-01-14 Thread Jukka Ruohonen
Module Name:src
Committed By:   jruoho
Date:   Fri Jan 14 18:33:34 UTC 2011

Modified Files:
src/sys/arch/x86/x86: acpi_machdep.c

Log Message:
acpi_md_ncpus(): use cpu_attached instead of cpus_running.


To generate a diff of this commit:
cvs rdiff -u -r1.28 -r1.29 src/sys/arch/x86/x86/acpi_machdep.c

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

Modified files:

Index: src/sys/arch/x86/x86/acpi_machdep.c
diff -u src/sys/arch/x86/x86/acpi_machdep.c:1.28 src/sys/arch/x86/x86/acpi_machdep.c:1.29
--- src/sys/arch/x86/x86/acpi_machdep.c:1.28	Thu Jan 13 03:40:50 2011
+++ src/sys/arch/x86/x86/acpi_machdep.c	Fri Jan 14 18:33:34 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: acpi_machdep.c,v 1.28 2011/01/13 03:40:50 jruoho Exp $	*/
+/*	$NetBSD: acpi_machdep.c,v 1.29 2011/01/14 18:33:34 jruoho Exp $	*/
 
 /*
  * Copyright 2001 Wasabi Systems, Inc.
@@ -40,7 +40,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: acpi_machdep.c,v 1.28 2011/01/13 03:40:50 jruoho Exp $);
+__KERNEL_RCSID(0, $NetBSD: acpi_machdep.c,v 1.29 2011/01/14 18:33:34 jruoho Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -72,7 +72,7 @@
 #include opt_mpbios.h
 #include opt_acpi.h
 
-extern uint32_t cpus_running;
+extern uint32_t cpus_attached;
 
 ACPI_STATUS
 acpi_md_OsInitialize(void)
@@ -288,7 +288,7 @@
 uint32_t
 acpi_md_ncpus(void)
 {
-	return popcount32(cpus_running);
+	return popcount32(cpus_attached);
 }
 
 void



CVS commit: src/share/man/man9

2011-01-14 Thread David Young
Module Name:src
Committed By:   dyoung
Date:   Fri Jan 14 18:34:44 UTC 2011

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

Log Message:
In the EXAMPLES section, use device_t and accessors instead of struct
device.


To generate a diff of this commit:
cvs rdiff -u -r1.20 -r1.21 src/share/man/man9/evcnt.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/evcnt.9
diff -u src/share/man/man9/evcnt.9:1.20 src/share/man/man9/evcnt.9:1.21
--- src/share/man/man9/evcnt.9:1.20	Thu Dec  2 12:54:13 2010
+++ src/share/man/man9/evcnt.9	Fri Jan 14 18:34:44 2011
@@ -1,4 +1,4 @@
-.\ $NetBSD: evcnt.9,v 1.20 2010/12/02 12:54:13 wiz Exp $
+.\ $NetBSD: evcnt.9,v 1.21 2011/01/14 18:34:44 dyoung Exp $
 .\
 .\ Copyright (c) 2000 Christopher G. Demetriou
 .\ All rights reserved.
@@ -32,7 +32,7 @@
 .\
 .\ --(license Id: LICENSE.proto,v 1.1 2000/06/13 21:40:26 cgd Exp )--
 .\
-.Dd August 7, 2010
+.Dd January 14, 2011
 .Dt EVCNT 9
 .Os
 .Sh NAME
@@ -226,7 +226,6 @@
 interrupts) a device driver might use:
 .Bd -literal
 struct foo_softc {
-	struct device sc_dev;		/* generic device information */
 	[ . . . ]
 	struct evcnt sc_ev_intr;	/* interrupt count */
 	struct evcnt sc_ev_intr_rd;	/* 'readable' interrupt count */
@@ -241,21 +240,19 @@
 function, using code like:
 .Bd -literal
 void
-fooattach(parent, self, aux)
-	struct device *parent, *self;
-	void *aux;
+fooattach(device_t parent, device_t self, void *aux)
 {
-	struct foo_softc *sc = (struct foo_softc *)self;
+	struct foo_softc *sc = device_private(self);
 
 	[ . . . ]
 
 	/* Initialize and attach event counters. */
 	evcnt_attach_dynamic(\*[Am]sc-\*[Gt]sc_ev, EVCNT_TYPE_INTR,
-	NULL, sc-\*[Gt]sc_dev.dv_xname, intr);
+	NULL, device_xname(self), intr);
 	evcnt_attach_dynamic(\*[Am]sc-\*[Gt]sc_ev_rd, EVCNT_TYPE_INTR,
-	\*[Am]sc-\*[Gt]sc_ev, sc-\*[Gt]sc_dev.dv_xname, intr rd);
+	\*[Am]sc-\*[Gt]sc_ev, device_xname(self), intr rd);
 	evcnt_attach_dynamic(\*[Am]sc-\*[Gt]sc_ev_wr, EVCNT_TYPE_INTR,
-	\*[Am]sc-\*[Gt]sc_ev, sc-\*[Gt]sc_dev.dv_xname, intr wr);
+	\*[Am]sc-\*[Gt]sc_ev, device_xname(self), intr wr);
 
 	[ . . . ]
 }



CVS commit: xsrc

2011-01-14 Thread Joerg Sonnenberger
Module Name:xsrc
Committed By:   joerg
Date:   Fri Jan 14 18:49:47 UTC 2011

Modified Files:
xsrc/external/mit/xmh/dist: xmh.man
xsrc/xfree/xc/programs/xmh: xmh.man

Log Message:
Drop trailing tabs after .fi.


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.1 -r1.2 xsrc/external/mit/xmh/dist/xmh.man
cvs rdiff -u -r1.1.1.4 -r1.2 xsrc/xfree/xc/programs/xmh/xmh.man

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

Modified files:

Index: xsrc/external/mit/xmh/dist/xmh.man
diff -u xsrc/external/mit/xmh/dist/xmh.man:1.1.1.1 xsrc/external/mit/xmh/dist/xmh.man:1.2
--- xsrc/external/mit/xmh/dist/xmh.man:1.1.1.1	Wed Jul 30 04:30:23 2008
+++ xsrc/external/mit/xmh/dist/xmh.man	Fri Jan 14 18:49:46 2011
@@ -983,7 +983,7 @@
 			Command
 			Command
 		
-.fi
+.fi
 .SH APPLICATION-SPECIFIC RESOURCES
 .PP
 The application class name is \fBXmh\fP.

Index: xsrc/xfree/xc/programs/xmh/xmh.man
diff -u xsrc/xfree/xc/programs/xmh/xmh.man:1.1.1.4 xsrc/xfree/xc/programs/xmh/xmh.man:1.2
--- xsrc/xfree/xc/programs/xmh/xmh.man:1.1.1.4	Fri Mar 18 13:09:40 2005
+++ xsrc/xfree/xc/programs/xmh/xmh.man	Fri Jan 14 18:49:47 2011
@@ -983,7 +983,7 @@
 			Command
 			Command
 		
-.fi
+.fi
 .SH APPLICATION-SPECIFIC RESOURCES
 .PP
 The application class name is \fBXmh\fP.



CVS commit: src/lib/libc/time

2011-01-14 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Jan 14 23:35:07 UTC 2011

Modified Files:
src/lib/libc/time: Makefile localtime.c zdump.c zic.c

Log Message:
don't depend on integer oveflow wrapping to detect it. From Paul Eggert in
the tz mailing list.


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.1 -r1.2 src/lib/libc/time/Makefile
cvs rdiff -u -r1.51 -r1.52 src/lib/libc/time/localtime.c
cvs rdiff -u -r1.17 -r1.18 src/lib/libc/time/zdump.c
cvs rdiff -u -r1.26 -r1.27 src/lib/libc/time/zic.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/time/Makefile
diff -u src/lib/libc/time/Makefile:1.1.1.1 src/lib/libc/time/Makefile:1.2
--- src/lib/libc/time/Makefile:1.1.1.1	Sun Oct 25 12:20:16 2009
+++ src/lib/libc/time/Makefile	Fri Jan 14 18:35:07 2011
@@ -110,6 +110,10 @@
 #  -TTZ_DOMAINDIR=\/path\ to use /path for gettext directory;
 #	the default is system-supplied, typically /usr/lib/locale
 #  $(GCC_DEBUG_FLAGS) if you are using GCC and want lots of checking
+#  $(GCC_OVERFLOW_FLAGS) if you are using GCC 3.4 or later.
+#	If you are using a compiler other than GCC, and if it defaults to
+#	undefined behavior on integer overflow, then you need to specify a flag
+#	saying that integer arithmetic is supposed to wrap around on overflow.
 #  -DNO_RUN_TIME_WARNINGS_ABOUT_YEAR_2000_PROBLEMS_THANK_YOU=1
 #	if you do not want run time warnings about formats that may cause
 #	year 2000 grief
@@ -120,6 +124,7 @@
 	-Wall -Wcast-qual -Wconversion -Wmissing-prototypes \
 	-Wnested-externs -Wpointer-arith -Wshadow \
 	-Wtraditional # -Wstrict-prototypes -Wwrite-strings
+GCC_OVERFLOW_FLAGS = -fwrapv
 #
 # If you want to use System V compatibility code, add
 #	-DUSG_COMPAT
@@ -386,7 +391,7 @@
 
 public:		$(ENCHILADA)
 		make maintainer-clean
-		make CFLAGS=$(GCC_DEBUG_FLAGS)
+		make CFLAGS=$(GCC_DEBUG_FLAGS) $(GCC_OVERFLOW_FLAGS)
 		-mkdir /tmp/,tzpublic
 		-for i in $(TDATA) ; do zic -v -d /tmp/,tzpublic $$i 21 | grep -v starting year ; done
 		for i in $(TDATA) ; do zic -d /tmp/,tzpublic $$i || exit; done

Index: src/lib/libc/time/localtime.c
diff -u src/lib/libc/time/localtime.c:1.51 src/lib/libc/time/localtime.c:1.52
--- src/lib/libc/time/localtime.c:1.51	Wed Jan  5 21:41:34 2011
+++ src/lib/libc/time/localtime.c	Fri Jan 14 18:35:07 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: localtime.c,v 1.51 2011/01/06 02:41:34 christos Exp $	*/
+/*	$NetBSD: localtime.c,v 1.52 2011/01/14 23:35:07 christos Exp $	*/
 
 /*
 ** This file is in the public domain, so clarified as of
@@ -10,7 +10,7 @@
 #if 0
 static char	elsieid[] = @(#)localtime.c	8.9;
 #else
-__RCSID($NetBSD: localtime.c,v 1.51 2011/01/06 02:41:34 christos Exp $);
+__RCSID($NetBSD: localtime.c,v 1.52 2011/01/14 23:35:07 christos Exp $);
 #endif
 #endif /* LIBC_SCCS and not lint */
 
@@ -1704,8 +1704,10 @@
 	int	number0;
 
 	number0 = *number;
+	if (delta  0 ? number0  delta - INT_MIN : INT_MAX - delta  number0)
+		  return 1;
 	*number += delta;
-	return (*number  number0) != (delta  0);
+	return 0;
 }
 
 static int
@@ -1714,8 +1716,10 @@
 	long	number0;
 
 	number0 = *number;
+	if (delta  0 ? number0  delta - LONG_MIN : LONG_MAX - delta  number0)
+		  return 1;
 	*number += delta;
-	return (*number  number0) != (delta  0);
+	return 0;
 }
 
 static int

Index: src/lib/libc/time/zdump.c
diff -u src/lib/libc/time/zdump.c:1.17 src/lib/libc/time/zdump.c:1.18
--- src/lib/libc/time/zdump.c:1.17	Thu Dec 31 17:49:16 2009
+++ src/lib/libc/time/zdump.c	Fri Jan 14 18:35:07 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: zdump.c,v 1.17 2009/12/31 22:49:16 mlelstv Exp $	*/
+/*	$NetBSD: zdump.c,v 1.18 2011/01/14 23:35:07 christos Exp $	*/
 /*
 ** This file is in the public domain, so clarified as of
 ** 2009-05-17 by Arthur David Olson.
@@ -7,7 +7,7 @@
 #include sys/cdefs.h
 #ifndef lint
 #ifndef NOID
-__RCSID($NetBSD: zdump.c,v 1.17 2009/12/31 22:49:16 mlelstv Exp $);
+__RCSID($NetBSD: zdump.c,v 1.18 2011/01/14 23:35:07 christos Exp $);
 #endif /* !defined NOID */
 #endif /* !defined lint */
 
@@ -26,6 +26,7 @@
 #include stdlib.h	/* for exit, malloc, atoi */
 #include err.h
 #include float.h	/* for FLT_MAX and DBL_MAX */
+#include limits.h	/* for INT_MAX, LONG_MAX, etc. */
 #include ctype.h	/* for isalpha et al. */
 #ifndef isascii
 #define isascii(x) 1
@@ -431,21 +432,25 @@
 		}
 	} else if (0  (time_t) -1) {
 		/*
-		** time_t is signed.  Assume overflow wraps around.
+		** time_t is signed.
 		*/
-		time_t t = 0;
-		time_t t1 = 1;
-
-		while (t  t1) {
-			t = t1;
-			t1 = 2 * t1 + 1;
+		if (sizeof (time_t) == sizeof (int)) {
+			absolute_min_time = INT_MIN;
+			absolute_max_time = INT_MAX;
+		} else if (sizeof (time_t) == sizeof (long)) {
+			absolute_min_time = LONG_MIN;
+			absolute_max_time = LONG_MAX;
+#if defined LLONG_MIN  defined LLONG_MAX
+		} else if (sizeof (time_t) == sizeof (long long)) {
+			absolute_min_time = LLONG_MIN;
+			absolute_max_time = LLONG_MAX;

CVS commit: src/libexec/ftpd

2011-01-14 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Jan 14 23:56:13 UTC 2011

Modified Files:
src/libexec/ftpd: ftpcmd.y

Log Message:
PR/44390: Paul Koning: make code gcc-4.5.1 friendly.


To generate a diff of this commit:
cvs rdiff -u -r1.90 -r1.91 src/libexec/ftpd/ftpcmd.y

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

Modified files:

Index: src/libexec/ftpd/ftpcmd.y
diff -u src/libexec/ftpd/ftpcmd.y:1.90 src/libexec/ftpd/ftpcmd.y:1.91
--- src/libexec/ftpd/ftpcmd.y:1.90	Mon Jul 13 15:05:40 2009
+++ src/libexec/ftpd/ftpcmd.y	Fri Jan 14 18:56:13 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: ftpcmd.y,v 1.90 2009/07/13 19:05:40 roy Exp $	*/
+/*	$NetBSD: ftpcmd.y,v 1.91 2011/01/14 23:56:13 christos Exp $	*/
 
 /*-
  * Copyright (c) 1997-2009 The NetBSD Foundation, Inc.
@@ -72,7 +72,7 @@
 #if 0
 static char sccsid[] = @(#)ftpcmd.y	8.3 (Berkeley) 4/6/94;
 #else
-__RCSID($NetBSD: ftpcmd.y,v 1.90 2009/07/13 19:05:40 roy Exp $);
+__RCSID($NetBSD: ftpcmd.y,v 1.91 2011/01/14 23:56:13 christos Exp $);
 #endif
 #endif /* not lint */
 
@@ -967,18 +967,24 @@
 		NUMBER
 		{
 #ifdef INET6
-			char *a, *p;
+			unsigned char buf[16];
 
-			memset(data_dest, 0, sizeof(data_dest));
+			(void)memset(data_dest, 0, sizeof(data_dest));
 			data_dest.su_len = sizeof(struct sockaddr_in6);
 			data_dest.su_family = AF_INET6;
-			p = (char *)data_dest.su_port;
-			p[0] = $39.i; p[1] = $41.i;
-			a = (char *)data_dest.si_su.su_sin6.sin6_addr;
-			a[0] = $5.i; a[1] = $7.i; a[2] = $9.i; a[3] = $11.i;
-			a[4] = $13.i; a[5] = $15.i; a[6] = $17.i; a[7] = $19.i;
-			a[8] = $21.i; a[9] = $23.i; a[10] = $25.i; a[11] = $27.i;
-			a[12] = $29.i; a[13] = $31.i; a[14] = $33.i; a[15] = $35.i;
+			buf[0] = $39.i; buf[1] = $41.i;
+			(void)memcpy(data_dest.su_port, buf,
+			sizeof(data_dest.su_port));
+			buf[0] = $5.i; buf[1] = $7.i;
+			buf[2] = $9.i; buf[3] = $11.i;
+			buf[4] = $13.i; buf[5] = $15.i;
+			buf[6] = $17.i; buf[7] = $19.i;
+			buf[8] = $21.i; buf[9] = $23.i;
+			buf[10] = $25.i; buf[11] = $27.i;
+			buf[12] = $29.i; buf[13] = $31.i;
+			buf[14] = $33.i; buf[15] = $35.i;
+			(void)memcpy(data_dest.si_su.su_sin6.sin6_addr,
+			buf, sizeof(data_dest.si_su.su_sin6.sin6_addr));
 			if (his_addr.su_family == AF_INET6) {
 /* XXX: more sanity checks! */
 data_dest.su_scope_id = his_addr.su_scope_id;



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

2011-01-14 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Sat Jan 15 07:23:49 UTC 2011

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

Log Message:
Add END(sym)
Add __RCSID (to match cdefs.h)


To generate a diff of this commit:
cvs rdiff -u -r1.30 -r1.31 src/sys/arch/powerpc/include/asm.h

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

Modified files:

Index: src/sys/arch/powerpc/include/asm.h
diff -u src/sys/arch/powerpc/include/asm.h:1.30 src/sys/arch/powerpc/include/asm.h:1.31
--- src/sys/arch/powerpc/include/asm.h:1.30	Mon Dec 20 21:11:25 2010
+++ src/sys/arch/powerpc/include/asm.h	Sat Jan 15 07:23:49 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: asm.h,v 1.30 2010/12/20 21:11:25 joerg Exp $	*/
+/*	$NetBSD: asm.h,v 1.31 2011/01/15 07:23:49 matt Exp $	*/
 
 /*
  * Copyright (C) 1995, 1996 Wolfgang Solfrank.
@@ -110,6 +110,7 @@
 	.text; .align 2; .globl x; .type x,@function; x:
 
 #define	ENTRY(y)	_ENTRY(_C_LABEL(y)); _PROF_PROLOGUE
+#define	END(y)		.size _C_LABEL(y),.-_C_LABEL(y)
 
 #define	ENTRY_NOPROFILE(y) _ENTRY(_C_LABEL(y))
 
@@ -123,7 +124,8 @@
 
 #define	ASMSTR		.asciz
 
-#define RCSID(x)	.pushsection .ident; .asciz x; .popsection
+#define RCSID(x)	__RCSID(x)
+#define	__RCSID(x)	.pushsection .ident; .asciz x; .popsection
 
 #ifdef __ELF__
 #define	WEAK_ALIAS(alias,sym)		\



CVS commit: src

2011-01-14 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Sat Jan 15 07:31:13 UTC 2011

Modified Files:
src/common/lib/libc/arch/powerpc/atomic: atomic_add.S atomic_and.S
atomic_cas.S atomic_dec.S atomic_inc.S atomic_op_asm.h atomic_or.S
atomic_swap.S membar_ops.S
src/common/lib/libc/arch/powerpc/string: ffs.S memcmp.S memcpy.S
memmove.S strlen.S
src/lib/libc/arch/powerpc: Makefile.inc SYS.h genassym.cf
src/lib/libc/arch/powerpc/gen: __setjmp14.S __sigsetjmp14.S _setjmp.S
swapcontext.S
src/lib/libc/arch/powerpc/string: bzero.S
src/lib/libc/arch/powerpc/sys: __clone.S __sigtramp2.S __vfork14.S
brk.S cerror.S fork.S getcontext.S pipe.S ptrace.S sbrk.S
src/lib/libc/compat/arch/powerpc: Makefile.inc
src/lib/libc/compat/arch/powerpc/gen: compat_setjmp.S
compat_sigsetjmp.S
src/lib/libc/compat/arch/powerpc/sys: compat_Ovfork.S
compat___sigtramp1.S compat_sigpending13.S compat_sigprocmask13.S
compat_sigsuspend13.S

Log Message:
Use END(foo) everywhere.
Make __cerror hidden.
Use non-PLT calls to __cerror.
Use assym.h when appropriate.
Use addi to adjust stack instead of loading it.
Add __RCSIDs
Force -D_NOREGNAMES for all .S files.
[this is all in preperation for secure plt support]


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/common/lib/libc/arch/powerpc/atomic/atomic_add.S \
src/common/lib/libc/arch/powerpc/atomic/atomic_cas.S
cvs rdiff -u -r1.5 -r1.6 src/common/lib/libc/arch/powerpc/atomic/atomic_and.S \
src/common/lib/libc/arch/powerpc/atomic/atomic_dec.S \
src/common/lib/libc/arch/powerpc/atomic/atomic_inc.S \
src/common/lib/libc/arch/powerpc/atomic/atomic_or.S \
src/common/lib/libc/arch/powerpc/atomic/atomic_swap.S
cvs rdiff -u -r1.4 -r1.5 \
src/common/lib/libc/arch/powerpc/atomic/atomic_op_asm.h
cvs rdiff -u -r1.3 -r1.4 src/common/lib/libc/arch/powerpc/atomic/membar_ops.S
cvs rdiff -u -r1.4 -r1.5 src/common/lib/libc/arch/powerpc/string/ffs.S
cvs rdiff -u -r1.2 -r1.3 src/common/lib/libc/arch/powerpc/string/memcmp.S \
src/common/lib/libc/arch/powerpc/string/memcpy.S \
src/common/lib/libc/arch/powerpc/string/memmove.S
cvs rdiff -u -r1.5 -r1.6 src/common/lib/libc/arch/powerpc/string/strlen.S
cvs rdiff -u -r1.10 -r1.11 src/lib/libc/arch/powerpc/Makefile.inc
cvs rdiff -u -r1.11 -r1.12 src/lib/libc/arch/powerpc/SYS.h
cvs rdiff -u -r1.1 -r1.2 src/lib/libc/arch/powerpc/genassym.cf
cvs rdiff -u -r1.4 -r1.5 src/lib/libc/arch/powerpc/gen/__setjmp14.S \
src/lib/libc/arch/powerpc/gen/__sigsetjmp14.S \
src/lib/libc/arch/powerpc/gen/swapcontext.S
cvs rdiff -u -r1.2 -r1.3 src/lib/libc/arch/powerpc/gen/_setjmp.S
cvs rdiff -u -r1.7 -r1.8 src/lib/libc/arch/powerpc/string/bzero.S
cvs rdiff -u -r1.2 -r1.3 src/lib/libc/arch/powerpc/sys/__clone.S \
src/lib/libc/arch/powerpc/sys/__sigtramp2.S
cvs rdiff -u -r1.3 -r1.4 src/lib/libc/arch/powerpc/sys/__vfork14.S
cvs rdiff -u -r1.10 -r1.11 src/lib/libc/arch/powerpc/sys/brk.S
cvs rdiff -u -r1.6 -r1.7 src/lib/libc/arch/powerpc/sys/cerror.S
cvs rdiff -u -r1.5 -r1.6 src/lib/libc/arch/powerpc/sys/fork.S
cvs rdiff -u -r1.4 -r1.5 src/lib/libc/arch/powerpc/sys/getcontext.S \
src/lib/libc/arch/powerpc/sys/ptrace.S
cvs rdiff -u -r1.7 -r1.8 src/lib/libc/arch/powerpc/sys/pipe.S
cvs rdiff -u -r1.9 -r1.10 src/lib/libc/arch/powerpc/sys/sbrk.S
cvs rdiff -u -r1.2 -r1.3 src/lib/libc/compat/arch/powerpc/Makefile.inc
cvs rdiff -u -r1.1 -r1.2 src/lib/libc/compat/arch/powerpc/gen/compat_setjmp.S \
src/lib/libc/compat/arch/powerpc/gen/compat_sigsetjmp.S
cvs rdiff -u -r1.1 -r1.2 src/lib/libc/compat/arch/powerpc/sys/compat_Ovfork.S \
src/lib/libc/compat/arch/powerpc/sys/compat_sigpending13.S \
src/lib/libc/compat/arch/powerpc/sys/compat_sigprocmask13.S \
src/lib/libc/compat/arch/powerpc/sys/compat_sigsuspend13.S
cvs rdiff -u -r1.2 -r1.3 \
src/lib/libc/compat/arch/powerpc/sys/compat___sigtramp1.S

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

Modified files:

Index: src/common/lib/libc/arch/powerpc/atomic/atomic_add.S
diff -u src/common/lib/libc/arch/powerpc/atomic/atomic_add.S:1.6 src/common/lib/libc/arch/powerpc/atomic/atomic_add.S:1.7
--- src/common/lib/libc/arch/powerpc/atomic/atomic_add.S:1.6	Sun May 25 15:56:12 2008
+++ src/common/lib/libc/arch/powerpc/atomic/atomic_add.S	Sat Jan 15 07:31:11 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: atomic_add.S,v 1.6 2008/05/25 15:56:12 chs Exp $	*/
+/*	$NetBSD: atomic_add.S,v 1.7 2011/01/15 07:31:11 matt Exp $	*/
 
 /*-
  * Copyright (c) 2007 The NetBSD Foundation, Inc.
@@ -31,14 +31,16 @@
 
 #include atomic_op_asm.h
 
-	.text
+__RCSID($NetBSD: atomic_add.S,v 1.7 2011/01/15 07:31:11 matt Exp $)
 
+	.text
 ENTRY(_atomic_add_32)
 1:	lwarx	%r10,0,%r3
 	add	%r10,%r10,%r4
 	stwcx.	%r10,0,%r3
 	bne-	1b
 	blr
+END(_atomic_add_32)