CVS commit: src/sys/arch/sparc64

2009-10-17 Thread Takeshi Nakayama
Module Name:src
Committed By:   nakayama
Date:   Sat Oct 17 08:50:49 UTC 2009

Modified Files:
src/sys/arch/sparc64/include: userret.h
src/sys/arch/sparc64/sparc64: trap.c

Log Message:
Merge want_ast check in userret() into trap handler, and repeat
preempt() call while want_resched is true.  While there remove
unnecessary #if 1.

This should fix a performance degradation of disk I/O on heavy load.


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/sys/arch/sparc64/include/userret.h
cvs rdiff -u -r1.157 -r1.158 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/include/userret.h
diff -u src/sys/arch/sparc64/include/userret.h:1.8 src/sys/arch/sparc64/include/userret.h:1.9
--- src/sys/arch/sparc64/include/userret.h:1.8	Mon Jun 30 14:12:20 2008
+++ src/sys/arch/sparc64/include/userret.h	Sat Oct 17 08:50:49 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: userret.h,v 1.8 2008/06/30 14:12:20 nakayama Exp $ */
+/*	$NetBSD: userret.h,v 1.9 2009/10/17 08:50:49 nakayama Exp $ */
 
 /*
  * Copyright (c) 1996-2002 Eduardo Horvath.  All rights reserved.
@@ -63,14 +63,6 @@
 
 	mi_userret(l);
 
-	if (want_ast) {
-		want_ast = 0;
-		if (l-l_pflag  LP_OWEUPC) {
-			l-l_pflag = ~LP_OWEUPC;
-			ADDUPROF(l);
-		}
-	}
-
 	/*
 	 * If profiling, charge recent system time to the trapped pc.
 	 */

Index: src/sys/arch/sparc64/sparc64/trap.c
diff -u src/sys/arch/sparc64/sparc64/trap.c:1.157 src/sys/arch/sparc64/sparc64/trap.c:1.158
--- src/sys/arch/sparc64/sparc64/trap.c:1.157	Sat May 16 19:15:34 2009
+++ src/sys/arch/sparc64/sparc64/trap.c	Sat Oct 17 08:50:49 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: trap.c,v 1.157 2009/05/16 19:15:34 nakayama Exp $ */
+/*	$NetBSD: trap.c,v 1.158 2009/10/17 08:50:49 nakayama 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.157 2009/05/16 19:15:34 nakayama Exp $);
+__KERNEL_RCSID(0, $NetBSD: trap.c,v 1.158 2009/10/17 08:50:49 nakayama Exp $);
 
 #include opt_ddb.h
 #include opt_multiprocessor.h
@@ -608,12 +608,14 @@
 #endif
 
 	case T_AST:
-#if 1
-		if (want_resched)
+		if (l-l_pflag  LP_OWEUPC) {
+			l-l_pflag = ~LP_OWEUPC;
+			ADDUPROF(l);
+		}
+		while (want_resched)
 			preempt();
 		want_ast = 0;
-#endif
-		break;	/* the work is all in userret() */
+		break;
 
 	case T_ILLINST:
 	case T_INST_EXCEPT:



CVS commit: src/sys/dev

2009-10-17 Thread Juergen Hannken-Illjes
Module Name:src
Committed By:   hannken
Date:   Sat Oct 17 10:29:30 UTC 2009

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

Log Message:
Remove unneeded vinvalbuf() on backing store as we don't use
VOP_BMAP()/VOP_STRATEGY() here.


To generate a diff of this commit:
cvs rdiff -u -r1.64 -r1.65 src/sys/dev/fss.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/fss.c
diff -u src/sys/dev/fss.c:1.64 src/sys/dev/fss.c:1.65
--- src/sys/dev/fss.c:1.64	Tue Oct 13 12:37:19 2009
+++ src/sys/dev/fss.c	Sat Oct 17 10:29:29 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: fss.c,v 1.64 2009/10/13 12:37:19 hannken Exp $	*/
+/*	$NetBSD: fss.c,v 1.65 2009/10/17 10:29:29 hannken Exp $	*/
 
 /*-
  * Copyright (c) 2003 The NetBSD Foundation, Inc.
@@ -36,7 +36,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: fss.c,v 1.64 2009/10/13 12:37:19 hannken Exp $);
+__KERNEL_RCSID(0, $NetBSD: fss.c,v 1.65 2009/10/17 10:29:29 hannken Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -705,14 +705,6 @@
 		sc-sc_bs_bmask = FSS_FSBSIZE(sc)-1;
 	}
 
-	/*
-	 * As all IO to from/to the backing store goes through
-	 * VOP_STRATEGY() clean the buffer cache to prevent
-	 * cache incoherencies.
-	 */
-	if ((error = vinvalbuf(sc-sc_bs_vp, V_SAVE, l-l_cred, l, 0, 0)) != 0)
-		return error;
-
 	return 0;
 }
 



CVS commit: src/sys/arch/amiga/stand/bootblock/boot

2009-10-17 Thread Michael van Elst
Module Name:src
Committed By:   mlelstv
Date:   Sat Oct 17 11:18:18 UTC 2009

Modified Files:
src/sys/arch/amiga/stand/bootblock/boot: Makefile console.c libstubs.h
libstubs.s

Log Message:
Add a serial console mode for the bootblock. In this mode all console
output will be echoed to the serial port and input will be accepted
from either keyboard or serial port. The bootblock serial console is
limited to 9600bps 8N1 as it uses the AmigaOS kernel debug routines.

To enable this you have to uncomment the SERCONSOLE define in
boot/Makefile.

Also note that the handling of a serial console in the kernel is
independent of this, you need to a build a kernel with 'options
SERCONSOLE'.


To generate a diff of this commit:
cvs rdiff -u -r1.39 -r1.40 src/sys/arch/amiga/stand/bootblock/boot/Makefile
cvs rdiff -u -r1.12 -r1.13 src/sys/arch/amiga/stand/bootblock/boot/console.c
cvs rdiff -u -r1.6 -r1.7 src/sys/arch/amiga/stand/bootblock/boot/libstubs.h
cvs rdiff -u -r1.9 -r1.10 src/sys/arch/amiga/stand/bootblock/boot/libstubs.s

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/stand/bootblock/boot/Makefile
diff -u src/sys/arch/amiga/stand/bootblock/boot/Makefile:1.39 src/sys/arch/amiga/stand/bootblock/boot/Makefile:1.40
--- src/sys/arch/amiga/stand/bootblock/boot/Makefile:1.39	Mon Jan 12 07:42:30 2009
+++ src/sys/arch/amiga/stand/bootblock/boot/Makefile	Sat Oct 17 11:18:17 2009
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.39 2009/01/12 07:42:30 tsutsui Exp $
+#	$NetBSD: Makefile,v 1.40 2009/10/17 11:18:17 mlelstv Exp $
 
 .include bsd.sys.mk		# for HOST_SH
 
@@ -51,6 +51,7 @@
 #XX#DEFS = -D_STANDALONE -DINSECURE -DDYNAMIC_CRC_TABLE -DNOBYFOUR -UBYFOUR 
 DEFS = -D_STANDALONE -DINSECURE 
 DEFS += -D__INTERNAL_LIBSA_CREAD
+#DEFS += -DSERCONSOLE
 SOBJS += cread.o
 
 #XX#SOBJS += adler32.o crc32.o inflate.o trees.o \

Index: src/sys/arch/amiga/stand/bootblock/boot/console.c
diff -u src/sys/arch/amiga/stand/bootblock/boot/console.c:1.12 src/sys/arch/amiga/stand/bootblock/boot/console.c:1.13
--- src/sys/arch/amiga/stand/bootblock/boot/console.c:1.12	Sun Oct 11 10:00:10 2009
+++ src/sys/arch/amiga/stand/bootblock/boot/console.c	Sat Oct 17 11:18:18 2009
@@ -1,4 +1,4 @@
-/* $NetBSD: console.c,v 1.12 2009/10/11 10:00:10 mlelstv Exp $ */
+/* $NetBSD: console.c,v 1.13 2009/10/17 11:18:18 mlelstv Exp $ */
 
 /*-
  * Copyright (c) 1996 The NetBSD Foundation, Inc.
@@ -115,6 +115,10 @@
 	if (OpenDevice(timer.device, 0, (struct AmigaIO*)mc-tmior, 0))
 		goto err;
 
+#ifdef SERCONSOLE
+	RawIOInit();
+#endif
+
 	ConsoleBase = mc;
 	return 0;
 
@@ -183,6 +187,11 @@
 	mc-cnior-length = 1;
 	mc-cnior-buf = buf;
 	mc-cnior-cmd = Cmd_Wr;
+
+#ifdef SERCONSOLE
+	RawPutChar((int32_t)c);
+#endif
+
 	(void)DoIO(mc-cnior);
 }
 
@@ -194,6 +203,12 @@
 	mc-cnior-length = -1;
 	mc-cnior-buf = s;
 	mc-cnior-cmd = Cmd_Wr;
+
+#ifdef SERCONSOLE
+	while (*s)
+		RawPutChar(*s++);
+#endif
+
 	(void)DoIO(mc-cnior);
 }
 
@@ -201,8 +216,12 @@
 getchar(void)
 {
 	struct AmigaIO *ior;
-	char c = -1;
+	char c = '\n';
 	struct Console *mc = ConsoleBase;
+	unsigned long ticks;
+#ifdef SERCONSOLE
+	int32_t r;
+#endif
 
 	mc-cnior-length = 1;
 	mc-cnior-buf = c;
@@ -210,22 +229,37 @@
 
 	SendIO(mc-cnior);
 
-	if (timelimit) {
+	ticks = 10 * timelimit;
+	do {
+		if (timelimit == 0)
+			ticks = 2;
+
 		mc-tmior-cmd = Cmd_Addtimereq;
-		mc-tmior-secs = timelimit;
-		mc-tmior-usec = 2; /* Paranoid */
+		mc-tmior-secs = 0;
+		mc-tmior-usec = 10;
 		SendIO((struct AmigaIO *)mc-tmior);
 
 		ior = WaitPort(mc-cnmp);
