CVS commit: src/bin/sh

2010-08-30 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Mon Aug 30 06:27:00 UTC 2010

Modified Files:
src/bin/sh: Makefile

Log Message:
increase commented out debugging.


To generate a diff of this commit:
cvs rdiff -u -r1.93 -r1.94 src/bin/sh/Makefile

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

Modified files:

Index: src/bin/sh/Makefile
diff -u src/bin/sh/Makefile:1.93 src/bin/sh/Makefile:1.94
--- src/bin/sh/Makefile:1.93	Sat Aug 21 22:21:31 2010
+++ src/bin/sh/Makefile	Mon Aug 30 02:26:59 2010
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.93 2010/08/22 02:21:31 perry Exp $
+#	$NetBSD: Makefile,v 1.94 2010/08/30 06:26:59 christos Exp $
 #	@(#)Makefile	8.4 (Berkeley) 5/5/95
 
 .include bsd.own.mk
@@ -35,7 +35,8 @@
 
 CPPFLAGS+=-DSHELL -I. -I${.CURDIR}
 #XXX: For testing only.
-#CPPFLAGS+=-DDEBUG=1
+#CPPFLAGS+=-DDEBUG=2
+#COPTS+=-g
 #CFLAGS+=-funsigned-char
 #TARGET_CHARFLAG?= -DTARGET_CHAR=unsigned char -funsigned-char
 



CVS commit: src/bin/sh

2010-08-30 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Mon Aug 30 06:27:15 UTC 2010

Modified Files:
src/bin/sh: input.c output.c output.h

Log Message:
dprintf is claimed by posix.


To generate a diff of this commit:
cvs rdiff -u -r1.42 -r1.43 src/bin/sh/input.c
cvs rdiff -u -r1.32 -r1.33 src/bin/sh/output.c
cvs rdiff -u -r1.20 -r1.21 src/bin/sh/output.h

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

Modified files:

Index: src/bin/sh/input.c
diff -u src/bin/sh/input.c:1.42 src/bin/sh/input.c:1.43
--- src/bin/sh/input.c:1.42	Tue Mar 10 17:21:11 2009
+++ src/bin/sh/input.c	Mon Aug 30 02:27:14 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: input.c,v 1.42 2009/03/10 21:21:11 roy Exp $	*/
+/*	$NetBSD: input.c,v 1.43 2010/08/30 06:27:14 christos Exp $	*/
 
 /*-
  * Copyright (c) 1991, 1993
@@ -37,7 +37,7 @@
 #if 0
 static char sccsid[] = @(#)input.c	8.3 (Berkeley) 6/9/95;
 #else
-__RCSID($NetBSD: input.c,v 1.42 2009/03/10 21:21:11 roy Exp $);
+__RCSID($NetBSD: input.c,v 1.43 2010/08/30 06:27:14 christos Exp $);
 #endif
 #endif /* not lint */
 
@@ -338,7 +338,7 @@
 	struct strpush *sp;
 
 	INTOFF;
-/*dprintf(*** calling pushstring: %s, %d\n, s, len);*/
+/*debugprintf(*** calling pushstring: %s, %d\n, s, len);*/
 	if (parsefile-strpush) {
 		sp = ckmalloc(sizeof (struct strpush));
 		sp-prev = parsefile-strpush;
@@ -365,7 +365,7 @@
 	parsenextc = sp-prevstring;
 	parsenleft = sp-prevnleft;
 	parselleft = sp-prevlleft;
-/*dprintf(*** calling popstring: restoring to '%s'\n, parsenextc);*/
+/*debugprintf(*** calling popstring: restoring to '%s'\n, parsenextc);*/
 	if (sp-ap)
 		sp-ap-flag = ~ALIASINUSE;
 	parsefile-strpush = sp-prev;

Index: src/bin/sh/output.c
diff -u src/bin/sh/output.c:1.32 src/bin/sh/output.c:1.33
--- src/bin/sh/output.c:1.32	Sun Jul 18 21:15:17 2010
+++ src/bin/sh/output.c	Mon Aug 30 02:27:14 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: output.c,v 1.32 2010/07/19 01:15:17 joerg Exp $	*/
+/*	$NetBSD: output.c,v 1.33 2010/08/30 06:27:14 christos Exp $	*/
 
 /*-
  * Copyright (c) 1991, 1993
@@ -37,7 +37,7 @@
 #if 0
 static char sccsid[] = @(#)output.c	8.2 (Berkeley) 5/4/95;
 #else
-__RCSID($NetBSD: output.c,v 1.32 2010/07/19 01:15:17 joerg Exp $);
+__RCSID($NetBSD: output.c,v 1.33 2010/08/30 06:27:14 christos Exp $);
 #endif
 #endif /* not lint */
 
@@ -264,8 +264,9 @@
 	va_end(ap);
 }
 
+#ifdef DEBUG
 void
-dprintf(const char *fmt, ...)
+debugprintf(const char *fmt, ...)
 {
 	va_list ap;
 
@@ -274,6 +275,7 @@
 	va_end(ap);
 	flushout(out2);
 }
+#endif
 
 void
 fmtstr(char *outbuf, size_t length, const char *fmt, ...)

