CVS commit: src/sys/dev/usb

2012-04-25 Thread David A. Holland
Module Name:src
Committed By:   dholland
Date:   Wed Apr 25 07:57:15 UTC 2012

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

Log Message:
Remove duplicate break. PR 46368 from Henning Petersen.


To generate a diff of this commit:
cvs rdiff -u -r1.118 -r1.119 src/sys/dev/usb/ugen.c

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

Modified files:

Index: src/sys/dev/usb/ugen.c
diff -u src/sys/dev/usb/ugen.c:1.118 src/sys/dev/usb/ugen.c:1.119
--- src/sys/dev/usb/ugen.c:1.118	Tue Mar  6 03:35:29 2012
+++ src/sys/dev/usb/ugen.c	Wed Apr 25 07:57:15 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: ugen.c,v 1.118 2012/03/06 03:35:29 mrg Exp $	*/
+/*	$NetBSD: ugen.c,v 1.119 2012/04/25 07:57:15 dholland Exp $	*/
 
 /*
  * Copyright (c) 1998, 2004 The NetBSD Foundation, Inc.
@@ -37,7 +37,7 @@
 
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: ugen.c,v 1.118 2012/03/06 03:35:29 mrg Exp $);
+__KERNEL_RCSID(0, $NetBSD: ugen.c,v 1.119 2012/04/25 07:57:15 dholland Exp $);
 
 #include opt_compat_netbsd.h
 
@@ -2011,7 +2011,6 @@ ugenkqfilter(dev_t dev, struct knote *kn
 		case UE_BULK:
 			kn-kn_fop = ugenread_bulk_filtops;
 			break;
-			break;
 		default:
 			return (EINVAL);
 		}



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

2012-04-25 Thread David A. Holland
Module Name:src
Committed By:   dholland
Date:   Wed Apr 25 07:58:43 UTC 2012

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

Log Message:
Add missing parenthesis in debug code. PR 46370 from Henning Petersen.


To generate a diff of this commit:
cvs rdiff -u -r1.110 -r1.111 src/sys/arch/hp700/hp700/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/hp700/hp700/machdep.c
diff -u src/sys/arch/hp700/hp700/machdep.c:1.110 src/sys/arch/hp700/hp700/machdep.c:1.111
--- src/sys/arch/hp700/hp700/machdep.c:1.110	Thu Apr  5 20:12:09 2012
+++ src/sys/arch/hp700/hp700/machdep.c	Wed Apr 25 07:58:43 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: machdep.c,v 1.110 2012/04/05 20:12:09 skrll Exp $	*/
+/*	$NetBSD: machdep.c,v 1.111 2012/04/25 07:58:43 dholland Exp $	*/
 
 /*-
  * Copyright (c) 2001, 2002 The NetBSD Foundation, Inc.
@@ -58,7 +58,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: machdep.c,v 1.110 2012/04/05 20:12:09 skrll Exp $);
+__KERNEL_RCSID(0, $NetBSD: machdep.c,v 1.111 2012/04/25 07:58:43 dholland Exp $);
 
 #include opt_cputype.h
 #include opt_ddb.h
@@ -1059,7 +1059,7 @@ ibtlb_g(int i, pa_space_t sp, vaddr_t va
 	error = pdcproc_btlb_insert(sp, va, pa, sz, prot, i);
 	if (error  0) {
 #ifdef BTLBDEBUG
-		DPRINTF((WARNING: BTLB insert failed (%d)\n, error);
+		DPRINTF((WARNING: BTLB insert failed (%d)\n, error));
 #endif
 	}
 	return error;



CVS commit: src/sys/arch/sparc/sparc

2012-04-25 Thread David A. Holland
Module Name:src
Committed By:   dholland
Date:   Wed Apr 25 08:19:33 UTC 2012

Modified Files:
src/sys/arch/sparc/sparc: machdep.c

Log Message:
Fix totally uncompilable code. PR 46374 from Henning Petersen.


To generate a diff of this commit:
cvs rdiff -u -r1.317 -r1.318 src/sys/arch/sparc/sparc/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/sparc/sparc/machdep.c
diff -u src/sys/arch/sparc/sparc/machdep.c:1.317 src/sys/arch/sparc/sparc/machdep.c:1.318
--- src/sys/arch/sparc/sparc/machdep.c:1.317	Sun Feb 19 21:06:29 2012
+++ src/sys/arch/sparc/sparc/machdep.c	Wed Apr 25 08:19:33 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: machdep.c,v 1.317 2012/02/19 21:06:29 rmind Exp $ */
+/*	$NetBSD: machdep.c,v 1.318 2012/04/25 08:19:33 dholland Exp $ */
 
 /*-
  * Copyright (c) 1996, 1997, 1998 The NetBSD Foundation, Inc.
@@ -71,7 +71,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: machdep.c,v 1.317 2012/02/19 21:06:29 rmind Exp $);
+__KERNEL_RCSID(0, $NetBSD: machdep.c,v 1.318 2012/04/25 08:19:33 dholland Exp $);
 
 #include opt_compat_netbsd.h
 #include opt_compat_sunos.h
@@ -2523,7 +2523,7 @@ bus_space_write_4(
 	uint32_t		v)
 {
 	__insn_barrier();
-	bus_space_write_4_real(
+	bus_space_write_4_real(t, h, o, v);
 }
 
 void



CVS commit: src/crypto/external/bsd/openssl/dist/crypto/buffer

2012-04-25 Thread Matthias Drochner
Module Name:src
Committed By:   drochner
Date:   Wed Apr 25 11:02:46 UTC 2012

Modified Files:
src/crypto/external/bsd/openssl/dist/crypto/buffer: buffer.c

Log Message:
fix for previous fix: correct error code (upstream rev.22474)


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 \
src/crypto/external/bsd/openssl/dist/crypto/buffer/buffer.c

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

Modified files:

Index: src/crypto/external/bsd/openssl/dist/crypto/buffer/buffer.c
diff -u src/crypto/external/bsd/openssl/dist/crypto/buffer/buffer.c:1.2 src/crypto/external/bsd/openssl/dist/crypto/buffer/buffer.c:1.3
--- src/crypto/external/bsd/openssl/dist/crypto/buffer/buffer.c:1.2	Thu Apr 19 20:20:57 2012
+++ src/crypto/external/bsd/openssl/dist/crypto/buffer/buffer.c	Wed Apr 25 11:02:46 2012
@@ -156,7 +156,7 @@ int BUF_MEM_grow_clean(BUF_MEM *str, siz
 	/* This limit is sufficient to ensure (len+3)/3*4  2**31 */
 	if (len  LIMIT_BEFORE_EXPANSION)
 		{
-		BUFerr(BUF_F_BUF_MEM_GROW,ERR_R_MALLOC_FAILURE);
+		BUFerr(BUF_F_BUF_MEM_GROW_CLEAN,ERR_R_MALLOC_FAILURE);
 		return 0;
 		}
 	n=(len+3)/3*4;



CVS commit: src/doc

2012-04-25 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Wed Apr 25 12:22:48 UTC 2012

Modified Files:
src/doc: 3RDPARTY

Log Message:
Update OpenSSH and Postfix entries
Capitalize latter.

Patch from Bug Hunting.


To generate a diff of this commit:
cvs rdiff -u -r1.933 -r1.934 src/doc/3RDPARTY

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

Modified files:

Index: src/doc/3RDPARTY
diff -u src/doc/3RDPARTY:1.933 src/doc/3RDPARTY:1.934
--- src/doc/3RDPARTY:1.933	Fri Apr  6 10:55:19 2012
+++ src/doc/3RDPARTY	Wed Apr 25 12:22:48 2012
@@ -1,4 +1,4 @@
-#	$NetBSD: 3RDPARTY,v 1.933 2012/04/06 10:55:19 spz Exp $
+#	$NetBSD: 3RDPARTY,v 1.934 2012/04/25 12:22:48 wiz Exp $
 #
 # This file contains a list of the software that has been integrated into
 # NetBSD where we are not the primary maintainer.