-		if (ior == mc-cnior)
+		if (ior == mc-cnior) {
 			AbortIO((struct AmigaIO *)mc-tmior);
-		else /* if (ior == mc-tmior) */ {
-			AbortIO(mc-cnior);
-			c = '\n';
+			ticks = 1;
+		} else /* if (ior == mc-tmior) */ {
+#ifdef SERCONSOLE
+			r = RawMayGetChar();
+			if (r != -1) {
+c = r;
+ticks = 1;
+			}
+#endif
+			if (ticks == 1)
+AbortIO((struct AmigaIO *)mc-cnior);
 		}
 		WaitIO((struct AmigaIO *)mc-tmior);
-		timelimit = 0;
-	}
+
+		--ticks;
+	} while (ticks != 0);
+	timelimit = 0;
+
 	(void)WaitIO(mc-cnior);
 	return c;
 }

Index: src/sys/arch/amiga/stand/bootblock/boot/libstubs.h
diff -u src/sys/arch/amiga/stand/bootblock/boot/libstubs.h:1.6 src/sys/arch/amiga/stand/bootblock/boot/libstubs.h:1.7
--- src/sys/arch/amiga/stand/bootblock/boot/libstubs.h:1.6	Mon Apr 28 20:23:13 2008
+++ src/sys/arch/amiga/stand/bootblock/boot/libstubs.h	Sat Oct 17 11:18:18 2009
@@ -1,4 +1,4 @@
-/* $NetBSD: libstubs.h,v 1.6 2008/04/28 20:23:13 martin Exp $ */
+/* $NetBSD: libstubs.h,v 1.7 2009/10/17 11:18:18 mlelstv Exp $ */
 
 /*-
  * Copyright (c) 1996 The NetBSD Foundation, Inc.
@@ -55,6 +55,10 @@
 void AbortIO(struct AmigaIO *);
 u_int8_t WaitIO(struct AmigaIO *);
 
+void RawIOInit(void);
+int32_t RawPutChar(int32_t c);
+int32_t RawMayGetChar(void);
+
 int OpenDevice(const char *, u_int32_t, struct AmigaIO *, u_int32_t);
 

CVS commit: src/distrib/sparc/miniroot

2009-10-17 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Sat Oct 17 12:45:20 UTC 2009

Modified Files:
src/distrib/sparc/miniroot: Makefile.inc

Log Message:
Build miniroot binaries for sparc with -Os to shrink instfs.tgz
for the second boot floppy which use miniroot objects.

This is workaround for PR install/42146, and ok'ed by m...@.


To generate a diff of this commit:
cvs rdiff -u -r1.15 -r1.16 src/distrib/sparc/miniroot/Makefile.inc

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

Modified files:

Index: src/distrib/sparc/miniroot/Makefile.inc
diff -u src/distrib/sparc/miniroot/Makefile.inc:1.15 src/distrib/sparc/miniroot/Makefile.inc:1.16
--- src/distrib/sparc/miniroot/Makefile.inc:1.15	Sun Sep 20 23:19:55 2009
+++ src/distrib/sparc/miniroot/Makefile.inc	Sat Oct 17 12:45:20 2009
@@ -1,6 +1,7 @@
-#	$NetBSD: Makefile.inc,v 1.15 2009/09/20 23:19:55 abs Exp $
+#	$NetBSD: Makefile.inc,v 1.16 2009/10/17 12:45:20 tsutsui Exp $
 
 IMAGESIZE=	8192k
+DBG=		-Os
 MAKEFS_FLAGS=   -o density=4k
 IMAGEENDIAN=	be
 MAKEDEVTARGETS=	all



CVS commit: src/usr.bin/script

2009-10-17 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Oct 17 19:05:55 UTC 2009

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

Log Message:
add more features found in other unices


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/usr.bin/script/script.1
cvs rdiff -u -r1.17 -r1.18 src/usr.bin/script/script.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/script/script.1
diff -u src/usr.bin/script/script.1:1.10 src/usr.bin/script/script.1:1.11
--- src/usr.bin/script/script.1:1.10	Thu Aug  7 07:15:48 2003
+++ src/usr.bin/script/script.1	Sat Oct 17 15:05:54 2009
@@ -1,4 +1,4 @@
-.\	$NetBSD: script.1,v 1.10 2003/08/07 11:15:48 agc Exp $
+.\	$NetBSD: script.1,v 1.11 2009/10/17 19:05:54 christos Exp $
 .\
 .\ Copyright (c) 1980, 1990, 1993
 .\	The Regents of the University of California.  All rights reserved.
@@ -29,7 +29,7 @@
 .\
 .\	@(#)script.1	8.1 (Berkeley) 6/6/93
 .\
-.Dd June 6, 1993
+.Dd October 17, 2009
 .Dt SCRIPT 1
 .Os
 .Sh NAME
@@ -37,7 +37,8 @@
 .Nd make typescript of terminal session
 .Sh SYNOPSIS
 .Nm
-.Op Fl adpr
+.Op Fl adfpqr
+.Op Fl c Ar command
 .Op Ar file
 .Sh DESCRIPTION
 .Nm
@@ -64,10 +65,21 @@
 or
 .Pa typescript ,
 retaining the prior contents.
+.It Fl c Ar command
+Run the named 
+.Ar command
+instead of the shell.
+Useful for capturing the output of a program that behaves differently when
+associated with a tty.
 .It Fl d
 Don't sleep between records when playing back a timestamped session.
+.It Fl f
+Flush output after each write. This is useful for watching the script
+output in real time.
 .It Fl p
 Play back a recorded session in real time.
+.It Fl q
+Be quiet, and don't output started and ended lines.
 .It Fl r
 Record a session with input, output, and timestamping.
 .El

Index: src/usr.bin/script/script.c
diff -u src/usr.bin/script/script.c:1.17 src/usr.bin/script/script.c:1.18
--- src/usr.bin/script/script.c:1.17	Mon Apr 13 03:15:32 2009
+++ src/usr.bin/script/script.c	Sat Oct 17 15:05:54 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: script.c,v 1.17 2009/04/13 07:15:32 lukem Exp $	*/
+/*	$NetBSD: script.c,v 1.18 2009/10/17 19:05:54 christos Exp $	*/
 
 /*
  * Copyright (c) 1980, 1992, 1993
@@ -39,7 +39,7 @@
 #if 0
 static char sccsid[] = @(#)script.c	8.1 (Berkeley) 6/6/93;
 #endif
-__RCSID($NetBSD: script.c,v 1.17 2009/04/13 07:15:32 lukem Exp $);
+__RCSID($NetBSD: script.c,v 1.18 2009/10/17 19:05:54 christos Exp $);
 #endif /* not lint */
 
 #include sys/types.h
@@ -78,13 +78,14 @@
 int	child, subchild;
 int	outcc;
 int	usesleep, rawout;
+int	quiet, flush;
 const char *fname;
 
 struct	termios tt;
 
 void	done(void);
 void	dooutput(void);
-void	doshell(void);
+void	doshell(const char *);
 void	fail(void);
 void	finish(int);
 int	main(int, char **);
@@ -101,28 +102,42 @@
 	struct winsize win;
 	int aflg, pflg, ch;
 	char ibuf[BUFSIZ];
+	const char *command;
 
 	aflg = 0;
 	pflg = 0;
 	usesleep = 1;
 	rawout = 0;
-	while ((ch = getopt(argc, argv, adpr)) != -1)
+	quiet = 0;
+	flush = 0;
+	command = NULL;
+	while ((ch = getopt(argc, argv, ac:dfpqr)) != -1)
 		switch(ch) {
 		case 'a':
 			aflg = 1;
 			break;
+		case 'c':
+			command = optarg;
+			break;
 		case 'd':
 			usesleep = 0;
 			break;
+		case 'f':
+			flush = 1;
+			break;
 		case 'p':
 			pflg = 1;
 			break;
+		case 'q':
+			quiet = 1;
+			break;
 		case 'r':
 			rawout = 1;
 			break;
 		case '?':
 		default:
-			(void)fprintf(stderr, usage: %s [-adpr] [file]\n,
+			(void)fprintf(stderr,
+			Usage: %s [-c command][-adfpqr] [file]\n,
 			getprogname());
 			exit(1);
 		}
@@ -145,7 +160,8 @@
 	if (openpty(master, slave, NULL, tt, win) == -1)
 		err(1, openpty);
 
-	(void)printf(Script started, output file is %s\n, fname);
+	if (!quiet)
+		(void)printf(Script started, output file is %s\n, fname);
 	rtt = tt;
 	cfmakeraw(rtt);
 	rtt.c_lflag = ~ECHO;
@@ -166,7 +182,7 @@
 		if (child)
 			dooutput();
 		else
-			doshell();
+			doshell(command);
 	}
 
 	if (!rawout)
@@ -196,7 +212,7 @@
 }
 
 void
-dooutput()
+dooutput(void)
 {
 	struct itimerval value;
 	int cc;
@@ -207,7 +223,7 @@
 	tvec = time(NULL);
 	if (rawout)
 		record(fscript, NULL, 0, 's');
-	else
+	else if (!quiet)
 		(void)fprintf(fscript, Script started on %s, ctime(tvec));
 
 	(void)signal(SIGALRM, scriptflush);
@@ -225,6 +241,8 @@
 		else
 			(void)fwrite(obuf, 1, cc, fscript);
 		outcc += cc;
+		if (flush)
+			(void)fflush(fscript);
 	}
 	done();
 }
@@ -239,19 +257,23 @@
 }
 
 void