Index: src/bin/sh/output.h
diff -u src/bin/sh/output.h:1.20 src/bin/sh/output.h:1.21
--- src/bin/sh/output.h:1.20	Fri Oct 31 10:38:42 2008
+++ src/bin/sh/output.h	Mon Aug 30 02:27:14 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: output.h,v 1.20 2008/10/31 14:38:42 christos Exp $	*/
+/*	$NetBSD: output.h,v 1.21 2010/08/30 06:27:14 christos Exp $	*/
 
 /*-
  * Copyright (c) 1991, 1993
@@ -70,8 +70,10 @@
 __attribute__((__format__(__printf__,2,3)));
 void out1fmt(const char *, ...)
 __attribute__((__format__(__printf__,1,2)));
+#ifdef DEBUG
 void dprintf(const char *, ...)
 __attribute__((__format__(__printf__,1,2)));
+#endif
 void fmtstr(char *, size_t, const char *, ...)
 __attribute__((__format__(__printf__,3,4)));
 void doformat(struct output *, const char *, va_list);



CVS commit: src/tests/dev/sysmon

2010-08-30 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Mon Aug 30 08:30:17 UTC 2010

Modified Files:
src/tests/dev/sysmon: t_swwdog.c

Log Message:
Make tcount volatile since a signal handler plays with it.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/tests/dev/sysmon/t_swwdog.c

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

Modified files:

Index: src/tests/dev/sysmon/t_swwdog.c
diff -u src/tests/dev/sysmon/t_swwdog.c:1.1 src/tests/dev/sysmon/t_swwdog.c:1.2
--- src/tests/dev/sysmon/t_swwdog.c:1.1	Fri Aug  6 16:13:26 2010
+++ src/tests/dev/sysmon/t_swwdog.c	Mon Aug 30 08:30:17 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: t_swwdog.c,v 1.1 2010/08/06 16:13:26 pooka Exp $	*/
+/*	$NetBSD: t_swwdog.c,v 1.2 2010/08/30 08:30:17 pooka Exp $	*/
 
 /*
  * Copyright (c) 2010 Antti Kantee.  All Rights Reserved.
@@ -44,7 +44,7 @@
 
 #include ../../h_macros.h
 
-static sig_atomic_t tcount;
+static volatile sig_atomic_t tcount;
 
 static void
 sigcount(int sig)



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

2010-08-30 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Mon Aug 30 09:44:11 UTC 2010

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

Log Message:
Use one line per sys/kern source module.  no functional change.


To generate a diff of this commit:
cvs rdiff -u -r1.93 -r1.94 src/sys/rump/librump/rumpkern/Makefile.rumpkern

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

Modified files:

Index: src/sys/rump/librump/rumpkern/Makefile.rumpkern
diff -u src/sys/rump/librump/rumpkern/Makefile.rumpkern:1.93 src/sys/rump/librump/rumpkern/Makefile.rumpkern:1.94
--- src/sys/rump/librump/rumpkern/Makefile.rumpkern:1.93	Sat Aug 21 13:20:43 2010
+++ src/sys/rump/librump/rumpkern/Makefile.rumpkern	Mon Aug 30 09:44:11 2010
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.rumpkern,v 1.93 2010/08/21 13:20:43 pgoyette Exp $
+#	$NetBSD: Makefile.rumpkern,v 1.94 2010/08/30 09:44:11 pooka Exp $
 #
 
 .include ${RUMPTOP}/Makefile.rump
@@ -44,24 +44,55 @@
 SRCS+=	devsw.c
 
 #
-# Rest are from the std kernel sources.
+# std kernel sources
 #
 # sys/kern
-SRCS+=	init_sysctl_base.c kern_auth.c kern_cfglock.c kern_descrip.c	\
-	kern_event.c kern_hook.c kern_ksyms.c kern_malloc_stdtype.c	\
-	kern_module.c kern_mutex_obj.c kern_ntptime.c kern_proc.c	\
-	kern_rate.c kern_resource.c kern_stub.c kern_syscall.c		\
-	kern_sysctl.c kern_tc.c kern_timeout.c kern_uidinfo.c param.c	\
-	sys_descrip.c sys_generic.c sys_module.c sys_pipe.c sys_select.c \
+SRCS+=	init_sysctl_base.c	\
+	kern_auth.c		\
+	kern_cfglock.c		\
+	kern_descrip.c		\
+	kern_event.c		\
+	kern_hook.c		\
+	kern_ksyms.c		\
+	kern_malloc_stdtype.c	\
+	kern_module.c		\
+	kern_mutex_obj.c	\
+	kern_ntptime.c		\
+	kern_proc.c		\
+	kern_rate.c		\
+	kern_resource.c		\
+	kern_stub.c		\
+	kern_syscall.c		\
+	kern_sysctl.c		\
+	kern_tc.c		\
+	kern_timeout.c		\
+	kern_uidinfo.c		\
+	param.c			\
+	subr_devsw.c		\
+	subr_callback.c		\
+	subr_copy.c		\
+	subr_device.c		\
+	subr_evcnt.c		\
+	subr_extent.c		\
+	subr_hash.c		\
+	subr_humanize.c		\
+	subr_iostat.c		\
+	subr_kobj.c		\
+	subr_log.c		\
+	subr_lwp_specificdata.c	\
+	subr_once.c		\
+	subr_prf.c		\
+	subr_specificdata.c	\
+	subr_time.c		\
+	subr_workqueue.c	\
+	subr_xcall.c		\
+	sys_descrip.c		\
+	sys_generic.c		\
+	sys_module.c		\
+	sys_pipe.c		\
+	sys_select.c		\
 	syscalls.c
 
-# sys/kern subr (misc)
-SRCS+=	subr_devsw.c subr_callback.c subr_copy.c subr_device.c		\
-	subr_evcnt.c subr_extent.c subr_hash.c subr_humanize.c		\
-	subr_iostat.c subr_kobj.c subr_log.c subr_lwp_specificdata.c	\
-	subr_once.c subr_prf.c subr_specificdata.c subr_time.c		\
-	subr_workqueue.c subr_xcall.c
-
 # sys/uvm
 SRCS+=	uvm_readahead.c
 



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

2010-08-30 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Mon Aug 30 09:44:40 UTC 2010

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

Log Message:
Include kern_prot.c for setuid etc.


To generate a diff of this commit:
cvs rdiff -u -r1.94 -r1.95 src/sys/rump/librump/rumpkern/Makefile.rumpkern

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

Modified files:

Index: src/sys/rump/librump/rumpkern/Makefile.rumpkern
diff -u src/sys/rump/librump/rumpkern/Makefile.rumpkern:1.94 src/sys/rump/librump/rumpkern/Makefile.rumpkern:1.95
--- src/sys/rump/librump/rumpkern/Makefile.rumpkern:1.94	Mon Aug 30 09:44:11 2010
+++ src/sys/rump/librump/rumpkern/Makefile.rumpkern	Mon Aug 30 09:44:40 2010
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.rumpkern,v 1.94 2010/08/30 09:44:11 pooka Exp $
+#	$NetBSD: Makefile.rumpkern,v 1.95 2010/08/30 09:44:40 pooka Exp $
 #
 
 .include ${RUMPTOP}/Makefile.rump
@@ -59,6 +59,7 @@
 	kern_mutex_obj.c	\
 	kern_ntptime.c		\
 	kern_proc.c		\
+	kern_prot.c		\
 	kern_rate.c		\
 	kern_resource.c		\
 	kern_stub.c		\



CVS commit: src/sys/rump

2010-08-30 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Mon Aug 30 10:08:39 UTC 2010

Modified Files:
src/sys/rump/include/rump: rump_syscalls_compat.h
src/sys/rump/librump/rumpvfs: compat.c

Log Message:
do 5.0 compat for fstat


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/sys/rump/include/rump/rump_syscalls_compat.h
cvs rdiff -u -r1.6 -r1.7 src/sys/rump/librump/rumpvfs/compat.c

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

Modified files:

Index: src/sys/rump/include/rump/rump_syscalls_compat.h
diff -u src/sys/rump/include/rump/rump_syscalls_compat.h:1.3 src/sys/rump/include/rump/rump_syscalls_compat.h:1.4
--- src/sys/rump/include/rump/rump_syscalls_compat.h:1.3	Mon Jul 26 11:52:25 2010
+++ src/sys/rump/include/rump/rump_syscalls_compat.h	Mon Aug 30 10:08:39 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: rump_syscalls_compat.h,v 1.3 2010/07/26 11:52:25 pooka Exp $	*/
+/*	$NetBSD: rump_syscalls_compat.h,v 1.4 2010/08/30 10:08:39 pooka Exp $	*/
 
 /*-
  * Copyright (c) 2010 Antti Kantee.  All Rights Reserved.
@@ -42,6 +42,7 @@
 #if !__NetBSD_Prereq__(5,99,7)
 #define rump_sys_stat(a,b) rump_sys_nb5_stat(a,b)
 #define rump_sys_lstat(a,b) rump_sys_nb5_lstat(a,b)
+#define rump_sys_fstat(a,b) rump_sys_nb5_fstat(a,b)
 #define rump_sys_pollts(a,b,c,d) rump_sys_nb5_pollts(a,b,c,d)
 #define rump_sys_select(a,b,c,d,e) rump_sys_nb5_select(a,b,c,d,e)
 #endif /* __NetBSD_Prereq */
@@ -57,6 +58,7 @@
 struct timespec;
 int rump_sys_nb5_stat(const char *, struct stat *);
 int rump_sys_nb5_lstat(const char *, struct stat *);
+int rump_sys_nb5_fstat(int, struct stat *);
 int rump_sys_nb5_pollts(struct pollfd *, size_t,
 			const struct timespec *, const void *);
 int rump_sys_nb5_select(int, fd_set *, fd_set *, fd_set *, struct timeval *);