@@ -832,7 +832,7 @@ Patch applied after OpenSSH import.
 
 Package:	OpenSSH
 Version:	5.9
-Current Vers:	5.9 / portable 5.9p1
+Current Vers:	6.0 / portable 6.0p1
 Maintainer:	OpenSSH
 Archive Site:	http://www.openssh.com/ftp.html
 Home Page:	http://www.openssh.com/portable.html
@@ -971,9 +971,9 @@ We use err() and friends. We have change
 formatting in man pages, disallowing flood pinging, alignment fixes,
 and more.
 
-Package:	postfix
+Package:	Postfix
 Version:	2.8.8
-Current Vers:	2.8.8/2.9.0
+Current Vers:	2.8.8/2.9.1
 Maintainer:	Wietse Venema wie...@porcupine.org
 Archive Site:	ftp://postfix.cloud9.net/official/
 Home Page:	http://www.postfix.org/



CVS commit: src

2012-04-25 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Wed Apr 25 13:55:17 UTC 2012

Modified Files:
src/distrib/sets/lists/modules: mi
src/sys/modules: Makefile

Log Message:
Actually create the if_axe module - driver was modularized a while ago.


To generate a diff of this commit:
cvs rdiff -u -r1.42 -r1.43 src/distrib/sets/lists/modules/mi
cvs rdiff -u -r1.104 -r1.105 src/sys/modules/Makefile

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/modules/mi
diff -u src/distrib/sets/lists/modules/mi:1.42 src/distrib/sets/lists/modules/mi:1.43
--- src/distrib/sets/lists/modules/mi:1.42	Wed Apr 25 04:49:46 2012
+++ src/distrib/sets/lists/modules/mi	Wed Apr 25 13:55:17 2012
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.42 2012/04/25 04:49:46 pgoyette Exp $
+# $NetBSD: mi,v 1.43 2012/04/25 13:55:17 pgoyette Exp $
 #
 # Note: don't delete entries from here - mark them as obsolete instead.
 #
@@ -77,6 +77,8 @@
 ./@MODULEDIR@/gpiosim/gpiosim.kmod		base-kernel-modules	kmod
 ./@MODULEDIR@/hfsbase-kernel-modules	kmod
 ./@MODULEDIR@/hfs/hfs.kmod			base-kernel-modules	kmod
+./@MODULEDIR@/if_axebase-kernel-modules	kmod
+./@MODULEDIR@/if_axe/if_axe.kmod		base-kernel-modules	kmod
 ./@MODULEDIR@/iicbase-kernel-modules	kmod
 ./@MODULEDIR@/iic/iic.kmod			base-kernel-modules	kmod
 ./@MODULEDIR@/iscsibase-kernel-modules	kmod,iscsi

Index: src/sys/modules/Makefile
diff -u src/sys/modules/Makefile:1.104 src/sys/modules/Makefile:1.105
--- src/sys/modules/Makefile:1.104	Wed Apr 25 04:49:46 2012
+++ src/sys/modules/Makefile	Wed Apr 25 13:55:17 2012
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.104 2012/04/25 04:49:46 pgoyette Exp $
+#	$NetBSD: Makefile,v 1.105 2012/04/25 13:55:17 pgoyette Exp $
 
 .include bsd.own.mk
 
@@ -31,6 +31,7 @@ SUBDIR+=	gpioiic
 SUBDIR+=	gpioow
 SUBDIR+=	gpiosim
 SUBDIR+=	hfs
+SUBDIR+=	if_axe
 SUBDIR+=	iic
 SUBDIR+=	kernfs
 SUBDIR+=	layerfs



CVS commit: src/etc

2012-04-25 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Wed Apr 25 16:11:27 UTC 2012

Modified Files:
src/etc: master.passwd

Log Message:
Change root's default shell to /bin/sh, to provide a default which
has command line editing, tab completion, and other features users
have come to expect from a modern OS.

Discussed on current-users approximately two weeks ago.  Should be
pulled up for NetBSD 6.0.


To generate a diff of this commit:
cvs rdiff -u -r1.45 -r1.46 src/etc/master.passwd

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

Modified files:

Index: src/etc/master.passwd
diff -u src/etc/master.passwd:1.45 src/etc/master.passwd:1.46
--- src/etc/master.passwd:1.45	Sat Jan 28 02:17:29 2012
+++ src/etc/master.passwd	Wed Apr 25 16:11:26 2012
@@ -1,4 +1,4 @@
-root::0:0::0:0:Charlie :/root:/bin/csh
+root::0:0::0:0:Charlie :/root:/bin/sh
 toor:*:0:0::0:0:Bourne-again Superuser:/root:/bin/sh
 daemon:*:1:1::0:0:The devil himself:/:/sbin/nologin
 operator:*:2:5::0:0:System :/usr/guest/operator:/sbin/nologin



CVS commit: src/usr.sbin/sup/source

2012-04-25 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Apr 25 17:33:49 UTC 2012

Modified Files:
src/usr.sbin/sup/source: supscan.c

Log Message:
- don't declare victory when there are errors.
- better error messages.


To generate a diff of this commit:
cvs rdiff -u -r1.19 -r1.20 src/usr.sbin/sup/source/supscan.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/sup/source/supscan.c
diff -u src/usr.sbin/sup/source/supscan.c:1.19 src/usr.sbin/sup/source/supscan.c:1.20
--- src/usr.sbin/sup/source/supscan.c:1.19	Wed Aug 31 12:25:00 2011
+++ src/usr.sbin/sup/source/supscan.c	Wed Apr 25 13:33:49 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: supscan.c,v 1.19 2011/08/31 16:25:00 plunky Exp $	*/
+/*	$NetBSD: supscan.c,v 1.20 2012/04/25 17:33:49 christos Exp $	*/
 
 /*
  * Copyright (c) 1992 Carnegie Mellon University
@@ -158,7 +158,7 @@ TREE *refuseT = NULL;		/* list of all fi
 
 
 void usage(void);
-void init(int, char **);
+int init(int, char **);
 static SCAN_COLLECTION *getscancoll(char *, char *, char *);
 int localhost(char *);
 int main(int, char **);
@@ -171,6 +171,7 @@ int
 main(int argc, char **argv)
 {
 	SCAN_COLLECTION * volatile c;	/* Avoid longjmp clobbering */
+	int errs;
 #ifdef RLIMIT_DATA
 	struct rlimit dlim;
 
@@ -185,7 +186,11 @@ main(int argc, char **argv)
 	}
 #endif
 
-	init(argc, argv);	/* process arguments */
+	errs = init(argc, argv);	/* process arguments */
+	if (errs) {
+		fprintf(stderr, supscan: %d collections had errors, errs);
+		return 1;
+	}
 	for (c = firstC; c; c = c-Cnext) {
 		collname = c-Cname;
 		basedir = c-Cbase;
@@ -202,10 +207,12 @@ main(int argc, char **argv)
 			if (!quiet)
 printf(SUP Scan for %s completed at %s,
 collname, ctime(scantime));
-		} else
+		} else {
 			fprintf(stderr,
 			SUP: Scan for %s aborted at %s, collname,
 			ctime(scantime));
+			errs++;
+		}
 		if (!quiet)
 			(void) fflush(stdout);
 	}
@@ -217,7 +224,7 @@ main(int argc, char **argv)
 			free(c-Cprefix);
 		free(c);
 	}