-doshell()
+doshell(const char *command)
 {
 	const char *shell;
 
-	shell = getenv(SHELL);
-	if (shell == NULL)
-		shell = _PATH_BSHELL;
-
 	(void)close(master);
 	(void)fclose(fscript);
 	login_tty(slave);
-	execl(shell, shell, -i, NULL);
-	warn(execl %s, shell);
+	if (command == NULL) {
+		shell = getenv(SHELL);
+		if (shell == NULL)
+			shell = _PATH_BSHELL;
+		execl(shell, shell, -i, NULL);
+		command = shell;
+	} else
+		

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

2009-10-17 Thread Takeshi Nakayama
Module Name:src
Committed By:   nakayama
Date:   Sat Oct 17 20:03:06 UTC 2009

Modified Files:
src/sys/arch/sparc64/sparc64: locore.s

Log Message:
Wrap unused code with #if 0 which is called from #if 0'ed code.


To generate a diff of this commit:
cvs rdiff -u -r1.291 -r1.292 src/sys/arch/sparc64/sparc64/locore.s

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/locore.s
diff -u src/sys/arch/sparc64/sparc64/locore.s:1.291 src/sys/arch/sparc64/sparc64/locore.s:1.292
--- src/sys/arch/sparc64/sparc64/locore.s:1.291	Sat May 30 16:52:32 2009
+++ src/sys/arch/sparc64/sparc64/locore.s	Sat Oct 17 20:03:06 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: locore.s,v 1.291 2009/05/30 16:52:32 martin Exp $	*/
+/*	$NetBSD: locore.s,v 1.292 2009/10/17 20:03:06 nakayama Exp $	*/
 
 /*
  * Copyright (c) 1996-2002 Eduardo Horvath
@@ -1165,6 +1165,7 @@
 	UTRAP(0x1f0); UTRAP(0x1f1); UTRAP(0x1f2); UTRAP(0x1f3); UTRAP(0x1f4); UTRAP(0x1f5); UTRAP(0x1f6); UTRAP(0x1f7)
 	UTRAP(0x1f8); UTRAP(0x1f9); UTRAP(0x1fa); UTRAP(0x1fb); UTRAP(0x1fc); UTRAP(0x1fd); UTRAP(0x1fe); UTRAP(0x1ff)
 
+#if 0
 /*
  * If the cleanwin trap handler detects an overfow we come here.
  * We need to fix up the window registers, switch to the interrupt
@@ -1190,6 +1191,7 @@
 	.asciz	Kernel stack overflow!
 	_ALIGN
 	.text
+#endif
 
 #ifdef DEBUG
 #define CHKREG(r) \
@@ -4155,7 +4157,6 @@
 	bne,pn	CCCR, 1b
 	 EMPTY
 2:
-
 	add	%sp, CC64FSZ+STKB, %o2	! tf = %sp + CC64FSZ + STKB
 	LDPTR	[%l2 + IH_PEND], %l7	! save ih-ih_pending
 	membar	#LoadStore



CVS commit: src/sys/rump/net/lib/libsockin

2009-10-17 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Sat Oct 17 20:35:52 UTC 2009

Modified Files:
src/sys/rump/net/lib/libsockin: sockin.c

Log Message:
fix off-by-one in sanity check and bump lazy bum magic value


To generate a diff of this commit:
cvs rdiff -u -r1.17 -r1.18 src/sys/rump/net/lib/libsockin/sockin.c

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

Modified files:

Index: src/sys/rump/net/lib/libsockin/sockin.c
diff -u src/sys/rump/net/lib/libsockin/sockin.c:1.17 src/sys/rump/net/lib/libsockin/sockin.c:1.18
--- src/sys/rump/net/lib/libsockin/sockin.c:1.17	Fri Oct 16 23:17:46 2009
+++ src/sys/rump/net/lib/libsockin/sockin.c	Sat Oct 17 20:35:52 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: sockin.c,v 1.17 2009/10/16 23:17:46 pooka Exp $	*/
+/*	$NetBSD: sockin.c,v 1.18 2009/10/17 20:35:52 pooka Exp $	*/
 
 /*
  * Copyright (c) 2008, 2009 Antti Kantee.  All Rights Reserved.
@@ -26,7 +26,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: sockin.c,v 1.17 2009/10/16 23:17:46 pooka Exp $);
+__KERNEL_RCSID(0, $NetBSD: sockin.c,v 1.18 2009/10/17 20:35:52 pooka Exp $);
 
 #include sys/param.h
 #include sys/condvar.h
@@ -407,7 +407,7 @@
 	{
 		struct sockaddr *saddr;
 		struct msghdr mhdr;
-		struct iovec iov[16];
+		struct iovec iov[32];
 		struct mbuf *m2;
 		size_t tot;
 		int i, s;
@@ -416,7 +416,7 @@
 
 		tot = 0;
 		for (i = 0, m2 = m; m2; m2 = m2-m_next, i++) {
-			if (i  16)
+			if (i = 32)
 panic(lazy bum);
 			iov[i].iov_base = m2-m_data;
 			iov[i].iov_len = m2-m_len;



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

2009-10-17 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Oct 17 20:46:03 UTC 2009

Modified Files:
src/usr.sbin/sup/source: scan.c stree.c supcmain.c supcmeat.c
supcname.c supfilesrv.c supscan.c

Log Message:
change to strchr and strrchr


To generate a diff of this commit:
cvs rdiff -u -r1.26 -r1.27 src/usr.sbin/sup/source/scan.c
cvs rdiff -u -r1.13 -r1.14 src/usr.sbin/sup/source/stree.c
cvs rdiff -u -r1.29 -r1.30 src/usr.sbin/sup/source/supcmain.c
cvs rdiff -u -r1.36 -r1.37 src/usr.sbin/sup/source/supcmeat.c
cvs rdiff -u -r1.6 -r1.7 src/usr.sbin/sup/source/supcname.c
cvs rdiff -u -r1.42 -r1.43 src/usr.sbin/sup/source/supfilesrv.c
cvs rdiff -u -r1.17 -r1.18 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/scan.c
diff -u src/usr.sbin/sup/source/scan.c:1.26 src/usr.sbin/sup/source/scan.c:1.27
--- src/usr.sbin/sup/source/scan.c:1.26	Thu Dec 20 15:15:59 2007
+++ src/usr.sbin/sup/source/scan.c	Sat Oct 17 16:46:03 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: scan.c,v 1.26 2007/12/20 20:15:59 christos Exp $	*/
+/*	$NetBSD: scan.c,v 1.27 2009/10/17 20:46:03 christos Exp $	*/
 
 /*
  * Copyright (c) 1992 Carnegie Mellon University
@@ -297,10 +297,10 @@
 rewound = TRUE;
 continue;
 			}
-			q = index(p, '\n');
+			q = strchr(p, '\n');
 			if (q)
 *q = 0;
-			if (index(#;:, *p))
+			if (strchr(#;:, *p))
 continue;
 			q = nxtarg(p,  \t);
 			if (strcmp(q, release) != 0)
@@ -357,10 +357,10 @@
 	f = fopen(buf, r);
 	if (f != NULL) {
 		while ((p = fgets(buf, sizeof(buf), f)) != NULL) {
-			q = index(p, '\n');
+			q = strchr(p, '\n');
 			if (q)
 *q = 0;
-			if (index(#;:, *p))
+			if (strchr(#;:, *p))
 continue;
 			q = nxtarg(p,  \t);
 			(void) parserelease(tl, q, p);
@@ -481,9 +481,9 @@
 		goaway(Can't read list file %s, fname);
 	cdprefix(prefix);
 	while ((p = fgets(buf, sizeof(buf), f)) != NULL) {
-		if ((q = index(p, '\n')) != NULL)
+		if ((q = strchr(p, '\n')) != NULL)
 			*q = '\0';
-		if (index(#;:, *p))
+		if (strchr(#;:, *p))
 			continue;
 		q = nxtarg(p,  \t);
 		if (*q == '\0')
@@ -851,7 +851,7 @@
 		(void) fclose(f);
 		return (FALSE);
 	}
-	if ((q = index(p, '\n')) != NULL)
+	if ((q = strchr(p, '\n')) != NULL)
 		*q = '\0';
 	if (*p++ != 'V') {
 		(void) fclose(f);
@@ -869,7 +869,7 @@
 	}
 	notwanted = FALSE;
 	while ((p = fgets(buf, sizeof(buf), f)) != NULL) {
-		q = index(p, '\n');
+		q = strchr(p, '\n');
 		if (q)
 			*q = 0;
 		ts.Tflags = 0;
@@ -890,17 +890,17 @@
 			p++;
 			ts.Tflags |= FNOACCT;
 		}
-		if ((q = index(p, ' ')) == NULL)
+		if ((q = strchr(p, ' ')) == NULL)
 			goaway(scanfile format inconsistent);
 		*q++ = '\0';
 		ts.Tmode = atoo(p);
 		p = q;
-		if ((q = index(p, ' ')) == NULL)
+		if ((q = strchr(p, ' ')) == NULL)
 			goaway(scanfile format inconsistent);
 		*q++ = '\0';
 		ts.Tctime = atoi(p);
 		p = q;
-		if ((q = index(p, ' ')) == NULL)
+		if ((q = strchr(p, ' ')) == NULL)
 			goaway(scanfile format inconsistent);
 		*q++ = 0;
 		ts.Tmtime = atoi(p);

Index: src/usr.sbin/sup/source/stree.c
diff -u src/usr.sbin/sup/source/stree.c:1.13 src/usr.sbin/sup/source/stree.c:1.14
--- src/usr.sbin/sup/source/stree.c:1.13	Fri Oct 16 08:41:37 2009
+++ src/usr.sbin/sup/source/stree.c	Sat Oct 17 16:46:03 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: stree.c,v 1.13 2009/10/16 12:41:37 christos Exp $	*/
+/*	$NetBSD: stree.c,v 1.14 2009/10/17 20:46:03 christos Exp $	*/
 
 /*
  * Copyright (c) 1992 Carnegie Mellon University
@@ -280,7 +280,7 @@
 		return (x);
 	(void) strncpy(buf, p, sizeof(buf) - 1);
 	buf[MAXPATHLEN] = '\0';
-	while ((q = rindex(buf, '/')) != NULL) {
+	while ((q = strrchr(buf, '/')) != NULL) {
 		while (q = buf  *(q - 1) == '/')
 			q--;
 		if (q == buf)

Index: src/usr.sbin/sup/source/supcmain.c
diff -u src/usr.sbin/sup/source/supcmain.c:1.29 src/usr.sbin/sup/source/supcmain.c:1.30
--- src/usr.sbin/sup/source/supcmain.c:1.29	Fri Oct 16 18:45:18 2009
+++ src/usr.sbin/sup/source/supcmain.c	Sat Oct 17 16:46:03 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: supcmain.c,v 1.29 2009/10/16 22:45:18 christos Exp $	*/
+/*	$NetBSD: supcmain.c,v 1.30 2009/10/17 20:46:03 christos Exp $	*/
 
 /*
  * Copyright (c) 1992 Carnegie Mellon University
@@ -671,7 +671,7 @@
 	lastC = NULL;
 	bogus = FALSE;
 	while ((p = read_line(f, NULL, NULL, NULL, 0)) != NULL) {
-		if (index(#;:, *p))
+		if (strchr(#;:, *p))
 			continue;
 		arg = nxtarg(p,  \t);
 		if (*arg == '\0') {

Index: src/usr.sbin/sup/source/supcmeat.c
diff -u src/usr.sbin/sup/source/supcmeat.c:1.36 src/usr.sbin/sup/source/supcmeat.c:1.37
--- src/usr.sbin/sup/source/supcmeat.c:1.36	Fri Oct 16 18:45:18 2009
+++ src/usr.sbin/sup/source/supcmeat.c	Sat Oct 17 16:46:03 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: supcmeat.c,v 1.36 2009/10/16 22:45:18 christos Exp $	*/
+/*	$NetBSD: supcmeat.c,v 1.37 2009/10/17 20:46:03 christos Exp $	*/
 
 /*
  * Copyright (c) 1992 Carnegie Mellon 

CVS commit: src/sys/fs/tmpfs

2009-10-17 Thread Nicolas Joly
Module Name:src
Committed By:   njoly
Date:   Sat Oct 17 22:20:56 UTC 2009

Modified Files:
src/sys/fs/tmpfs: tmpfs_vnops.c

Log Message:
Make tmpfs write fail when process file size limit is reached.


To generate a diff of this commit:
cvs rdiff -u -r1.63 -r1.64 src/sys/fs/tmpfs/tmpfs_vnops.c

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

Modified files:

Index: src/sys/fs/tmpfs/tmpfs_vnops.c
diff -u src/sys/fs/tmpfs/tmpfs_vnops.c:1.63 src/sys/fs/tmpfs/tmpfs_vnops.c:1.64
--- src/sys/fs/tmpfs/tmpfs_vnops.c:1.63	Tue Oct  6 00:17:24 2009
+++ src/sys/fs/tmpfs/tmpfs_vnops.c	Sat Oct 17 22:20:56 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: tmpfs_vnops.c,v 1.63 2009/10/06 00:17:24 rmind Exp $	*/
+/*	$NetBSD: tmpfs_vnops.c,v 1.64 2009/10/17 22:20:56 njoly Exp $	*/
 
 /*
  * Copyright (c) 2005, 2006, 2007 The NetBSD Foundation, Inc.
@@ -35,7 +35,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: tmpfs_vnops.c,v 1.63 2009/10/06 00:17:24 rmind Exp $);
+__KERNEL_RCSID(0, $NetBSD: tmpfs_vnops.c,v 1.64 2009/10/17 22:20:56 njoly Exp $);
 
 #include sys/param.h
 #include sys/dirent.h
@@ -594,6 +594,7 @@
 	bool extended;
 	int error;
 	off_t oldsize;
+	struct proc *p = curproc;
 	struct tmpfs_node *node;
 	struct uvm_object *uobj;
 
@@ -612,6 +613,15 @@
 		goto out;
 	}
 
+	if (((uio-uio_offset + uio-uio_resid) 
+	p-p_rlimit[RLIMIT_FSIZE].rlim_cur)) {
+		mutex_enter(proc_lock);
+		psignal(p, SIGXFSZ);
+		mutex_exit(proc_lock);
+		error = EFBIG;
+		goto out;
+	}
+
 	if (ioflag  IO_APPEND)
 		uio-uio_offset = node-tn_size;
 



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

2009-10-17 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Oct 17 22:26:13 UTC 2009

Modified Files:
src/usr.sbin/sup/source: expand.c ffilecopy.c filecopy.c netcryptvoid.c
scm.c scmio.c stree.c supextern.h supmsg.c

Log Message:
pass lint


To generate a diff of this commit:
cvs rdiff -u -r1.17 -r1.18 src/usr.sbin/sup/source/expand.c \
src/usr.sbin/sup/source/scmio.c
cvs rdiff -u -r1.9 -r1.10 src/usr.sbin/sup/source/ffilecopy.c \
src/usr.sbin/sup/source/netcryptvoid.c
cvs rdiff -u -r1.4 -r1.5 src/usr.sbin/sup/source/filecopy.c
cvs rdiff -u -r1.27 -r1.28 src/usr.sbin/sup/source/scm.c
cvs rdiff -u -r1.14 -r1.15 src/usr.sbin/sup/source/stree.c
cvs rdiff -u -r1.21 -r1.22 src/usr.sbin/sup/source/supextern.h
cvs rdiff -u -r1.16 -r1.17 src/usr.sbin/sup/source/supmsg.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/expand.c
diff -u src/usr.sbin/sup/source/expand.c:1.17 src/usr.sbin/sup/source/expand.c:1.18
--- src/usr.sbin/sup/source/expand.c:1.17	Tue Oct 13 08:11:19 2009
+++ src/usr.sbin/sup/source/expand.c	Sat Oct 17 18:26:13 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: expand.c,v 1.17 2009/10/13 12:11:19 christos Exp $	*/
+/*	$NetBSD: expand.c,v 1.18 2009/10/17 22:26:13 christos Exp $	*/
 
 /*
  * Copyright (c) 1991 Carnegie Mellon University
@@ -97,7 +97,7 @@
 static int amatch(char *, char *);
 static void addone(char *, const char *);
 static int addpath(char);
-static int gethdir(char *, int);
+static int gethdir(char *, size_t);
 
 int 
 expand(char *spec, char **buffer, int bufsize)
@@ -392,7 +392,7 @@
 }
 
 static int 
-gethdir(char *home, int homelen)
+gethdir(char *home, size_t homelen)
 {
 	struct passwd *pp = getpwnam(home);
 
Index: src/usr.sbin/sup/source/scmio.c
diff -u src/usr.sbin/sup/source/scmio.c:1.17 src/usr.sbin/sup/source/scmio.c:1.18
--- src/usr.sbin/sup/source/scmio.c:1.17	Fri Oct 16 08:41:37 2009
+++ src/usr.sbin/sup/source/scmio.c	Sat Oct 17 18:26:13 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: scmio.c,v 1.17 2009/10/16 12:41:37 christos Exp $	*/
+/*	$NetBSD: scmio.c,v 1.18 2009/10/17 22:26:13 christos Exp $	*/
 
 /*
  * Copyright (c) 1992 Carnegie Mellon University
@@ -157,6 +157,7 @@
 
 #include libc.h
 #include errno.h
+#include stdbool.h
 #include sys/types.h
 #include sys/stat.h
 #include sys/file.h
@@ -201,9 +202,9 @@
 }   buffers[2];
 struct buf *gblbufptr;		/* buffer pointer */
 
-static int writedata(int, char *);
-static int writeblock(int, char *);
-static int readdata(int, char *);
+static int writedata(size_t, void *);
+static int writeblock(size_t, void *);
+static int readdata(size_t, void *, bool);
 static int readcount(int *);
 
 
@@ -212,7 +213,7 @@
  ***/
 
 static int
-writedata(int count, char *data)
+writedata(size_t count, void *data)
 {/* write raw data to network */
 	int x, tries;
 	struct buf *bp;
@@ -260,12 +261,12 @@
 }
 
 static int
-writeblock(int count, char *data)
+writeblock(size_t count, void *data)
 {/* write data block */
 	int x;
-	int y = byteswap(count);
+	int y = byteswap((int)count);
 
-	x = writedata(sizeof(int), (char *) y);
+	x = writedata(sizeof(int), y);
 	if (x == SCMOK)
 		x = writedata(count, data);
 	return (x);
@@ -284,18 +285,18 @@
 	gblbufptr-b_ptr = gblbufptr-b_data;
 	gblbufptr-b_cnt = 0;
 	x = byteswap(msg);
-	return (writedata(sizeof(int), (char *) x));
+	return (writedata(sizeof(int), x));
 }
 
 int
 writemend(void)
 {/* write end of message */
-	int count;
+	size_t count;
 	char *data;
 	int x;
 
 	x = byteswap(ENDCOUNT);
-	x = writedata(sizeof(int), (char *) x);
+	x = writedata(sizeof(int), x);
 	if (x != SCMOK)
 		return (x);
 	if (gblbufptr == NULL)
@@ -317,18 +318,19 @@
 	if (scmdebug  2)
 		loginfo(SCM Writing integer %d, i);
 	x = byteswap(i);
-	return (writeblock(sizeof(int), (char *) x));
+	return (writeblock(sizeof(int), x));
 }
 
 int
 writestring(char *p)
 {/* write string as data block */
-	int len, x;
+	int len;
+	int x;
 	if (p == NULL) {
 		int y = byteswap(NULLCOUNT);
 		if (scmdebug  2)
 			loginfo(SCM Writing string NULL);
-		return (writedata(sizeof(int), (char *) y));
+		return (writedata(sizeof(int), y));
 	}
 	if (scmdebug  2)
 		loginfo(SCM Writing string %s, p);
@@ -340,7 +342,7 @@
 		encode(p, cryptbuf, len);
 		p = cryptbuf;
 	}
-	return (writeblock(len, p));
+	return (writeblock((size_t)len, p));
 }
 
 int