Index: src/sys/rump/librump/rumpvfs/compat.c
diff -u src/sys/rump/librump/rumpvfs/compat.c:1.6 src/sys/rump/librump/rumpvfs/compat.c:1.7
--- src/sys/rump/librump/rumpvfs/compat.c:1.6	Mon Jul 19 15:33:16 2010
+++ src/sys/rump/librump/rumpvfs/compat.c	Mon Aug 30 10:08:39 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: compat.c,v 1.6 2010/07/19 15:33:16 pooka Exp $	*/
+/*	$NetBSD: compat.c,v 1.7 2010/08/30 10:08:39 pooka Exp $	*/
 
 /*
  * Copyright (c) 2009 Antti Kantee.  All Rights Reserved.
@@ -28,7 +28,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: compat.c,v 1.6 2010/07/19 15:33:16 pooka Exp $);
+__KERNEL_RCSID(0, $NetBSD: compat.c,v 1.7 2010/08/30 10:08:39 pooka Exp $);
 
 #include sys/param.h
 #include sys/kmem.h
@@ -120,6 +120,26 @@
 	return retval;
 }
 
+int
+rump_sys_nb5_fstat(int fd, struct stat *sb)
+{
+	struct compat_50_sys___fstat30_args args;
+	register_t retval = 0;
+	int error = 0;
+
+	SPARG(args, fd) = fd;
+	SPARG(args, sb) = (struct stat30 *)sb;
+
+	rump_schedule();
+	error = compat_50_sys___fstat30(curlwp, args, retval);
+	if (error) {
+		retval = -1;
+		rumpuser_seterrno(error);
+	}
+	rump_unschedule();
+	return retval;
+}
+
 /*
  * XXX: types.  But I don't want to start playing compat games in
  * the userspace namespace too



CVS commit: src/sys/kern

2010-08-30 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Mon Aug 30 10:24:05 UTC 2010

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

Log Message:
Use the generally more useful funcalias for rump syscalls.


To generate a diff of this commit:
cvs rdiff -u -r1.98 -r1.99 src/sys/kern/makesyscalls.sh

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

Modified files:

Index: src/sys/kern/makesyscalls.sh
diff -u src/sys/kern/makesyscalls.sh:1.98 src/sys/kern/makesyscalls.sh:1.99
--- src/sys/kern/makesyscalls.sh:1.98	Mon Jul 19 15:25:47 2010
+++ src/sys/kern/makesyscalls.sh	Mon Aug 30 10:24:04 2010
@@ -1,5 +1,5 @@
 #! /bin/sh -
-#	$NetBSD: makesyscalls.sh,v 1.98 2010/07/19 15:25:47 pooka Exp $
+#	$NetBSD: makesyscalls.sh,v 1.99 2010/08/30 10:24:04 pooka Exp $
 #
 # Copyright (c) 1994, 1996, 2000 Christopher G. Demetriou
 # All rights reserved.
@@ -548,7 +548,10 @@
 	if (!rumpable)
 		return
 
-	printf(%s rump_%s(, returntype, funcstdname)  rumpcallshdr
+	if (wantrename)
+		printf(%s rump_%s(, returntype, funcstdname)  rumpcallshdr
+	else
+		printf(%s rump_sys_%s(, returntype, funcalias)  rumpcallshdr
 	for (i = 1; i  varargc; i++)
 		if (argname[i] != PAD)
 			printf(%s, , argtype[i])  rumpcallshdr
@@ -575,7 +578,7 @@
 	if (argc == 0) {
 		printf(0, 0, )  rumpsysent
 	} else {
-		printf(ns(struct %s%s_args), , compatwrap_, funcname)  rumpsysent
+		printf(ns(struct sys_%s%s_args), , compatwrap_, funcalias)  rumpsysent
 	}
 	printf(0,\n\t%s },, wfn)  rumpsysent
 	for (i = 0; i  (41 - length(wfn)) / 8; i++)
@@ -667,14 +670,14 @@
 	}
 
 	# need a local prototype, we export the re-re-named one in .h
-	printf(\n%s rump_%s(, returntype, funcname)  rumpcalls
+	printf(\n%s rump_sys_%s(, returntype, funcalias)  rumpcalls
 	for (i = 1; i  argc; i++) {
 		if (argname[i] != PAD)
 			printf(%s, , argtype[i])  rumpcalls
 	}
 	printf(%s);, argtype[argc])  rumpcalls
 
-	printf(\n%s\nrump_%s(, returntype, funcname)  rumpcalls
+	printf(\n%s\nrump_sys_%s(, returntype, funcalias)  rumpcalls
 	for (i = 1; i  argc; i++) {
 		if (argname[i] != PAD)
 			printf(%s %s, , argtype[i], argname[i])  rumpcalls



CVS commit: src/sys

2010-08-30 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Mon Aug 30 10:24:42 UTC 2010

Modified Files:
src/sys/kern: init_sysent.c syscalls.c
src/sys/rump/include/rump: rump_syscalls.h
src/sys/rump/librump/rumpkern: rump_syscalls.c
src/sys/sys: syscall.h syscallargs.h

Log Message:
Empty commit to show makesyscalls.sh rev 1.99 didn't change anything (yet).


To generate a diff of this commit:
cvs rdiff -u -r1.245 -r1.246 src/sys/kern/init_sysent.c
cvs rdiff -u -r1.236 -r1.237 src/sys/kern/syscalls.c
cvs rdiff -u -r1.27 -r1.28 src/sys/rump/include/rump/rump_syscalls.h
cvs rdiff -u -r1.47 -r1.48 src/sys/rump/librump/rumpkern/rump_syscalls.c
cvs rdiff -u -r1.232 -r1.233 src/sys/sys/syscall.h
cvs rdiff -u -r1.214 -r1.215 src/sys/sys/syscallargs.h

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

Modified files:

Index: src/sys/kern/init_sysent.c
diff -u src/sys/kern/init_sysent.c:1.245 src/sys/kern/init_sysent.c:1.246
--- src/sys/kern/init_sysent.c:1.245	Tue Mar  2 19:37:02 2010
+++ src/sys/kern/init_sysent.c	Mon Aug 30 10:24:42 2010
@@ -1,14 +1,14 @@
-/* $NetBSD: init_sysent.c,v 1.245 2010/03/02 19:37:02 pooka Exp $ */
+/* $NetBSD: init_sysent.c,v 1.246 2010/08/30 10:24:42 pooka Exp $ */
 
 /*
  * System call switch table.
  *
  * DO NOT EDIT-- this file is automatically generated.
- * created from	NetBSD: syscalls.master,v 1.232 2010/03/02 19:34:26 pooka Exp
+ * created from	NetBSD: syscalls.master,v 1.235 2010/06/10 19:09:03 pooka Exp
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: init_sysent.c,v 1.245 2010/03/02 19:37:02 pooka Exp $);
+__KERNEL_RCSID(0, $NetBSD: init_sysent.c,v 1.246 2010/08/30 10:24:42 pooka Exp $);
 
 #include opt_modular.h
 #include opt_ntp.h

Index: src/sys/kern/syscalls.c
diff -u src/sys/kern/syscalls.c:1.236 src/sys/kern/syscalls.c:1.237
--- src/sys/kern/syscalls.c:1.236	Tue Mar  2 19:37:02 2010
+++ src/sys/kern/syscalls.c	Mon Aug 30 10:24:42 2010
@@ -1,14 +1,14 @@
-/* $NetBSD: syscalls.c,v 1.236 2010/03/02 19:37:02 pooka Exp $ */
+/* $NetBSD: syscalls.c,v 1.237 2010/08/30 10:24:42 pooka Exp $ */
 
 /*
  * System call names.
  *
  * DO NOT EDIT-- this file is automatically generated.
- * created from	NetBSD: syscalls.master,v 1.232 2010/03/02 19:34:26 pooka Exp
+ * created from	NetBSD: syscalls.master,v 1.235 2010/06/10 19:09:03 pooka Exp
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: syscalls.c,v 1.236 2010/03/02 19:37:02 pooka Exp $);
+__KERNEL_RCSID(0, $NetBSD: syscalls.c,v 1.237 2010/08/30 10:24:42 pooka Exp $);
 
 #if defined(_KERNEL_OPT)
 #include opt_modular.h

Index: src/sys/rump/include/rump/rump_syscalls.h
diff -u src/sys/rump/include/rump/rump_syscalls.h:1.27 src/sys/rump/include/rump/rump_syscalls.h:1.28
--- src/sys/rump/include/rump/rump_syscalls.h:1.27	Mon Jul 19 15:38:55 2010
+++ src/sys/rump/include/rump/rump_syscalls.h	Mon Aug 30 10:24:42 2010
@@ -1,4 +1,4 @@
-/* $NetBSD: rump_syscalls.h,v 1.27 2010/07/19 15:38:55 pooka Exp $ */
+/* $NetBSD: rump_syscalls.h,v 1.28 2010/08/30 10:24:42 pooka Exp $ */
 
 /*
  * System call protos in rump namespace.

Index: src/sys/rump/librump/rumpkern/rump_syscalls.c
diff -u src/sys/rump/librump/rumpkern/rump_syscalls.c:1.47 src/sys/rump/librump/rumpkern/rump_syscalls.c:1.48
--- src/sys/rump/librump/rumpkern/rump_syscalls.c:1.47	Mon Jul 19 15:38:55 2010
+++ src/sys/rump/librump/rumpkern/rump_syscalls.c	Mon Aug 30 10:24:42 2010
@@ -1,4 +1,4 @@
-/* $NetBSD: rump_syscalls.c,v 1.47 2010/07/19 15:38:55 pooka Exp $ */
+/* $NetBSD: rump_syscalls.c,v 1.48 2010/08/30 10:24:42 pooka Exp $ */
 
 /*
  * System call vector and marshalling for rump.
@@ -8,7 +8,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: rump_syscalls.c,v 1.47 2010/07/19 15:38:55 pooka Exp $);
+__KERNEL_RCSID(0, $NetBSD: rump_syscalls.c,v 1.48 2010/08/30 10:24:42 pooka Exp $);
 
 #include sys/types.h
 #include sys/param.h

Index: src/sys/sys/syscall.h
diff -u src/sys/sys/syscall.h:1.232 src/sys/sys/syscall.h:1.233
--- src/sys/sys/syscall.h:1.232	Tue Mar  2 19:37:02 2010
+++ src/sys/sys/syscall.h	Mon Aug 30 10:24:42 2010
@@ -1,10 +1,10 @@
-/* $NetBSD: syscall.h,v 1.232 2010/03/02 19:37:02 pooka Exp $ */
+/* $NetBSD: syscall.h,v 1.233 2010/08/30 10:24:42 pooka Exp $ */
 
 /*
  * System call numbers.
  *
  * DO NOT EDIT-- this file is automatically generated.
- * created from	NetBSD: syscalls.master,v 1.232 2010/03/02 19:34:26 pooka Exp
+ * created from	NetBSD: syscalls.master,v 1.235 2010/06/10 19:09:03 pooka Exp
  */
 
 #ifndef _SYS_SYSCALL_H_