-	exit(0);
+	return errs ? 1 : 0;
 }
 /*
  ***I N I T I A L I Z A T I O N***
@@ -232,7 +239,7 @@ usage(void)
 	exit(1);
 }
 
-void
+int
 init(int argc, char **argv)
 {
 	char buf[STRINGLENGTH], fbuf[STRINGLENGTH], *p, *q;
@@ -240,6 +247,7 @@ init(int argc, char **argv)
 	SCAN_COLLECTION **c;
 	int fflag, sflag;
 	char *filename = NULL;
+	int errs = 0;
 
 	quiet = FALSE;
 	trace = FALSE;
@@ -297,9 +305,11 @@ init(int argc, char **argv)
 			*c = getscancoll(filename, estrdup(collname), NULL);
 			if (*c)
 c = ((*c)-Cnext);
+			else
+errs++;
 		}
 		(void) fclose(f);
-		return;
+		return errs;
 	}
 	if (argc  2  fflag) {
 		firstC = NULL;
@@ -317,14 +327,19 @@ init(int argc, char **argv)
 			*c = getscancoll(filename, estrdup(q), estrdup(p));
 			if (*c)
 c = ((*c)-Cnext);
+			else
+errs++;
 		}
 		(void) fclose(f);
-		return;
+		return errs;
 	}
 	if (argc  2 || argc  3)
 		usage();
 	firstC = getscancoll(filename, estrdup(argv[1]),
 	argc  2 ? estrdup(argv[2]) : NULL);
+	if (firstC == NULL)
+		errs++;
+	return errs;
 }
 
 static SCAN_COLLECTION *
@@ -357,8 +372,8 @@ getscancoll(char *filename, char *collna
 		}
 	}
 	if (chdir(basedir)  0) {
-		fprintf(stderr, supscan:  Can't chdir to base directory %s for %s\n,
-		basedir, collname);
+		fprintf(stderr, supscan: Can't chdir to base directory %s 
+		for %s (%s)\n, basedir, collname, strerror(errno));
 		return (NULL);
 	}
 	prefix = NULL;
@@ -372,8 +387,9 @@ getscancoll(char *filename, char *collna
 continue;
 			prefix = estrdup(p);
 			if (chdir(prefix)  0) {
-fprintf(stderr, supscan: can't chdir to %s from base directory %s for %s\n,
-prefix, basedir, collname);
+fprintf(stderr, supscan: can't chdir to %s 
+ from base directory %s for %s\n,
+prefix, basedir, collname, strerror(errno));
 fclose(f);
 free(prefix);
 return (NULL);
@@ -382,7 +398,7 @@ getscancoll(char *filename, char *collna
 		}
 		(void) fclose(f);
 	}
-	if ((c = (SCAN_COLLECTION *) malloc(sizeof(SCAN_COLLECTION))) == NULL)
+	if ((c = malloc(sizeof(*c))) == NULL)
 		quit(1, supscan: can't malloc collection structure\n);
 	c-Cname = collname;
 	c-Cbase = basedir;



CVS commit: src/usr.sbin/sup/source

2012-04-25 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Apr 25 18:07:45 UTC 2012

Modified Files:
src/usr.sbin/sup/source: supscan.c

Log Message:
forgot the %s for the error


To generate a diff of this commit:
cvs rdiff -u -r1.20 -r1.21 src/usr.sbin/sup/source/supscan.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/sup/source/supscan.c
diff -u src/usr.sbin/sup/source/supscan.c:1.20 src/usr.sbin/sup/source/supscan.c:1.21
--- src/usr.sbin/sup/source/supscan.c:1.20	Wed Apr 25 13:33:49 2012
+++ src/usr.sbin/sup/source/supscan.c	Wed Apr 25 14:07:45 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: supscan.c,v 1.20 2012/04/25 17:33:49 christos Exp $	*/
+/*	$NetBSD: supscan.c,v 1.21 2012/04/25 18:07:45 christos Exp $	*/
 
 /*
  * Copyright (c) 1992 Carnegie Mellon University
@@ -388,7 +388,7 @@ getscancoll(char *filename, char *collna
 			prefix = estrdup(p);
 			if (chdir(prefix)  0) {
 fprintf(stderr, supscan: can't chdir to %s 
- from base directory %s for %s\n,
+ from base directory %s for %s (%s)\n,
 prefix, basedir, collname, strerror(errno));
 fclose(f);
 free(prefix);



CVS commit: src/usr.bin/m4

2012-04-25 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Apr 25 18:23:58 UTC 2012

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

Log Message:
Fix wrong loop index leading to infinite loop
ifdef(`FOO',
# FOO
)
XXX: Pullup to 6.


To generate a diff of this commit:
cvs rdiff -u -r1.41 -r1.42 src/usr.bin/m4/main.c

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

Modified files:

Index: src/usr.bin/m4/main.c
diff -u src/usr.bin/m4/main.c:1.41 src/usr.bin/m4/main.c:1.42
--- src/usr.bin/m4/main.c:1.41	Tue Sep  6 14:16:01 2011
+++ src/usr.bin/m4/main.c	Wed Apr 25 14:23:58 2012
@@ -1,5 +1,5 @@
 /*	$OpenBSD: main.c,v 1.77 2009/10/14 17:19:47 sthen Exp $	*/
-/*	$NetBSD: main.c,v 1.41 2011/09/06 18:16:01 joerg Exp $	*/
+/*	$NetBSD: main.c,v 1.42 2012/04/25 18:23:58 christos Exp $	*/
 
 /*-
  * Copyright (c) 1989, 1993
@@ -42,7 +42,7 @@
 #include nbtool_config.h
 #endif
 #include sys/cdefs.h
-__RCSID($NetBSD: main.c,v 1.41 2011/09/06 18:16:01 joerg Exp $);
+__RCSID($NetBSD: main.c,v 1.42 2012/04/25 18:23:58 christos Exp $);
 #include assert.h
 #include signal.h
 #include err.h
@@ -494,7 +494,7 @@ macro(void)
 		default:
 			if (LOOK_AHEAD(t, scommt)) {
 char *q;
-for (q = scommt; *q; p++)
+for (q = scommt; *q; q++)
 	chrsave(*q);
 for(;;) {
 	t = gpbc();



CVS commit: src/sys/arch/sparc64/sparc64

2012-04-25 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Wed Apr 25 19:58:07 UTC 2012

Modified Files:
src/sys/arch/sparc64/sparc64: trap.c

Log Message:
Fix 32bit build


To generate a diff of this commit:
cvs rdiff -u -r1.175 -r1.176 src/sys/arch/sparc64/sparc64/trap.c

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

Modified files:

Index: src/sys/arch/sparc64/sparc64/trap.c
diff -u src/sys/arch/sparc64/sparc64/trap.c:1.175 src/sys/arch/sparc64/sparc64/trap.c:1.176
--- src/sys/arch/sparc64/sparc64/trap.c:1.175	Mon Apr 23 15:09:13 2012
+++ src/sys/arch/sparc64/sparc64/trap.c	Wed Apr 25 19:58:07 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: trap.c,v 1.175 2012/04/23 15:09:13 martin Exp $ */
+/*	$NetBSD: trap.c,v 1.176 2012/04/25 19:58:07 martin Exp $ */
 
 /*
  * Copyright (c) 1996-2002 Eduardo Horvath.  All rights reserved.
@@ -50,7 +50,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: trap.c,v 1.175 2012/04/23 15:09:13 martin Exp $);
+__KERNEL_RCSID(0, $NetBSD: trap.c,v 1.176 2012/04/25 19:58:07 martin Exp $);
 
 #include opt_ddb.h
 #include opt_multiprocessor.h
@@ -746,7 +746,7 @@ badtrap:
 		sig = SIGBUS;
 		ksi.ksi_trap = type;
 		ksi.ksi_code = BUS_ADRALN;
-		ksi.ksi_addr = (void*)dsfar;
+		ksi.ksi_addr = (void*)(intptr_t)dsfar;
 		}
 		break;
 



CVS commit: src/usr.sbin/sup/source

2012-04-25 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Wed Apr 25 22:35:00 UTC 2012

Modified Files:
src/usr.sbin/sup/source: supscan.c

Log Message:
errs might be clobbered by longjmp, so declare it volatile.


To generate a diff of this commit:
cvs rdiff -u -r1.21 -r1.22 src/usr.sbin/sup/source/supscan.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/sup/source/supscan.c
diff -u src/usr.sbin/sup/source/supscan.c:1.21 src/usr.sbin/sup/source/supscan.c:1.22
--- src/usr.sbin/sup/source/supscan.c:1.21	Wed Apr 25 18:07:45 2012
+++ src/usr.sbin/sup/source/supscan.c	Wed Apr 25 22:35:00 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: supscan.c,v 1.21 2012/04/25 18:07:45 christos Exp $	*/
+/*	$NetBSD: supscan.c,v 1.22 2012/04/25 22:35:00 martin Exp $	*/
 
 /*
  * Copyright (c) 1992 Carnegie Mellon University
@@ -171,7 +171,7 @@ int
 main(int argc, char **argv)
 {
 	SCAN_COLLECTION * volatile c;	/* Avoid longjmp clobbering */