@@ -353,9 +355,9 @@
 
 	if (fstat(f, statbuf)  0)
 		return (scmerr(errno, Can't access open file for message));
-	filesize = statbuf.st_size;
+	filesize = (int)statbuf.st_size;
 	y = byteswap(filesize);
-	x = writedata(sizeof(int), (char *) y);
+	x = writedata(sizeof(int), y);
 
 	if (cryptflag)
 		x = getcryptbuf(FILEXFER);
@@ -367,9 +369,9 @@
 			if (number  0) {
 if (cryptflag) {
 	encode(buf, cryptbuf, number);
-	x = writedata(number, cryptbuf);
+	x = writedata((size_t)number, cryptbuf);
 

CVS commit: src/usr.bin/script

2009-10-17 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Sat Oct 17 22:28:33 UTC 2009

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

Log Message:
New sentence, new line. Remove trailing whitespace.


To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.12 src/usr.bin/script/script.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/script/script.1
diff -u src/usr.bin/script/script.1:1.11 src/usr.bin/script/script.1:1.12
--- src/usr.bin/script/script.1:1.11	Sat Oct 17 19:05:54 2009
+++ src/usr.bin/script/script.1	Sat Oct 17 22:28:33 2009
@@ -1,4 +1,4 @@
-.\	$NetBSD: script.1,v 1.11 2009/10/17 19:05:54 christos Exp $
+.\	$NetBSD: script.1,v 1.12 2009/10/17 22:28:33 wiz Exp $
 .\
 .\ Copyright (c) 1980, 1990, 1993
 .\	The Regents of the University of California.  All rights reserved.
@@ -66,7 +66,7 @@
 .Pa typescript ,
 retaining the prior contents.
 .It Fl c Ar command
-Run the named 
+Run the named
 .Ar command
 instead of the shell.
 Useful for capturing the output of a program that behaves differently when
@@ -74,8 +74,8 @@
 .It Fl d
 Don't sleep between records when playing back a timestamped session.
 .It Fl f
-Flush output after each write. This is useful for watching the script
-output in real time.
+Flush output after each write.
+This is useful for watching the script output in real time.
 .It Fl p
 Play back a recorded session in real time.
 .It Fl q
@@ -116,10 +116,12 @@
 .Ev SHELL
 exists, the shell forked by
 .Nm
-will be that shell. If
+will be that shell.
+If
 .Ev SHELL
 is not set, the Bourne shell
-is assumed. (Most shells set this variable automatically).
+is assumed.
+(Most shells set this variable automatically).
 .El
 .Sh SEE ALSO
 .Xr csh 1



CVS commit: src/distrib/notes

2009-10-17 Thread Soren Jacobsen
Module Name:src
Committed By:   snj
Date:   Sat Oct 17 22:33:55 UTC 2009

Modified Files:
src/distrib/notes/common: legal.common
src/distrib/notes/evbarm: legal

Log Message:
Move Microsoft out of legal.common and into evbarm, where it belongs.
I forgot to do this when I added it in 1.52.


To generate a diff of this commit:
cvs rdiff -u -r1.52 -r1.53 src/distrib/notes/common/legal.common
cvs rdiff -u -r1.2 -r1.3 src/distrib/notes/evbarm/legal

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

Modified files:

Index: src/distrib/notes/common/legal.common
diff -u src/distrib/notes/common/legal.common:1.52 src/distrib/notes/common/legal.common:1.53
--- src/distrib/notes/common/legal.common:1.52	Sat Apr 25 09:10:55 2009
+++ src/distrib/notes/common/legal.common	Sat Oct 17 22:33:55 2009
@@ -1,4 +1,4 @@
-.\	$NetBSD: legal.common,v 1.52 2009/04/25 09:10:55 snj Exp $
+.\	$NetBSD: legal.common,v 1.53 2009/10/17 22:33:55 snj Exp $
 .\
 .\ Copyright (c) 1999-2004 The NetBSD Foundation, Inc.
 .\ All rights reserved.
@@ -67,8 +67,6 @@
 This product contains software written by Michael L. Hitch for
 the NetBSD project.
 .It
-This product includes software developed by Microsoft.
-.It
 This product includes cryptographic software written by
 Eric Young (e...@cryptsoft.com)
 .It

Index: src/distrib/notes/evbarm/legal
diff -u src/distrib/notes/evbarm/legal:1.2 src/distrib/notes/evbarm/legal:1.3
--- src/distrib/notes/evbarm/legal:1.2	Mon May 20 23:48:45 2002
+++ src/distrib/notes/evbarm/legal	Sat Oct 17 22:33:55 2009
@@ -1,8 +1,10 @@
-.\	$NetBSD: legal,v 1.2 2002/05/20 23:48:45 itojun Exp $
+.\	$NetBSD: legal,v 1.3 2009/10/17 22:33:55 snj Exp $
 .
 .It
 This product includes software developed by Advanced Risc Machines Ltd.
 .It
+This product includes software developed by Microsoft.
+.It
 This product includes software developed by Neil Carson.
 .It
 This product includes software developed by the RiscBSD kernel team.



CVS commit: src/usr.bin/script

2009-10-17 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Oct 17 22:36:23 UTC 2009

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

Log Message:
use system to parse args


To generate a diff of this commit:
cvs rdiff -u -r1.18 -r1.19 src/usr.bin/script/script.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/script/script.c
diff -u src/usr.bin/script/script.c:1.18 src/usr.bin/script/script.c:1.19
--- src/usr.bin/script/script.c:1.18	Sat Oct 17 15:05:54 2009
+++ src/usr.bin/script/script.c	Sat Oct 17 18:36:23 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: script.c,v 1.18 2009/10/17 19:05:54 christos Exp $	*/
+/*	$NetBSD: script.c,v 1.19 2009/10/17 22:36:23 christos Exp $	*/
 
 /*
  * Copyright (c) 1980, 1992, 1993
@@ -39,7 +39,7 @@
 #if 0
 static char sccsid[] = @(#)script.c	8.1 (Berkeley) 6/6/93;
 #endif
-__RCSID($NetBSD: script.c,v 1.18 2009/10/17 19:05:54 christos Exp $);
+__RCSID($NetBSD: script.c,v 1.19 2009/10/17 22:36:23 christos Exp $);
 #endif /* not lint */
 
 #include sys/types.h
@@ -269,11 +269,12 @@
 		if (shell == NULL)
 			shell = _PATH_BSHELL;
 		execl(shell, shell, -i, NULL);
-		command = shell;
-	} else
-		execlp(command, command, NULL);
+		warn(execl `%s', shell);
+	} else {
+		if (system(command) == -1)
+			warn(system `%s', command);
+	}
 
-	warn(execl %s, command);
 	fail();
 }
 



CVS commit: src/dist/file

2009-10-17 Thread Soren Jacobsen
Module Name:src
Committed By:   snj
Date:   Sat Oct 17 23:05:40 UTC 2009

Removed Files:
src/dist/file: AUTHORS COPYING ChangeLog INSTALL MAINT Makefile.am
Makefile.in NEWS README TODO acinclude.m4 aclocal.m4 compile
config.guess config.h.in config.sub configure configure.ac depcomp
file2netbsd install-sh ltmain.sh missing
src/dist/file/doc: Makefile.am Makefile.in file.1 file.man libmagic.3
libmagic.man magic.5 magic.man
src/dist/file/magic: Header Localstuff Makefile.am Makefile.in
src/dist/file/magic/magdir: acorn adi adventure allegro alliant alpha
amanda amigaos animation apl apple applix archive asterix att3b
audio basis bflt blender blit bout bsdi btsnoop c-lang c64 cad
cafebabe cddb chord cisco citrus clarion claris clipper commands
communications compress console convex cracklib ctags dact database
diamond diff digital dolby dump dyadic editors efi elf encore epoc
erlang esri fcs filesystems flash fonts fortran frame freebsd fsav
games gcc geos gimp gnome-keyring gnu gnumeric grace graphviz
gringotts hitachi-sh hp human68k ibm370 ibm6000 iff images inform
intel interleaf island ispell java jpeg karma kde lecter lex lif
linux lisp llvm lua luks mach macintosh magic mail.news maple
mathcad mathematica matroska mcrypt mercurial mime mips mirage
misctools mkid mlssa mmdf modem motorola mozilla msdos msvc mup
natinst ncr netbsd netscape netware news nitpicker ocaml octave
ole2compounddocs olf os2 os400 os9 osf1 palm parix pbm pdf pdp perl
pgp pkgadd plan9 plus5 printer project psdbms psion pulsar pyramid
python revision riff rpm rtf ruby sc sccs scientific securitycerts
sendmail sequent sgi sgml sharc sinclair sketch smalltalk sniffer
softquad spec spectrum sql sun sysex teapot terminfo tex tgif ti-8x
timezone troff tuxedo typeset unicode unknown uuencode varied.out
varied.script vax vicar virtutech visx vms vmware vorbis vxl warc
weak windows wordprocessors xdelta xenix xilinx xo65 xwindows zilog
zyxel
src/dist/file/python: Makefile.am Makefile.in README example.py
py_magic.c py_magic.h setup.py
src/dist/file/src: Makefile.am Makefile.in apprentice.c apptype.c
ascmagic.c asprintf.c compress.c elfclass.h file.c file.h
file_opts.h fsmagic.c funcs.c getopt_long.c is_tar.c magic.c
magic.h mygetopt.h names.h patchlevel.h print.c readelf.c readelf.h
softmagic.c tar.h vasprintf.c
src/dist/file/tests: Makefile.am Makefile.in README gedcom.magic
gedcom.result gedcom.testfile test.c

Log Message:
This hasn't been used in a while.  Long live external/bsd/file!


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.1 -r0 src/dist/file/AUTHORS src/dist/file/COPYING \
src/dist/file/INSTALL src/dist/file/NEWS src/dist/file/TODO \
src/dist/file/compile
cvs rdiff -u -r1.1.1.13 -r0 src/dist/file/ChangeLog
cvs rdiff -u -r1.6 -r0 src/dist/file/MAINT src/dist/file/config.guess \
src/dist/file/config.sub src/dist/file/install-sh src/dist/file/ltmain.sh
cvs rdiff -u -r1.3 -r0 src/dist/file/Makefile.am
cvs rdiff -u -r1.16 -r0 src/dist/file/Makefile.in
cvs rdiff -u -r1.7 -r0 src/dist/file/README
cvs rdiff -u -r1.1.1.3 -r0 src/dist/file/acinclude.m4
cvs rdiff -u -r1.13 -r0 src/dist/file/aclocal.m4
cvs rdiff -u -r1.17 -r0 src/dist/file/config.h.in
cvs rdiff -u -r1.21 -r0 src/dist/file/configure
cvs rdiff -u -r1.2 -r0 src/dist/file/configure.ac
cvs rdiff -u -r1.5 -r0 src/dist/file/depcomp src/dist/file/missing
cvs rdiff -u -r1.20 -r0 src/dist/file/file2netbsd
cvs rdiff -u -r1.1.1.1 -r0 src/dist/file/doc/Makefile.am \
src/dist/file/doc/file.man src/dist/file/doc/libmagic.man \
src/dist/file/doc/magic.man
cvs rdiff -u -r1.13 -r0 src/dist/file/doc/Makefile.in
cvs rdiff -u -r1.18 -r0 src/dist/file/doc/file.1
cvs rdiff -u -r1.10 -r0 src/dist/file/doc/libmagic.3
cvs rdiff -u -r1.16 -r0 src/dist/file/doc/magic.5
cvs rdiff -u -r1.1.1.1 -r0 src/dist/file/magic/Header
cvs rdiff -u -r1.1.1.2 -r0 src/dist/file/magic/Localstuff
cvs rdiff -u -r1.2 -r0 src/dist/file/magic/Makefile.am
cvs rdiff -u -r1.16 -r0 src/dist/file/magic/Makefile.in
cvs rdiff -u -r1.1.1.2 -r0 src/dist/file/magic/magdir/acorn \
src/dist/file/magic/magdir/blender src/dist/file/magic/magdir/bout \
src/dist/file/magic/magdir/cafebabe src/dist/file/magic/magdir/cddb \
src/dist/file/magic/magdir/claris \
src/dist/file/magic/magdir/communications \
src/dist/file/magic/magdir/digital src/dist/file/magic/magdir/editors \
src/dist/file/magic/magdir/frame src/dist/file/magic/magdir/freebsd \
src/dist/file/magic/magdir/gimp src/dist/file/magic/magdir/hp \

CVS commit: src/sys/fs/puffs

2009-10-17 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Sat Oct 17 23:16:05 UTC 2009

Modified Files:
src/sys/fs/puffs: puffs_msgif.h puffs_vnops.c

Log Message:
Transmit VOP_ABORTOP() to the server.


To generate a diff of this commit:
cvs rdiff -u -r1.66 -r1.67 src/sys/fs/puffs/puffs_msgif.h
cvs rdiff -u -r1.135 -r1.136 src/sys/fs/puffs/puffs_vnops.c

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

Modified files:

Index: src/sys/fs/puffs/puffs_msgif.h
diff -u src/sys/fs/puffs/puffs_msgif.h:1.66 src/sys/fs/puffs/puffs_msgif.h:1.67
--- src/sys/fs/puffs/puffs_msgif.h:1.66	Mon Jan 12 18:48:35 2009
+++ src/sys/fs/puffs/puffs_msgif.h	Sat Oct 17 23:16:05 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: puffs_msgif.h,v 1.66 2009/01/12 18:48:35 pooka Exp $	*/
+/*	$NetBSD: puffs_msgif.h,v 1.67 2009/10/17 23:16:05 pooka Exp $	*/
 
 /*
  * Copyright (c) 2005, 2006, 2007  Antti Kantee.  All Rights Reserved.
@@ -102,7 +102,7 @@
 #define PUFFS_ERR_MAX PUFFS_ERR_VPTOFH
 
 #define PUFFSDEVELVERS	0x8000
-#define PUFFSVERSION	27
+#define PUFFSVERSION	28
 #define PUFFSNAMESIZE	32
 
 #define PUFFS_TYPEPREFIX puffs|
@@ -563,6 +563,13 @@
 	struct puffs_kcred	pvnr_cred;		/* OUT	*/
 };
 
+struct puffs_vnmsg_abortop {
+	struct puffs_req	pvn_pr;
+
+	struct puffs_kcn	pvnr_cn;		/* OUT	*/
+	struct puffs_kcred	pvnr_cn_cred;		/* OUT	*/
+};
+
 
 /*
  * For cache reports.  Everything is always out-out-out, no replies

Index: src/sys/fs/puffs/puffs_vnops.c
diff -u src/sys/fs/puffs/puffs_vnops.c:1.135 src/sys/fs/puffs/puffs_vnops.c:1.136
--- src/sys/fs/puffs/puffs_vnops.c:1.135	Wed Sep 30 18:22:29 2009
+++ src/sys/fs/puffs/puffs_vnops.c	Sat Oct 17 23:16:05 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: puffs_vnops.c,v 1.135 2009/09/30 18:22:29 pooka Exp $	*/
+/*	$NetBSD: puffs_vnops.c,v 1.136 2009/10/17 23:16:05 pooka Exp $	*/
 
 /*
  * Copyright (c) 2005, 2006, 2007  Antti Kantee.  All Rights Reserved.
@@ -30,7 +30,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: puffs_vnops.c,v 1.135 2009/09/30 18:22:29 pooka Exp $);
+__KERNEL_RCSID(0, $NetBSD: puffs_vnops.c,v 1.136 2009/10/17 23:16:05 pooka Exp $);
 
 #include sys/param.h
 #include sys/buf.h
@@ -82,6 +82,7 @@
 int	puffs_vnop_bmap(void *);
 int	puffs_vnop_mmap(void *);
 int	puffs_vnop_getpages(void *);
+int	puffs_vnop_abortop(void *);
 
 int	puffs_vnop_spec_read(void *);
 int	puffs_vnop_spec_write(void *);
@@ -130,7 +131,7 @@
 { vop_advlock_desc, puffs_vnop_checkop },	/* advlock */
 { vop_strategy_desc, puffs_vnop_strategy },	/* REAL strategy */
 { vop_revoke_desc, genfs_revoke },		/* REAL revoke */
-{ vop_abortop_desc, genfs_abortop },		/* REAL abortop */
+{ vop_abortop_desc, puffs_vnop_abortop },	/* REAL abortop */
 { vop_inactive_desc, puffs_vnop_inactive },	/* REAL inactive */
 { vop_reclaim_desc, puffs_vnop_reclaim },	/* REAL reclaim */
 { vop_lock_desc, puffs_vnop_lock },		/* REAL lock */
@@ -2106,6 +2107,33 @@
 	return error;
 }
 