Index: src/sys/sys/syscallargs.h
diff -u src/sys/sys/syscallargs.h:1.214 src/sys/sys/syscallargs.h:1.215
--- src/sys/sys/syscallargs.h:1.214	Tue Mar  2 19:37:02 2010
+++ src/sys/sys/syscallargs.h	Mon Aug 30 10:24:42 2010
@@ -1,10 +1,10 @@
-/* $NetBSD: syscallargs.h,v 1.214 2010/03/02 19:37:02 pooka Exp $ */
+/* $NetBSD: syscallargs.h,v 1.215 2010/08/30 10:24:42 pooka Exp $ */
 
 /*
  * System call argument 

CVS commit: src/sys/kern

2010-08-30 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Mon Aug 30 10:30:01 UTC 2010

Modified Files:
src/sys/kern: kern_prot.c

Log Message:
remove trailing empty line.  no useful change.


To generate a diff of this commit:
cvs rdiff -u -r1.110 -r1.111 src/sys/kern/kern_prot.c

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

Modified files:

Index: src/sys/kern/kern_prot.c
diff -u src/sys/kern/kern_prot.c:1.110 src/sys/kern/kern_prot.c:1.111
--- src/sys/kern/kern_prot.c:1.110	Thu Jul  1 02:38:30 2010
+++ src/sys/kern/kern_prot.c	Mon Aug 30 10:30:01 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: kern_prot.c,v 1.110 2010/07/01 02:38:30 rmind Exp $	*/
+/*	$NetBSD: kern_prot.c,v 1.111 2010/08/30 10:30:01 pooka Exp $	*/
 
 /*
  * Copyright (c) 1982, 1986, 1989, 1990, 1991, 1993
@@ -41,7 +41,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: kern_prot.c,v 1.110 2010/07/01 02:38:30 rmind Exp $);
+__KERNEL_RCSID(0, $NetBSD: kern_prot.c,v 1.111 2010/08/30 10:30:01 pooka Exp $);
 
 #include opt_compat_43.h
 
@@ -625,4 +625,3 @@
 	mutex_exit(proc_lock);
 	return (0);
 }
-



CVS commit: src/sys/kern

2010-08-30 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Mon Aug 30 10:32:54 UTC 2010

Modified Files:
src/sys/kern: syscalls.master

Log Message:
RUMP syscalls for kern_prot.c interfaces


To generate a diff of this commit:
cvs rdiff -u -r1.235 -r1.236 src/sys/kern/syscalls.master

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

Modified files:

Index: src/sys/kern/syscalls.master
diff -u src/sys/kern/syscalls.master:1.235 src/sys/kern/syscalls.master:1.236
--- src/sys/kern/syscalls.master:1.235	Thu Jun 10 19:09:03 2010
+++ src/sys/kern/syscalls.master	Mon Aug 30 10:32:54 2010
@@ -1,4 +1,4 @@
-	$NetBSD: syscalls.master,v 1.235 2010/06/10 19:09:03 pooka Exp $
+	$NetBSD: syscalls.master,v 1.236 2010/08/30 10:32:54 pooka Exp $
 
 ;	@(#)syscalls.master	8.2 (Berkeley) 1/13/94
 
@@ -90,13 +90,13 @@
 			long bufsize, int flags); }
 19	COMPAT_43 MODULAR { long|sys||lseek(int fd, long offset, int whence); }\
 			olseek
-20	STD 		{ pid_t|sys||getpid_with_ppid(void); } getpid
+20	STD 	RUMP	{ pid_t|sys||getpid_with_ppid(void); } getpid
 21	COMPAT_40 MODULAR { int|sys||mount(const char *type, const char *path, \
 			int flags, void *data); }
 22	STD 	 RUMP	{ int|sys||unmount(const char *path, int flags); }
-23	STD 		{ int|sys||setuid(uid_t uid); }
-24	STD 		{ uid_t|sys||getuid_with_euid(void); } getuid
-25	STD 		{ uid_t|sys||geteuid(void); }
+23	STD 	RUMP	{ int|sys||setuid(uid_t uid); }
+24	STD 	RUMP	{ uid_t|sys||getuid_with_euid(void); } getuid
+25	STD 	RUMP	{ uid_t|sys||geteuid(void); }
 26	STD 		{ int|sys||ptrace(int req, pid_t pid, void *addr, \
 			int data); }
 27	STD 	RUMP	{ ssize_t|sys||recvmsg(int s, struct msghdr *msg, \
@@ -119,12 +119,12 @@
 37	STD 		{ int|sys||kill(int pid, int signum); }
 38	COMPAT_43 MODULAR { int|sys||stat(const char *path, struct stat43 *ub); } \
 			stat43
-39	STD 		{ pid_t|sys||getppid(void); }
+39	STD 	RUMP	{ pid_t|sys||getppid(void); }
 40	COMPAT_43 MODULAR { int|sys||lstat(const char *path, \
 			struct stat43 *ub); } lstat43
 41	STD 	RUMP	{ int|sys||dup(int fd); }
 42	STD 	RUMP	{ int|sys||pipe(void); }
-43	STD 		{ gid_t|sys||getegid(void); }
+43	STD 	RUMP	{ gid_t|sys||getegid(void); }
 44	STD 		{ int|sys||profil(char *samples, size_t size, \
 			u_long offset, u_int scale); }
 45	STD 		{ int|sys||ktrace(const char *fname, int ops, \
@@ -132,11 +132,11 @@
 46	COMPAT_13 MODULAR { int|sys||sigaction(int signum, \
 			const struct sigaction13 *nsa, \
 			struct sigaction13 *osa); } sigaction13
-47	STD 		{ gid_t|sys||getgid_with_egid(void); } getgid
+47	STD 	RUMP	{ gid_t|sys||getgid_with_egid(void); } getgid
 48	COMPAT_13 MODULAR { int|sys||sigprocmask(int how, \
 			int mask); } sigprocmask13
-49	STD 		{ int|sys||__getlogin(char *namebuf, size_t namelen); }
-50	STD 	 	{ int|sys||__setlogin(const char *namebuf); }
+49	STD 	RUMP	{ int|sys||__getlogin(char *namebuf, size_t namelen); }
+50	STD 	RUMP 	{ int|sys||__setlogin(const char *namebuf); }
 51	STD 		{ int|sys||acct(const char *path); }
 52	COMPAT_13 MODULAR { int|sys||sigpending(void); } sigpending13
 53	COMPAT_13 MODULAR { int|sys||sigaltstack( \
@@ -177,12 +177,12 @@
 77	OBSOL		vlimit
 78	STD 		{ int|sys||mincore(void *addr, size_t len, \
 			char *vec); }
-79	STD 		{ int|sys||getgroups(int gidsetsize, \
+79	STD 	RUMP	{ int|sys||getgroups(int gidsetsize, \
 			gid_t *gidset); }
-80	STD 		{ int|sys||setgroups(int gidsetsize, \
+80	STD 	RUMP	{ int|sys||setgroups(int gidsetsize, \
 			const gid_t *gidset); }
-81	STD 		{ int|sys||getpgrp(void); }
-82	STD 		{ int|sys||setpgid(int pid, int pgid); }
+81	STD 	RUMP	{ int|sys||getpgrp(void); }
+82	STD 	RUMP	{ int|sys||setpgid(int pid, int pgid); }
 83	COMPAT_50 MODULAR { int|sys||setitimer(int which, \
 			const struct itimerval50 *itv, \
 			struct itimerval50 *oitv); }
@@ -250,8 +250,8 @@
 125	COMPAT_43 MODULAR { int|sys||recvfrom(int s, void *buf, size_t len, \
 			int flags, void *from, int *fromlenaddr); } \
 			orecvfrom
-126	STD 		{ int|sys||setreuid(uid_t ruid, uid_t euid); }
-127	STD 		{ int|sys||setregid(gid_t rgid, gid_t egid); }
+126	STD 	RUMP	{ int|sys||setreuid(uid_t ruid, uid_t euid); }
+127	STD 	RUMP	{ int|sys||setregid(gid_t rgid, gid_t egid); }
 128	STD 	 RUMP	{ int|sys||rename(const char *from, const char *to); }
 129	COMPAT_43 MODULAR { int|sys||truncate(const char *path, long length); } \
 			otruncate
@@ -280,7 +280,7 @@
 145	COMPAT_43 MODULAR { int|sys||setrlimit(int which, \
 			const struct orlimit *rlp); } osetrlimit
 146	COMPAT_43 MODULAR { int|sys||killpg(int pgid, int signum); } okillpg
-147	STD 	 	{ int|sys||setsid(void); }
+147	STD 	RUMP 	{ int|sys||setsid(void); }
 148	STD 		{ int|sys||quotactl(const char *path, int cmd, \
 			int uid, void *arg); }
 149	COMPAT_43 MODULAR { int|sys||quota(void); } oquota
@@ -353,9 +353,9 @@
 180	UNIMPL
 
 ; Syscalls 180-199 are used by/reserved for BSD
-181	STD 		{ 

CVS commit: src/sys

2010-08-30 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Mon Aug 30 10:34:52 UTC 2010

Modified Files:
src/sys/kern: init_sysent.c syscalls.c
src/sys/rump/include/rump: rump_syscalls.h
src/sys/rump/librump/rumpkern: rump_syscalls.c
src/sys/sys: syscall.h syscallargs.h

Log Message:
regen: rump syscalls for kern_prot interfaces


To generate a diff of this commit:
cvs rdiff -u -r1.246 -r1.247 src/sys/kern/init_sysent.c
cvs rdiff -u -r1.237 -r1.238 src/sys/kern/syscalls.c
cvs rdiff -u -r1.28 -r1.29 src/sys/rump/include/rump/rump_syscalls.h
cvs rdiff -u -r1.48 -r1.49 src/sys/rump/librump/rumpkern/rump_syscalls.c
cvs rdiff -u -r1.233 -r1.234 src/sys/sys/syscall.h
cvs rdiff -u -r1.215 -r1.216 src/sys/sys/syscallargs.h

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

Modified files:

Index: src/sys/kern/init_sysent.c
diff -u src/sys/kern/init_sysent.c:1.246 src/sys/kern/init_sysent.c:1.247
--- src/sys/kern/init_sysent.c:1.246	Mon Aug 30 10:24:42 2010
+++ src/sys/kern/init_sysent.c	Mon Aug 30 10:34:51 2010
@@ -1,14 +1,14 @@
-/* $NetBSD: init_sysent.c,v 1.246 2010/08/30 10:24:42 pooka Exp $ */
+/* $NetBSD: init_sysent.c,v 1.247 2010/08/30 10:34:51 pooka Exp $ */
 
 /*
  * System call switch table.
  *
  * DO NOT EDIT-- this file is automatically generated.
- * created from	NetBSD: syscalls.master,v 1.235 2010/06/10 19:09:03 pooka Exp
+ * created from	NetBSD: syscalls.master,v 1.236 2010/08/30 10:32:54 pooka Exp
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: init_sysent.c,v 1.246 2010/08/30 10:24:42 pooka Exp $);
+__KERNEL_RCSID(0, $NetBSD: init_sysent.c,v 1.247 2010/08/30 10:34:51 pooka Exp $);
 
 #include opt_modular.h
 #include opt_ntp.h

Index: src/sys/kern/syscalls.c
diff -u src/sys/kern/syscalls.c:1.237 src/sys/kern/syscalls.c:1.238
--- src/sys/kern/syscalls.c:1.237	Mon Aug 30 10:24:42 2010
+++ src/sys/kern/syscalls.c	Mon Aug 30 10:34:51 2010
@@ -1,14 +1,14 @@
-/* $NetBSD: syscalls.c,v 1.237 2010/08/30 10:24:42 pooka Exp $ */
+/* $NetBSD: syscalls.c,v 1.238 2010/08/30 10:34:51 pooka Exp $ */
 
 /*
  * System call names.
  *
  * DO NOT EDIT-- this file is automatically generated.
- * created from	NetBSD: syscalls.master,v 1.235 2010/06/10 19:09:03 pooka Exp
+ * created from	NetBSD: syscalls.master,v 1.236 2010/08/30 10:32:54 pooka Exp
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: syscalls.c,v 1.237 2010/08/30 10:24:42 pooka Exp $);
+__KERNEL_RCSID(0, $NetBSD: syscalls.c,v 1.238 2010/08/30 10:34:51 pooka Exp $);
 
 #if defined(_KERNEL_OPT)
 #include opt_modular.h

Index: src/sys/rump/include/rump/rump_syscalls.h
diff -u src/sys/rump/include/rump/rump_syscalls.h:1.28 src/sys/rump/include/rump/rump_syscalls.h:1.29
--- src/sys/rump/include/rump/rump_syscalls.h:1.28	Mon Aug 30 10:24:42 2010
+++ src/sys/rump/include/rump/rump_syscalls.h	Mon Aug 30 10:34:51 2010
@@ -1,10 +1,10 @@
-/* $NetBSD: rump_syscalls.h,v 1.28 2010/08/30 10:24:42 pooka Exp $ */
+/* $NetBSD: rump_syscalls.h,v 1.29 2010/08/30 10:34:51 pooka Exp $ */
 
 /*
  * System call protos in rump namespace.
  *
  * DO NOT EDIT-- this file is automatically generated.
- * created from	NetBSD: syscalls.master,v 1.235 2010/06/10 19:09:03 pooka Exp
+ * created from	NetBSD: syscalls.master,v 1.236 2010/08/30 10:32:54 pooka Exp
  */
 
 #ifndef _RUMP_RUMP_SYSCALLS_H_