-	int errs;
+	volatile int errs;
 #ifdef RLIMIT_DATA
 	struct rlimit dlim;
 



CVS commit: src/lib/libpthread

2012-04-25 Thread enami tsugutomo
Module Name:src
Committed By:   enami
Date:   Thu Apr 26 00:21:44 UTC 2012

Modified Files:
src/lib/libpthread: pthread.c

Log Message:
Store allocated lwpctl state in the thread actually forked,
which is the only thread lives in the child process.

The problem originally reported here:
  https://bugs.ruby-lang.org/issues/6341


To generate a diff of this commit:
cvs rdiff -u -r1.133 -r1.134 src/lib/libpthread/pthread.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/libpthread/pthread.c
diff -u src/lib/libpthread/pthread.c:1.133 src/lib/libpthread/pthread.c:1.134
--- src/lib/libpthread/pthread.c:1.133	Thu Mar 22 20:01:18 2012
+++ src/lib/libpthread/pthread.c	Thu Apr 26 00:21:44 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: pthread.c,v 1.133 2012/03/22 20:01:18 drochner Exp $	*/
+/*	$NetBSD: pthread.c,v 1.134 2012/04/26 00:21:44 enami Exp $	*/
 
 /*-
  * Copyright (c) 2001, 2002, 2003, 2006, 2007, 2008 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include sys/cdefs.h
-__RCSID($NetBSD: pthread.c,v 1.133 2012/03/22 20:01:18 drochner Exp $);
+__RCSID($NetBSD: pthread.c,v 1.134 2012/04/26 00:21:44 enami Exp $);
 
 #define	__EXPOSE_STACK	1
 
@@ -84,7 +84,6 @@ pthread_queue_t pthread__allqueue;
 
 static pthread_attr_t pthread_default_attr;
 static lwpctl_t pthread__dummy_lwpctl = { .lc_curcpu = LWPCTL_CPU_NONE };
-static pthread_t pthread__first;
 
 enum {
 	DIAGASSERT_ABORT =	10,
@@ -229,7 +228,6 @@ pthread__init(void)
 	}
 
 	/* Tell libc that we're here and it should role-play accordingly. */
-	pthread__first = first;
 	pthread_atfork(NULL, NULL, pthread__fork_callback);
 	__isthreaded = 1;
 }