+int
+puffs_vnop_abortop(void *v)
+{
+	struct vop_abortop_args /* {
+		struct vnode *a_dvp;
+		struct componentname *a_cnp;
+	}; */ *ap = v;
+	PUFFS_MSG_VARS(vn, abortop);
+	struct vnode *dvp = ap-a_dvp;
+	struct puffs_mount *pmp = MPTOPUFFSMP(dvp-v_mount);
+	struct componentname *cnp = ap-a_cnp;
+	int error;
+
+	if (EXISTSOP(pmp, ABORTOP)) {
+		PUFFS_MSG_ALLOC(vn, abortop);
+		puffs_makecn(abortop_msg-pvnr_cn, abortop_msg-pvnr_cn_cred,
+		cnp, PUFFS_USE_FULLPNBUF(pmp));
+		puffs_msg_setinfo(park_abortop, PUFFSOP_VN,
+		PUFFS_VN_ABORTOP, VPTOPNC(dvp));
+
+		PUFFS_MSG_ENQUEUEWAIT(pmp, park_abortop, error);
+		PUFFS_MSG_RELEASE(abortop);
+	}
+
+	return genfs_abortop(v);
+}
+
 #define BIOASYNC(bp) (bp-b_flags  B_ASYNC)
 
 /*



CVS commit: src/lib/libpuffs

2009-10-17 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Sat Oct 17 23:19:52 UTC 2009

Modified Files:
src/lib/libpuffs: dispatcher.c puffs.c puffs.h

Log Message:
Dispatch puffs_node_abortop().

Note: We use the storage of puffs_cache_write from puffs_ops for
this purpose.  It's not issued by the kernel and hence currently
unused, and this saves us from the trouble of bumping the lib major
version.


To generate a diff of this commit:
cvs rdiff -u -r1.32 -r1.33 src/lib/libpuffs/dispatcher.c
cvs rdiff -u -r1.98 -r1.99 src/lib/libpuffs/puffs.c
cvs rdiff -u -r1.110 -r1.111 src/lib/libpuffs/puffs.h

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

Modified files:

Index: src/lib/libpuffs/dispatcher.c
diff -u src/lib/libpuffs/dispatcher.c:1.32 src/lib/libpuffs/dispatcher.c:1.33
--- src/lib/libpuffs/dispatcher.c:1.32	Tue Aug 12 19:44:39 2008
+++ src/lib/libpuffs/dispatcher.c	Sat Oct 17 23:19:52 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: dispatcher.c,v 1.32 2008/08/12 19:44:39 pooka Exp $	*/
+/*	$NetBSD: dispatcher.c,v 1.33 2009/10/17 23:19:52 pooka Exp $	*/
 
 /*
  * Copyright (c) 2006, 2007, 2008 Antti Kantee.  All Rights Reserved.
@@ -31,7 +31,7 @@
 
 #include sys/cdefs.h
 #if !defined(lint)
-__RCSID($NetBSD: dispatcher.c,v 1.32 2008/08/12 19:44:39 pooka Exp $);
+__RCSID($NetBSD: dispatcher.c,v 1.33 2009/10/17 23:19:52 pooka Exp $);
 #endif /* !lint */
 
 #include sys/types.h