@@ -29,7 +29,11 @@
 int rump_sys_fchdir(int);
 int rump_sys_chmod(const char *, mode_t);
 int rump_sys_chown(const char *, uid_t, gid_t);
+pid_t rump_sys_getpid(void);
 int rump_sys_unmount(const char *, int);
+int rump_sys_setuid(uid_t);
+uid_t rump_sys_getuid(void);
+uid_t rump_sys_geteuid(void);
 ssize_t rump_sys_recvmsg(int, struct msghdr *, int);
 ssize_t rump_sys_sendmsg(int, const struct msghdr *, int);
 ssize_t rump_sys_recvfrom(int, void *, size_t, int, struct sockaddr *, unsigned int *);
@@ -40,12 +44,21 @@
 int rump_sys_chflags(const char *, u_long);
 int rump_sys_fchflags(int, u_long);
 void rump_sys_sync(void);
+pid_t rump_sys_getppid(void);
 int rump_sys_dup(int);
+gid_t rump_sys_getegid(void);
+gid_t rump_sys_getgid(void);
+int rump_sys___getlogin(char *, size_t);
+int rump_sys___setlogin(const char *);
 int rump_sys_ioctl(int, u_long, ...);
 int rump_sys_revoke(const char *);
 int rump_sys_symlink(const char *, const char *);
 ssize_t rump_sys_readlink(const char *, char *, size_t);
 int rump_sys_chroot(const char *);
+int rump_sys_getgroups(int, gid_t *);
+int rump_sys_setgroups(int, const gid_t *);
+int rump_sys_getpgrp(void);
+int rump_sys_setpgid(int, int);
 int rump_sys_dup2(int, int);
 int rump_sys_fcntl(int, int, ...);
 int rump_sys_fsync(int);
@@ -58,6 +71,8 @@
 ssize_t rump_sys_writev(int, const struct iovec *, int);
 int rump_sys_fchown(int, uid_t, gid_t);
 int rump_sys_fchmod(int, mode_t);
+int rump_sys_setreuid(uid_t, uid_t);
+int rump_sys_setregid(gid_t, gid_t);
 int rump_sys_rename(const char *, const char *);
 int rump_sys_flock(int, int);
 int 

CVS commit: src/dist/nvi/docs/vi.man

2010-08-30 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Mon Aug 30 10:41:54 UTC 2010

Modified Files:
src/dist/nvi/docs/vi.man: vi.1

Log Message:
refering - referring, per PR 43814.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/dist/nvi/docs/vi.man/vi.1

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

Modified files:

Index: src/dist/nvi/docs/vi.man/vi.1
diff -u src/dist/nvi/docs/vi.man/vi.1:1.4 src/dist/nvi/docs/vi.man/vi.1:1.5
--- src/dist/nvi/docs/vi.man/vi.1:1.4	Fri Dec 12 22:55:55 2008
+++ src/dist/nvi/docs/vi.man/vi.1	Mon Aug 30 10:41:54 2010
@@ -1,4 +1,4 @@
-.\	$NetBSD: vi.1,v 1.4 2008/12/12 22:55:55 lukem Exp $
+.\	$NetBSD: vi.1,v 1.5 2010/08/30 10:41:54 wiz Exp $
 .\
 .\ Copyright (c) 1994
 .\ The Regents of the University of California.  All rights reserved.
@@ -953,7 +953,7 @@
 Rewind the argument list.
 .TP
 .B rta[g][!] tagstring
-Edit the file refering the specified tag. (Only in gtagsmode)
+Edit the file referring the specified tag. (Only in gtagsmode)
 .TP
 .B se[t] [option[=[value]] ...] [nooption ...] [option? ...] [all]
 Display or set editor options.



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

2010-08-30 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Mon Aug 30 10:49:40 UTC 2010

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

Log Message:
* record proc's cred in p_cred too
* account procs for uids


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

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

Modified files:

Index: src/sys/rump/librump/rumpkern/rump.c
diff -u src/sys/rump/librump/rumpkern/rump.c:1.182 src/sys/rump/librump/rumpkern/rump.c:1.183
--- src/sys/rump/librump/rumpkern/rump.c:1.182	Thu Aug 26 19:56:07 2010
+++ src/sys/rump/librump/rumpkern/rump.c	Mon Aug 30 10:49:40 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: rump.c,v 1.182 2010/08/26 19:56:07 pooka Exp $	*/
+/*	$NetBSD: rump.c,v 1.183 2010/08/30 10:49:40 pooka Exp $	*/
 
 /*
  * Copyright (c) 2007 Antti Kantee.  All Rights Reserved.
@@ -28,7 +28,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: rump.c,v 1.182 2010/08/26 19:56:07 pooka Exp $);
+__KERNEL_RCSID(0, $NetBSD: rump.c,v 1.183 2010/08/30 10:49:40 pooka Exp $);
 
 #include sys/systm.h
 #define ELFSIZE ARCH_ELFSIZE
@@ -530,8 +530,9 @@
 		p-p_fd = fd_init(NULL);
 		p-p_lock = mutex_obj_alloc(MUTEX_DEFAULT, IPL_NONE);
 		p-p_pgrp = rump_pgrp;
-		l-l_cred = rump_cred_suserget();
+		p-p_cred = l-l_cred = rump_cred_suserget();
 
+		chgproccnt(0, 1);
 		atomic_inc_uint(nprocs);
 	} else {
 		p = proc0;
@@ -576,6 +577,7 @@
 	if (p-p_pid != 0) {
 		mutex_obj_free(p-p_lock);
 		fd_free();
+		chgproccnt(kauth_cred_getuid(p-p_cred), -1);
 		if (rump_proc_vfs_release)
 			rump_proc_vfs_release(p);
 		rump_cred_put(l-l_cred);



CVS commit: src/lib/librump

2010-08-30 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Mon Aug 30 11:37:52 UTC 2010

Modified Files:
src/lib/librump: rump.3

Log Message:
Add some commas.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/lib/librump/rump.3

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

Modified files:

Index: src/lib/librump/rump.3
diff -u src/lib/librump/rump.3:1.2 src/lib/librump/rump.3:1.3
--- src/lib/librump/rump.3:1.2	Fri Aug 27 18:31:18 2010
+++ src/lib/librump/rump.3	Mon Aug 30 11:37:52 2010
@@ -1,4 +1,4 @@
-.\ $NetBSD: rump.3,v 1.2 2010/08/27 18:31:18 wiz Exp $
+.\ $NetBSD: rump.3,v 1.3 2010/08/30 11:37:52 wiz Exp $
 .\
 .\ Copyright (c) 2008-2010 Antti Kantee.  All rights reserved.
 .\
@@ -120,8 +120,8 @@
 components which use features provided by the base and factions.
 Notably, components may have interdependencies.
 For example, a rump kernel providing a virtual IP router requires
-the following components: rumpnet_netinet rumpnet_net, rumpnet
-rumpnet_virtif, rump and rumpuser.
+the following components: rumpnet_netinet, rumpnet_net, rumpnet,
+rumpnet_virtif, rump, and rumpuser.
 A rump kernel providing an NFS client requires the above and
 additionally rumpfs_nfs and rumpvfs.
 .Pp



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

2010-08-30 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Mon Aug 30 11:51:29 UTC 2010

Modified Files:
src/sys/rump/dev/lib/libucom: UCOM.ioconf

Log Message:
doesn't need files.rump


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/sys/rump/dev/lib/libucom/UCOM.ioconf

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/dev/lib/libucom/UCOM.ioconf
diff -u src/sys/rump/dev/lib/libucom/UCOM.ioconf:1.4 src/sys/rump/dev/lib/libucom/UCOM.ioconf:1.5
--- src/sys/rump/dev/lib/libucom/UCOM.ioconf:1.4	Mon Mar  8 10:24:37 2010
+++ src/sys/rump/dev/lib/libucom/UCOM.ioconf	Mon Aug 30 11:51:29 2010
@@ -1,11 +1,10 @@
-#	$NetBSD: UCOM.ioconf,v 1.4 2010/03/08 10:24:37 pooka Exp $
+#	$NetBSD: UCOM.ioconf,v 1.5 2010/08/30 11:51:29 pooka Exp $
 #
 
 ioconf ucom
 
 include conf/files
 include dev/usb/files.usb
-include rump/dev/files.rump
 
 pseudo-root uhub*
 



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

2010-08-30 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Mon Aug 30 11:52:10 UTC 2010

Modified Files:
src/sys/rump/dev/lib/libulpt: ULPT.ioconf

Log Message:
doesn't need files.rump


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/sys/rump/dev/lib/libulpt/ULPT.ioconf

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/dev/lib/libulpt/ULPT.ioconf
diff -u src/sys/rump/dev/lib/libulpt/ULPT.ioconf:1.3 src/sys/rump/dev/lib/libulpt/ULPT.ioconf:1.4
--- src/sys/rump/dev/lib/libulpt/ULPT.ioconf:1.3	Mon Mar  8 10:30:17 2010
+++ src/sys/rump/dev/lib/libulpt/ULPT.ioconf	Mon Aug 30 11:52:10 2010
@@ -1,11 +1,10 @@
-#	$NetBSD: ULPT.ioconf,v 1.3 2010/03/08 10:30:17 pooka Exp $
+#	$NetBSD: ULPT.ioconf,v 1.4 2010/08/30 11:52:10 pooka Exp $
 #
 
 ioconf ulpt
 
 include conf/files
 include dev/usb/files.usb
-include rump/dev/files.rump
 
 pseudo-root uhub*
 



CVS commit: src/sys/rump/include/machine

2010-08-30 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Mon Aug 30 18:29:52 UTC 2010

Modified Files:
src/sys/rump/include/machine: intr.h

Log Message:
Make IPLs not equal IPL_NONE to avoid some KASSERTs.


To generate a diff of this commit:
cvs rdiff -u -r1.16 -r1.17 src/sys/rump/include/machine/intr.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/rump/include/machine/intr.h
diff -u src/sys/rump/include/machine/intr.h:1.16 src/sys/rump/include/machine/intr.h:1.17
--- src/sys/rump/include/machine/intr.h:1.16	Fri Feb  6 20:01:41 2009
+++ src/sys/rump/include/machine/intr.h	Mon Aug 30 18:29:52 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: intr.h,v 1.16 2009/02/06 20:01:41 pooka Exp $	*/
+/*	$NetBSD: intr.h,v 1.17 2010/08/30 18:29:52 pooka Exp $	*/
 
 /*
  * Copyright (c) 2007 Antti Kantee.  All Rights Reserved.
@@ -37,10 +37,8 @@
 ipl_t _ipl;
 } ipl_cookie_t;
 
-static inline ipl_cookie_t makeiplcookie(ipl_t);
-
-static inline
-ipl_cookie_t makeiplcookie(ipl_t ipl)
+static inline ipl_cookie_t
+makeiplcookie(ipl_t ipl)
 {
 	ipl_cookie_t c;
 	c._ipl = ipl;
@@ -60,12 +58,12 @@
 #define spl0() ((void)0)
 
 #define IPL_NONE 0
-#define	IPL_SOFTBIO 0
-#define	IPL_SOFTCLOCK 0
-#define IPL_SOFTSERIAL 0
-#define	IPL_SOFTNET 0
-#define IPL_SCHED 0
-#define IPL_VM 0
-#define IPL_HIGH 0
+#define	IPL_SOFTBIO 1
+#define	IPL_SOFTCLOCK 1
+#define IPL_SOFTSERIAL 1
+#define	IPL_SOFTNET 1
+#define IPL_SCHED 2
+#define IPL_VM 2
+#define IPL_HIGH 2
 
 #endif /* _SYS_RUMP_INTR_H_ */



CVS commit: src/sys/ddb

2010-08-30 Thread Thor Lancelot Simon
Module Name:src
Committed By:   tls
Date:   Mon Aug 30 19:23:26 UTC 2010

Modified Files:
src/sys/ddb: db_input.c

Log Message:
Don't overflow DDB command history.  Coyote Point changelist description:

DDB is flakey.  The command history wanders past the bounds.  Way
past.  When it hits some boolean that indicates a.out format symbol
tables are to be used, and here is the pointer to the function, the
call thru the NULL function pointer renders the debug session entirely
unsatisfactory, outcome wise.


To generate a diff of this commit:
cvs rdiff -u -r1.23 -r1.24 src/sys/ddb/db_input.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/ddb/db_input.c
diff -u src/sys/ddb/db_input.c:1.23 src/sys/ddb/db_input.c:1.24
--- src/sys/ddb/db_input.c:1.23	Sat Mar  7 22:02:17 2009
+++ src/sys/ddb/db_input.c	Mon Aug 30 19:23:25 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: db_input.c,v 1.23 2009/03/07 22:02:17 ad Exp $	*/
+/*	$NetBSD: db_input.c,v 1.24 2010/08/30 19:23:25 tls Exp $	*/
 
 /*
  * Mach Operating System
@@ -30,7 +30,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: db_input.c,v 1.23 2009/03/07 22:02:17 ad Exp $);
+__KERNEL_RCSID(0, $NetBSD: db_input.c,v 1.24 2010/08/30 19:23:25 tls Exp $);
 
 #ifdef _KERNEL_OPT
 #include opt_ddbparam.h
@@ -63,7 +63,6 @@
 static char*db_le;		/* one past last character */
 #if DDB_HISTORY_SIZE != 0
 static char	db_history[DDB_HISTORY_SIZE];	/* start of history buffer */
-static int	db_history_size = DDB_HISTORY_SIZE;/* size of history buffer */
 static char*db_history_curr = db_history;	/* start of current line */
 static char*db_history_last = db_history;	/* start of last line */
 static char*db_history_prev = (char *) 0;	/* start of previous line */
@@ -131,21 +130,31 @@
 }
 
 #if DDB_HISTORY_SIZE != 0
-#define INC_DB_CURR() \
-	do { \
-		 db_history_curr++; \
-		 if (db_history_curr  db_history + db_history_size - 1) \
-			 db_history_curr = db_history; \
-	} while (/*CONSTCOND*/ 0)
-#define DEC_DB_CURR() \
-	do { \
-		 db_history_curr--; \
-		 if (db_history_curr  db_history) \
-		 db_history_curr = db_history + \
-		 db_history_size - 1; \
-	} while (/*CONSTCOND*/ 0)
+
+#define INC_DB_CURR() do {		\
+	++db_history_curr;		\
+	if (db_history_curr  db_history + DDB_HISTORY_SIZE - 1)	\
+	db_history_curr = db_history;\
+} while (0)
+#define DEC_DB_CURR() do {		\
+	--db_history_curr;		\
+	if (db_history_curr  db_history)\
+	db_history_curr = db_history + DDB_HISTORY_SIZE - 1;	\
+} while (0)
 #endif
 
+static inline void db_hist_put(int c)
+{
+	KASSERT(db_history[0]  = db_history_last);
+	KASSERT(db_history_last = db_history[DDB_HISTORY_SIZE-1]);
+
+	*db_history_last++ = c;
+
+	if (db_history_last  db_history[DDB_HISTORY_SIZE-1])
+	db_history_last = db_history;
+}
+	
+
 /* returns true at end-of-line */
 static int
 db_inputchar(int c)