@@ -237,13 +235,12 @@ pthread__init(void)
 static void
 pthread__fork_callback(void)
 {
-	struct __pthread_st *self;
+	struct __pthread_st *self = pthread__self();
 
 	/* lwpctl state is not copied across fork. */
-	if (_lwp_ctl(LWPCTL_FEATURE_CURCPU, pthread__first-pt_lwpctl)) {
+	if (_lwp_ctl(LWPCTL_FEATURE_CURCPU, self-pt_lwpctl)) {
 		err(1, _lwp_ctl);
 	}
-	self = pthread__self();
 	self-pt_lid = _lwp_self();
 }
 



CVS commit: src/sys/dev/sun

2012-04-25 Thread Michael Lorenz
Module Name:src
Committed By:   macallan
Date:   Thu Apr 26 00:50:11 UTC 2012

Modified Files:
src/sys/dev/sun: files.sun kbd.c kbdvar.h

Log Message:
report power button events to sysmon
also send pwm events for volume control keys directly with
options KBD_HIJACK_VOLUME_BUTTONS
so they work in X as well


To generate a diff of this commit:
cvs rdiff -u -r1.16 -r1.17 src/sys/dev/sun/files.sun
cvs rdiff -u -r1.63 -r1.64 src/sys/dev/sun/kbd.c
cvs rdiff -u -r1.20 -r1.21 src/sys/dev/sun/kbdvar.h

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

Modified files:

Index: src/sys/dev/sun/files.sun
diff -u src/sys/dev/sun/files.sun:1.16 src/sys/dev/sun/files.sun:1.17
--- src/sys/dev/sun/files.sun:1.16	Fri Dec  5 11:52:42 2008
+++ src/sys/dev/sun/files.sun	Thu Apr 26 00:50:10 2012
@@ -1,4 +1,4 @@
-# $NetBSD: files.sun,v 1.16 2008/12/05 11:52:42 jdc Exp $
+# $NetBSD: files.sun,v 1.17 2012/04/26 00:50:10 macallan Exp $
 #
 # Configuration file for devices found on Sun machines.
 #
@@ -19,7 +19,7 @@ device kbd: firm_events, wskbddev
 file	dev/sun/kbd.c			kbd needs-flag
 file	dev/sun/kbd_tables.c 		kbd
 
-defflag	opt_sunkbd.h	SPARCBOOK_CMD
+defflag	opt_sunkbd.h	SPARCBOOK_CMD KBD_HIJACK_VOLUME_BUTTONS
 file	dev/sun/wskbdmap_sun.c		kbd  wskbd
 
 # e.g. - lower layer: sun keyboard at zs

Index: src/sys/dev/sun/kbd.c
diff -u src/sys/dev/sun/kbd.c:1.63 src/sys/dev/sun/kbd.c:1.64
--- src/sys/dev/sun/kbd.c:1.63	Tue May 12 14:46:39 2009
+++ src/sys/dev/sun/kbd.c	Thu Apr 26 00:50:10 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: kbd.c,v 1.63 2009/05/12 14:46:39 cegger Exp $	*/
+/*	$NetBSD: kbd.c,v 1.64 2012/04/26 00:50:10 macallan Exp $	*/
 
 /*
  * Copyright (c) 1992, 1993
@@ -47,7 +47,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: kbd.c,v 1.63 2009/05/12 14:46:39 cegger Exp $);
+__KERNEL_RCSID(0, $NetBSD: kbd.c,v 1.64 2012/04/26 00:50:10 macallan Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -65,6 +65,8 @@ __KERNEL_RCSID(0, $NetBSD: kbd.c,v 1.63
 #include sys/poll.h
 #include sys/file.h
 
+#include dev/sysmon/sysmon_taskq.h
+
 #include dev/wscons/wsksymdef.h
 
 #include dev/sun/kbd_reg.h
@@ -76,6 +78,7 @@ __KERNEL_RCSID(0, $NetBSD: kbd.c,v 1.63
 
 #include ioconf.h
 #include locators.h
+#include opt_sunkbd.h
 
 dev_type_open(kbdopen);
 dev_type_close(kbdclose);
@@ -150,7 +153,7 @@ static void	kbd_input_wskbd(struct kbd_s
 /* firm events input */
 static void	kbd_input_event(struct kbd_softc *, int);
 
-
+static void	kbd_powerbutton(void *);
 
 /
  *  Entry points for /dev/kbd
@@ -899,7 +902,7 @@ static void
 kbd_input_wskbd(struct kbd_softc *k, int code)
 {
 	int type, key;
-
+	
 #ifdef WSDISPLAY_COMPAT_RAWKBD
 	if (k-k_wsraw) {
 		u_char buf;
@@ -912,6 +915,27 @@ kbd_input_wskbd(struct kbd_softc *k, int
 
 	type = KEY_UP(code) ? WSCONS_EVENT_KEY_UP : WSCONS_EVENT_KEY_DOWN;
 	key = KEY_CODE(code);
+
+	if (type == WSCONS_EVENT_KEY_DOWN) {
+		switch (key) {
+#ifdef KBD_HIJACK_VOLUME_BUTTONS
+			case 0x02:
+pmf_event_inject(NULL, PMFE_AUDIO_VOLUME_DOWN);
+return;
+			case 0x04:
+pmf_event_inject(NULL, PMFE_AUDIO_VOLUME_UP);
+return;
+#endif
+			case 0x30:
+if (k-k_isconsole)
+	k-k_ev = KEY_UP(code) ?
+	PSWITCH_EVENT_RELEASED :
+	PSWITCH_EVENT_PRESSED;
+	sysmon_task_queue_sched(0, kbd_powerbutton, k);
+return;
+		}
+	}
+
 	wskbd_input(k-k_wskbd, type, key);
 }
 
@@ -919,6 +943,7 @@ int
 wssunkbd_enable(void *v, int on)
 {
 	struct kbd_softc *k = v;
+
 	if (k-k_wsenabled != on) {
 		k-k_wsenabled = on;
 		if (on) {
@@ -1048,7 +1073,24 @@ void
 kbd_wskbd_attach(struct kbd_softc *k, int isconsole)
 {
 	k-k_isconsole = isconsole;
-	
+	if (isconsole) {
+		sysmon_task_queue_init();
+		memset(k-k_sm_pbutton, 0, sizeof(struct sysmon_pswitch));
+		k-k_sm_pbutton.smpsw_name = device_xname(k-k_dev);
+		k-k_sm_pbutton.smpsw_type = PSWITCH_TYPE_POWER;
+		if (sysmon_pswitch_register(k-k_sm_pbutton) != 0)
+			aprint_error_dev(k-k_dev,
+			unable to register power button with sysmon\n);
+	}
 	config_interrupts(k-k_dev, kbd_enable);
 }
+
+static void
+kbd_powerbutton(void *cookie)
+{
+	struct kbd_softc *k = cookie;
+
+	sysmon_pswitch_event(k-k_sm_pbutton, k-k_ev);
+}
+
 #endif

Index: src/sys/dev/sun/kbdvar.h
diff -u src/sys/dev/sun/kbdvar.h:1.20 src/sys/dev/sun/kbdvar.h:1.21
--- src/sys/dev/sun/kbdvar.h:1.20	Tue May 12 14:46:39 2009
+++ src/sys/dev/sun/kbdvar.h	Thu Apr 26 00:50:10 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: kbdvar.h,v 1.20 2009/05/12 14:46:39 cegger Exp $	*/
+/*	$NetBSD: kbdvar.h,v 1.21 2012/04/26 00:50:10 macallan Exp $	*/
 
 /*
  * Copyright (c) 1992, 1993
@@ -43,6 +43,7 @@
 #include wskbd.h	/* for NWSKBD */
 #include dev/wscons/wsconsio.h
 #include dev/wscons/wskbdvar.h
+#include dev/sysmon/sysmonvar.h
 
 #if NWSKBD  0
 #include opt_wsdisplay_compat.h
@@ -51,6 +52,9 @@
 struct kbd_softc {
 	device_t k_dev;		/* required first: 

CVS commit: src/games/wtf

2012-04-25 Thread Jan Schaumann
Module Name:src
Committed By:   jschauma
Date:   Thu Apr 26 01:55:14 UTC 2012

Modified Files:
src/games/wtf: wtf

Log Message:
allow multiple '-f acronyms' arguments to be given, which makes this behave
more consistently with ACRONYMSDB, which may also point to multiple files


To generate a diff of this commit:
cvs rdiff -u -r1.15 -r1.16 src/games/wtf/wtf

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

Modified files:

Index: src/games/wtf/wtf
diff -u src/games/wtf/wtf:1.15 src/games/wtf/wtf:1.16
--- src/games/wtf/wtf:1.15	Mon Aug  6 21:14:36 2007
+++ src/games/wtf/wtf	Thu Apr 26 01:55:14 2012
@@ -1,6 +1,6 @@
 #!/bin/sh
 #
-#	$NetBSD: wtf,v 1.15 2007/08/06 21:14:36 hubertf Exp $
+#	$NetBSD: wtf,v 1.16 2012/04/26 01:55:14 jschauma Exp $
 #
 # Public domain
 #
@@ -12,13 +12,6 @@ usage() {
 	exit 1
 }
 
-acronyms=${ACRONYMDB:-`ls /usr/share/misc/acronyms* 2/dev/null`}
-
-if [ $acronyms =  ]; then
-	echo $PROGNAME: acronyms database not found! 2
-	exit 1
-fi
-
 args=`getopt f: $*`
 if [ $? -ne 0 ]; then
 	usage
@@ -27,7 +20,7 @@ set -- $args
 while [ $# -gt 0 ]; do
 	case $1 in
 		-f)
-			acronyms=$2; shift
+			acronyms=$2 $acronyms; shift
 			;;
 		--)
 			shift; break
@@ -44,8 +37,17 @@ if [ $# -lt 1 ] ; then
 	usage
 fi
 
-for f in $acronyms
-do
+if [ $acronyms =  ]; then
+	acronyms=${ACRONYMDB:-`ls /usr/share/misc/acronyms* 2/dev/null`}
+fi
+
+if [ $acronyms =  ]; then
+	echo $PROGNAME: acronyms database not found! 2
+	exit 1
+fi
+
+
+for f in $acronyms ; do
 	if [ ! -f $f ]; then
 		echo $PROGNAME: cannot open acronyms database file \`$f' 2
 		exit 1



CVS commit: [netbsd-6] src/external/gpl3/gdb/dist/gdb

2012-04-25 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Thu Apr 26 02:49:27 UTC 2012

Modified Files:
src/external/gpl3/gdb/dist/gdb [netbsd-6]: sparc-nat.c

Log Message:
Pull up following revision(s) (requested by martin in ticket #200):
external/gpl3/gdb/dist/gdb/sparc-nat.c: revision 1.3
remove code that assumed that lwpid shares pid space and can be used 
interchangeably.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.2.2.1 src/external/gpl3/gdb/dist/gdb/sparc-nat.c

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

Modified files:

Index: src/external/gpl3/gdb/dist/gdb/sparc-nat.c
diff -u src/external/gpl3/gdb/dist/gdb/sparc-nat.c:1.2 src/external/gpl3/gdb/dist/gdb/sparc-nat.c:1.2.2.1
--- src/external/gpl3/gdb/dist/gdb/sparc-nat.c:1.2	Sun Jan 22 20:27:28 2012
+++ src/external/gpl3/gdb/dist/gdb/sparc-nat.c	Thu Apr 26 02:49:27 2012
@@ -140,22 +140,7 @@ sparc_fetch_inferior_registers (struct t
   struct gdbarch *gdbarch = get_regcache_arch (regcache);
   int pid;
 
-  /* NOTE: cagney/2002-12-03: This code assumes that the currently
- selected light weight processes' registers can be written
- directly into the selected thread's register cache.  This works
- fine when given an 1:1 LWP:thread model (such as found on
- GNU/Linux) but will, likely, have problems when used on an N:1
- (userland threads) or N:M (userland multiple LWP) model.  In the
- case of the latter two, the LWP's registers do not necessarily
- belong to the selected thread (the LWP could be in the middle of
- executing the thread switch code).
-
- These functions should instead be paramaterized with an explicit
- object (struct regcache, struct thread_info?) into which the LWPs
- registers can be written.  */
-  pid = TIDGET (inferior_ptid);
-  if (pid == 0)
-pid = PIDGET (inferior_ptid);
+  pid = PIDGET (inferior_ptid);
 
   if (regnum == SPARC_G0_REGNUM)
 {
@@ -193,11 +178,7 @@ sparc_store_inferior_registers (struct t
   struct gdbarch *gdbarch = get_regcache_arch (regcache);
   int pid;
 
-  /* NOTE: cagney/2002-12-02: See comment in fetch_inferior_registers
- about threaded assumptions.  */
-  pid = TIDGET (inferior_ptid);
-  if (pid == 0)
-pid = PIDGET (inferior_ptid);
+  pid = PIDGET (inferior_ptid);
 
   if (regnum == -1 || sparc_gregset_supplies_p (gdbarch, regnum))
 {
@@ -278,9 +259,7 @@ sparc_xfer_wcookie (struct target_ops *o
   {
 int pid;
 
-pid = TIDGET (inferior_ptid);
-if (pid == 0)
-  pid = PIDGET (inferior_ptid);
+pid = PIDGET (inferior_ptid);
 
 /* Sanity check.  The proper type for a cookie is register_t, but
we can't assume that this type exists on all systems supported



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

2012-04-25 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Thu Apr 26 02:57:48 UTC 2012

Modified Files:
src/sys/arch/sparc64/sparc64 [netbsd-6]: trap.c

Log Message:
Pull up following revision(s) (requested by martin in ticket #201):
sys/arch/sparc64/sparc64/trap.c: revision 1.176
Fix 32bit build


To generate a diff of this commit:
cvs rdiff -u -r1.168.8.2 -r1.168.8.3 src/sys/arch/sparc64/sparc64/trap.c

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

Modified files:

Index: src/sys/arch/sparc64/sparc64/trap.c
diff -u src/sys/arch/sparc64/sparc64/trap.c:1.168.8.2 src/sys/arch/sparc64/sparc64/trap.c:1.168.8.3
--- src/sys/arch/sparc64/sparc64/trap.c:1.168.8.2	Tue Apr 24 19:44:16 2012
+++ src/sys/arch/sparc64/sparc64/trap.c	Thu Apr 26 02:57:48 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: trap.c,v 1.168.8.2 2012/04/24 19:44:16 riz Exp $ */
+/*	$NetBSD: trap.c,v 1.168.8.3 2012/04/26 02:57:48 riz Exp $ */
 
 /*
  * Copyright (c) 1996-2002 Eduardo Horvath.  All rights reserved.
@@ -50,7 +50,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: trap.c,v 1.168.8.2 2012/04/24 19:44:16 riz Exp $);
+__KERNEL_RCSID(0, $NetBSD: trap.c,v 1.168.8.3 2012/04/26 02:57:48 riz Exp $);
 
 #include opt_ddb.h
 #include opt_multiprocessor.h
@@ -748,7 +748,7 @@ badtrap:
 		sig = SIGBUS;
 		ksi.ksi_trap = type;
 		ksi.ksi_code = BUS_ADRALN;
-		ksi.ksi_addr = (void*)dsfar;
+		ksi.ksi_addr = (void*)(intptr_t)dsfar;
 		}
 		break;
 



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

2012-04-25 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Thu Apr 26 03:00:22 UTC 2012

Modified Files:
src/distrib/sets/lists/modules: md.evbppc mi

Log Message:
add vcoda module


To generate a diff of this commit:
cvs rdiff -u -r1.19 -r1.20 src/distrib/sets/lists/modules/md.evbppc
cvs rdiff -u -r1.43 -r1.44 src/distrib/sets/lists/modules/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/modules/md.evbppc
diff -u src/distrib/sets/lists/modules/md.evbppc:1.19 src/distrib/sets/lists/modules/md.evbppc:1.20
--- src/distrib/sets/lists/modules/md.evbppc:1.19	Sat Mar 10 16:52:02 2012
+++ src/distrib/sets/lists/modules/md.evbppc	Wed Apr 25 23:00:21 2012
@@ -1,4 +1,4 @@
-# $NetBSD: md.evbppc,v 1.19 2012/03/10 21:52:02 joerg Exp $
+# $NetBSD: md.evbppc,v 1.20 2012/04/26 03:00:21 christos Exp $
 ./stand/powerpc-4xx			base-kernel-modules	kmod,compatmodules
 ./stand/powerpc-4xx/@OSRELEASE@		base-kernel-modules	kmod,compatmodules
 ./stand/powerpc-4xx/@OSRELEASE@/modules	base-kernel-modules	kmod,compatmodules
@@ -339,6 +339,8 @@
 ./stand/powerpc-booke/@OSRELEASE@/modules/union/union.kmod		base-kernel-modules	kmod,compatmodules
 ./stand/powerpc-booke/@OSRELEASE@/modules/usbverbose			base-kernel-modules	kmod,compatmodules
 ./stand/powerpc-booke/@OSRELEASE@/modules/usbverbose/usbverbose.kmod	base-kernel-modules	kmod,compatmodules
+./stand/powerpc-booke/@OSRELEASE@/modules/vcoda 			base-kernel-modules	kmod,compatmodules
+./stand/powerpc-booke/@OSRELEASE@/modules/vcoda/vcoda.kmod	base-kernel-modules	kmod,compatmodules
 ./stand/powerpc-booke/@OSRELEASE@/modules/v7fs base-kernel-modules	kmod,compatmodules
 ./stand/powerpc-booke/@OSRELEASE@/modules/v7fs/v7fs.kmod	base-kernel-modules	kmod,compatmodules
 ./stand/powerpc-booke/@OSRELEASE@/modules/vnd base-kernel-modules	kmod,compatmodules

Index: src/distrib/sets/lists/modules/mi
diff -u src/distrib/sets/lists/modules/mi:1.43 src/distrib/sets/lists/modules/mi:1.44
--- src/distrib/sets/lists/modules/mi:1.43	Wed Apr 25 09:55:17 2012
+++ src/distrib/sets/lists/modules/mi	Wed Apr 25 23:00:22 2012
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.43 2012/04/25 13:55:17 pgoyette Exp $
+# $NetBSD: mi,v 1.44 2012/04/26 03:00:22 christos Exp $
 #
 # Note: don't delete entries from here - mark them as obsolete instead.
 #
@@ -179,6 +179,8 @@
 ./@MODULEDIR@/union/union.kmod			base-kernel-modules	kmod
 ./@MODULEDIR@/usbverbose			base-kernel-modules	kmod
 ./@MODULEDIR@/usbverbose/usbverbose.kmod	base-kernel-modules	kmod
+./@MODULEDIR@/vcodabase-kernel-modules	kmod
+./@MODULEDIR@/vcoda/vcoda.kmod			base-kernel-modules	kmod
 ./@MODULEDIR@/v7fsbase-kernel-modules	kmod
 ./@MODULEDIR@/v7fs/v7fs.kmod			base-kernel-modules	kmod
 ./@MODULEDIR@/vnd base-kernel-modules	kmod



CVS commit: src/sys/modules

2012-04-25 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Thu Apr 26 03:03:53 UTC 2012

Modified Files:
src/sys/modules: Makefile
src/sys/modules/coda: Makefile
Added Files:
src/sys/modules/vcoda: Makefile

Log Message:
split the coda module in a device one, and a vfs one so that it works.


To generate a diff of this commit:
cvs rdiff -u -r1.105 -r1.106 src/sys/modules/Makefile
cvs rdiff -u -r1.1 -r1.2 src/sys/modules/coda/Makefile
cvs rdiff -u -r0 -r1.1 src/sys/modules/vcoda/Makefile

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

Modified files:

Index: src/sys/modules/Makefile
diff -u src/sys/modules/Makefile:1.105 src/sys/modules/Makefile:1.106
--- src/sys/modules/Makefile:1.105	Wed Apr 25 09:55:17 2012
+++ src/sys/modules/Makefile	Wed Apr 25 23:03:53 2012
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.105 2012/04/25 13:55:17 pgoyette Exp $
+#	$NetBSD: Makefile,v 1.106 2012/04/26 03:03:53 christos Exp $
 
 .include bsd.own.mk
 
@@ -76,6 +76,7 @@ SUBDIR+=	udf
 SUBDIR+=	umap
 SUBDIR+=	union
 SUBDIR+=	usbverbose
+SUBDIR+=	vcoda
 SUBDIR+=	v7fs
 SUBDIR+=	vnd
 SUBDIR+=	tprof

Index: src/sys/modules/coda/Makefile
diff -u src/sys/modules/coda/Makefile:1.1 src/sys/modules/coda/Makefile:1.2
--- src/sys/modules/coda/Makefile:1.1	Sat Jun 28 12:11:35 2008
+++ src/sys/modules/coda/Makefile	Wed Apr 25 23:03:53 2012
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.1 2008/06/28 16:11:35 rumble Exp $
+#	$NetBSD: Makefile,v 1.2 2012/04/26 03:03:53 christos Exp $
 
 .include ../Makefile.inc
 
@@ -6,7 +6,6 @@
 
 KMOD=	coda
 
-SRCS=	coda_namecache.c coda_psdev.c coda_subr.c coda_venus.c \
-	coda_vfsops.c coda_vnops.c
+SRCS=	coda_venus.c coda_vfsops.c coda_vnops.c
 
 .include bsd.kmodule.mk

Added files:

Index: src/sys/modules/vcoda/Makefile
diff -u /dev/null src/sys/modules/vcoda/Makefile:1.1
--- /dev/null	Wed Apr 25 23:03:53 2012
+++ src/sys/modules/vcoda/Makefile	Wed Apr 25 23:03:53 2012
@@ -0,0 +1,11 @@
+#	$NetBSD: Makefile,v 1.1 2012/04/26 03:03:53 christos Exp $
+
+.include ../Makefile.inc
+
+.PATH:	${S}/coda
+
+KMOD=	vcoda
+
+SRCS=	coda_psdev.c coda_namecache.c coda_subr.c
+
+.include bsd.kmodule.mk



CVS commit: [netbsd-6] src/doc

2012-04-25 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Thu Apr 26 03:04:34 UTC 2012

Modified Files:
src/doc [netbsd-6]: CHANGES-6.0

Log Message:
Tickets 200, 201.


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.77 -r1.1.2.78 src/doc/CHANGES-6.0

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-6.0
diff -u src/doc/CHANGES-6.0:1.1.2.77 src/doc/CHANGES-6.0:1.1.2.78
--- src/doc/CHANGES-6.0:1.1.2.77	Tue Apr 24 19:45:06 2012
+++ src/doc/CHANGES-6.0	Thu Apr 26 03:04:34 2012
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-6.0,v 1.1.2.77 2012/04/24 19:45:06 riz Exp $
+# $NetBSD: CHANGES-6.0,v 1.1.2.78 2012/04/26 03:04:34 riz Exp $
 
 A complete list of changes from the initial NetBSD 6.0 branch on 15 Feb 2012
 until the 6.0 release:
@@ -1983,3 +1983,13 @@ sys/arch/sparc64/sparc64/trap.c			1.175
 	instruction).
 	[martin, ticket #199]
 
+external/gpl3/gdb/dist/gdb/sparc-nat.c		1.3
+
+	Fix threaded debugging on sparc64.
+	[martin, ticket #200]
+
+sys/arch/sparc64/sparc64/trap.c			1.176
+
+	32-bit build fix for ticket #199.
+	[martin, ticket #201]
+



CVS commit: src/sys/coda

2012-04-25 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Thu Apr 26 03:04:55 UTC 2012

Modified Files:
src/sys/coda: coda_psdev.c coda_subr.c coda_venus.c coda_vfsops.c
coda_vnops.c

Log Message:
re-arrange things so that vcoda does not depend on coda.


To generate a diff of this commit:
cvs rdiff -u -r1.47 -r1.48 src/sys/coda/coda_psdev.c
cvs rdiff -u -r1.25 -r1.26 src/sys/coda/coda_subr.c
cvs rdiff -u -r1.28 -r1.29 src/sys/coda/coda_venus.c
cvs rdiff -u -r1.70 -r1.71 src/sys/coda/coda_vfsops.c
cvs rdiff -u -r1.81 -r1.82 src/sys/coda/coda_vnops.c

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

Modified files:

Index: src/sys/coda/coda_psdev.c
diff -u src/sys/coda/coda_psdev.c:1.47 src/sys/coda/coda_psdev.c:1.48
--- src/sys/coda/coda_psdev.c:1.47	Sat Jan 10 21:45:46 2009
+++ src/sys/coda/coda_psdev.c	Wed Apr 25 23:04:54 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: coda_psdev.c,v 1.47 2009/01/11 02:45:46 christos Exp $	*/
+/*	$NetBSD: coda_psdev.c,v 1.48 2012/04/26 03:04:54 christos Exp $	*/
 
 /*
  *
@@ -54,7 +54,7 @@
 /* These routines are the device entry points for Venus. */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: coda_psdev.c,v 1.47 2009/01/11 02:45:46 christos Exp $);
+__KERNEL_RCSID(0, $NetBSD: coda_psdev.c,v 1.48 2012/04/26 03:04:54 christos Exp $);
 
 extern int coda_nc_initialized;/* Set if cache has been initialized */
 
@@ -76,6 +76,7 @@ extern int coda_nc_initialized;/* Se
 #include sys/select.h
 #include sys/conf.h
 #include sys/atomic.h
+#include sys/module.h
 
 #include miscfs/syncfs/syncfs.h
 
@@ -95,6 +96,8 @@ int coda_pcatch = PCATCH;
 #else
 #endif
 
+int coda_kernel_version = CODA_KERNEL_VERSION;
+
 #define ENTRY if(coda_psdev_print_entry) myprintf((Entered %s\n,__func__))
 
 void vcodaattach(int n);
@@ -123,6 +126,8 @@ struct vmsg {
 void *	 vm_sleep;	/* Not used by Mach. */
 };
 
+struct coda_mntinfo coda_mnttbl[NVCODA];
+
 #define	VM_READ	1
 #define	VM_WRITE2
 #define	VM_INTR	4
@@ -721,3 +726,43 @@ coda_call(struct coda_mntinfo *mntinfo, 
 	return(error);
 }
 
+MODULE(MODULE_CLASS_DRIVER, vcoda, NULL);
+
+static int
+vcoda_modcmd(modcmd_t cmd, void *arg)
+{
+	int cmajor, dmajor, error = 0;
+
+	dmajor = cmajor = -1;
+
+	switch (cmd) {
+	case MODULE_CMD_INIT:
+#ifdef _MODULE
+		vcodaattach(NVCODA);
+
+		return devsw_attach(vcoda, NULL, dmajor,
+		vcoda_cdevsw, cmajor);
+#endif
+		break;
+
+	case MODULE_CMD_FINI:
+#ifdef _MODULE
+		{
+			for  (size_t i = 0; i  NVCODA; i++) {
+struct vcomm *vcp = coda_mnttbl[i].mi_vcomm;
+if (VC_OPEN(vcp))
+	return EBUSY;
+			}
+			return devsw_detach(NULL, vcoda_cdevsw);
+		}
+#endif
+		break;
+
+	case MODULE_CMD_STAT:
+		return ENOTTY;
+
+	default:
+		return ENOTTY;
+	}
+	return error;
+}

Index: src/sys/coda/coda_subr.c
diff -u src/sys/coda/coda_subr.c:1.25 src/sys/coda/coda_subr.c:1.26
--- src/sys/coda/coda_subr.c:1.25	Wed Aug 31 14:31:02 2011
+++ src/sys/coda/coda_subr.c	Wed Apr 25 23:04:54 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: coda_subr.c,v 1.25 2011/08/31 18:31:02 plunky Exp $	*/
+/*	$NetBSD: coda_subr.c,v 1.26 2012/04/26 03:04:54 christos Exp $	*/
 
 /*
  *
@@ -55,7 +55,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: coda_subr.c,v 1.25 2011/08/31 18:31:02 plunky Exp $);
+__KERNEL_RCSID(0, $NetBSD: coda_subr.c,v 1.26 2012/04/26 03:04:54 christos Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -79,6 +79,12 @@ int coda_new = 0;
 
 struct cnode *coda_freelist = NULL;
 struct cnode *coda_cache[CODA_CACHESIZE];
+MALLOC_DEFINE(M_CODA, coda, Coda file system structures and tables);
+
+int codadebug = 0;
+int coda_printf_delay = 0;  /* in microseconds */
+int coda_vnop_print_entry = 0;
+int coda_vfsop_print_entry = 0;
 
 #define	CNODE_NEXT(cp)	((cp)-c_next)
 

Index: src/sys/coda/coda_venus.c
diff -u src/sys/coda/coda_venus.c:1.28 src/sys/coda/coda_venus.c:1.29
--- src/sys/coda/coda_venus.c:1.28	Tue Jul 20 13:26:03 2010
+++ src/sys/coda/coda_venus.c	Wed Apr 25 23:04:54 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: coda_venus.c,v 1.28 2010/07/20 17:26:03 christos Exp $	*/
+/*	$NetBSD: coda_venus.c,v 1.29 2012/04/26 03:04:54 christos Exp $	*/
 
 /*
  *
@@ -32,7 +32,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: coda_venus.c,v 1.28 2010/07/20 17:26:03 christos Exp $);
+__KERNEL_RCSID(0, $NetBSD: coda_venus.c,v 1.29 2012/04/26 03:04:54 christos Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -201,8 +201,6 @@ __KERNEL_RCSID(0, $NetBSD: coda_venus.c
 	} while (/*CONSTCOND*/ 0)
 
 
-int coda_kernel_version = CODA_KERNEL_VERSION;
-
 int
 venus_root(void *mdp,
 	kauth_cred_t cred, struct proc *p,

Index: src/sys/coda/coda_vfsops.c
diff -u src/sys/coda/coda_vfsops.c:1.70 src/sys/coda/coda_vfsops.c:1.71
--- src/sys/coda/coda_vfsops.c:1.70	Mon Sep 26 20:54:47 2011
+++ src/sys/coda/coda_vfsops.c	Wed Apr 25 23:04:54 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: coda_vfsops.c,v 1.70 2011/09/27 00:54:47 christos Exp $	*/

CVS commit: src/games/wtf

2012-04-25 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Thu Apr 26 03:16:13 UTC 2012

Modified Files:
src/games/wtf: wtf

Log Message:
use modern shell constructs


To generate a diff of this commit:
cvs rdiff -u -r1.16 -r1.17 src/games/wtf/wtf

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

Modified files:

Index: src/games/wtf/wtf
diff -u src/games/wtf/wtf:1.16 src/games/wtf/wtf:1.17
--- src/games/wtf/wtf:1.16	Wed Apr 25 21:55:14 2012
+++ src/games/wtf/wtf	Wed Apr 25 23:16:13 2012
@@ -1,53 +1,50 @@
 #!/bin/sh
 #
-#	$NetBSD: wtf,v 1.16 2012/04/26 01:55:14 jschauma Exp $
+#	$NetBSD: wtf,v 1.17 2012/04/26 03:16:13 christos Exp $
 #
 # Public domain
 #
 
-PROGNAME=`basename $0`
+PROGNAME=$(basename $0)
 
 usage() {
-	echo usage: $PROGNAME [-f dbfile] [is] acronym
+	echo Usage: $PROGNAME [-f dbfile] [is] acronym
 	exit 1
 }
 
-args=`getopt f: $*`
-if [ $? -ne 0 ]; then
-	usage
-fi
-set -- $args
-while [ $# -gt 0 ]; do
-	case $1 in
-		-f)
-			acronyms=$2 $acronyms; shift
-			;;
-		--)
-			shift; break
-			;;
+while getopts f: f
+do
+	case $f in
+	f)
+		acronyms=$OPTARG $acronyms
+		;;
+	*)
+		usage
+		;;
 	esac
-	shift
 done
 
-if [ $1 = is ] ; then
+shift $(expr $OPTIND - 1)
+
+if [ $1 = is ]; then
 	shift
 fi
 
-if [ $# -lt 1 ] ; then
+if [ -z $1 ]; then
 	usage
 fi
 
-if [ $acronyms =  ]; then
-	acronyms=${ACRONYMDB:-`ls /usr/share/misc/acronyms* 2/dev/null`}
+if [ -z $acronyms ]; then
+	acronyms=${ACRONYMDB:-$(ls /usr/share/misc/acronyms* 2/dev/null)}
 fi
 
-if [ $acronyms =  ]; then
+if [ -z $acronyms ]; then
 	echo $PROGNAME: acronyms database not found! 2
 	exit 1
 fi
 
 
-for f in $acronyms ; do
+for f in $acronyms; do
 	if [ ! -f $f ]; then
 		echo $PROGNAME: cannot open acronyms database file \`$f' 2
 		exit 1
@@ -55,43 +52,41 @@ for f in $acronyms ; do
 done
 
 rv=0
-while [ $# -gt 0 ] ; do
+for i; do
 	# Search acronyms list first
-	target=`echo $1 | tr '[a-z]' '[A-Z]'`
-	ans=`fgrep -h $target $acronyms 2/dev/null \
-	 | sed -ne \|^$target[[:space:]]|s|^$target[[:space:]]*||p`
-	if [ $ans !=  ] ; then
+	target=$(echo $i | tr '[a-z]' '[A-Z]')
+	ans=$(fgrep -h $target $acronyms 2/dev/null \
+	 | sed -ne \|^$target[[:space:]]|s|^$target[[:space:]]*||p)
+	if [ -n $ans ] ; then
 		echo $target: $ans
-		shift ; continue
+		continue
 	fi
 
 	# Try whatis(1) next
-	ans=`whatis $1 2/dev/null`
-	if [ $? -eq 0 ] ; then
+	ans=$(whatis $i 2/dev/null)
+	if [ $? -eq 0 ]; then
 		echo $ans | sort -u
-		shift ; continue
+		continue
 	fi
 
 	# Try pkg_info(1) next
-	ans=`pkg_info -qc $1 2 /dev/null`
-	if [ $? -eq 0 ] ; then
-		echo $1: $ans
-		shift ; continue
+	ans=$(pkg_info -qc $i 2 /dev/null)
+	if [ $? -eq 0 ]; then
+		echo $i: $ans
+		continue
 	fi
 
 	# Try querying pkgsrc's help facility next
-	if [ -f ../../mk/bsd.pkg.mk ] ; then
-		ans=`make help topic=$1`
-		if [ $? -eq 0 ] ; then
-			echo $1: $ans
-			shift ; continue
+	if [ -f ../../mk/bsd.pkg.mk ]; then
+		ans=$(make help topic=$i)
+		if [ $? -eq 0 ]; then
+			echo $i: $ans
+			continue
 		fi
 	fi
 
 	# Give up!
-	echo $PROGNAME: I don't know what $1 means! 12
+	echo $PROGNAME: I don't know what \`$i' means! 12
 	rv=1
-	
-	shift
 done
 exit $rv