@@ -828,6 +828,24 @@
 			break;
 		}
 
+		case PUFFS_VN_ABORTOP:
+		{
+			struct puffs_vnmsg_abortop *auxt = auxbuf;
+			struct puffs_cn pcn;
+
+			if (pops-puffs_node_abortop == NULL) {
+error = 0;
+break;
+			}
+
+			pcn.pcn_pkcnp = auxt-pvnr_cn;
+			PUFFS_KCREDTOCRED(pcn.pcn_cred, auxt-pvnr_cn_cred);
+
+			error = pops-puffs_node_abortop(pu, opcookie, pcn);
+
+			break;
+		}
+
 		case PUFFS_VN_READ:
 		{
 			struct puffs_vnmsg_read *auxt = auxbuf;
@@ -896,6 +914,8 @@
 			break;
 		}
 
+#if 0
+	/* not issued by kernel currently */
 	} else if (PUFFSOP_OPCLASS(preq-preq_opclass) == PUFFSOP_CACHE) {
 		struct puffs_cacheinfo *pci = (void *)preq;
 
@@ -904,6 +924,7 @@
 			pci-pcache_nruns, pci-pcache_runs);
 		}
 		error = 0;
+#endif
 
 	} else if (PUFFSOP_OPCLASS(preq-preq_opclass) == PUFFSOP_ERROR) {
 		struct puffs_error *perr = (void *)preq;

Index: src/lib/libpuffs/puffs.c
diff -u src/lib/libpuffs/puffs.c:1.98 src/lib/libpuffs/puffs.c:1.99
--- src/lib/libpuffs/puffs.c:1.98	Thu Jan  8 02:28:08 2009
+++ src/lib/libpuffs/puffs.c	Sat Oct 17 23:19:52 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: puffs.c,v 1.98 2009/01/08 02:28:08 lukem Exp $	*/
+/*	$NetBSD: puffs.c,v 1.99 2009/10/17 23:19:52 pooka Exp $	*/
 
 /*
  * Copyright (c) 2005, 2006, 2007  Antti Kantee.  All Rights Reserved.
@@ -31,7 +31,7 @@
 
 #include sys/cdefs.h
 #if !defined(lint)
-__RCSID($NetBSD: puffs.c,v 1.98 2009/01/08 02:28:08 lukem Exp $);
+__RCSID($NetBSD: puffs.c,v 1.99 2009/10/17 23:19:52 pooka Exp $);
 #endif /* !lint */
 
 #include sys/param.h
@@ -99,6 +99,7 @@
 	FILLOP(print,PRINT);
 	FILLOP(read, READ);
 	FILLOP(write,WRITE);
+	FILLOP(abortop,  ABORTOP);
 }
 #undef FILLOP
 