@@ -239,7 +248,7 @@
 			for (p = db_history_curr, db_le = db_lbuf_start;
 			 *p; ) {
 *db_le++ = *p++;
-if (p == db_history + db_history_size) {
+if (p = db_history + DDB_HISTORY_SIZE) {
 	p = db_history;
 }
 			}
@@ -261,8 +270,7 @@
 for (p = db_history_curr,
  db_le = db_lbuf_start; *p;) {
 	*db_le++ = *p++;
-	if (p == db_history +
-	db_history_size) {
+	if (p = db_history + DDB_HISTORY_SIZE) {
 		p = db_history;
 	}
 }
@@ -291,10 +299,10 @@
 			 pc != db_le  *pp; pp++, pc++) {
 if (*pp != *pc)
 	break;
-if (++pp == db_history + db_history_size) {
+if (++pp = db_history + DDB_HISTORY_SIZE) {
 	pp = db_history;
 }
-if (++pc == db_history + db_history_size) {
+if (++pc = db_history + DDB_HISTORY_SIZE) {
 	pc = db_history;
 }
 			}
@@ -307,15 +315,13 @@
 		}
 		if (db_le != db_lbuf_start) {
 			char *p;
+
 			db_history_prev = db_history_last;
-			for (p = db_lbuf_start; p != db_le; p++) {
-*db_history_last++ = *p;
-if (db_history_last == db_history +
-db_history_size) {
-	db_history_last = db_history;
-}
+
+			for (p = db_lbuf_start; p != db_le; ) {
+db_hist_put(*p++);
 			}
-			*db_history_last++ = '\0';
+			db_hist_put(0);
 		}
 		db_history_curr = db_history_last;
 #endif



CVS commit: src/sys/dev/wsfb

2010-08-30 Thread Michael Lorenz
Module Name:src
Committed By:   macallan
Date:   Tue Aug 31 02:49:17 UTC 2010

Modified Files:
src/sys/dev/wsfb: files.wsfb genfb.c genfbvar.h

Log Message:
make use of a shadow framebuffer optional, use VCONS_DONT_READ by default


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/sys/dev/wsfb/files.wsfb
cvs rdiff -u -r1.29 -r1.30 src/sys/dev/wsfb/genfb.c
cvs rdiff -u -r1.14 -r1.15 src/sys/dev/wsfb/genfbvar.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/wsfb/files.wsfb
diff -u src/sys/dev/wsfb/files.wsfb:1.6 src/sys/dev/wsfb/files.wsfb:1.7
--- src/sys/dev/wsfb/files.wsfb:1.6	Thu Aug  6 16:26:51 2009
+++ src/sys/dev/wsfb/files.wsfb	Tue Aug 31 02:49:17 2010
@@ -1,4 +1,4 @@
-# $NetBSD: files.wsfb,v 1.6 2009/08/06 16:26:51 macallan Exp $
+# $NetBSD: files.wsfb,v 1.7 2010/08/31 02:49:17 macallan Exp $
 
 #
 # wsdisplay framebuffer drivers
@@ -9,6 +9,6 @@
 defflag opt_wsfb.h WSFB_ALLOW_OTHERS	# allow to mmap() foreign ranges
 
 # a generic framebuffer console
-device genfb: wsemuldisplaydev, rasops1, rasops8, rasops15, rasops16, rasops24, rasops32, vcons, drm
+device genfb: wsemuldisplaydev, rasops1, rasops2, rasops8, rasops15, rasops16, rasops24, rasops32, vcons, drm
 file	dev/wsfb/genfb.c	genfb	needs-flag
-defflag opt_genfb.h GENFB_DEBUG
+defflag opt_genfb.h GENFB_DEBUG GENFB_SHADOWFB

Index: src/sys/dev/wsfb/genfb.c
diff -u src/sys/dev/wsfb/genfb.c:1.29 src/sys/dev/wsfb/genfb.c:1.30
--- src/sys/dev/wsfb/genfb.c:1.29	Mon Feb 22 05:55:10 2010
+++ src/sys/dev/wsfb/genfb.c	Tue Aug 31 02:49:17 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: genfb.c,v 1.29 2010/02/22 05:55:10 ahoka Exp $ */
+/*	$NetBSD: genfb.c,v 1.30 2010/08/31 02:49:17 macallan Exp $ */
 
 /*-
  * Copyright (c) 2007 Michael Lorenz
@@ -27,7 +27,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: genfb.c,v 1.29 2010/02/22 05:55:10 ahoka Exp $);
+__KERNEL_RCSID(0, $NetBSD: genfb.c,v 1.30 2010/08/31 02:49:17 macallan Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -193,9 +193,11 @@
 	memcpy(sc-sc_ops, ops, sizeof(struct genfb_ops));
 	sc-sc_mode = WSDISPLAYIO_MODE_EMUL;
 
+#ifdef GENFB_SHADOWFB
 	sc-sc_shadowfb = kmem_alloc(sc-sc_fbsize, KM_SLEEP);
 	if (sc-sc_want_clear == false  sc-sc_shadowfb != NULL)
 		memcpy(sc-sc_shadowfb, sc-sc_fbaddr, sc-sc_fbsize);
+#endif
 
 	vcons_init(sc-vd, sc, sc-sc_defaultscreen_descr,
 	genfb_accessops);
@@ -415,12 +417,17 @@
 	if (sc-sc_want_clear)
 		ri-ri_flg |= RI_FULLCLEAR;
 
+#ifdef GENFB_SHADOWFB
 	if (sc-sc_shadowfb != NULL) {
 
 		ri-ri_hwbits = (char *)sc-sc_fbaddr;
 		ri-ri_bits = (char *)sc-sc_shadowfb;
 	} else
+#endif
+	{
 		ri-ri_bits = (char *)sc-sc_fbaddr;
+		scr-scr_flags |= VCONS_DONT_READ;
+	}
 
 	if (existing  sc-sc_want_clear) {
 		ri-ri_flg |= RI_CLEAR;

Index: src/sys/dev/wsfb/genfbvar.h
diff -u src/sys/dev/wsfb/genfbvar.h:1.14 src/sys/dev/wsfb/genfbvar.h:1.15
--- src/sys/dev/wsfb/genfbvar.h:1.14	Wed Feb 24 22:38:09 2010
+++ src/sys/dev/wsfb/genfbvar.h	Tue Aug 31 02:49:17 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: genfbvar.h,v 1.14 2010/02/24 22:38:09 dyoung Exp $ */
+/*	$NetBSD: genfbvar.h,v 1.15 2010/08/31 02:49:17 macallan Exp $ */
 
 /*-
  * Copyright (c) 2007 Michael Lorenz
@@ -27,7 +27,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: genfbvar.h,v 1.14 2010/02/24 22:38:09 dyoung Exp $);
+__KERNEL_RCSID(0, $NetBSD: genfbvar.h,v 1.15 2010/08/31 02:49:17 macallan Exp $);
 
 #ifndef GENFBVAR_H
 #define GENFBVAR_H
@@ -46,6 +46,7 @@
 #include dev/rasops/rasops.h
 
 #include dev/wscons/wsdisplay_vconsvar.h
+#include opt_genfb.h
 
 #ifdef SPLASHSCREEN
 #define GENFB_DISABLE_TEXT
@@ -81,7 +82,9 @@
 	struct genfb_colormap_callback *sc_cmcb;
 	struct genfb_pmf_callback *sc_pmfcb;
 	void *sc_fbaddr;	/* kva */
-	void *sc_shadowfb; 
+#ifdef GENFB_SHADOWFB
+	void *sc_shadowfb;
+#endif
 	bus_addr_t sc_fboffset;	/* bus address */
 	int sc_width, sc_height, sc_stride, sc_depth;
 	size_t sc_fbsize;



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

2010-08-30 Thread Michael Lorenz
Module Name:src
Committed By:   macallan
Date:   Tue Aug 31 03:08:23 UTC 2010

Modified Files:
src/sys/arch/sparc64/dev: gfb.c

Log Message:
remove shadow framebuffer support, use VCONS_DONT_READ instead


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/sys/arch/sparc64/dev/gfb.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/dev/gfb.c
diff -u src/sys/arch/sparc64/dev/gfb.c:1.2 src/sys/arch/sparc64/dev/gfb.c:1.3
--- src/sys/arch/sparc64/dev/gfb.c:1.2	Thu Dec 31 05:08:05 2009
+++ src/sys/arch/sparc64/dev/gfb.c	Tue Aug 31 03:08:23 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: gfb.c,v 1.2 2009/12/31 05:08:05 macallan Exp $	*/
+/*	$NetBSD: gfb.c,v 1.3 2010/08/31 03:08:23 macallan Exp $	*/
 
 /*
  * Copyright (c) 2009 Michael Lorenz
@@ -30,7 +30,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: gfb.c,v 1.2 2009/12/31 05:08:05 macallan Exp $);
+__KERNEL_RCSID(0, $NetBSD: gfb.c,v 1.3 2010/08/31 03:08:23 macallan Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -66,7 +66,7 @@
 
 	int sc_width, sc_height, sc_depth, sc_stride, sc_fblen;
 	int sc_locked;
-	void *sc_fbaddr, *sc_shadow;
+	void *sc_fbaddr;
 	struct vcons_screen sc_console_screen;
 	struct wsscreen_descr sc_defaultscreen_descr;
 	const struct wsscreen_descr *sc_screens[1];
@@ -158,7 +158,6 @@
 		return;
 	}
 
-	sc-sc_shadow = kmem_alloc(sc-sc_fblen, KM_SLEEP);
 	sc-sc_locked = 0;
 	sc-sc_mode = WSDISPLAYIO_MODE_EMUL;
 
@@ -230,6 +229,27 @@
 	aa.accesscookie = sc-vd;
 
 	config_found(sc-sc_dev, aa, wsemuldisplaydevprint);
+
+#ifdef GFB_DEBUG
+	/*
+	 * now dump a register range
+	 * try 1, 2 and 4 since they're only 0x2000 each
+	 */
+	bus_space_handle_t regh;
+
+	if (bus_space_map(sc-sc_memt, ma-ma_reg[3].ur_paddr,
+	0x2000, BUS_SPACE_MAP_LINEAR, regh) == 0) {
+		for (i = 0; i  0x200; i += 32) {
+			printf(%04x, i);
+			for (j = 0; j  32; j += 4) {
+printf( %08x, bus_space_read_4(sc-sc_memt,
+regh, i + j));
+			}
+			printf(\n); 
+		}
+		bus_space_unmap(sc-sc_memt, regh, 0x2000);
+	}
+#endif
 }
 
 static int
@@ -330,8 +350,8 @@
 	ri-ri_stride = sc-sc_stride;
 	ri-ri_flg = RI_CENTER | RI_FULLCLEAR;
 
-	ri-ri_bits = sc-sc_shadow;
-	ri-ri_hwbits = (char *)sc-sc_fbaddr;
+	ri-ri_bits = (char *)sc-sc_fbaddr;
+	scr-scr_flags |= VCONS_DONT_READ;
 
 	if (existing) {
 		ri-ri_flg |= RI_CLEAR;



CVS commit: src/bin/pax

2010-08-30 Thread enami tsugutomo
Module Name:src
Committed By:   enami
Date:   Tue Aug 31 03:16:06 UTC 2010

Modified Files:
src/bin/pax: ar_io.c options.c

Log Message:
- Raise an error rather than silently creating broken archive
  if user don't specify --force-local but opened file is actually
  a local file.
- Make cpio to accept -F option as described in manpage.
- Make pax to set forcelocal flag if requested to do so.
- Add missing break statement.


To generate a diff of this commit:
cvs rdiff -u -r1.49 -r1.50 src/bin/pax/ar_io.c
cvs rdiff -u -r1.108 -r1.109 src/bin/pax/options.c

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

Modified files:

Index: src/bin/pax/ar_io.c
diff -u src/bin/pax/ar_io.c:1.49 src/bin/pax/ar_io.c:1.50
--- src/bin/pax/ar_io.c:1.49	Tue Feb  3 05:22:40 2009
+++ src/bin/pax/ar_io.c	Tue Aug 31 03:16:06 2010
@@ -42,7 +42,7 @@
 #if 0
 static char sccsid[] = @(#)ar_io.c	8.2 (Berkeley) 4/18/94;
 #else
-__RCSID($NetBSD: ar_io.c,v 1.49 2009/02/03 05:22:40 dbj Exp $);
+__RCSID($NetBSD: ar_io.c,v 1.50 2010/08/31 03:16:06 enami Exp $);
 #endif
 #endif /* not lint */
 
@@ -147,6 +147,11 @@
 			syswarn(0, errno, Failed open on %s, name);
 			return -1;
 		}
+		if (!isrmt(arfd)) {
+			rmtclose(arfd);
+			tty_warn(0, Not a remote file: %s, name);
+			return -1;
+		}
 		blksz = rdblksz = 8192;
 		lstrval = 1;
 		return 0;

Index: src/bin/pax/options.c
diff -u src/bin/pax/options.c:1.108 src/bin/pax/options.c:1.109
--- src/bin/pax/options.c:1.108	Wed Aug 25 21:36:02 2010
+++ src/bin/pax/options.c	Tue Aug 31 03:16:06 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: options.c,v 1.108 2010/08/25 21:36:02 sjg Exp $	*/
+/*	$NetBSD: options.c,v 1.109 2010/08/31 03:16:06 enami Exp $	*/
 
 /*-
  * Copyright (c) 1992 Keith Muller.
@@ -42,7 +42,7 @@
 #if 0
 static char sccsid[] = @(#)options.c	8.2 (Berkeley) 4/18/94;
 #else
-__RCSID($NetBSD: options.c,v 1.108 2010/08/25 21:36:02 sjg Exp $);
+__RCSID($NetBSD: options.c,v 1.109 2010/08/31 03:16:06 enami Exp $);
 #endif
 #endif /* not lint */
 
@@ -643,7 +643,7 @@
 			secure = 0;
 			break;
 		case OPT_FORCE_LOCAL:
-			forcelocal = 0;
+			forcelocal = 1;
 			break;
 		case OPT_USE_COMPRESS_PROGRAM:
 			zflag = 1;
@@ -1677,6 +1677,7 @@
 			(void)fputs(\n\n, stderr);
 			cpio_usage();
 			break;
+		case 'F':
 		case 'I':
 		case 'O':
 			/*
@@ -1734,13 +1735,13 @@
 			 * process Version 6 cpio format
 			 */
 			frmt = (fsub[F_BCPIO]);
+			break;
 		case OPT_FORCE_LOCAL:
 			forcelocal = 1;
 			break;
 		case OPT_INSECURE:
 			secure = 0;
 			break;
-
 		case OPT_SPARSE:
 			/* do nothing; we already generate sparse files */
 			break;



CVS commit: src/bin/pax

2010-08-30 Thread enami tsugutomo
Module Name:src
Committed By:   enami
Date:   Tue Aug 31 04:50:07 UTC 2010

Modified Files:
src/bin/pax: ar_io.c

Log Message:
Fix build as tools.


To generate a diff of this commit:
cvs rdiff -u -r1.50 -r1.51 src/bin/pax/ar_io.c

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

Modified files:

Index: src/bin/pax/ar_io.c
diff -u src/bin/pax/ar_io.c:1.50 src/bin/pax/ar_io.c:1.51
--- src/bin/pax/ar_io.c:1.50	Tue Aug 31 03:16:06 2010
+++ src/bin/pax/ar_io.c	Tue Aug 31 04:50:07 2010
@@ -42,7 +42,7 @@
 #if 0
 static char sccsid[] = @(#)ar_io.c	8.2 (Berkeley) 4/18/94;
 #else
-__RCSID($NetBSD: ar_io.c,v 1.50 2010/08/31 03:16:06 enami Exp $);
+__RCSID($NetBSD: ar_io.c,v 1.51 2010/08/31 04:50:07 enami Exp $);
 #endif
 #endif /* not lint */
 
@@ -147,11 +147,13 @@
 			syswarn(0, errno, Failed open on %s, name);
 			return -1;
 		}
+#if !HAVE_NBTOOL_CONFIG_H
 		if (!isrmt(arfd)) {
 			rmtclose(arfd);
 			tty_warn(0, Not a remote file: %s, name);
 			return -1;
 		}
+#endif
 		blksz = rdblksz = 8192;
 		lstrval = 1;
 		return 0;



CVS commit: src/bin/pax

2010-08-30 Thread enami tsugutomo
Module Name:src
Committed By:   enami
Date:   Tue Aug 31 05:07:10 UTC 2010

Modified Files:
src/bin/pax: ar_io.c

Log Message:
Backout previous; it was wrong fix.


To generate a diff of this commit:
cvs rdiff -u -r1.51 -r1.52 src/bin/pax/ar_io.c

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

Modified files:

Index: src/bin/pax/ar_io.c
diff -u src/bin/pax/ar_io.c:1.51 src/bin/pax/ar_io.c:1.52
--- src/bin/pax/ar_io.c:1.51	Tue Aug 31 04:50:07 2010
+++ src/bin/pax/ar_io.c	Tue Aug 31 05:07:09 2010
@@ -42,7 +42,7 @@
 #if 0
 static char sccsid[] = @(#)ar_io.c	8.2 (Berkeley) 4/18/94;
 #else
-__RCSID($NetBSD: ar_io.c,v 1.51 2010/08/31 04:50:07 enami Exp $);
+__RCSID($NetBSD: ar_io.c,v 1.52 2010/08/31 05:07:09 enami Exp $);
 #endif
 #endif /* not lint */
 
@@ -147,13 +147,11 @@
 			syswarn(0, errno, Failed open on %s, name);
 			return -1;
 		}
-#if !HAVE_NBTOOL_CONFIG_H
 		if (!isrmt(arfd)) {
 			rmtclose(arfd);
 			tty_warn(0, Not a remote file: %s, name);
 			return -1;
 		}
-#endif
 		blksz = rdblksz = 8192;
 		lstrval = 1;
 		return 0;



CVS commit: src

2010-08-30 Thread enami tsugutomo
Module Name:src
Committed By:   enami
Date:   Tue Aug 31 05:12:35 UTC 2010

Modified Files:
src/include: rmt.h
src/lib/librmt: rmtlib.c

Log Message:
Move prototype of isrmt() to rmt.h.  It is a public interface
described in rmtops(3).


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/include/rmt.h
cvs rdiff -u -r1.21 -r1.22 src/lib/librmt/rmtlib.c

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

Modified files:

Index: src/include/rmt.h
diff -u src/include/rmt.h:1.5 src/include/rmt.h:1.6
--- src/include/rmt.h:1.5	Thu Feb  3 04:39:32 2005
+++ src/include/rmt.h	Tue Aug 31 05:12:35 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: rmt.h,v 1.5 2005/02/03 04:39:32 perry Exp $	*/
+/*	$NetBSD: rmt.h,v 1.6 2010/08/31 05:12:35 enami Exp $	*/
 
 /*
  *	rmt.h
@@ -20,6 +20,7 @@
 #include sys/cdefs.h
 
 __BEGIN_DECLS
+int	isrmt(int);
 int	rmtaccess(const char *, int);
 int	rmtclose(int);
 int	rmtcreat(const char *, mode_t);

Index: src/lib/librmt/rmtlib.c
diff -u src/lib/librmt/rmtlib.c:1.21 src/lib/librmt/rmtlib.c:1.22
--- src/lib/librmt/rmtlib.c:1.21	Sun Mar 19 23:05:50 2006
+++ src/lib/librmt/rmtlib.c	Tue Aug 31 05:12:35 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: rmtlib.c,v 1.21 2006/03/19 23:05:50 christos Exp $	*/
+/*	$NetBSD: rmtlib.c,v 1.22 2010/08/31 05:12:35 enami Exp $	*/
 
 /*
  *	rmt --- remote tape emulator subroutines
@@ -28,7 +28,7 @@
  */
 
 #include sys/cdefs.h
-__RCSID($NetBSD: rmtlib.c,v 1.21 2006/03/19 23:05:50 christos Exp $);
+__RCSID($NetBSD: rmtlib.c,v 1.22 2010/08/31 05:12:35 enami Exp $);
 
 #define RMTIOCTL	1
 /* #define USE_REXEC	1 */	/* rexec code courtesy of Dan Kegel, srs!dan */
@@ -71,8 +71,6 @@
 static	void	rmtabort(int);
 static	int	status(int);
 
-	int	isrmt(int);
-
 
 #define BUFMAGIC	64	/* a magic number for buffer sizes */
 #define MAXUNIT		4