@@ -586,21 +587,15 @@
 	return rv;
 }
 
+/*ARGSUSED*/
 struct puffs_usermount *
-_puffs_init(int develv, struct puffs_ops *pops, const char *mntfromname,
+_puffs_init(int dummy, struct puffs_ops *pops, const char *mntfromname,
 	const char *puffsname, void *priv, uint32_t pflags)
 {
 	struct puffs_usermount *pu;
 	struct puffs_kargs *pargs;
 	int sverrno;
 
-	if (develv != PUFFS_DEVEL_LIBVERSION) {
-		warnx(puffs_init: mounting with lib version %d, need %d,
-		develv, PUFFS_DEVEL_LIBVERSION);
-		errno = EINVAL;
-		return NULL;
-	}
-
 	pu = malloc(sizeof(struct puffs_usermount));
 	if (pu == NULL)
 		goto failfree;

Index: src/lib/libpuffs/puffs.h
diff -u src/lib/libpuffs/puffs.h:1.110 src/lib/libpuffs/puffs.h:1.111
--- src/lib/libpuffs/puffs.h:1.110	Fri Dec 12 19:45:16 2008
+++ src/lib/libpuffs/puffs.h	Sat Oct 17 23:19:52 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: puffs.h,v 1.110 2008/12/12 19:45:16 pooka Exp $	*/
+/*	$NetBSD: puffs.h,v 1.111 2009/10/17 23:19:52 pooka Exp $	*/
 
 /*
  * Copyright (c) 2005, 2006, 2007  Antti Kantee.  All Rights Reserved.
@@ -218,10 +218,13 @@
 	uint8_t *, off_t, size_t *, const struct puffs_cred *, int);
 	int (*puffs_node_write)(struct puffs_usermount *, puffs_cookie_t,
 	uint8_t *, off_t, size_t *, const struct puffs_cred *, int);
+	int (*puffs_node_abortop)(struct puffs_usermount *, puffs_cookie_t,
+	const struct puffs_cn *);
 
-	/* XXX: this shouldn't be here */
-	void (*puffs_cache_write)(struct puffs_usermount *,
-	puffs_cookie_t, size_t, struct puffs_cacherun *);
+#if 0
+	/* enable next time this structure is changed */
+	void *puffs_ops_spare[32];
+#endif
 };
 
 typedef	int (*pu_pathbuild_fn)(struct puffs_usermount *,
@@ -354,8 +357,8 @@
 	int fsname##_node_write(struct puffs_usermount *,		\
 	puffs_cookie_t, uint8_t *, off_t, size_t *,			\
 	const struct 

CVS commit: src/lib/libp2k

2009-10-17 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Sat Oct 17 23:20:15 UTC 2009

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

Log Message:
Implement abortop.


To generate a diff of this commit:
cvs rdiff -u -r1.24 -r1.25 src/lib/libp2k/p2k.c

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

Modified files:

Index: src/lib/libp2k/p2k.c
diff -u src/lib/libp2k/p2k.c:1.24 src/lib/libp2k/p2k.c:1.25
--- src/lib/libp2k/p2k.c:1.24	Thu Oct 15 16:41:08 2009
+++ src/lib/libp2k/p2k.c	Sat Oct 17 23:20:15 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: p2k.c,v 1.24 2009/10/15 16:41:08 pooka Exp $	*/
+/*	$NetBSD: p2k.c,v 1.25 2009/10/17 23:20:15 pooka Exp $	*/
 
 /*
  * Copyright (c) 2007, 2008, 2009  Antti Kantee.  All Rights Reserved.
@@ -300,6 +300,7 @@
 
 	PUFFSOP_SET(pops, p2k, node, inactive);
 	PUFFSOP_SET(pops, p2k, node, reclaim);
+	PUFFSOP_SET(pops, p2k, node, abortop);
 
 	dodaemon = true;
 	if (getenv(P2K_DEBUG) != NULL) {
@@ -889,6 +890,29 @@
 	return rv;
 }
 
+int
+p2k_node_abortop(struct puffs_usermount *pu, puffs_cookie_t opc,
+	const struct puffs_cn *pcn)
+{
+	struct p2k_node *p2n_dir = opc;
+	struct componentname *cnp;
+
+	if ((cnp = p2n_dir-p2n_cn) != NULL) {
+		freecn(cnp, 0);
+		p2n_dir-p2n_cn = NULL;
+	}
+	if ((cnp = p2n_dir-p2n_cn_ren_src) != NULL) {
+		freecn(cnp, RUMPCN_FORCEFREE);
+		p2n_dir-p2n_cn_ren_src = NULL;
+	}
+	if ((cnp = p2n_dir-p2n_cn_ren_targ) != NULL) {
+		freecn(cnp, RUMPCN_FORCEFREE);
+		p2n_dir-p2n_cn_ren_targ = NULL;
+	}
+
+	return 0;
+}
+
 static int
 do_nukenode(struct p2k_node *p2n_dir, struct p2k_node *p2n,
 	const struct puffs_cn *pcn,



CVS commit: src/sys/fs/puffs

2009-10-17 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Sat Oct 17 23:22:04 UTC 2009

Modified Files:
src/sys/fs/puffs: puffs_msgif.h

Log Message:
Bump protocol version once more to allow for previous to be pulled
to netbsd-5 (protocols are not compatible due to time_t/dev_t
change).


To generate a diff of this commit:
cvs rdiff -u -r1.67 -r1.68 src/sys/fs/puffs/puffs_msgif.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/fs/puffs/puffs_msgif.h
diff -u src/sys/fs/puffs/puffs_msgif.h:1.67 src/sys/fs/puffs/puffs_msgif.h:1.68
--- src/sys/fs/puffs/puffs_msgif.h:1.67	Sat Oct 17 23:16:05 2009
+++ src/sys/fs/puffs/puffs_msgif.h	Sat Oct 17 23:22:04 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: puffs_msgif.h,v 1.67 2009/10/17 23:16:05 pooka Exp $	*/
+/*	$NetBSD: puffs_msgif.h,v 1.68 2009/10/17 23:22:04 pooka Exp $	*/
 
 /*
  * Copyright (c) 2005, 2006, 2007  Antti Kantee.  All Rights Reserved.
@@ -102,7 +102,7 @@
 #define PUFFS_ERR_MAX PUFFS_ERR_VPTOFH
 
 #define PUFFSDEVELVERS	0x8000
-#define PUFFSVERSION	28
+#define PUFFSVERSION	29
 #define PUFFSNAMESIZE	32
 
 #define PUFFS_TYPEPREFIX puffs|



CVS commit: src/distrib/sets

2009-10-17 Thread Alistair G. Crooks
Module Name:src
Committed By:   agc
Date:   Sat Oct 17 23:43:22 UTC 2009

Modified Files:
src/distrib/sets: regpkg regpkgset

Log Message:
Move to a 2-clause BSD license


To generate a diff of this commit:
cvs rdiff -u -r1.16 -r1.17 src/distrib/sets/regpkg
cvs rdiff -u -r1.10 -r1.11 src/distrib/sets/regpkgset

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/regpkg
diff -u src/distrib/sets/regpkg:1.16 src/distrib/sets/regpkg:1.17
--- src/distrib/sets/regpkg:1.16	Fri Apr  3 22:36:35 2009
+++ src/distrib/sets/regpkg	Sat Oct 17 23:43:22 2009
@@ -1,8 +1,12 @@
 #! /bin/sh
 #
-# $NetBSD: regpkg,v 1.16 2009/04/03 22:36:35 perry Exp $
+# $NetBSD: regpkg,v 1.17 2009/10/17 23:43:22 agc Exp $
 #
-# Copyright (c) 2003 Alistair G. Crooks.  All rights reserved.
+# Copyright (c) 2003,2009 The NetBSD Foundation, Inc.
+# All rights reserved.
+#
+# This code is derived from software contributed to The NetBSD Foundation
+# by Alistair Crooks (a...@netbsd.org)
 #
 # Redistribution and use in source and binary forms, with or without
 # modification, are permitted provided that the following conditions
@@ -12,25 +16,18 @@
 # 2. Redistributions in binary form must reproduce the above copyright
 #notice, this list of conditions and the following disclaimer in the
 #documentation and/or other materials provided with the distribution.
-# 3. All advertising materials mentioning features or use of this software
-#must display the following acknowledgement:
-#	This product includes software developed by Alistair G. Crooks.
-#	for the NetBSD project.
-# 4. The name of the author may not be used to endorse or promote
-#products derived from this software without specific prior written
-#permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS
-# OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-# ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR 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.
+#
+# 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.
 #
 
 # Usage: regpkg [options] set pkgname
@@ -635,7 +632,7 @@
 	# @name line and a lot of @comment MD5: lines.
 	#
 	{
-		rcsid='$NetBSD: regpkg,v 1.16 2009/04/03 22:36:35 perry Exp $'
+		rcsid='$NetBSD: regpkg,v 1.17 2009/10/17 23:43:22 agc Exp $'
 		utcdate=$(${ENV_CMD} TZ=UTC LOCALE=C \
 			${DATE} '+%Y-%m-%d %H:%M')
 		user=${USER:-root}

Index: src/distrib/sets/regpkgset
diff -u src/distrib/sets/regpkgset:1.10 src/distrib/sets/regpkgset:1.11
--- src/distrib/sets/regpkgset:1.10	Mon Nov 12 15:06:45 2007
+++ src/distrib/sets/regpkgset	Sat Oct 17 23:43:22 2009
@@ -1,8 +1,12 @@
 #! /bin/sh
 #
-# $NetBSD: regpkgset,v 1.10 2007/11/12 15:06:45 jmmv Exp $
+# $NetBSD: regpkgset,v 1.11 2009/10/17 23:43:22 agc Exp $
 #
-# Copyright (c) 2003 Alistair G. Crooks.  All rights reserved.
+# Copyright (c) 2003,2009 The NetBSD Foundation, Inc.
+# All rights reserved.
+#
+# This code is derived from software contributed to The NetBSD Foundation
+# by Alistair Crooks (a...@netbsd.org)
 #
 # Redistribution and use in source and binary forms, with or without
 # modification, are permitted provided that the following conditions
@@ -12,25 +16,18 @@
 # 2. Redistributions in binary form must reproduce the above copyright
 #notice, this list of conditions and the following disclaimer in the
 #documentation and/or other materials provided with the distribution.
-# 3. All advertising materials mentioning features or use of this software
-#must display the following acknowledgement:
-#	This product includes software developed by Alistair G. Crooks.
-#	for the NetBSD project.
-# 4. The name of the author 

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

2009-10-17 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Sun Oct 18 00:41:09 UTC 2009

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

Log Message:
Clear PG_FAKE for pages we wrote to.  This avoids paging in data
we already have (and the backend might not yet have) in cases where
fs_bshift  PAGE_SHIFT.


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 src/sys/rump/librump/rumpvfs/vm_vfs.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/vm_vfs.c
diff -u src/sys/rump/librump/rumpvfs/vm_vfs.c:1.12 src/sys/rump/librump/rumpvfs/vm_vfs.c:1.13
--- src/sys/rump/librump/rumpvfs/vm_vfs.c:1.12	Wed Oct  7 10:23:50 2009
+++ src/sys/rump/librump/rumpvfs/vm_vfs.c	Sun Oct 18 00:41:09 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: vm_vfs.c,v 1.12 2009/10/07 10:23:50 pooka Exp $	*/
+/*	$NetBSD: vm_vfs.c,v 1.13 2009/10/18 00:41:09 pooka Exp $	*/
 
 /*
  * Copyright (c) 2008 Antti Kantee.  All Rights Reserved.
@@ -29,7 +29,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: vm_vfs.c,v 1.12 2009/10/07 10:23:50 pooka Exp $);
+__KERNEL_RCSID(0, $NetBSD: vm_vfs.c,v 1.13 2009/10/18 00:41:09 pooka Exp $);
 
 #include sys/param.h
 
@@ -157,10 +157,11 @@
 
 			pageoff = uio-uio_offset  PAGE_MASK;
 			xfersize = MIN(MIN(todo, PAGE_SIZE), PAGE_SIZE-pageoff);
+			KASSERT(xfersize  0);
 			uiomove((uint8_t *)pgs[i]-uanon + pageoff,
 			xfersize, uio);
 			if (uio-uio_rw == UIO_WRITE)
-pgs[i]-flags = ~PG_CLEAN;
+pgs[i]-flags = ~(PG_CLEAN | PG_FAKE);
 			todo -= xfersize;
 		}
 		uvm_page_unbusy(pgs, npages);



CVS commit: src/distrib/notes/common

2009-10-17 Thread Soren Jacobsen
Module Name:src
Committed By:   snj
Date:   Sun Oct 18 01:40:44 UTC 2009

Modified Files:
src/distrib/notes/common: legal.common

Log Message:
Kill two duplicate lines.


To generate a diff of this commit:
cvs rdiff -u -r1.53 -r1.54 src/distrib/notes/common/legal.common

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

Modified files:

Index: src/distrib/notes/common/legal.common
diff -u src/distrib/notes/common/legal.common:1.53 src/distrib/notes/common/legal.common:1.54
--- src/distrib/notes/common/legal.common:1.53	Sat Oct 17 22:33:55 2009
+++ src/distrib/notes/common/legal.common	Sun Oct 18 01:40:44 2009
@@ -1,4 +1,4 @@
-.\	$NetBSD: legal.common,v 1.53 2009/10/17 22:33:55 snj Exp $
+.\	$NetBSD: legal.common,v 1.54 2009/10/18 01:40:44 snj Exp $
 .\
 .\ Copyright (c) 1999-2004 The NetBSD Foundation, Inc.
 .\ All rights reserved.
@@ -84,9 +84,6 @@
 Technology Division, US Naval Research Laboratory.
 .It
 This product includes software developed by
-Berkeley Software Design, Inc.
-.It
-This product includes software developed by
 David Jones and Gordon Ross
 .It
 This product includes software developed by
@@ -135,11 +132,7 @@
 This product includes software developed by Amancio Hasty and
 Roger Hardiman
 .It
-This product includes software developed by Berkeley Software
-Design, Inc.
-.It
-This product includes software developed by Berkeley Software Design,
-Inc.
+This product includes software developed by Berkeley Software Design, Inc.
 .It
 This product includes software developed by Bill Paul.
 .It



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

2009-10-17 Thread Alistair G. Crooks
Module Name:src
Committed By:   agc
Date:   Sun Oct 18 03:53:32 UTC 2009

Modified Files:
src/external/bsd/pkg_install/dist/bpm: bpm.1 bpm.sh.in
src/external/bsd/pkg_install/dist/lib: defs.h

Log Message:
Move to a 2-clause BSD license


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.2 -r1.2 src/external/bsd/pkg_install/dist/bpm/bpm.1
cvs rdiff -u -r1.1.1.1 -r1.2 src/external/bsd/pkg_install/dist/bpm/bpm.sh.in
cvs rdiff -u -r1.1.1.1 -r1.2 src/external/bsd/pkg_install/dist/lib/defs.h

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

Modified files:

Index: src/external/bsd/pkg_install/dist/bpm/bpm.1
diff -u src/external/bsd/pkg_install/dist/bpm/bpm.1:1.1.1.2 src/external/bsd/pkg_install/dist/bpm/bpm.1:1.2
--- src/external/bsd/pkg_install/dist/bpm/bpm.1:1.1.1.2	Sat Feb 14 17:19:13 2009
+++ src/external/bsd/pkg_install/dist/bpm/bpm.1	Sun Oct 18 03:53:32 2009
@@ -1,7 +1,10 @@
-.\ $NetBSD: bpm.1,v 1.1.1.2 2009/02/14 17:19:13 joerg Exp $ */
+.\ $NetBSD: bpm.1,v 1.2 2009/10/18 03:53:32 agc Exp $ */
 .\
+.\ Copyright (c) 2003,2009 The NetBSD Foundation, Inc.
+.\ All rights reserved.
 .\
-.\ Copyright (c) 2003 Alistair G. Crooks.  All rights reserved.
+.\ This code is derived from software contributed to The NetBSD Foundation
+.\ by Alistair Crooks (a...@netbsd.org)
 .\
 .\ Redistribution and use in source and binary forms, with or without
 .\ modification, are permitted provided that the following conditions
@@ -11,24 +14,18 @@
 .\ 2. Redistributions in binary form must reproduce the above copyright
 .\notice, this list of conditions and the following disclaimer in the
 .\documentation and/or other materials provided with the distribution.
-.\ 3. All advertising materials mentioning features or use of this software
-.\must display the following acknowledgement:
-.\	This product includes software developed by Alistair G. Crooks.
-.\ 4. The name of the author may not be used to endorse or promote
-.\products derived from this software without specific prior written
-.\permission.
 .\
-.\ THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS
-.\ OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-.\ WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\ ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR 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.
+.\ 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.
 .\
 .Dd August 3, 2007
 .Dt BPM 1

Index: src/external/bsd/pkg_install/dist/bpm/bpm.sh.in
diff -u src/external/bsd/pkg_install/dist/bpm/bpm.sh.in:1.1.1.1 src/external/bsd/pkg_install/dist/bpm/bpm.sh.in:1.2
--- src/external/bsd/pkg_install/dist/bpm/bpm.sh.in:1.1.1.1	Tue Sep 30 19:00:26 2008
+++ src/external/bsd/pkg_install/dist/bpm/bpm.sh.in	Sun Oct 18 03:53:32 2009
@@ -1,8 +1,12 @@
 #! /bin/sh
 #
-# $NetBSD: bpm.sh.in,v 1.1.1.1 2008/09/30 19:00:26 joerg Exp $
+# $NetBSD: bpm.sh.in,v 1.2 2009/10/18 03:53:32 agc Exp $
 #
-# Copyright (c) 2003 Alistair G. Crooks.  All rights reserved.
+# Copyright (c) 2003,2009 The NetBSD Foundation, Inc.
+# All rights reserved.
+#
+# This code is derived from software contributed to The NetBSD Foundation
+# by Alistair Crooks (a...@netbsd.org)
 #
 # Redistribution and use in source and binary forms, with or without
 # modification, are permitted provided that the following conditions
@@ -12,24 +16,18 @@
 # 2. Redistributions in binary form must reproduce the above copyright
 #notice, this list of conditions and the following disclaimer in the
 #documentation and/or other materials provided with the distribution.
-# 3. All advertising materials mentioning features or use of this software
-#must display the following acknowledgement:
-#	This product