CVS commit: src/lib/libpuffs
Module Name:src Committed By: pooka Date: Mon Dec 13 09:06:52 UTC 2010 Modified Files: src/lib/libpuffs: puffs_ops.3 Log Message: document abortop. part of PR kern/44208 To generate a diff of this commit: cvs rdiff -u -r1.26 -r1.27 src/lib/libpuffs/puffs_ops.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/libpuffs/puffs_ops.3 diff -u src/lib/libpuffs/puffs_ops.3:1.26 src/lib/libpuffs/puffs_ops.3:1.27 --- src/lib/libpuffs/puffs_ops.3:1.26 Fri May 21 11:20:50 2010 +++ src/lib/libpuffs/puffs_ops.3 Mon Dec 13 09:06:51 2010 @@ -1,4 +1,4 @@ -.\ $NetBSD: puffs_ops.3,v 1.26 2010/05/21 11:20:50 pooka Exp $ +.\ $NetBSD: puffs_ops.3,v 1.27 2010/12/13 09:06:51 pooka Exp $ .\ .\ Copyright (c) 2007 Antti Kantee. All rights reserved. .\ @@ -23,7 +23,7 @@ .\ OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\ SUCH DAMAGE. .\ -.Dd May 21, 2010 +.Dd December 13, 2010 .Dt PUFFS_OPS 3 .Os .Sh NAME @@ -177,6 +177,11 @@ .Fa off_t offset size_t *resid const struct puffs_cred *pcr int ioflag .Fc .Ft int +.Fo puffs_node_abortop +.Fa struct puffs_usermount *pu puffs_cookie_t opc +.Fa const struct puffs_cn *pcn +.Fc +.Ft int .Fo puffs_node_getextattr .Fa struct puffs_usermount *pu puffs_cookie_t opc int attrnamespace .Fa const char *attrname size_t *attrsize uint8_t *attr size_t *resid @@ -728,6 +733,11 @@ In case the file .Fa opc has a link count of zero, it may be safely removed now. +.It Fn puffs_node_abortop pu opc pcn +In case the operation following lookup (e.g. mkdir or remove) is not +executed for some reason, abortop will be issued. +This is useful only for servers which cache state between lookup +and a directory operation and is generally left unimplemented. .It Fn puffs_node_inactive pu opc The node .Fa opc
CVS commit: src
Module Name:src Committed By: jruoho Date: Mon Dec 13 10:07:47 UTC 2010 Modified Files: src/lib/libc/sys: modctl.2 src/sbin/modload: modload.8 src/sbin/modstat: modstat.8 src/sbin/modunload: modunload.8 src/share/man/man9: module.9 Log Message: Xref module(4). To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/lib/libc/sys/modctl.2 cvs rdiff -u -r1.38 -r1.39 src/sbin/modload/modload.8 cvs rdiff -u -r1.6 -r1.7 src/sbin/modstat/modstat.8 cvs rdiff -u -r1.18 -r1.19 src/sbin/modunload/modunload.8 cvs rdiff -u -r1.23 -r1.24 src/share/man/man9/module.9 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libc/sys/modctl.2 diff -u src/lib/libc/sys/modctl.2:1.6 src/lib/libc/sys/modctl.2:1.7 --- src/lib/libc/sys/modctl.2:1.6 Sun Nov 28 00:26:38 2010 +++ src/lib/libc/sys/modctl.2 Mon Dec 13 10:07:46 2010 @@ -1,4 +1,4 @@ -.\ $NetBSD: modctl.2,v 1.6 2010/11/28 00:26:38 jnemeth Exp $ +.\ $NetBSD: modctl.2,v 1.7 2010/12/13 10:07:46 jruoho Exp $ .\ .\ Copyright (c) 2009 The NetBSD Foundation, Inc. .\ All rights reserved. @@ -24,7 +24,7 @@ .\ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\ POSSIBILITY OF SUCH DAMAGE. .\ -.Dd November 27, 2010 +.Dd December 13, 2010 .Dt MODCTL 2 .Os .Sh NAME @@ -269,6 +269,9 @@ and the requested module does not match the current kernel's version information. .El +.Sh SEE ALSO +.Xr module 4 , +.Xr module 9 .Sh HISTORY The .Fn modctl Index: src/sbin/modload/modload.8 diff -u src/sbin/modload/modload.8:1.38 src/sbin/modload/modload.8:1.39 --- src/sbin/modload/modload.8:1.38 Fri Mar 5 18:51:22 2010 +++ src/sbin/modload/modload.8 Mon Dec 13 10:07:47 2010 @@ -1,4 +1,4 @@ -.\ $NetBSD: modload.8,v 1.38 2010/03/05 18:51:22 pooka Exp $ +.\ $NetBSD: modload.8,v 1.39 2010/12/13 10:07:47 jruoho Exp $ .\ .\ Copyright (c) 1993 Christopher G. Demetriou .\ All rights reserved. @@ -32,7 +32,7 @@ .\ .\ Id: LICENSE,v 1.2 2000/06/14 15:57:33 cgd Exp .\ -.Dd March 5, 2010 +.Dd December 13, 2010 .Dt MODLOAD 8 .Os .Sh NAME @@ -126,6 +126,7 @@ utility exits with a status of 0 on success and with a nonzero status if an error occurs. .Sh SEE ALSO +.Xr module 4 , .Xr modstat 8 , .Xr modunload 8 .Sh HISTORY Index: src/sbin/modstat/modstat.8 diff -u src/sbin/modstat/modstat.8:1.6 src/sbin/modstat/modstat.8:1.7 --- src/sbin/modstat/modstat.8:1.6 Fri Mar 5 18:51:23 2010 +++ src/sbin/modstat/modstat.8 Mon Dec 13 10:07:47 2010 @@ -1,4 +1,4 @@ -.\ $NetBSD: modstat.8,v 1.6 2010/03/05 18:51:23 pooka Exp $ +.\ $NetBSD: modstat.8,v 1.7 2010/12/13 10:07:47 jruoho Exp $ .\ .\ Copyright (c) 1993 Christopher G. Demetriou .\ All rights reserved. @@ -32,7 +32,7 @@ .\ .\ Id: LICENSE,v 1.2 2000/06/14 15:57:33 cgd Exp .\ -.Dd March 5, 2010 +.Dd December 13, 2010 .Dt MODSTAT 8 .Os .Sh NAME @@ -84,6 +84,7 @@ utility exits with a status of 0 on success and with a nonzero status if an error occurs. .Sh SEE ALSO +.Xr module 4 , .Xr modload 8 , .Xr modunload 8 .Sh HISTORY Index: src/sbin/modunload/modunload.8 diff -u src/sbin/modunload/modunload.8:1.18 src/sbin/modunload/modunload.8:1.19 --- src/sbin/modunload/modunload.8:1.18 Mon Dec 6 23:42:48 2010 +++ src/sbin/modunload/modunload.8 Mon Dec 13 10:07:47 2010 @@ -1,4 +1,4 @@ -.\ $NetBSD: modunload.8,v 1.18 2010/12/06 23:42:48 jmcneill Exp $ +.\ $NetBSD: modunload.8,v 1.19 2010/12/13 10:07:47 jruoho Exp $ .\ .\ Copyright (c) 1993 Christopher G. Demetriou .\ All rights reserved. @@ -32,7 +32,7 @@ .\ .\ Id: LICENSE,v 1.2 2000/06/14 15:57:33 cgd Exp .\ -.Dd December 6, 2010 +.Dd December 13, 2010 .Dt MODUNLOAD 8 .Os .Sh NAME @@ -61,6 +61,7 @@ utility exits with a status of 0 on success and with a nonzero status if an error occurs. .Sh SEE ALSO +.Xr module 4 , .Xr modload 8 , .Xr modstat 8 .Sh HISTORY Index: src/share/man/man9/module.9 diff -u src/share/man/man9/module.9:1.23 src/share/man/man9/module.9:1.24 --- src/share/man/man9/module.9:1.23 Thu Dec 2 12:54:13 2010 +++ src/share/man/man9/module.9 Mon Dec 13 10:07:46 2010 @@ -1,4 +1,4 @@ -.\ $NetBSD: module.9,v 1.23 2010/12/02 12:54:13 wiz Exp $ +.\ $NetBSD: module.9,v 1.24 2010/12/13 10:07:46 jruoho Exp $ .\ .\ Copyright (c) 2010 The NetBSD Foundation, Inc. .\ All rights reserved. @@ -27,7 +27,7 @@ .\ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\ POSSIBILITY OF SUCH DAMAGE. .\ -.Dd November 27, 2010 +.Dd December 13, 2010 .Dt MODULE 9 .Os .Sh NAME @@ -430,7 +430,8 @@ .Fn module_init_md is for finding modules passed in by the boot loader. .Sh SEE ALSO -.Xr modctl 2 +.Xr modctl 2 , +.Xr module 4 .Sh HISTORY The kernel module subsystem first appeared in .Nx 5.0 .
CVS commit: src/usr.sbin/fwctl
Module Name:src Committed By: cegger Date: Mon Dec 13 11:51:23 UTC 2010 Modified Files: src/usr.sbin/fwctl: fwcontrol.c Log Message: PR bin/44230: Missing close. To generate a diff of this commit: cvs rdiff -u -r1.10 -r1.11 src/usr.sbin/fwctl/fwcontrol.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/fwctl/fwcontrol.c diff -u src/usr.sbin/fwctl/fwcontrol.c:1.10 src/usr.sbin/fwctl/fwcontrol.c:1.11 --- src/usr.sbin/fwctl/fwcontrol.c:1.10 Thu Aug 26 07:04:04 2010 +++ src/usr.sbin/fwctl/fwcontrol.c Mon Dec 13 11:51:23 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: fwcontrol.c,v 1.10 2010/08/26 07:04:04 cegger Exp $ */ +/* $NetBSD: fwcontrol.c,v 1.11 2010/12/13 11:51:23 cegger Exp $ */ /* * Copyright (C) 2002 * Hidetoshi Shimokawa. All rights reserved. @@ -34,7 +34,7 @@ */ #include sys/cdefs.h //__FBSDID($FreeBSD: src/usr.sbin/fwcontrol/fwcontrol.c,v 1.23 2006/10/26 22:33:38 imp Exp $); -__RCSID($NetBSD: fwcontrol.c,v 1.10 2010/08/26 07:04:04 cegger Exp $); +__RCSID($NetBSD: fwcontrol.c,v 1.11 2010/12/13 11:51:23 cegger Exp $); #include sys/param.h #include sys/malloc.h @@ -492,6 +492,7 @@ fscanf(file, DUMP_FORMAT, p, p+1, p+2, p+3, p+4, p+5, p+6, p+7); p += 8; } + fclose(file); } static void
CVS commit: src/usr.bin
Module Name:src Committed By: pooka Date: Mon Dec 13 13:29:15 UTC 2010 Modified Files: src/usr.bin: Makefile Added Files: src/usr.bin/rump_server: Makefile Log Message: Add rump_server which is just like rump_allserver with the exception that it links in only -lrump instead of everything. The startup time difference (especially when attaching a debugger) is noticeable. To generate a diff of this commit: cvs rdiff -u -r1.195 -r1.196 src/usr.bin/Makefile cvs rdiff -u -r0 -r1.1 src/usr.bin/rump_server/Makefile 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/Makefile diff -u src/usr.bin/Makefile:1.195 src/usr.bin/Makefile:1.196 --- src/usr.bin/Makefile:1.195 Sun Dec 12 12:48:30 2010 +++ src/usr.bin/Makefile Mon Dec 13 13:29:15 2010 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.195 2010/12/12 12:48:30 pooka Exp $ +# $NetBSD: Makefile,v 1.196 2010/12/13 13:29:15 pooka Exp $ # from: @(#)Makefile 8.3 (Berkeley) 1/7/94 .include bsd.own.mk @@ -22,7 +22,7 @@ pagesize passwd paste patch pathchk pkill pmap pmc pr \ printenv printf progress pwhash qsubst quota radioctl rdist \ renice rev revoke rfcomm_sppd rlogin rpcgen rpcinfo rs rsh \ - rump_allserver rump_halt rup ruptime rusers rwall rwho \ + rump_allserver rump_halt rump_server rup ruptime rusers rwall rwho \ script sdiff sdpquery sed seq shar shlock \ showmount shuffle sockstat soelim sort spell split stat su systat \ tabs tail talk tcopy tee telnet tftp tic time tip touch tput \ Added files: Index: src/usr.bin/rump_server/Makefile diff -u /dev/null src/usr.bin/rump_server/Makefile:1.1 --- /dev/null Mon Dec 13 13:29:15 2010 +++ src/usr.bin/rump_server/Makefile Mon Dec 13 13:29:15 2010 @@ -0,0 +1,12 @@ +# $NetBSD: Makefile,v 1.1 2010/12/13 13:29:15 pooka Exp $ +# + +.PATH: ${.CURDIR}/../rump_allserver + +PROG= rump_server +SRCS= rump_allserver.c +NOMAN= for now + +LDADD+= -lrump -lrumpuser -lpthread + +.include bsd.prog.mk
CVS commit: src/usr.bin/rump_allserver
Module Name:src Committed By: pooka Date: Mon Dec 13 13:32:26 UTC 2010 Modified Files: src/usr.bin/rump_allserver: rump_allserver.c Log Message: Handle -l which dlopens libs. This is more applicable to rump_server than rump_allserver. So if I do: golem rump_server unix:///tmp/commsuck == golem env RUMP_SERVER=unix:///tmp/commsuck rump.modstat NAME CLASS SOURCE REFS SIZE REQUIRES susersecmodel builtin0 -- and: golem rump_server -l librumpvfs.so unix:///tmp/commsuck == golem env RUMP_SERVER=unix:///tmp/commsuck rump.modstat NAME CLASS SOURCE REFS SIZE REQUIRES susersecmodel builtin0 -- wapblvfsbuiltin0 -- golem rump_server -l librumpvfs.so -l librumpfs_ffs.so unix:///tmp/commsuck == golem env RUMP_SERVER=unix:///tmp/commsuck rump.modstat NAME CLASS SOURCE REFS SIZE REQUIRES ffs vfsbuiltin0 -- susersecmodel builtin0 -- wapblvfsbuiltin0 -- Well, you get the picture... To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/usr.bin/rump_allserver/rump_allserver.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/rump_allserver/rump_allserver.c diff -u src/usr.bin/rump_allserver/rump_allserver.c:1.5 src/usr.bin/rump_allserver/rump_allserver.c:1.6 --- src/usr.bin/rump_allserver/rump_allserver.c:1.5 Sun Dec 12 18:33:44 2010 +++ src/usr.bin/rump_allserver/rump_allserver.c Mon Dec 13 13:32:25 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: rump_allserver.c,v 1.5 2010/12/12 18:33:44 pooka Exp $ */ +/* $NetBSD: rump_allserver.c,v 1.6 2010/12/13 13:32:25 pooka Exp $ */ /*- * Copyright (c) 2010 Antti Kantee. All Rights Reserved. @@ -27,7 +27,7 @@ #include sys/cdefs.h #ifndef lint -__RCSID($NetBSD: rump_allserver.c,v 1.5 2010/12/12 18:33:44 pooka Exp $); +__RCSID($NetBSD: rump_allserver.c,v 1.6 2010/12/13 13:32:25 pooka Exp $); #endif /* !lint */ #include sys/types.h @@ -36,6 +36,7 @@ #include rump/rump.h #include rump/rump_syscalls.h +#include dlfcn.h #include err.h #include errno.h #include semaphore.h @@ -80,8 +81,13 @@ setprogname(argv[0]); sflag = 0; - while ((ch = getopt(argc, argv, s)) != -1) { + while ((ch = getopt(argc, argv, l:s)) != -1) { switch (ch) { + case 'l': + if (dlopen(optarg, RTLD_LAZY|RTLD_GLOBAL) == NULL) +errx(1, dlopen %s failed: %s, +optarg, dlerror()); + break; case 's': sflag = 1; break;
CVS commit: src/distrib/sets/lists
Module Name:src Committed By: pooka Date: Mon Dec 13 13:38:20 UTC 2010 Modified Files: src/distrib/sets/lists/base: mi src/distrib/sets/lists/comp: mi Log Message: +rump_server To generate a diff of this commit: cvs rdiff -u -r1.899 -r1.900 src/distrib/sets/lists/base/mi cvs rdiff -u -r1.1536 -r1.1537 src/distrib/sets/lists/comp/mi Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/distrib/sets/lists/base/mi diff -u src/distrib/sets/lists/base/mi:1.899 src/distrib/sets/lists/base/mi:1.900 --- src/distrib/sets/lists/base/mi:1.899 Sun Dec 12 12:48:31 2010 +++ src/distrib/sets/lists/base/mi Mon Dec 13 13:38:18 2010 @@ -1,4 +1,4 @@ -# $NetBSD: mi,v 1.899 2010/12/12 12:48:31 pooka Exp $ +# $NetBSD: mi,v 1.900 2010/12/13 13:38:18 pooka Exp $ # # Note: Don't delete entries from here - mark them as obsolete instead, # unless otherwise stated below. @@ -588,6 +588,7 @@ ./usr/bin/rs base-util-bin ./usr/bin/rsh base-netutil-bin ./usr/bin/rump_allserver base-util-bin +./usr/bin/rump_server base-util-bin ./usr/bin/rump.halt base-util-bin ./usr/bin/rup base-netutil-bin ./usr/bin/ruptimebase-netutil-bin Index: src/distrib/sets/lists/comp/mi diff -u src/distrib/sets/lists/comp/mi:1.1536 src/distrib/sets/lists/comp/mi:1.1537 --- src/distrib/sets/lists/comp/mi:1.1536 Sun Dec 12 12:48:31 2010 +++ src/distrib/sets/lists/comp/mi Mon Dec 13 13:38:19 2010 @@ -1,4 +1,4 @@ -# $NetBSD: mi,v 1.1536 2010/12/12 12:48:31 pooka Exp $ +# $NetBSD: mi,v 1.1537 2010/12/13 13:38:19 pooka Exp $ # # Note: don't delete entries from here - mark them as obsolete instead. # @@ -3322,6 +3322,7 @@ ./usr/libdata/debug/usr/bin/rs.debug comp-util-debug debug ./usr/libdata/debug/usr/bin/rsh.debug comp-netutil-debug debug ./usr/libdata/debug/usr/bin/rump_allserver.debug comp-util-debug debug +./usr/libdata/debug/usr/bin/rump_server.debug comp-util-debug debug ./usr/libdata/debug/usr/bin/rump.halt.debug comp-util-debug debug ./usr/libdata/debug/usr/bin/rup.debug comp-netutil-debug debug ./usr/libdata/debug/usr/bin/ruptime.debug comp-netutil-debug debug
CVS commit: src
Module Name:src Committed By: pooka Date: Mon Dec 13 13:39:43 UTC 2010 Modified Files: src/distrib/sets/lists/tests: mi src/tests/rump/rumpkern: Makefile t_sp.sh Removed Files: src/tests/rump/rumpkern/h_server: Makefile h_simpleserver.c Log Message: Retire h_simpleserver and use rump_server instead. To generate a diff of this commit: cvs rdiff -u -r1.171 -r1.172 src/distrib/sets/lists/tests/mi cvs rdiff -u -r1.10 -r1.11 src/tests/rump/rumpkern/Makefile cvs rdiff -u -r1.2 -r1.3 src/tests/rump/rumpkern/t_sp.sh cvs rdiff -u -r1.1 -r0 src/tests/rump/rumpkern/h_server/Makefile \ src/tests/rump/rumpkern/h_server/h_simpleserver.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/distrib/sets/lists/tests/mi diff -u src/distrib/sets/lists/tests/mi:1.171 src/distrib/sets/lists/tests/mi:1.172 --- src/distrib/sets/lists/tests/mi:1.171 Sun Dec 12 12:53:35 2010 +++ src/distrib/sets/lists/tests/mi Mon Dec 13 13:39:42 2010 @@ -1,4 +1,4 @@ -# $NetBSD: mi,v 1.171 2010/12/12 12:53:35 pooka Exp $ +# $NetBSD: mi,v 1.172 2010/12/13 13:39:42 pooka Exp $ # # Note: don't delete entries from here - mark them as obsolete instead. # @@ -415,8 +415,8 @@ ./usr/libdata/debug/usr/tests/rump/rumpkern/h_client/h_reboot.debug tests-obsolete obsolete ./usr/libdata/debug/usr/tests/rump/rumpkern/h_client/h_simplecli.debug tests-syscall-debug debug,atf ./usr/libdata/debug/usr/tests/rump/rumpkern/h_client/h_stresscli.debug tests-syscall-debug debug,atf -./usr/libdata/debug/usr/tests/rump/rumpkern/h_server tests-syscall-debug -./usr/libdata/debug/usr/tests/rump/rumpkern/h_server/h_simpleserver.debug tests-syscall-debug debug,atf +./usr/libdata/debug/usr/tests/rump/rumpkern/h_server tests-obsolete obsolete +./usr/libdata/debug/usr/tests/rump/rumpkern/h_server/h_simpleserver.debug tests-obsolete obsolete ./usr/libdata/debug/usr/tests/rump/rumpvfstests-syscall-debug ./usr/libdata/debug/usr/tests/rump/rumpvfs/t_etfs.debug tests-syscall-debug debug,atf ./usr/libdata/debug/usr/tests/rump/rumpvfs/t_p2kifs.debug tests-syscall-debug debug,atf @@ -1653,8 +1653,8 @@ ./usr/tests/rump/rumpkern/h_client/h_reboot tests-obsolete obsolete ./usr/tests/rump/rumpkern/h_client/h_simplecli tests-rump-tests atf ./usr/tests/rump/rumpkern/h_client/h_stresscli tests-rump-tests atf -./usr/tests/rump/rumpkern/h_server tests-rump-tests -./usr/tests/rump/rumpkern/h_server/h_simpleserver tests-rump-tests atf +./usr/tests/rump/rumpkern/h_server tests-obsolete obsolete +./usr/tests/rump/rumpkern/h_server/h_simpleserver tests-obsolete obsolete ./usr/tests/rump/rumpvfs tests-rump-tests ./usr/tests/rump/rumpvfs/Atffile tests-rump-tests atf ./usr/tests/rump/rumpvfs/t_etfs tests-rump-tests atf Index: src/tests/rump/rumpkern/Makefile diff -u src/tests/rump/rumpkern/Makefile:1.10 src/tests/rump/rumpkern/Makefile:1.11 --- src/tests/rump/rumpkern/Makefile:1.10 Tue Nov 30 22:09:15 2010 +++ src/tests/rump/rumpkern/Makefile Mon Dec 13 13:39:42 2010 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.10 2010/11/30 22:09:15 pooka Exp $ +# $NetBSD: Makefile,v 1.11 2010/12/13 13:39:42 pooka Exp $ .include bsd.own.mk @@ -14,7 +14,7 @@ TESTS_SH= t_sp -SUBDIR+= h_server h_client +SUBDIR+= h_client ADD_TO_LD= -lrumpvfs -lrump -lrumpuser -lpthread LDADD.t_modlinkset+= -lukfs -lrumpdev_disk -lrumpdev -lrumpfs_msdos Index: src/tests/rump/rumpkern/t_sp.sh diff -u src/tests/rump/rumpkern/t_sp.sh:1.2 src/tests/rump/rumpkern/t_sp.sh:1.3 --- src/tests/rump/rumpkern/t_sp.sh:1.2 Sun Dec 12 12:51:19 2010 +++ src/tests/rump/rumpkern/t_sp.sh Mon Dec 13 13:39:42 2010 @@ -1,4 +1,4 @@ -# $NetBSD: t_sp.sh,v 1.2 2010/12/12 12:51:19 pooka Exp $ +# $NetBSD: t_sp.sh,v 1.3 2010/12/13 13:39:42 pooka Exp $ # # Copyright (c) 2010 The NetBSD Foundation, Inc. # All rights reserved. @@ -37,8 +37,7 @@ export RUMP_SERVER=unix://commsock - atf_check -s exit:0 \ - $(atf_get_srcdir)/h_server/h_simpleserver ${RUMP_SERVER} + atf_check -s exit:0 rump_server ${RUMP_SERVER} atf_check -s exit:0 $(atf_get_srcdir)/h_client/h_simplecli } @@ -62,8 +61,7 @@ export RUMP_SERVER=unix://commsock - atf_check -s exit:0 \ - $(atf_get_srcdir)/h_server/h_simpleserver ${RUMP_SERVER} + atf_check -s exit:0 rump_server ${RUMP_SERVER} atf_check -s exit:0 $(atf_get_srcdir)/h_client/h_stresscli ${stresst} }
CVS commit: src/etc/mtree
Module Name:src Committed By: pooka Date: Mon Dec 13 13:41:42 UTC 2010 Modified Files: src/etc/mtree: NetBSD.dist.tests Log Message: directory not used anymore To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/etc/mtree/NetBSD.dist.tests Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/etc/mtree/NetBSD.dist.tests diff -u src/etc/mtree/NetBSD.dist.tests:1.1 src/etc/mtree/NetBSD.dist.tests:1.2 --- src/etc/mtree/NetBSD.dist.tests:1.1 Wed Dec 8 23:56:02 2010 +++ src/etc/mtree/NetBSD.dist.tests Mon Dec 13 13:41:41 2010 @@ -1,4 +1,4 @@ -# $NetBSD: NetBSD.dist.tests,v 1.1 2010/12/08 23:56:02 njoly Exp $ +# $NetBSD: NetBSD.dist.tests,v 1.2 2010/12/13 13:41:41 pooka Exp $ ./usr/libdata/debug/usr/tests ./usr/libdata/debug/usr/tests/atf @@ -78,7 +78,6 @@ ./usr/libdata/debug/usr/tests/rump/modautoload ./usr/libdata/debug/usr/tests/rump/rumpkern ./usr/libdata/debug/usr/tests/rump/rumpkern/h_client -./usr/libdata/debug/usr/tests/rump/rumpkern/h_server ./usr/libdata/debug/usr/tests/rump/rumpvfs ./usr/libdata/debug/usr/tests/sbin ./usr/libdata/debug/usr/tests/sbin/resize_ffs @@ -169,7 +168,6 @@ ./usr/tests/rump/modautoload ./usr/tests/rump/rumpkern ./usr/tests/rump/rumpkern/h_client -./usr/tests/rump/rumpkern/h_server ./usr/tests/rump/rumpvfs ./usr/tests/sbin ./usr/tests/sbin/resize_ffs
CVS commit: src/sys/rump/librump/rumpkern
Module Name:src Committed By: pooka Date: Mon Dec 13 14:03:59 UTC 2010 Modified Files: src/sys/rump/librump/rumpkern: rump.c Log Message: stubs to make life easier To generate a diff of this commit: cvs rdiff -u -r1.210 -r1.211 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.210 src/sys/rump/librump/rumpkern/rump.c:1.211 --- src/sys/rump/librump/rumpkern/rump.c:1.210 Sun Dec 12 17:11:33 2010 +++ src/sys/rump/librump/rumpkern/rump.c Mon Dec 13 14:03:59 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: rump.c,v 1.210 2010/12/12 17:11:33 pooka Exp $ */ +/* $NetBSD: rump.c,v 1.211 2010/12/13 14:03:59 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.210 2010/12/12 17:11:33 pooka Exp $); +__KERNEL_RCSID(0, $NetBSD: rump.c,v 1.211 2010/12/13 14:03:59 pooka Exp $); #include sys/systm.h #define ELFSIZE ARCH_ELFSIZE @@ -144,6 +144,10 @@ void rump__unavailable_vfs_panic() {panic(vfs component not available);} __weak_alias(usermount_common_policy,rump__unavailable_vfs_panic); +/* easier to write vfs-less clients */ +__weak_alias(rump_pub_etfs_register,rump__unavailable); +__weak_alias(rump_pub_etfs_remove,rump__unavailable); + rump_proc_vfs_init_fn rump_proc_vfs_init; rump_proc_vfs_release_fn rump_proc_vfs_release;
CVS commit: src/usr.bin/rump_allserver
Module Name:src Committed By: pooka Date: Mon Dec 13 14:13:22 UTC 2010 Modified Files: src/usr.bin/rump_allserver: rump_allserver.c Log Message: Add -m which can be used to load modules (which is a completely different code path than using dlopen() before rump_init(), since the former uses the in-kernel linker and the latter links the object in rtld). So: golem ./rump_server -l librumpvfs.so -m /sys/modules/tmpfs/tmpfs.kmod unix:///tmp/commsuck == golem env RUMP_SERVER=unix:///tmp/commsuck rump.modstat NAME CLASS SOURCE REFS SIZE REQUIRES susersecmodel builtin0 -- tmpfsvfsfilesys0 16713- wapblvfsbuiltin0 -- Source is filesys instead of builtin, as expected. Notably, for -m you *must* use -l librumpvfs.so. This is because you need VFS in your kernel to be able to load modules from the file system. In a regular kernel librumpvfs.so is linked at kernel build time and loaded by the bootloader. Here we use dlopen() for both effects (the other choices would have been to link rump_server with -lrumpvfs, but that would limit the flexibility, or link tmpfs.kmod directly into the binary, but that would limit the flexibility even more). To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/usr.bin/rump_allserver/rump_allserver.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/rump_allserver/rump_allserver.c diff -u src/usr.bin/rump_allserver/rump_allserver.c:1.6 src/usr.bin/rump_allserver/rump_allserver.c:1.7 --- src/usr.bin/rump_allserver/rump_allserver.c:1.6 Mon Dec 13 13:32:25 2010 +++ src/usr.bin/rump_allserver/rump_allserver.c Mon Dec 13 14:13:21 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: rump_allserver.c,v 1.6 2010/12/13 13:32:25 pooka Exp $ */ +/* $NetBSD: rump_allserver.c,v 1.7 2010/12/13 14:13:21 pooka Exp $ */ /*- * Copyright (c) 2010 Antti Kantee. All Rights Reserved. @@ -27,11 +27,12 @@ #include sys/cdefs.h #ifndef lint -__RCSID($NetBSD: rump_allserver.c,v 1.6 2010/12/13 13:32:25 pooka Exp $); +__RCSID($NetBSD: rump_allserver.c,v 1.7 2010/12/13 14:13:21 pooka Exp $); #endif /* !lint */ #include sys/types.h #include sys/signal.h +#include sys/module.h #include rump/rump.h #include rump/rump_syscalls.h @@ -75,19 +76,31 @@ main(int argc, char *argv[]) { const char *serverurl; + char **modarray = NULL; + unsigned nmods = 0, curmod = 0, i; int error; int ch, sflag; setprogname(argv[0]); sflag = 0; - while ((ch = getopt(argc, argv, l:s)) != -1) { + while ((ch = getopt(argc, argv, l:m:s)) != -1) { switch (ch) { case 'l': if (dlopen(optarg, RTLD_LAZY|RTLD_GLOBAL) == NULL) errx(1, dlopen %s failed: %s, optarg, dlerror()); break; + case 'm': + if (nmods - curmod == 0) { +modarray = realloc(modarray, +(nmods+16) * sizeof(char *)); +if (modarray == NULL) + err(1, realloc); +nmods += 16; + } + modarray[curmod++] = optarg; + break; case 's': sflag = 1; break; @@ -114,6 +127,21 @@ error = rump_init(); if (error) die(sflag, error, rump init failed); + + for (i = 0; i curmod; i++) { + struct modctl_load ml; + +#define ETFSKEY /module.mod + if ((error = rump_pub_etfs_register(ETFSKEY, + modarray[0], RUMP_ETFS_REG)) != 0) + die(sflag, error, module etfs register failed); + memset(ml, 0, sizeof(ml)); + ml.ml_filename = ETFSKEY; + if (rump_sys_modctl(MODCTL_LOAD, ml) == -1) + die(sflag, errno, module load failed); + rump_pub_etfs_remove(ETFSKEY); + } + error = rump_init_server(serverurl); if (error) die(sflag, error, rump server init failed);
CVS commit: src/lib/libc/gen
Module Name:src Committed By: pooka Date: Mon Dec 13 14:17:11 UTC 2010 Modified Files: src/lib/libc/gen: sysctlbyname.c Log Message: Mirror sysctlgetmibinfo RUMP_ACTION change. To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/lib/libc/gen/sysctlbyname.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libc/gen/sysctlbyname.c diff -u src/lib/libc/gen/sysctlbyname.c:1.5 src/lib/libc/gen/sysctlbyname.c:1.6 --- src/lib/libc/gen/sysctlbyname.c:1.5 Wed Jul 22 22:53:41 2009 +++ src/lib/libc/gen/sysctlbyname.c Mon Dec 13 14:17:11 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: sysctlbyname.c,v 1.5 2009/07/22 22:53:41 alc Exp $ */ +/* $NetBSD: sysctlbyname.c,v 1.6 2010/12/13 14:17:11 pooka Exp $ */ /*- * Copyright (c) 2003,2004 The NetBSD Foundation, Inc. @@ -31,10 +31,12 @@ #include sys/cdefs.h #if defined(LIBC_SCCS) !defined(lint) -__RCSID($NetBSD: sysctlbyname.c,v 1.5 2009/07/22 22:53:41 alc Exp $); +__RCSID($NetBSD: sysctlbyname.c,v 1.6 2010/12/13 14:17:11 pooka Exp $); #endif /* LIBC_SCCS and not lint */ +#ifndef RUMP_ACTION #include namespace.h +#endif #include sys/param.h #include sys/sysctl.h @@ -42,6 +44,11 @@ __weak_alias(sysctlbyname,_sysctlbyname) #endif +#ifdef RUMP_ACTION +#include rump/rump_syscalls.h +#define sysctl(a,b,c,d,e,f) rump_sys___sysctl(a,b,c,d,e,f) +#endif + /* * trivial sysctlbyname() function for the lazy. */
CVS commit: src/sys/netinet
Module Name:src Committed By: matt Date: Mon Dec 13 14:18:50 UTC 2010 Modified Files: src/sys/netinet: ip_input.c Log Message: Back out rev that shouldn't have been committed. To generate a diff of this commit: cvs rdiff -u -r1.292 -r1.293 src/sys/netinet/ip_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/netinet/ip_input.c diff -u src/sys/netinet/ip_input.c:1.292 src/sys/netinet/ip_input.c:1.293 --- src/sys/netinet/ip_input.c:1.292 Sat Dec 11 22:37:46 2010 +++ src/sys/netinet/ip_input.c Mon Dec 13 14:18:50 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: ip_input.c,v 1.292 2010/12/11 22:37:46 matt Exp $ */ +/* $NetBSD: ip_input.c,v 1.293 2010/12/13 14:18:50 matt Exp $ */ /* * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project. @@ -91,7 +91,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: ip_input.c,v 1.292 2010/12/11 22:37:46 matt Exp $); +__KERNEL_RCSID(0, $NetBSD: ip_input.c,v 1.293 2010/12/13 14:18:50 matt Exp $); #include opt_inet.h #include opt_compat_netbsd.h @@ -390,9 +390,7 @@ IF_DEQUEUE(lcl_intrq, m); if (m == NULL) break; - KERNEL_UNLOCK_ONE(NULL); ip_input(m); - KERNEL_LOCK(1, NULL); } mutex_exit(softnet_lock); }
CVS commit: src/usr.bin/rump_allserver
Module Name:src Committed By: pooka Date: Mon Dec 13 14:26:22 UTC 2010 Modified Files: src/usr.bin/rump_allserver: rump_allserver.c Log Message: Also support ld syntax in -l. was: -l librumpvfs.so now: -lrumpvfs To generate a diff of this commit: cvs rdiff -u -r1.7 -r1.8 src/usr.bin/rump_allserver/rump_allserver.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/rump_allserver/rump_allserver.c diff -u src/usr.bin/rump_allserver/rump_allserver.c:1.7 src/usr.bin/rump_allserver/rump_allserver.c:1.8 --- src/usr.bin/rump_allserver/rump_allserver.c:1.7 Mon Dec 13 14:13:21 2010 +++ src/usr.bin/rump_allserver/rump_allserver.c Mon Dec 13 14:26:22 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: rump_allserver.c,v 1.7 2010/12/13 14:13:21 pooka Exp $ */ +/* $NetBSD: rump_allserver.c,v 1.8 2010/12/13 14:26:22 pooka Exp $ */ /*- * Copyright (c) 2010 Antti Kantee. All Rights Reserved. @@ -27,7 +27,7 @@ #include sys/cdefs.h #ifndef lint -__RCSID($NetBSD: rump_allserver.c,v 1.7 2010/12/13 14:13:21 pooka Exp $); +__RCSID($NetBSD: rump_allserver.c,v 1.8 2010/12/13 14:26:22 pooka Exp $); #endif /* !lint */ #include sys/types.h @@ -87,9 +87,16 @@ while ((ch = getopt(argc, argv, l:m:s)) != -1) { switch (ch) { case 'l': - if (dlopen(optarg, RTLD_LAZY|RTLD_GLOBAL) == NULL) -errx(1, dlopen %s failed: %s, -optarg, dlerror()); + if (dlopen(optarg, RTLD_LAZY|RTLD_GLOBAL) == NULL) { +char pb[MAXPATHLEN]; +/* try to mimic linker -l syntax */ + +snprintf(pb, sizeof(pb), lib%s.so, optarg); +if (dlopen(pb, RTLD_LAZY|RTLD_GLOBAL) == NULL) { + errx(1, dlopen %s failed: %s, + pb, dlerror()); +} + } break; case 'm': if (nmods - curmod == 0) {
CVS commit: src/usr.sbin/fwctl
Module Name:src Committed By: christos Date: Mon Dec 13 16:52:53 UTC 2010 Modified Files: src/usr.sbin/fwctl: fwcontrol.c Log Message: - no casts for malloc and free - malloc(type) - malloc(*value) - malloc+strcpy - strdup To generate a diff of this commit: cvs rdiff -u -r1.11 -r1.12 src/usr.sbin/fwctl/fwcontrol.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/fwctl/fwcontrol.c diff -u src/usr.sbin/fwctl/fwcontrol.c:1.11 src/usr.sbin/fwctl/fwcontrol.c:1.12 --- src/usr.sbin/fwctl/fwcontrol.c:1.11 Mon Dec 13 06:51:23 2010 +++ src/usr.sbin/fwctl/fwcontrol.c Mon Dec 13 11:52:53 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: fwcontrol.c,v 1.11 2010/12/13 11:51:23 cegger Exp $ */ +/* $NetBSD: fwcontrol.c,v 1.12 2010/12/13 16:52:53 christos Exp $ */ /* * Copyright (C) 2002 * Hidetoshi Shimokawa. All rights reserved. @@ -34,7 +34,7 @@ */ #include sys/cdefs.h //__FBSDID($FreeBSD: src/usr.sbin/fwcontrol/fwcontrol.c,v 1.23 2006/10/26 22:33:38 imp Exp $); -__RCSID($NetBSD: fwcontrol.c,v 1.11 2010/12/13 11:51:23 cegger Exp $); +__RCSID($NetBSD: fwcontrol.c,v 1.12 2010/12/13 16:52:53 christos Exp $); #include sys/param.h #include sys/malloc.h @@ -111,7 +111,8 @@ struct eui64 eui, tmpeui; struct fw_devlstreq *data; char *endptr; - int i, node; + int i; + long node; if (nodestr == '\0') return -1; @@ -129,7 +130,7 @@ if (eui64_hostton(nodestr, eui) != 0 eui64_aton(nodestr, eui) != 0) return -1; - data = (struct fw_devlstreq *)malloc(sizeof(struct fw_devlstreq)); + data = malloc(sizeof(*data)); if (data == NULL) err(EX_SOFTWARE, %s: data malloc, __func__); get_dev(fd,data); @@ -153,7 +154,7 @@ if (node 0 || node 63) return -1; else - return node; + return (int)node; } static void @@ -165,7 +166,7 @@ char addr[EUI64_SIZ], hostname[40]; int i; - data = (struct fw_devlstreq *)malloc(sizeof(struct fw_devlstreq)); + data = malloc(sizeof(*data)); if (data == NULL) err(EX_SOFTWARE, %s:data malloc, __func__); get_dev(fd, data); @@ -178,10 +179,10 @@ if (eui64_ntohost(hostname, sizeof(hostname), eui)) hostname[0] = 0; printf(%4d %s %6d%s\n, - (devinfo-status || i == 0) ? devinfo-dst : -1, - addr, devinfo-status, hostname); + (devinfo-status || i == 0) ? devinfo-dst : -1, + addr, devinfo-status, hostname); } - free((void *)data); + free(data); } static uint32_t @@ -191,7 +192,7 @@ struct fw_asyreq *asyreq; uint32_t *qld, res; - asyreq = (struct fw_asyreq *)malloc(sizeof(struct fw_asyreq_t) + 16); + asyreq = malloc(sizeof(struct fw_asyreq_t) + 16); if (asyreq == NULL) err(EX_SOFTWARE, %s:asyreq malloc, __func__); asyreq-req.len = 16; @@ -245,7 +246,7 @@ { struct fw_asyreq *asyreq; - asyreq = (struct fw_asyreq *)malloc(sizeof(struct fw_asyreq_t) + 12); + asyreq = malloc(sizeof(struct fw_asyreq_t) + 12); if (asyreq == NULL) err(EX_SOFTWARE, %s:asyreq malloc, __func__); asyreq-req.len = 12; @@ -272,7 +273,7 @@ { struct fw_asyreq *asyreq; - asyreq = (struct fw_asyreq *)malloc(sizeof(struct fw_asyreq_t) + 12); + asyreq = malloc(sizeof(struct fw_asyreq_t) + 12); if (asyreq == NULL) err(EX_SOFTWARE, %s:asyreq malloc, __func__); asyreq-req.len = 12; @@ -291,7 +292,7 @@ { struct fw_asyreq *asyreq; - asyreq = (struct fw_asyreq *)malloc(sizeof(struct fw_asyreq_t) + 16); + asyreq = malloc(sizeof(struct fw_asyreq_t) + 16); if (asyreq == NULL) err(EX_SOFTWARE, %s:asyreq malloc, __func__); asyreq-req.len = 16; @@ -320,7 +321,7 @@ uint32_t max, reg, old; int i; - data = (struct fw_devlstreq *)malloc(sizeof(struct fw_devlstreq)); + data = malloc(sizeof(*data)); if (data == NULL) err(EX_SOFTWARE, %s:data malloc, __func__); get_dev(fd, data); @@ -345,7 +346,7 @@ printf(\n); } } - free((void *)data); + free(data); } static void @@ -377,7 +378,7 @@ int i, error; struct fw_devlstreq *data; - data = (struct fw_devlstreq *)malloc(sizeof(struct fw_devlstreq)); + data = malloc(sizeof(*data)); if (data == NULL) err(EX_SOFTWARE, %s:data malloc, __func__); get_dev(fd, data); @@ -492,7 +493,7 @@ fscanf(file, DUMP_FORMAT, p, p+1, p+2, p+3, p+4, p+5, p+6, p+7); p += 8; } - fclose(file); + (void)fclose(file); } static void @@ -506,7 +507,7 @@ -1W, -2W, -5W, -9W}; static const char *speed[] = {S100, S200, S400, S800}; - tmap = malloc(sizeof(struct fw_topology_map)); + tmap = malloc(sizeof(*tmap)); if (tmap == NULL) err(EX_SOFTWARE, %s:tmap malloc, __func__); if (ioctl(fd, FW_GTPMAP, tmap) 0) @@ -675,7 +676,7 @@ if (ioctl(fd, FW_SRSTREAM, isoreq) 0) err(EX_IOERR, %s: ioctl FW_SRSTREAM, __func__); - buf = (char *)malloc(RECV_NUM_PACKET * RECV_PACKET_SZ); + buf = malloc(RECV_NUM_PACKET * RECV_PACKET_SZ); if (buf == NULL) err(EX_SOFTWARE, %s:buf malloc, __func__); /* @@ -787,7 +788,7 @@
CVS commit: src/bin/sh
Module Name:src Committed By: christos Date: Mon Dec 13 16:54:04 UTC 2010 Modified Files: src/bin/sh: parser.c Log Message: PR/44229: Henning Petersen: Remove dup check for whitespace. To generate a diff of this commit: cvs rdiff -u -r1.78 -r1.79 src/bin/sh/parser.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/sh/parser.c diff -u src/bin/sh/parser.c:1.78 src/bin/sh/parser.c:1.79 --- src/bin/sh/parser.c:1.78 Wed Nov 17 08:40:48 2010 +++ src/bin/sh/parser.c Mon Dec 13 11:54:04 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: parser.c,v 1.78 2010/11/17 13:40:48 christos Exp $ */ +/* $NetBSD: parser.c,v 1.79 2010/12/13 16:54:04 christos Exp $ */ /*- * Copyright (c) 1991, 1993 @@ -37,7 +37,7 @@ #if 0 static char sccsid[] = @(#)parser.c 8.7 (Berkeley) 5/16/95; #else -__RCSID($NetBSD: parser.c,v 1.78 2010/11/17 13:40:48 christos Exp $); +__RCSID($NetBSD: parser.c,v 1.79 2010/12/13 16:54:04 christos Exp $); #endif #endif /* not lint */ @@ -814,8 +814,6 @@ startlinno = plinno; for (;;) { /* until token or start of word found */ c = pgetc_macro(); - if (c == ' ' || c == '\t') - continue; /* quick check for white space first */ switch (c) { case ' ': case '\t': continue;
CVS commit: src/share/mk
Module Name:src Committed By: pooka Date: Mon Dec 13 17:22:26 UTC 2010 Modified Files: src/share/mk: bsd.own.mk bsd.prog.mk Log Message: Define RUMPPRG, which is just like PROG, except it additionally builds a rump client with the name rump.${PROG}. The rump client is not installed suid/sgid by default even if BINMODE is defined. To generate a diff of this commit: cvs rdiff -u -r1.645 -r1.646 src/share/mk/bsd.own.mk cvs rdiff -u -r1.254 -r1.255 src/share/mk/bsd.prog.mk Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/mk/bsd.own.mk diff -u src/share/mk/bsd.own.mk:1.645 src/share/mk/bsd.own.mk:1.646 --- src/share/mk/bsd.own.mk:1.645 Sun Dec 5 09:54:34 2010 +++ src/share/mk/bsd.own.mk Mon Dec 13 17:22:26 2010 @@ -1,4 +1,4 @@ -# $NetBSD: bsd.own.mk,v 1.645 2010/12/05 09:54:34 mrg Exp $ +# $NetBSD: bsd.own.mk,v 1.646 2010/12/13 17:22:26 pooka Exp $ # This needs to be before bsd.init.mk .if defined(BSD_MK_COMPAT_FILE) @@ -442,6 +442,13 @@ BINMODE?= 555 NONBINMODE?= 444 +# These are here mainly because we don't want suid root in case +# a Makefile defines BINMODE. +RUMPBINGRP?= wheel +RUMPBINOWN?= root +RUMPBINMODE?= 555 +RUMPNONBINMODE?=444 + MANDIR?= /usr/share/man MANGRP?= wheel MANOWN?= root Index: src/share/mk/bsd.prog.mk diff -u src/share/mk/bsd.prog.mk:1.254 src/share/mk/bsd.prog.mk:1.255 --- src/share/mk/bsd.prog.mk:1.254 Fri Dec 10 20:08:17 2010 +++ src/share/mk/bsd.prog.mk Mon Dec 13 17:22:26 2010 @@ -1,4 +1,4 @@ -# $NetBSD: bsd.prog.mk,v 1.254 2010/12/10 20:08:17 joerg Exp $ +# $NetBSD: bsd.prog.mk,v 1.255 2010/12/13 17:22:26 pooka Exp $ # @(#)bsd.prog.mk 8.2 (Berkeley) 4/2/94 .ifndef HOSTPROG @@ -179,6 +179,11 @@ ${INSTALL_FILE} -o ${BINOWN} -g ${BINGRP} -m ${BINMODE} \ ${STRIPFLAG} ${.ALLSRC} ${.TARGET} +__progrumpinstall: .USE + ${_MKTARGET_INSTALL} + ${INSTALL_FILE} -o ${RUMPBINOWN} -g ${RUMPBINGRP} -m ${RUMPBINMODE} \ + ${STRIPFLAG} ${.ALLSRC} ${.TARGET} + __progdebuginstall: .USE ${_MKTARGET_INSTALL} ${INSTALL_FILE} -o ${DEBUGOWN} -g ${DEBUGGRP} -m ${DEBUGMODE} \ @@ -204,6 +209,22 @@ _CCLINK= ${CXX} ${_CCLINKFLAGS} .endif +.if defined(RUMPPRG) +PROG= ${RUMPPRG} +PROGS= ${RUMPPRG} rump.${RUMPPRG} +. if defined(SRCS) +SRCS.rump.${PROG}:= ${SRCS} ${PROG}_rumpops.c ${RUMPSRCS} +SRCS+= ${PROG}_hostops.c +. else +SRCS= ${PROG}.c ${PROG}_hostops.c +SRCS.rump.${PROG}= ${PROG}.c ${PROG}_rumpops.c ${RUMPSRCS} +. endif +LDADD.rump.${PROG}+= -lrumpclient +DPADD.rump.${PROG}+= ${LIBRUMPCLIENT} +MAN.rump.${PROG}= # defined but feeling empty +_RUMPINSTALL.rump.${PROG}=# defined +.endif + .if defined(PROG) _CCLINK?= ${CC} ${_CCLINKFLAGS} . if defined(MAN) @@ -224,14 +245,14 @@ # Turn the single-program PROG and PROG_CXX variables into their multi-word # counterparts, PROGS and PROGS_CXX. -.if defined(PROG_CXX) !defined(PROGS_CXX) +.if !defined(RUMPPRG) +. if defined(PROG_CXX) !defined(PROGS_CXX) PROGS_CXX= ${PROG_CXX} -.elif defined(PROG) !defined(PROGS) +. elif defined(PROG) !defined(PROGS) PROGS= ${PROG} +. endif .endif - - # # Per-program definitions and targets. # @@ -351,7 +372,11 @@ ${_PROGDEBUG.${_P}:D${DESTDIR}${DEBUGDIR}${BINDIR.${_P}}/${_PROGDEBUG.${_P}}} .if ${MKUPDATE} == no +.if defined(_RUMPINSTALL.${_P}) +${DESTDIR}${BINDIR.${_P}}/${PROGNAME.${_P}}! ${_P} __progrumpinstall +.else ${DESTDIR}${BINDIR.${_P}}/${PROGNAME.${_P}}! ${_P} __proginstall +.endif .if !defined(BUILD) !make(all) !make(${_P}) ${DESTDIR}${BINDIR.${_P}}/${PROGNAME.${_P}}! .MADE .endif @@ -362,7 +387,11 @@ .endif .endif # define(_PROGDEBUG.${_P}) .else # MKUPDATE != no +.if defined(_RUMPINSTALL.${_P}) +${DESTDIR}${BINDIR.${_P}}/${PROGNAME.${_P}}: ${_P} __progrumpinstall +.else ${DESTDIR}${BINDIR.${_P}}/${PROGNAME.${_P}}: ${_P} __proginstall +.endif .if !defined(BUILD) !make(all) !make(${_P}) ${DESTDIR}${BINDIR.${_P}}/${PROGNAME.${_P}}: .MADE .endif
CVS commit: src/sbin/ifconfig
Module Name:src Committed By: pooka Date: Mon Dec 13 17:35:08 UTC 2010 Modified Files: src/sbin/ifconfig: Makefile Makefile.inc af_atalk.c af_inet.c af_inet6.c af_inetany.c af_iso.c env.c ieee80211.c ifconfig.c media.c util.c Added Files: src/sbin/ifconfig: ifconfig_hostops.c ifconfig_rumpops.c prog_ops.h Log Message: Convert from the .ifdef RUMP_ACTION stuff to RUMPPRG. To generate a diff of this commit: cvs rdiff -u -r1.49 -r1.50 src/sbin/ifconfig/Makefile cvs rdiff -u -r1.7 -r1.8 src/sbin/ifconfig/Makefile.inc cvs rdiff -u -r1.16 -r1.17 src/sbin/ifconfig/af_atalk.c cvs rdiff -u -r1.14 -r1.15 src/sbin/ifconfig/af_inet.c cvs rdiff -u -r1.26 -r1.27 src/sbin/ifconfig/af_inet6.c cvs rdiff -u -r1.12 -r1.13 src/sbin/ifconfig/af_inetany.c cvs rdiff -u -r1.13 -r1.14 src/sbin/ifconfig/af_iso.c cvs rdiff -u -r1.6 -r1.7 src/sbin/ifconfig/env.c cvs rdiff -u -r1.24 -r1.25 src/sbin/ifconfig/ieee80211.c cvs rdiff -u -r1.223 -r1.224 src/sbin/ifconfig/ifconfig.c cvs rdiff -u -r0 -r1.1 src/sbin/ifconfig/ifconfig_hostops.c \ src/sbin/ifconfig/ifconfig_rumpops.c src/sbin/ifconfig/prog_ops.h cvs rdiff -u -r1.4 -r1.5 src/sbin/ifconfig/media.c cvs rdiff -u -r1.15 -r1.16 src/sbin/ifconfig/util.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sbin/ifconfig/Makefile diff -u src/sbin/ifconfig/Makefile:1.49 src/sbin/ifconfig/Makefile:1.50 --- src/sbin/ifconfig/Makefile:1.49 Fri Nov 5 16:23:56 2010 +++ src/sbin/ifconfig/Makefile Mon Dec 13 17:35:08 2010 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.49 2010/11/05 16:23:56 pooka Exp $ +# $NetBSD: Makefile,v 1.50 2010/12/13 17:35:08 pooka Exp $ # @(#)Makefile 8.1 (Berkeley) 6/5/93 # when making a change to this file, please check if the change is @@ -7,6 +7,7 @@ .include bsd.own.mk +RUMPPRG=ifconfig MAN= ifconfig.8 #DBG+=-g @@ -18,6 +19,10 @@ .include Makefile.inc +.PATH: ${.CURDIR}/../../lib/libc/net +RUMPSRCS= getifaddrs.c +CPPFLAGS+= -DRUMP_ACTION + CPPFLAGS+=-I${NETBSDSRCDIR}/sys/dist/pf/ SRCS+= pfsync.c @@ -26,17 +31,4 @@ COPTS.ifconfig.c+= -fno-loop-optimize .endif -# -# Compile-time debug flag. If compiled with make RUMP_ACTION=1, -# make rump system calls to a server in another process. -# -.ifdef RUMP_ACTION -.PATH: ${.CURDIR}/../../lib/libc/net -CPPFLAGS+= -DRUMP_SYS_NETWORKING -DRUMP_SYS_IOCTL -DRUMP_SYS_CLOSE -CPPFLAGS+= -DRUMP_ACTION -LDADD+= -lrumpclient -DBG= -g -SRCS+= getifaddrs.c -.endif - .include bsd.prog.mk Index: src/sbin/ifconfig/Makefile.inc diff -u src/sbin/ifconfig/Makefile.inc:1.7 src/sbin/ifconfig/Makefile.inc:1.8 --- src/sbin/ifconfig/Makefile.inc:1.7 Wed Sep 16 14:59:45 2009 +++ src/sbin/ifconfig/Makefile.inc Mon Dec 13 17:35:08 2010 @@ -1,10 +1,8 @@ -# $NetBSD: Makefile.inc,v 1.7 2009/09/16 14:59:45 tsutsui Exp $ +# $NetBSD: Makefile.inc,v 1.8 2010/12/13 17:35:08 pooka Exp $ # shared stuff with src/distrib/utils/x_ifconfig for install media. # stuff not required by install media should be into Makefile. -PROG= ifconfig - DPADD+=${LIBUTIL} DPADD+=${LIBPROP} LDADD+=-lutil Index: src/sbin/ifconfig/af_atalk.c diff -u src/sbin/ifconfig/af_atalk.c:1.16 src/sbin/ifconfig/af_atalk.c:1.17 --- src/sbin/ifconfig/af_atalk.c:1.16 Sat Jan 30 18:30:33 2010 +++ src/sbin/ifconfig/af_atalk.c Mon Dec 13 17:35:08 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: af_atalk.c,v 1.16 2010/01/30 18:30:33 is Exp $ */ +/* $NetBSD: af_atalk.c,v 1.17 2010/12/13 17:35:08 pooka Exp $ */ /* * Copyright (c) 1983, 1993 @@ -31,7 +31,7 @@ #include sys/cdefs.h #ifndef lint -__RCSID($NetBSD: af_atalk.c,v 1.16 2010/01/30 18:30:33 is Exp $); +__RCSID($NetBSD: af_atalk.c,v 1.17 2010/12/13 17:35:08 pooka Exp $); #endif /* not lint */ #include sys/param.h @@ -56,6 +56,7 @@ #include af_inetany.h #include parse.h #include extern.h +#include prog_ops.h #ifndef satocsat #define satocsat(__sa) ((const struct sockaddr_at *)(__sa)) @@ -209,7 +210,7 @@ memset(ifr, 0, sizeof(ifr)); estrlcpy(ifr.ifr_name, ifname, sizeof(ifr.ifr_name)); ifr.ifr_addr.sa_family = AF_APPLETALK; - if (ioctl(s, SIOCGIFADDR, ifr) != -1) + if (prog_ioctl(s, SIOCGIFADDR, ifr) != -1) ; else if (errno == EADDRNOTAVAIL || errno == EAFNOSUPPORT) { if (!force) @@ -223,7 +224,7 @@ if (flags IFF_POINTOPOINT) { estrlcpy(ifr.ifr_name, ifname, sizeof(ifr.ifr_name)); - if (ioctl(s, SIOCGIFDSTADDR, ifr) == -1) { + if (prog_ioctl(s, SIOCGIFDSTADDR, ifr) == -1) { if (errno == EADDRNOTAVAIL) memset(ifr.ifr_addr, 0, sizeof(ifr.ifr_addr)); else Index: src/sbin/ifconfig/af_inet.c diff -u src/sbin/ifconfig/af_inet.c:1.14 src/sbin/ifconfig/af_inet.c:1.15 --- src/sbin/ifconfig/af_inet.c:1.14 Fri Sep 11 22:06:29 2009 +++ src/sbin/ifconfig/af_inet.c Mon Dec 13 17:35:08 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: af_inet.c,v 1.14 2009/09/11 22:06:29 dyoung Exp $ */ +/* $NetBSD: af_inet.c,v 1.15 2010/12/13 17:35:08 pooka Exp $ */
CVS commit: src/distrib/utils/x_ifconfig
Module Name:src Committed By: pooka Date: Mon Dec 13 17:35:31 UTC 2010 Modified Files: src/distrib/utils/x_ifconfig: Makefile Log Message: Define PROG here since Makefile.inc no longer defines it. To generate a diff of this commit: cvs rdiff -u -r1.29 -r1.30 src/distrib/utils/x_ifconfig/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/distrib/utils/x_ifconfig/Makefile diff -u src/distrib/utils/x_ifconfig/Makefile:1.29 src/distrib/utils/x_ifconfig/Makefile:1.30 --- src/distrib/utils/x_ifconfig/Makefile:1.29 Sat Nov 28 22:13:34 2009 +++ src/distrib/utils/x_ifconfig/Makefile Mon Dec 13 17:35:31 2010 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.29 2009/11/28 22:13:34 he Exp $ +# $NetBSD: Makefile,v 1.30 2010/12/13 17:35:31 pooka Exp $ # Build a smaller ifconfig (i.e. for boot media) .include bsd.own.mk @@ -13,6 +13,7 @@ SRCS+= af_inet6.c .endif +PROG= ifconfig .include ${.CURDIR}/../../../sbin/ifconfig/Makefile.inc .include bsd.prog.mk
CVS commit: src/sbin/route
Module Name:src Committed By: pooka Date: Mon Dec 13 17:39:47 UTC 2010 Modified Files: src/sbin/route: Makefile route.c show.c Added Files: src/sbin/route: prog_ops.h route_hostops.c route_rumpops.c Log Message: Convert from RUMP_ACTION to RUMPPRG. To generate a diff of this commit: cvs rdiff -u -r1.24 -r1.25 src/sbin/route/Makefile cvs rdiff -u -r0 -r1.1 src/sbin/route/prog_ops.h \ src/sbin/route/route_hostops.c src/sbin/route/route_rumpops.c cvs rdiff -u -r1.126 -r1.127 src/sbin/route/route.c cvs rdiff -u -r1.41 -r1.42 src/sbin/route/show.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sbin/route/Makefile diff -u src/sbin/route/Makefile:1.24 src/sbin/route/Makefile:1.25 --- src/sbin/route/Makefile:1.24 Thu Nov 4 23:36:10 2010 +++ src/sbin/route/Makefile Mon Dec 13 17:39:47 2010 @@ -1,9 +1,9 @@ -# $NetBSD: Makefile,v 1.24 2010/11/04 23:36:10 pooka Exp $ +# $NetBSD: Makefile,v 1.25 2010/12/13 17:39:47 pooka Exp $ # @(#)Makefile 8.1 (Berkeley) 6/5/93 .include bsd.own.mk -PROG= route +RUMPPRG=route MAN= route.8 SRCS= route.c show.c keywords.c @@ -20,15 +20,4 @@ # keywords.c keywords.h : keywords.sh # ${HOST_SH} keywords.sh -# -# Compile-time debug flag. If compiled with make RUMP_ACTION=1, -# make rump system calls. -# -.ifdef RUMP_ACTION -CPPFLAGS+= -DRUMP_SYS_NETWORKING -DRUMP_SYS_READWRITE -DRUMP_SYS_CLOSE -CPPFLAGS+= -DRUMP_ACTION -DSMALL -Dsysctl=rump_sys___sysctl -LDADD+= -lrumpclient -DBG=-g -.endif - .include bsd.prog.mk Index: src/sbin/route/route.c diff -u src/sbin/route/route.c:1.126 src/sbin/route/route.c:1.127 --- src/sbin/route/route.c:1.126 Fri Nov 12 16:32:18 2010 +++ src/sbin/route/route.c Mon Dec 13 17:39:47 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: route.c,v 1.126 2010/11/12 16:32:18 roy Exp $ */ +/* $NetBSD: route.c,v 1.127 2010/12/13 17:39:47 pooka Exp $ */ /* * Copyright (c) 1983, 1989, 1991, 1993 @@ -39,7 +39,7 @@ #if 0 static char sccsid[] = @(#)route.c 8.6 (Berkeley) 4/28/95; #else -__RCSID($NetBSD: route.c,v 1.126 2010/11/12 16:32:18 roy Exp $); +__RCSID($NetBSD: route.c,v 1.127 2010/12/13 17:39:47 pooka Exp $); #endif #endif /* not lint */ @@ -71,14 +71,13 @@ #include paths.h #include err.h -#ifdef RUMP_ACTION #include rump/rump.h #include rump/rump_syscalls.h #include rump/rumpclient.h -#endif #include keywords.h #include extern.h +#include prog_ops.h union sockunion { struct sockaddr sa; @@ -162,11 +161,6 @@ { int ch; -#ifdef RUMP_ACTION - if (rumpclient_init() == -1) - err(1, rump client init); -#endif - if (argc 2) usage(NULL); @@ -204,11 +198,14 @@ argc -= optind; argv += optind; - pid = getpid(); + if (prog_init prog_init() == -1) + err(1, init failed); + + pid = prog_getpid(); if (tflag) - sock = open(/dev/null, O_WRONLY, 0); + sock = prog_open(/dev/null, O_WRONLY, 0); else - sock = socket(PF_ROUTE, SOCK_RAW, 0); + sock = prog_socket(PF_ROUTE, SOCK_RAW, 0); if (sock 0) err(EXIT_FAILURE, socket); @@ -269,7 +266,8 @@ flags = 0; af = AF_UNSPEC; - shutdown(sock, SHUT_RD); /* Don't want to read back our messages */ + /* Don't want to read back our messages */ + prog_shutdown(sock, SHUT_RD); parse_show_opts(argc, argv, af, flags, afname, false); mib[0] = CTL_NET; mib[1] = PF_ROUTE; @@ -277,13 +275,13 @@ mib[3] = 0; /* wildcard address family */ mib[4] = NET_RT_DUMP; mib[5] = 0; /* no flags */ - if (sysctl(mib, 6, NULL, needed, NULL, 0) 0) + if (prog_sysctl(mib, 6, NULL, needed, NULL, 0) 0) err(EXIT_FAILURE, route-sysctl-estimate); buf = lim = NULL; if (needed) { if ((buf = malloc(needed)) == NULL) err(EXIT_FAILURE, malloc); - if (sysctl(mib, 6, buf, needed, NULL, 0) 0) + if (prog_sysctl(mib, 6, buf, needed, NULL, 0) 0) err(EXIT_FAILURE, actual retrieval of routing table); lim = buf + needed; } @@ -311,7 +309,8 @@ continue; rtm-rtm_type = RTM_DELETE; rtm-rtm_seq = seqno; - if ((rlen = write(sock, next, rtm-rtm_msglen)) 0) { + if ((rlen = prog_write(sock, next, + rtm-rtm_msglen)) 0) { warnx(writing to routing socket: %s, route_strerror(errno)); return 1; @@ -801,8 +800,10 @@ cmd = argv[0]; af = AF_UNSPEC; - if (*cmd != 'g') - shutdown(sock, SHUT_RD); /* Don't want to read back our messages */ + if (*cmd != 'g') { + /* Don't want to read back our messages */ + prog_shutdown(sock, SHUT_RD); + } while (--argc 0) { if (**(++argv)== '-') { switch (key = keyword(1 + *argv)) { @@ -1419,12 +1420,12 @@ mib[3] = 0; /* wildcard address family */ mib[4] = NET_RT_IFLIST; mib[5] = 0; /* no flags */ - if (sysctl(mib, 6, NULL, needed, NULL, 0) 0) + if (prog_sysctl(mib, 6, NULL, needed, NULL, 0) 0) err(EXIT_FAILURE, route-sysctl-estimate); if (needed) { if ((buf = malloc(needed)) == NULL) err(EXIT_FAILURE, malloc); - if (sysctl(mib, 6,
CVS commit: src/sbin/ping
Module Name:src Committed By: pooka Date: Mon Dec 13 17:42:17 UTC 2010 Modified Files: src/sbin/ping: Makefile ping.c Added Files: src/sbin/ping: ping_hostops.c ping_rumpops.c prog_ops.h Log Message: RUMP_ACTION - RUMPPRG To generate a diff of this commit: cvs rdiff -u -r1.15 -r1.16 src/sbin/ping/Makefile cvs rdiff -u -r1.91 -r1.92 src/sbin/ping/ping.c cvs rdiff -u -r0 -r1.1 src/sbin/ping/ping_hostops.c \ src/sbin/ping/ping_rumpops.c src/sbin/ping/prog_ops.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sbin/ping/Makefile diff -u src/sbin/ping/Makefile:1.15 src/sbin/ping/Makefile:1.16 --- src/sbin/ping/Makefile:1.15 Thu Nov 11 22:56:38 2010 +++ src/sbin/ping/Makefile Mon Dec 13 17:42:17 2010 @@ -1,8 +1,8 @@ -# $NetBSD: Makefile,v 1.15 2010/11/11 22:56:38 pooka Exp $ +# $NetBSD: Makefile,v 1.16 2010/12/13 17:42:17 pooka Exp $ # @(#)Makefile 8.1 (Berkeley) 6/5/93 USE_FORT?= yes # setuid -PROG= ping +RUMPPRG=ping MAN= ping.8 BINOWN= root BINMODE=4555 @@ -12,16 +12,4 @@ LDADD+= -lipsec DPADD+= ${LIBIPSEC} -# -# Compile-time debug flag. If compiled with make RUMP_ACTION=1, -# make rump system calls. This allows to single-step ioctl commands -# to figure out where ioctl's go in the kernel. -# -.ifdef RUMP_ACTION -CPPFLAGS+= -DRUMP_SYS_NETWORKING -DRUMP_SYS_IOCTL -DRUMP_SYS_CLOSE -CPPFLAGS+= -DRUMP_ACTION -LDADD+= -lrumpclient -DBG=-g -.endif - .include bsd.prog.mk Index: src/sbin/ping/ping.c diff -u src/sbin/ping/ping.c:1.91 src/sbin/ping/ping.c:1.92 --- src/sbin/ping/ping.c:1.91 Thu Nov 11 22:56:38 2010 +++ src/sbin/ping/ping.c Mon Dec 13 17:42:17 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: ping.c,v 1.91 2010/11/11 22:56:38 pooka Exp $ */ +/* $NetBSD: ping.c,v 1.92 2010/12/13 17:42:17 pooka Exp $ */ /* * Copyright (c) 1989, 1993 @@ -58,7 +58,7 @@ #include sys/cdefs.h #ifndef lint -__RCSID($NetBSD: ping.c,v 1.91 2010/11/11 22:56:38 pooka Exp $); +__RCSID($NetBSD: ping.c,v 1.92 2010/12/13 17:42:17 pooka Exp $); #endif #include stdio.h @@ -92,12 +92,7 @@ #include netinet6/ipsec.h #endif /*IPSEC*/ -#ifdef RUMP_ACTION -#include rump/rump.h -#include rump/rump_syscalls.h -#include rump/rumpclient.h -#define poll(a,b,c) rump_sys_poll(a,b,c) -#endif +#include prog_ops.h #define FLOOD_INTVL 0.01 /* default flood output interval */ #define MAXPACKET (IP_MAXPACKET-60-8) /* max packet size */ @@ -251,21 +246,19 @@ struct sigaction sa; #endif -#ifdef RUMP_ACTION - if (rumpclient_init() == -1) - err(1, rumpclient init failed); -#endif + if (prog_init prog_init() == -1) + err(1, init failed); - if ((s = socket(AF_INET, SOCK_RAW, IPPROTO_ICMP)) 0) + if ((s = prog_socket(AF_INET, SOCK_RAW, IPPROTO_ICMP)) 0) err(1, Cannot create socket); - if ((sloop = socket(AF_INET, SOCK_RAW, IPPROTO_ICMP)) 0) + if ((sloop = prog_socket(AF_INET, SOCK_RAW, IPPROTO_ICMP)) 0) err(1, Cannot create socket); /* * sloop is never read on. This prevents packets from * queueing in its recv buffer. */ - if (shutdown(sloop, SHUT_RD) == -1) + if (prog_shutdown(sloop, SHUT_RD) == -1) warn(Cannot shutdown for read); if (setuid(getuid()) == -1) @@ -472,23 +465,23 @@ ident = arc4random() 0x; if (options SO_DEBUG) { - if (setsockopt(s, SOL_SOCKET, SO_DEBUG, + if (prog_setsockopt(s, SOL_SOCKET, SO_DEBUG, (char *)on, sizeof(on)) == -1) warn(Can't turn on socket debugging); } if (options SO_DONTROUTE) { - if (setsockopt(s, SOL_SOCKET, SO_DONTROUTE, + if (prog_setsockopt(s, SOL_SOCKET, SO_DONTROUTE, (char *)on, sizeof(on)) == -1) warn(SO_DONTROUTE); } if (options SO_DEBUG) { - if (setsockopt(sloop, SOL_SOCKET, SO_DEBUG, + if (prog_setsockopt(sloop, SOL_SOCKET, SO_DEBUG, (char *)on, sizeof(on)) == -1) warn(Can't turn on socket debugging); } if (options SO_DONTROUTE) { - if (setsockopt(sloop, SOL_SOCKET, SO_DONTROUTE, + if (prog_setsockopt(sloop, SOL_SOCKET, SO_DONTROUTE, (char *)on, sizeof(on)) == -1) warn(SO_DONTROUTE); } @@ -513,7 +506,8 @@ - optlen); (void) memcpy(opack_ip + 1, optspace, optlen); - if (setsockopt(s,IPPROTO_IP,IP_HDRINCL, (char *) on, sizeof(on)) 0) + if (prog_setsockopt(s,IPPROTO_IP,IP_HDRINCL, + (char *) on, sizeof(on)) 0) err(1, Can't set special IP header); opack_ip-ip_v = IPVERSION; @@ -528,24 +522,25 @@ if (pingflags F_MCAST) { if (pingflags F_MCAST_NOLOOP) { u_char loop = 0; - if (setsockopt(s, IPPROTO_IP, IP_MULTICAST_LOOP, + if (prog_setsockopt(s, IPPROTO_IP, + IP_MULTICAST_LOOP, (char *) loop, 1) 0) err(1, Can't disable multicast loopback); } if (ttl != 0 - setsockopt(s, IPPROTO_IP, IP_MULTICAST_TTL, + prog_setsockopt(s, IPPROTO_IP, IP_MULTICAST_TTL, (char *) ttl, 1) 0) err(1, Can't set multicast time-to-live); if
CVS commit: src/sbin/sysctl
Module Name:src Committed By: pooka Date: Mon Dec 13 17:47:40 UTC 2010 Modified Files: src/sbin/sysctl: Makefile sysctl.c Added Files: src/sbin/sysctl: prog_ops.h sysctl_hostops.c sysctl_rumpops.c Log Message: RUMP_ACTION - RUMPPRG To generate a diff of this commit: cvs rdiff -u -r1.19 -r1.20 src/sbin/sysctl/Makefile cvs rdiff -u -r0 -r1.1 src/sbin/sysctl/prog_ops.h \ src/sbin/sysctl/sysctl_hostops.c src/sbin/sysctl/sysctl_rumpops.c cvs rdiff -u -r1.132 -r1.133 src/sbin/sysctl/sysctl.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sbin/sysctl/Makefile diff -u src/sbin/sysctl/Makefile:1.19 src/sbin/sysctl/Makefile:1.20 --- src/sbin/sysctl/Makefile:1.19 Fri Nov 5 15:55:23 2010 +++ src/sbin/sysctl/Makefile Mon Dec 13 17:47:40 2010 @@ -1,19 +1,16 @@ -# $NetBSD: Makefile,v 1.19 2010/11/05 15:55:23 pooka Exp $ +# $NetBSD: Makefile,v 1.20 2010/12/13 17:47:40 pooka Exp $ # @(#)Makefile 8.1 (Berkeley) 6/6/93 .include bsd.own.mk #CFLAGS+=-g -PROG= sysctl +RUMPPRG=sysctl MAN= sysctl.8 SRCS= sysctl.c -.ifdef RUMP_ACTION .PATH: ${.CURDIR}/../../lib/libc/gen CPPFLAGS+= -DRUMP_ACTION -LDADD+= -lrumpclient -SRCS+= sysctlgetmibinfo.c -.endif +RUMPSRCS+= sysctlbyname.c sysctlgetmibinfo.c .include bsd.prog.mk Index: src/sbin/sysctl/sysctl.c diff -u src/sbin/sysctl/sysctl.c:1.132 src/sbin/sysctl/sysctl.c:1.133 --- src/sbin/sysctl/sysctl.c:1.132 Fri Nov 5 15:55:23 2010 +++ src/sbin/sysctl/sysctl.c Mon Dec 13 17:47:40 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: sysctl.c,v 1.132 2010/11/05 15:55:23 pooka Exp $ */ +/* $NetBSD: sysctl.c,v 1.133 2010/12/13 17:47:40 pooka Exp $ */ /*- * Copyright (c) 2003 The NetBSD Foundation, Inc. @@ -68,7 +68,7 @@ #if 0 static char sccsid[] = @(#)sysctl.c 8.1 (Berkeley) 6/6/93; #else -__RCSID($NetBSD: sysctl.c,v 1.132 2010/11/05 15:55:23 pooka Exp $); +__RCSID($NetBSD: sysctl.c,v 1.133 2010/12/13 17:47:40 pooka Exp $); #endif #endif /* not lint */ @@ -105,12 +105,7 @@ #include time.h #include unistd.h -#ifdef RUMP_ACTION -#include rump/rumpclient.h -#include rump/rump_syscalls.h - -#define sysctl(a,b,c,d,e,f) rump_sys___sysctl(a,b,c,d,e,f) -#endif +#include prog_ops.h /* * this needs to be able to do the printing and the setting @@ -276,11 +271,6 @@ int name[CTL_MAXNAME]; int ch; -#ifdef RUMP_ACTION - if (rumpclient_init() == -1) - err(1, rumpclient init failed); -#endif - while ((ch = getopt(argc, argv, Aabdef:Mnqrwx)) != -1) { switch (ch) { case 'A': @@ -337,6 +327,9 @@ if ((Aflag || Mflag || dflag) argc == 0 fn == NULL) aflag = 1; + if (prog_init prog_init() == -1) + err(1, prog init failed); + if (Aflag) warnfp = stdout; stale = req = 0; @@ -667,7 +660,7 @@ } if (type != CTLTYPE_NODE pnode-sysctl_size == 0) { - rc = sysctl(name[0], namelen, NULL, sz, NULL, 0); + rc = prog_sysctl(name[0], namelen, NULL, sz, NULL, 0); if (rc == -1) { sysctlerror(1); *sp = *dp = '\0'; @@ -718,7 +711,7 @@ } case CTLTYPE_INT: { int i; - rc = sysctl(name, namelen, i, sz, NULL, 0); + rc = prog_sysctl(name, namelen, i, sz, NULL, 0); if (rc == -1) { sysctlerror(1); break; @@ -728,7 +721,7 @@ } case CTLTYPE_BOOL: { bool b; - rc = sysctl(name, namelen, b, sz, NULL, 0); + rc = prog_sysctl(name, namelen, b, sz, NULL, 0); if (rc == -1) { sysctlerror(1); break; @@ -740,14 +733,14 @@ unsigned char buf[1024], *tbuf; tbuf = buf; sz = sizeof(buf); - rc = sysctl(name[0], namelen, tbuf, sz, NULL, 0); + rc = prog_sysctl(name[0], namelen, tbuf, sz, NULL, 0); if (rc == -1 errno == ENOMEM) { tbuf = malloc(sz); if (tbuf == NULL) { sysctlerror(1); break; } - rc = sysctl(name[0], namelen, tbuf, sz, NULL, 0); + rc = prog_sysctl(name[0], namelen, tbuf, sz, NULL, 0); } if (rc == -1) sysctlerror(1); @@ -760,7 +753,7 @@ case CTLTYPE_QUAD: { u_quad_t q; sz = sizeof(q); - rc = sysctl(name[0], namelen, q, sz, NULL, 0); + rc = prog_sysctl(name[0], namelen, q, sz, NULL, 0); if (rc == -1) { sysctlerror(1); break; @@ -780,7 +773,7 @@ fprintf(warnfp, %s: !malloc failed!\n, gsname); break; } - rc = sysctl(name[0], namelen, d, sz, NULL, 0); + rc = prog_sysctl(name[0], namelen, d, sz, NULL, 0); if (rc == -1) { sysctlerror(1); break; @@ -1023,7 +1016,7 @@ } /* - * note that we (mostly) let the invoker of sysctl(8) + * note that we (mostly) let the invoker of prog_sysctl(8) * play rampant here and depend on the kernel to tell * them that they were wrong. well...within reason. * we later check the various parameters against each @@ -1417,7 +1410,7 @@ name[namelen++] = CTL_CREATE; sz = sizeof(node); - rc = sysctl(name[0], namelen, node, sz, node, sizeof(node)); + rc = prog_sysctl(name[0], namelen, node, sz, node, sizeof(node)); if (rc == -1) { sysctlperror(%s:
CVS commit: src/distrib/sets/lists
Module Name:src Committed By: pooka Date: Mon Dec 13 17:51:41 UTC 2010 Modified Files: src/distrib/sets/lists/base: mi src/distrib/sets/lists/comp: mi Log Message: add fresh rump clients To generate a diff of this commit: cvs rdiff -u -r1.900 -r1.901 src/distrib/sets/lists/base/mi cvs rdiff -u -r1.1537 -r1.1538 src/distrib/sets/lists/comp/mi Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/distrib/sets/lists/base/mi diff -u src/distrib/sets/lists/base/mi:1.900 src/distrib/sets/lists/base/mi:1.901 --- src/distrib/sets/lists/base/mi:1.900 Mon Dec 13 13:38:18 2010 +++ src/distrib/sets/lists/base/mi Mon Dec 13 17:51:39 2010 @@ -1,4 +1,4 @@ -# $NetBSD: mi,v 1.900 2010/12/13 13:38:18 pooka Exp $ +# $NetBSD: mi,v 1.901 2010/12/13 17:51:39 pooka Exp $ # # Note: Don't delete entries from here - mark them as obsolete instead, # unless otherwise stated below. @@ -233,6 +233,7 @@ ./sbin/gpt base-sysutil-root ./sbin/halt base-sysutil-root ./sbin/ifconfig base-netutil-root +./sbin/rump.ifconfig base-netutil-root ./sbin/init base-sysutil-root ./sbin/ipf base-ipf-root ipfilter ./sbin/ipppctl base-netutil-root @@ -290,6 +291,7 @@ ./sbin/pflogd base-pf-root pf ./sbin/pfs base-pf-root pf ./sbin/ping base-netutil-root +./sbin/rump.ping base-netutil-root ./sbin/ping6 base-netutil-root use_inet6 ./sbin/poweroff base-sysutil-root ./sbin/pppoectl base-netutil-root @@ -305,6 +307,7 @@ ./sbin/restore base-sysutil-root ./sbin/rndctl base-sysutil-root ./sbin/route base-netutil-root +./sbin/rump.route base-netutil-root ./sbin/routed base-router-root ./sbin/rrestore base-netutil-root ./sbin/rtsol base-netutil-root use_inet6 @@ -319,6 +322,7 @@ ./sbin/swapctl base-sysutil-root ./sbin/swapon base-sysutil-root ./sbin/sysctl base-sysutil-root +./sbin/rump.sysctl base-sysutil-root ./sbin/tbrconfigbase-router-root ./sbin/ttyflags base-sysutil-root ./sbin/tunefs base-sysutil-root Index: src/distrib/sets/lists/comp/mi diff -u src/distrib/sets/lists/comp/mi:1.1537 src/distrib/sets/lists/comp/mi:1.1538 --- src/distrib/sets/lists/comp/mi:1.1537 Mon Dec 13 13:38:19 2010 +++ src/distrib/sets/lists/comp/mi Mon Dec 13 17:51:40 2010 @@ -1,4 +1,4 @@ -# $NetBSD: mi,v 1.1537 2010/12/13 13:38:19 pooka Exp $ +# $NetBSD: mi,v 1.1538 2010/12/13 17:51:40 pooka Exp $ # # Note: don't delete entries from here - mark them as obsolete instead. # @@ -2975,6 +2975,7 @@ ./usr/libdata/debug/sbin/fsirand.debug comp-sysutil-debug debug ./usr/libdata/debug/sbin/gpt.debug comp-sysutil-debug debug ./usr/libdata/debug/sbin/ifconfig.debug comp-netutil-debug debug +./usr/libdata/debug/sbin/rump.ifconfig.debug comp-netutil-debug debug ./usr/libdata/debug/sbin/init.debug comp-sysutil-debug debug ./usr/libdata/debug/sbin/ipf.debug comp-ipf-debug ipfilter,debug ./usr/libdata/debug/sbin/lvm.debug comp-sysutil-debug lvm,debug @@ -3020,6 +3021,7 @@ ./usr/libdata/debug/sbin/pflogd.debug comp-pf-debug pf,debug ./usr/libdata/debug/sbin/pfs.debug comp-pf-debug pf,debug ./usr/libdata/debug/sbin/ping.debug comp-netutil-debug debug +./usr/libdata/debug/sbin/rump.ping.debug comp-netutil-debug debug ./usr/libdata/debug/sbin/ping6.debug comp-netutil-debug use_inet6,debug ./usr/libdata/debug/sbin/pppoectl.debug comp-netutil-debug debug ./usr/libdata/debug/sbin/raidctl.debug comp-sysutil-debug debug @@ -3030,6 +3032,7 @@ ./usr/libdata/debug/sbin/restore.debug comp-sysutil-debug debug ./usr/libdata/debug/sbin/rndctl.debug comp-sysutil-debug debug ./usr/libdata/debug/sbin/route.debug comp-netutil-debug debug +./usr/libdata/debug/sbin/rump.route.debug comp-netutil-debug debug ./usr/libdata/debug/sbin/routed.debug comp-router-debug debug ./usr/libdata/debug/sbin/rtsol.debug comp-netutil-debug use_inet6,debug ./usr/libdata/debug/sbin/savecore.debug comp-sysutil-debug debug @@ -3041,6 +3044,7 @@ ./usr/libdata/debug/sbin/svhlabel.debug comp-sysutil-debug debug ./usr/libdata/debug/sbin/swapctl.debug comp-sysutil-debug debug ./usr/libdata/debug/sbin/sysctl.debug comp-sysutil-debug debug +./usr/libdata/debug/sbin/rump.sysctl.debug comp-sysutil-debug debug ./usr/libdata/debug/sbin/tbrconfig.debug comp-router-debug debug ./usr/libdata/debug/sbin/ttyflags.debug comp-sysutil-debug debug ./usr/libdata/debug/sbin/tunefs.debug comp-sysutil-debug debug
CVS commit: src/usr.sbin/envstat
Module Name:src Committed By: pooka Date: Mon Dec 13 18:00:39 UTC 2010 Modified Files: src/usr.sbin/envstat: Makefile envstat.c Added Files: src/usr.sbin/envstat: envstat_hostops.c envstat_rumpops.c prog_ops.h Log Message: RUMP_ACTION - RUMPPRG To generate a diff of this commit: cvs rdiff -u -r1.8 -r1.9 src/usr.sbin/envstat/Makefile cvs rdiff -u -r1.82 -r1.83 src/usr.sbin/envstat/envstat.c cvs rdiff -u -r0 -r1.1 src/usr.sbin/envstat/envstat_hostops.c \ src/usr.sbin/envstat/envstat_rumpops.c src/usr.sbin/envstat/prog_ops.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.sbin/envstat/Makefile diff -u src/usr.sbin/envstat/Makefile:1.8 src/usr.sbin/envstat/Makefile:1.9 --- src/usr.sbin/envstat/Makefile:1.8 Fri Nov 5 13:42:37 2010 +++ src/usr.sbin/envstat/Makefile Mon Dec 13 18:00:38 2010 @@ -1,6 +1,6 @@ -# $NetBSD: Makefile,v 1.8 2010/11/05 13:42:37 pooka Exp $ +# $NetBSD: Makefile,v 1.9 2010/12/13 18:00:38 pooka Exp $ -PROG= envstat +RUMPPRG= envstat SRCS+= envstat.c config.c config_yacc.y config_lex.l LDADD= -lprop @@ -12,11 +12,4 @@ YHEADER= yes -.ifdef RUMP_ACTION -LDADD+= -lrumpclient -CPPFLAGS+= -DRUMP_SYS_OPEN -DRUMP_SYS_CLOSE -CPPFLAGS+= -DRUMP_ACTION -DBG= -g -.endif - .include bsd.prog.mk Index: src/usr.sbin/envstat/envstat.c diff -u src/usr.sbin/envstat/envstat.c:1.82 src/usr.sbin/envstat/envstat.c:1.83 --- src/usr.sbin/envstat/envstat.c:1.82 Fri Nov 5 13:52:42 2010 +++ src/usr.sbin/envstat/envstat.c Mon Dec 13 18:00:38 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: envstat.c,v 1.82 2010/11/05 13:52:42 pooka Exp $ */ +/* $NetBSD: envstat.c,v 1.83 2010/12/13 18:00:38 pooka Exp $ */ /*- * Copyright (c) 2007, 2008 Juan Romero Pardines. @@ -27,7 +27,7 @@ #include sys/cdefs.h #ifndef lint -__RCSID($NetBSD: envstat.c,v 1.82 2010/11/05 13:52:42 pooka Exp $); +__RCSID($NetBSD: envstat.c,v 1.83 2010/12/13 18:00:38 pooka Exp $); #endif /* not lint */ #include stdio.h @@ -48,12 +48,7 @@ #include prop/proplib.h #include envstat.h - -#ifdef RUMP_ACTION -#include rump/rump.h -#include rump/rumpclient.h -#include rump/rump_syscalls.h -#endif +#include prog_ops.h #define ENVSYS_DFLAG 0x0001 /* list registered devices */ #define ENVSYS_FFLAG 0x0002 /* show temp in farenheit */ @@ -123,8 +118,6 @@ static int sysmonfd; /* fd of /dev/sysmon */ /* sneak in between ioctl() */ -#ifdef RUMP_ACTION -#include sys/syscall.h int ioctl(int fd, unsigned long request, ...) { @@ -132,15 +125,11 @@ int rv; va_start(ap, request); - if (fd == sysmonfd) - rv = rump_sys_ioctl(fd, request, va_arg(ap, void *)); - else - rv = syscall(SYS_ioctl, fd, request, va_arg(ap, void *)); + rv = prog_ioctl(fd, request, va_arg(ap, void *)); va_end(ap); return rv; } -#endif int main(int argc, char **argv) { @@ -149,10 +138,8 @@ char *endptr, *configfile = NULL; FILE *cf; -#ifdef RUMP_ACTION - if (rumpclient_init() == -1) - err(1, rumpclient init failed); -#endif + if (prog_init prog_init() == -1) + err(1, init failed); setprogname(argv[0]); @@ -241,7 +228,7 @@ errx(EXIT_FAILURE, -d flag cannot be used with -s); /* Open the device in ro mode */ - if ((sysmonfd = open(_PATH_SYSMON, O_RDONLY)) == -1) + if ((sysmonfd = prog_open(_PATH_SYSMON, O_RDONLY)) == -1) err(EXIT_FAILURE, %s, _PATH_SYSMON); /* Print dictionary in raw mode */ @@ -257,10 +244,10 @@ /* Remove all properties set in dictionary */ } else if (flags ENVSYS_SFLAG) { /* Close the ro descriptor */ - (void)close(sysmonfd); + (void)prog_close(sysmonfd); /* open the fd in rw mode */ - if ((sysmonfd = open(_PATH_SYSMON, O_RDWR)) == -1) + if ((sysmonfd = prog_open(_PATH_SYSMON, O_RDWR)) == -1) err(EXIT_FAILURE, %s, _PATH_SYSMON); dict = prop_dictionary_create(); @@ -311,7 +298,7 @@ free(sensors); if (mydevname) free(mydevname); - (void)close(sysmonfd); + (void)prog_close(sysmonfd); return rval ? EXIT_FAILURE : EXIT_SUCCESS; } @@ -338,8 +325,8 @@ /* * Close the read only descriptor and open a new one read write. */ - (void)close(sysmonfd); - if ((sysmonfd = open(_PATH_SYSMON, O_RDWR)) == -1) { + (void)prog_close(sysmonfd); + if ((sysmonfd = prog_open(_PATH_SYSMON, O_RDWR)) == -1) { error = errno; warn(%s, _PATH_SYSMON); return error; Added files: Index: src/usr.sbin/envstat/envstat_hostops.c diff -u /dev/null src/usr.sbin/envstat/envstat_hostops.c:1.1 --- /dev/null Mon Dec 13 18:00:39 2010 +++ src/usr.sbin/envstat/envstat_hostops.c Mon Dec 13 18:00:38 2010 @@ -0,0 +1,46 @@ +/* $NetBSD: envstat_hostops.c,v 1.1 2010/12/13 18:00:38 pooka Exp $ */ + +/* + * Copyright (c) 2010 The NetBSD Foundation, Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code
CVS commit: src/distrib/sets/lists
Module Name:src Committed By: pooka Date: Mon Dec 13 18:02:05 UTC 2010 Modified Files: src/distrib/sets/lists/base: mi src/distrib/sets/lists/comp: mi Log Message: +rump.envstat To generate a diff of this commit: cvs rdiff -u -r1.901 -r1.902 src/distrib/sets/lists/base/mi cvs rdiff -u -r1.1538 -r1.1539 src/distrib/sets/lists/comp/mi Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/distrib/sets/lists/base/mi diff -u src/distrib/sets/lists/base/mi:1.901 src/distrib/sets/lists/base/mi:1.902 --- src/distrib/sets/lists/base/mi:1.901 Mon Dec 13 17:51:39 2010 +++ src/distrib/sets/lists/base/mi Mon Dec 13 18:02:04 2010 @@ -1,4 +1,4 @@ -# $NetBSD: mi,v 1.901 2010/12/13 17:51:39 pooka Exp $ +# $NetBSD: mi,v 1.902 2010/12/13 18:02:04 pooka Exp $ # # Note: Don't delete entries from here - mark them as obsolete instead, # unless otherwise stated below. @@ -1142,6 +1142,7 @@ ./usr/sbin/editmapbase-obsolete obsolete ./usr/sbin/edquotabase-sysutil-bin ./usr/sbin/envstatbase-sysutil-bin +./usr/sbin/rump.envstatbase-sysutil-bin ./usr/sbin/eshconfigbase-sysutil-bin ./usr/sbin/etcupdatebase-sysutil-bin ./usr/sbin/extattrctlbase-sysutil-bin Index: src/distrib/sets/lists/comp/mi diff -u src/distrib/sets/lists/comp/mi:1.1538 src/distrib/sets/lists/comp/mi:1.1539 --- src/distrib/sets/lists/comp/mi:1.1538 Mon Dec 13 17:51:40 2010 +++ src/distrib/sets/lists/comp/mi Mon Dec 13 18:02:04 2010 @@ -1,4 +1,4 @@ -# $NetBSD: mi,v 1.1538 2010/12/13 17:51:40 pooka Exp $ +# $NetBSD: mi,v 1.1539 2010/12/13 18:02:04 pooka Exp $ # # Note: don't delete entries from here - mark them as obsolete instead. # @@ -3610,6 +3610,7 @@ ./usr/libdata/debug/usr/sbin/dumplfs.debug comp-sysutil-debug debug ./usr/libdata/debug/usr/sbin/edquota.debug comp-sysutil-debug debug ./usr/libdata/debug/usr/sbin/envstat.debug comp-sysutil-debug debug +./usr/libdata/debug/usr/sbin/rump.envstat.debug comp-sysutil-debug debug ./usr/libdata/debug/usr/sbin/eshconfig.debug comp-sysutil-debug debug ./usr/libdata/debug/usr/sbin/extattrctl.debug comp-sysutil-debug debug ./usr/libdata/debug/usr/sbin/faithd.debug comp-router-debug inet6,debug
CVS commit: src/sbin/ifconfig
Module Name:src Committed By: njoly Date: Mon Dec 13 19:17:21 UTC 2010 Modified Files: src/sbin/ifconfig: prog_ops.h Log Message: op_read return value is a ssize_t, not an int. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/sbin/ifconfig/prog_ops.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sbin/ifconfig/prog_ops.h diff -u src/sbin/ifconfig/prog_ops.h:1.1 src/sbin/ifconfig/prog_ops.h:1.2 --- src/sbin/ifconfig/prog_ops.h:1.1 Mon Dec 13 17:35:08 2010 +++ src/sbin/ifconfig/prog_ops.h Mon Dec 13 19:17:20 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: prog_ops.h,v 1.1 2010/12/13 17:35:08 pooka Exp $ */ +/* $NetBSD: prog_ops.h,v 1.2 2010/12/13 19:17:20 njoly Exp $ */ /* * Copyright (c) 2010 The NetBSD Foundation, Inc. @@ -39,7 +39,7 @@ int (*op_socket)(int, int, int); int (*op_ioctl)(int, unsigned long, ...); - int (*op_read)(int, void *, size_t); + ssize_t (*op_read)(int, void *, size_t); int (*op_close)(int); };
CVS commit: src
Module Name:src Committed By: pooka Date: Mon Dec 13 19:19:10 UTC 2010 Modified Files: src/distrib/utils/x_ping: Makefile src/distrib/utils/x_route: Makefile src/sbin/ping: prog_ops.h src/sbin/route: prog_ops.h Log Message: be a happy crunch build To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/distrib/utils/x_ping/Makefile cvs rdiff -u -r1.16 -r1.17 src/distrib/utils/x_route/Makefile cvs rdiff -u -r1.1 -r1.2 src/sbin/ping/prog_ops.h cvs rdiff -u -r1.1 -r1.2 src/sbin/route/prog_ops.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/distrib/utils/x_ping/Makefile diff -u src/distrib/utils/x_ping/Makefile:1.6 src/distrib/utils/x_ping/Makefile:1.7 --- src/distrib/utils/x_ping/Makefile:1.6 Wed Dec 12 00:05:13 2001 +++ src/distrib/utils/x_ping/Makefile Mon Dec 13 19:19:10 2010 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.6 2001/12/12 00:05:13 tv Exp $ +# $NetBSD: Makefile,v 1.7 2010/12/13 19:19:10 pooka Exp $ # Build ping without IPSEC SRCDIR= ${.CURDIR}/../../../sbin/ping @@ -6,7 +6,7 @@ PROG= ping NOMAN= # defined -CPPFLAGS+= -I${SRCDIR} +CPPFLAGS+= -I${SRCDIR} -DCRUNCHOPS DPADD= ${LIBM} LDADD= -lm Index: src/distrib/utils/x_route/Makefile diff -u src/distrib/utils/x_route/Makefile:1.16 src/distrib/utils/x_route/Makefile:1.17 --- src/distrib/utils/x_route/Makefile:1.16 Tue Jan 18 12:30:21 2005 +++ src/distrib/utils/x_route/Makefile Mon Dec 13 19:19:10 2010 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.16 2005/01/18 12:30:21 lukem Exp $ +# $NetBSD: Makefile,v 1.17 2010/12/13 19:19:10 pooka Exp $ # @(#)Makefile 8.1 (Berkeley) 6/5/93 SRCDIR= ${.CURDIR}/../../../sbin/route @@ -10,7 +10,7 @@ SRCS= route.c show.c keywords.c -CPPFLAGS+= -DSMALL -I${SRCDIR} +CPPFLAGS+= -DSMALL -I${SRCDIR} -DCRUNCHOPS .if defined(SMALLPROG_INET6) (${USE_INET6} != no) CPPFLAGS+= -DINET6 .endif Index: src/sbin/ping/prog_ops.h diff -u src/sbin/ping/prog_ops.h:1.1 src/sbin/ping/prog_ops.h:1.2 --- src/sbin/ping/prog_ops.h:1.1 Mon Dec 13 17:42:17 2010 +++ src/sbin/ping/prog_ops.h Mon Dec 13 19:19:10 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: prog_ops.h,v 1.1 2010/12/13 17:42:17 pooka Exp $ */ +/* $NetBSD: prog_ops.h,v 1.2 2010/12/13 19:19:10 pooka Exp $ */ /* * Copyright (c) 2010 The NetBSD Foundation, Inc. @@ -31,6 +31,7 @@ #include sys/types.h +#ifndef CRUNCHOPS struct prog_ops { int (*op_init)(void); @@ -57,5 +58,15 @@ #define prog_recvfrom prog_ops.op_recvfrom #define prog_sendto prog_ops.op_sendto #define prog_close prog_ops.op_close +#else +#define prog_init ((int (*)(void))NULL) +#define prog_socket socket +#define prog_setsockopt setsockopt +#define prog_shutdown shutdown +#define prog_poll poll +#define prog_recvfrom recvfrom +#define prog_sendto sendto +#define prog_close close +#endif #endif /* _PROG_OPS_H_ */ Index: src/sbin/route/prog_ops.h diff -u src/sbin/route/prog_ops.h:1.1 src/sbin/route/prog_ops.h:1.2 --- src/sbin/route/prog_ops.h:1.1 Mon Dec 13 17:39:47 2010 +++ src/sbin/route/prog_ops.h Mon Dec 13 19:19:10 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: prog_ops.h,v 1.1 2010/12/13 17:39:47 pooka Exp $ */ +/* $NetBSD: prog_ops.h,v 1.2 2010/12/13 19:19:10 pooka Exp $ */ /* * Copyright (c) 2010 The NetBSD Foundation, Inc. @@ -31,6 +31,7 @@ #include sys/types.h +#ifndef CRUNCHOPS struct prog_ops { int (*op_init)(void); @@ -56,5 +57,15 @@ #define prog_write prog_ops.op_write #define prog_sysctl prog_ops.op_sysctl #define prog_shutdown prog_ops.op_shutdown +#else +#define prog_init ((int (*)(void))NULL) +#define prog_socket socket +#define prog_open open +#define prog_getpid getpid +#define prog_read read +#define prog_write write +#define prog_sysctl sysctl +#define prog_shutdown shutdown +#endif #endif /* _PROG_OPS_H_ */
CVS commit: src/share/man/man4
Module Name:src Committed By: jruoho Date: Mon Dec 13 19:22:01 UTC 2010 Modified Files: src/share/man/man4: module.4 Log Message: Clarifications. Improvements to wording and markup. Also follow the common conventions and split the NOTES into CAVEATS (all these really highlight the work-in-progress nature of the modules). Split the note about security into SECURITY CONSIDERATIONS. Add an EXAMPLE on how to manually update modules. To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/share/man/man4/module.4 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/man/man4/module.4 diff -u src/share/man/man4/module.4:1.3 src/share/man/man4/module.4:1.4 --- src/share/man/man4/module.4:1.3 Sun Dec 12 22:14:19 2010 +++ src/share/man/man4/module.4 Mon Dec 13 19:22:01 2010 @@ -1,4 +1,4 @@ -.\ $NetBSD: module.4,v 1.3 2010/12/12 22:14:19 pgoyette Exp $ +.\ $NetBSD: module.4,v 1.4 2010/12/13 19:22:01 jruoho Exp $ .\ .\ Copyright (c) 1993 Christopher G. Demetriou .\ All rights reserved. @@ -32,7 +32,7 @@ .\ .\ Id: LICENSE,v 1.2 2000/06/14 15:57:33 cgd Exp .\ -.Dd December 19, 2010 +.Dd December 13, 2010 .Dt MODULE 4 .Os .Sh NAME @@ -49,8 +49,12 @@ .Pp Additionally, the kernel may automatically load software modules as needed to perform requested operations. -For example, an xyzfs module can be loaded automatically when an -attempt is made to mount an xyzfs file system. +For example, an +.Dq xyzfs +module can be loaded automatically when an +attempt is made to mount an +.Dq xyzfs +file system. Modules can also depend on other modules, and dependant modules are automatically loaded. When a module is no longer needed, it can be automatically unloaded. @@ -63,8 +67,8 @@ interface is accessed with the .Xr modctl 2 system call. -Normally all operations involving -Kernel Modules are handled by the +All common operations involving +kernel modules are handled by the .Xr modload 8 , .Xr modunload 8 , and @@ -79,13 +83,13 @@ .Nm interface. .Ss Device Driver modules -New block and character device -drivers may be loaded into the system with -.Li options MODULAR . -One problem with loading a device driver is that the driver's device -nodes must exist for the devices to be accessed. +Many device drivers can be loaded as a kernel module. +One potential problem specific to block and character device drivers +is that the device nodes must exist for the devices to be accessed. These need to be created manually, after the driver module has been successfully loaded. +Majority of the device driver modules do not however +need any manual intervention to function properly. .Ss Execution Interpreters Execution Interpreters can be loaded to provide support for executing binaries not normally supported by kernel. @@ -106,50 +110,31 @@ Alternate system security models may loaded using the .Nm facility. -.Sh NOTES -.Ss Security considerations -Kernel modules can do anything with kernel structures. -There is no memory protection between modules and the rest of the kernel. -Hence, a potential attacker with access to the -.Xr modctl 2 -system call can acquire complete and total control over the system. -.Pp -To avoid associated security risks, new modules can only be loaded when -.Pa securelevel -is less than or equal to zero, or if the kernel was built with -.Cd options INSECURE . -.Ss Module might crash system -Loading and using a buggy module is likely to crash the operating -system. -Since the module becomes part of kernel, a code error is much more -fatal than for userland programs. -.Ss Modules need to be updated when the kernel is updated -Kernel modules are built to operate only with a specific version of the -Operating System kernel. -When you update the kernel to a new version, you should also update the -contents of the -.Pa /stand/${ARCH}/${VERSION}/modules/ -directory with all required modules. -(This location has been the subject of much discussion, and may change -in future versions of the -.Nx -operating system.) -.Ss Missing file system modules may prevent the system from booting -If you attempt to boot the operating system from a file system for -which the module is not built into the kernel, the boot may fail -with the message -.Dq Cannot mount root, error 79 . -On certain architectures (currently, i386 and amd64), you may be able to -recover from this error by using the -.Dq load xxxfs -command before trying to boot. -This command is only available on newer bootloaders. -.Pp -Since the absence of required modules, or the inability of the bootloader -to load the modules, is a common reason for a -.Dv MODULAR -kernel's failure to boot, you might want to maintain a non-MODULAR -kernel in the root file system for recovery purposes. +.Sh EXAMPLES +The common build tool of +.Nx , +.Dq build.sh , +automatically compiles and installs all +modules during a full system build and
CVS commit: src/share/man/man7
Module Name:src Committed By: jruoho Date: Mon Dec 13 19:35:00 UTC 2010 Modified Files: src/share/man/man7: c.7 Log Message: Prompted by dholland@; add the C99 TCORs. To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/share/man/man7/c.7 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/man/man7/c.7 diff -u src/share/man/man7/c.7:1.6 src/share/man/man7/c.7:1.7 --- src/share/man/man7/c.7:1.6 Thu Dec 2 12:04:01 2010 +++ src/share/man/man7/c.7 Mon Dec 13 19:35:00 2010 @@ -1,4 +1,4 @@ -.\ $NetBSD: c.7,v 1.6 2010/12/02 12:04:01 wiz Exp $ +.\ $NetBSD: c.7,v 1.7 2010/12/13 19:35:00 jruoho Exp $ .\ .\ Copyright (C) 2007, 2010 Gabor Kovesdan. All rights reserved. .\ @@ -25,7 +25,7 @@ .\ .\ $FreeBSD: src/share/man/man7/c99.7,v 1.1 2010/06/17 12:05:47 gabor Exp $ .\ -.Dd November 30, 2010 +.Dd December 11, 2010 .Dt C 7 .Os .Sh NAME @@ -195,6 +195,21 @@ .%A ISO/IEC .%T 9899:1999, Programming languages -- C .Re +.Pp +.Rs +.%A ISO/IEC +.%T 9899:1999 TCOR1, Programming languages -- C, Technical Corrigendum 1 +.Re +.Pp +.Rs +.%A ISO/IEC +.%T 9899:1999 TCOR2, Programming languages -- C, Technical Corrigendum 2 +.Re +.Pp +.Rs +.%A ISO/IEC +.%T 9899:1999 TCOR3, Programming languages -- C, Technical Corrigendum 3 +.Re .Sh HISTORY This manual page first appeared in .Fx 9.0
CVS commit: src
Module Name:src Committed By: pooka Date: Mon Dec 13 19:36:34 UTC 2010 Modified Files: src/distrib/sets/lists/man: mi src/usr.bin/rump_allserver: Makefile Added Files: src/usr.bin/rump_allserver: rump_allserver.1 Log Message: manpage To generate a diff of this commit: cvs rdiff -u -r1.1266 -r1.1267 src/distrib/sets/lists/man/mi cvs rdiff -u -r1.2 -r1.3 src/usr.bin/rump_allserver/Makefile cvs rdiff -u -r0 -r1.1 src/usr.bin/rump_allserver/rump_allserver.1 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/distrib/sets/lists/man/mi diff -u src/distrib/sets/lists/man/mi:1.1266 src/distrib/sets/lists/man/mi:1.1267 --- src/distrib/sets/lists/man/mi:1.1266 Mon Dec 13 06:30:44 2010 +++ src/distrib/sets/lists/man/mi Mon Dec 13 19:36:34 2010 @@ -1,4 +1,4 @@ -# $NetBSD: mi,v 1.1266 2010/12/13 06:30:44 mrg Exp $ +# $NetBSD: mi,v 1.1267 2010/12/13 19:36:34 pooka Exp $ # # Note: don't delete entries from here - mark them as obsolete instead. # @@ -445,6 +445,8 @@ ./usr/share/man/cat1/rsh.0 man-netutil-catman .cat ./usr/share/man/cat1/rtld.0 man-shlib-catman .cat ./usr/share/man/cat1/rump.halt.0 man-netutil-catman .cat +./usr/share/man/cat1/rump_allserver.0 man-netutil-catman .cat +./usr/share/man/cat1/rump_server.0 man-netutil-catman .cat ./usr/share/man/cat1/rup.0 man-netutil-catman .cat ./usr/share/man/cat1/ruptime.0 man-netutil-catman .cat ./usr/share/man/cat1/rusers.0 man-netutil-catman .cat @@ -3224,6 +3226,8 @@ ./usr/share/man/html1/rsh.html man-netutil-htmlman html ./usr/share/man/html1/rtld.html man-shlib-htmlman html ./usr/share/man/html1/rump.halt.html man-netutil-htmlman html +./usr/share/man/html1/rump_allserver.html man-netutil-htmlman html +./usr/share/man/html1/rump_server.html man-netutil-htmlman html ./usr/share/man/html1/rup.html man-netutil-htmlman html ./usr/share/man/html1/ruptime.html man-netutil-htmlman html ./usr/share/man/html1/rusers.html man-netutil-htmlman html @@ -5661,6 +5665,8 @@ ./usr/share/man/man1/rsh.1 man-netutil-man .man ./usr/share/man/man1/rtld.1 man-shlib-man .man ./usr/share/man/man1/rump.halt.1 man-netutil-man .man +./usr/share/man/man1/rump_allserver.1 man-netutil-man .man +./usr/share/man/man1/rump_server.1 man-netutil-man .man ./usr/share/man/man1/rup.1 man-netutil-man .man ./usr/share/man/man1/ruptime.1 man-netutil-man .man ./usr/share/man/man1/rusers.1 man-netutil-man .man Index: src/usr.bin/rump_allserver/Makefile diff -u src/usr.bin/rump_allserver/Makefile:1.2 src/usr.bin/rump_allserver/Makefile:1.3 --- src/usr.bin/rump_allserver/Makefile:1.2 Sun Dec 5 20:12:55 2010 +++ src/usr.bin/rump_allserver/Makefile Mon Dec 13 19:36:34 2010 @@ -1,8 +1,8 @@ -# $NetBSD: Makefile,v 1.2 2010/12/05 20:12:55 pooka Exp $ +# $NetBSD: Makefile,v 1.3 2010/12/13 19:36:34 pooka Exp $ # PROG= rump_allserver -NOMAN= for now +MLINKS+=rump_allserver.1 rump_server.1 RUMPTOP=${.CURDIR}/../../sys/rump Added files: Index: src/usr.bin/rump_allserver/rump_allserver.1 diff -u /dev/null src/usr.bin/rump_allserver/rump_allserver.1:1.1 --- /dev/null Mon Dec 13 19:36:34 2010 +++ src/usr.bin/rump_allserver/rump_allserver.1 Mon Dec 13 19:36:34 2010 @@ -0,0 +1,107 @@ +.\ $NetBSD: rump_allserver.1,v 1.1 2010/12/13 19:36:34 pooka Exp $ +.\ +.\ Copyright (c) 2010 Antti Kantee. All rights reserved. +.\ +.\ Redistribution and use in source and binary forms, with or without +.\ modification, are permitted provided that the following conditions +.\ are met: +.\ 1. Redistributions of source code must retain the above copyright +.\notice, this list of conditions and the following disclaimer. +.\ 2. Redistributions in binary form must reproduce the above copyright +.\notice, this list of conditions and the following disclaimer in the +.\documentation and/or other materials provided with the distribution. +.\ +.\ THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 AUTHOR 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 December 13, 2010 +.Dt RUMP_SERVER 1 +.Os +.Sh NAME +.Nm rump_server , +.Nm rump_allserver +.Nd rump kernel server +.Sh SYNOPSIS +.Nm +.Op Fl s +.Op Fl l Ar library +.Op Fl m Ar module +.Ar url +.Sh DESCRIPTION
CVS commit: src/sys/sys
Module Name:src Committed By: joerg Date: Mon Dec 13 19:37:32 UTC 2010 Modified Files: src/sys/sys: exec_elf.h Log Message: Add PT_GNU_EH_FRAME definition To generate a diff of this commit: cvs rdiff -u -r1.106 -r1.107 src/sys/sys/exec_elf.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/sys/exec_elf.h diff -u src/sys/sys/exec_elf.h:1.106 src/sys/sys/exec_elf.h:1.107 --- src/sys/sys/exec_elf.h:1.106 Sat Oct 16 10:27:08 2010 +++ src/sys/sys/exec_elf.h Mon Dec 13 19:37:32 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: exec_elf.h,v 1.106 2010/10/16 10:27:08 skrll Exp $ */ +/* $NetBSD: exec_elf.h,v 1.107 2010/12/13 19:37:32 joerg Exp $ */ /*- * Copyright (c) 1994 The NetBSD Foundation, Inc. @@ -344,6 +344,7 @@ #define PT_NUM 8 #define PT_LOOS 0x6000 /* OS-specific range */ +#define PT_GNU_EH_FRAME 0x6474e550 /* GNU-specific EH frame segment */ #define PT_HIOS 0x6fff #define PT_LOPROC 0x7000 /* Processor-specific range */ #define PT_HIPROC 0x7fff
CVS commit: src/usr.bin/rump_server
Module Name:src Committed By: pooka Date: Mon Dec 13 19:39:37 UTC 2010 Modified Files: src/usr.bin/rump_server: Makefile Log Message: there's a manpage now ... just not here To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/usr.bin/rump_server/Makefile 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/rump_server/Makefile diff -u src/usr.bin/rump_server/Makefile:1.1 src/usr.bin/rump_server/Makefile:1.2 --- src/usr.bin/rump_server/Makefile:1.1 Mon Dec 13 13:29:15 2010 +++ src/usr.bin/rump_server/Makefile Mon Dec 13 19:39:37 2010 @@ -1,11 +1,11 @@ -# $NetBSD: Makefile,v 1.1 2010/12/13 13:29:15 pooka Exp $ +# $NetBSD: Makefile,v 1.2 2010/12/13 19:39:37 pooka Exp $ # .PATH: ${.CURDIR}/../rump_allserver PROG= rump_server SRCS= rump_allserver.c -NOMAN= for now +NOMAN= installed by ../rump_allserver LDADD+= -lrump -lrumpuser -lpthread
CVS commit: src/sbin
Module Name:src Committed By: pooka Date: Mon Dec 13 20:48:45 UTC 2010 Modified Files: src/sbin/modload: Makefile main.c src/sbin/modstat: Makefile main.c src/sbin/modunload: Makefile main.c Added Files: src/sbin/modload: modload_hostops.c modload_rumpops.c prog_ops.h src/sbin/modstat: modstat_hostops.c modstat_rumpops.c prog_ops.h src/sbin/modunload: modunload_hostops.c modunload_rumpops.c prog_ops.h Log Message: Add rump client support for module utilities. It should be noted that while modstat and modunload and builtin modules work exactly the same as in the host case, modload loads file system kernel modules from the rump kernel namespace. By default, archs which have rump support for the kernel kernel ABI have the host module directory mapped into the rump kernel namespace at the same location (/stand/...). Therefore, if the *host* module directory is populated, rump.modload foo will work as expected. Otherwise, RUMP_MODULEBASE can be used to point to the module directory. To generate a diff of this commit: cvs rdiff -u -r1.14 -r1.15 src/sbin/modload/Makefile cvs rdiff -u -r1.13 -r1.14 src/sbin/modload/main.c cvs rdiff -u -r0 -r1.1 src/sbin/modload/modload_hostops.c \ src/sbin/modload/modload_rumpops.c src/sbin/modload/prog_ops.h cvs rdiff -u -r1.1 -r1.2 src/sbin/modstat/Makefile cvs rdiff -u -r1.10 -r1.11 src/sbin/modstat/main.c cvs rdiff -u -r0 -r1.1 src/sbin/modstat/modstat_hostops.c \ src/sbin/modstat/modstat_rumpops.c src/sbin/modstat/prog_ops.h cvs rdiff -u -r1.13 -r1.14 src/sbin/modunload/Makefile cvs rdiff -u -r1.3 -r1.4 src/sbin/modunload/main.c cvs rdiff -u -r0 -r1.1 src/sbin/modunload/modunload_hostops.c \ src/sbin/modunload/modunload_rumpops.c src/sbin/modunload/prog_ops.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sbin/modload/Makefile diff -u src/sbin/modload/Makefile:1.14 src/sbin/modload/Makefile:1.15 --- src/sbin/modload/Makefile:1.14 Wed Nov 12 12:35:53 2008 +++ src/sbin/modload/Makefile Mon Dec 13 20:48:44 2010 @@ -1,8 +1,8 @@ -# $NetBSD: Makefile,v 1.14 2008/11/12 12:35:53 ad Exp $ +# $NetBSD: Makefile,v 1.15 2010/12/13 20:48:44 pooka Exp $ .include bsd.own.mk -PROG= modload +RUMPPRG=modload SRCS= main.c MAN= modload.8 LDADD= -lprop Index: src/sbin/modload/main.c diff -u src/sbin/modload/main.c:1.13 src/sbin/modload/main.c:1.14 --- src/sbin/modload/main.c:1.13 Thu Jun 11 08:12:00 2009 +++ src/sbin/modload/main.c Mon Dec 13 20:48:44 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: main.c,v 1.13 2009/06/11 08:12:00 wiz Exp $ */ +/* $NetBSD: main.c,v 1.14 2010/12/13 20:48:44 pooka Exp $ */ /*- * Copyright (c) 2008 The NetBSD Foundation, Inc. @@ -28,7 +28,7 @@ #include sys/cdefs.h #ifndef lint -__RCSID($NetBSD: main.c,v 1.13 2009/06/11 08:12:00 wiz Exp $); +__RCSID($NetBSD: main.c,v 1.14 2010/12/13 20:48:44 pooka Exp $); #endif /* !lint */ #include sys/module.h @@ -44,6 +44,8 @@ #include prop/proplib.h +#include prog_ops.h + int main(int, char **); static void parse_bool_param(prop_dictionary_t, const char *, const char *); @@ -160,12 +162,14 @@ } else { if (argc != 1) usage(); + if (prog_init prog_init() == -1) + err(1, prog init failed); cmdargs.ml_filename = argv[0]; cmdargs.ml_flags = flags; cmdargs.ml_props = propsstr; cmdargs.ml_propslen = strlen(propsstr); - if (modctl(MODCTL_LOAD, cmdargs)) { + if (prog_modctl(MODCTL_LOAD, cmdargs)) { err(EXIT_FAILURE, NULL); } } Index: src/sbin/modstat/Makefile diff -u src/sbin/modstat/Makefile:1.1 src/sbin/modstat/Makefile:1.2 --- src/sbin/modstat/Makefile:1.1 Wed Jan 16 12:34:57 2008 +++ src/sbin/modstat/Makefile Mon Dec 13 20:48:45 2010 @@ -1,6 +1,6 @@ -# $NetBSD: Makefile,v 1.1 2008/01/16 12:34:57 ad Exp $ +# $NetBSD: Makefile,v 1.2 2010/12/13 20:48:45 pooka Exp $ -PROG= modstat +RUMPPRG=modstat SRCS= main.c MAN= modstat.8 Index: src/sbin/modstat/main.c diff -u src/sbin/modstat/main.c:1.10 src/sbin/modstat/main.c:1.11 --- src/sbin/modstat/main.c:1.10 Fri Mar 19 16:25:33 2010 +++ src/sbin/modstat/main.c Mon Dec 13 20:48:45 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: main.c,v 1.10 2010/03/19 16:25:33 pooka Exp $ */ +/* $NetBSD: main.c,v 1.11 2010/12/13 20:48:45 pooka Exp $ */ /*- * Copyright (c) 2008 The NetBSD Foundation, Inc. @@ -28,7 +28,7 @@ #include sys/cdefs.h #ifndef lint -__RCSID($NetBSD: main.c,v 1.10 2010/03/19 16:25:33 pooka Exp $); +__RCSID($NetBSD: main.c,v 1.11 2010/12/13 20:48:45 pooka Exp $); #endif /* !lint */ #include sys/module.h @@ -39,6 +39,8 @@ #include unistd.h #include err.h +#include prog_ops.h + int main(int, char **); static void usage(void) __dead; static int modstatcmp(const void *, const void *); @@ -88,10 +90,13 @@ if (argc != 0) usage(); + if (prog_init prog_init() == -1) + err(1, prog init failed); + for (len = 8192;;) { iov.iov_base =
CVS commit: src/distrib/sets/lists
Module Name:src Committed By: pooka Date: Mon Dec 13 20:51:12 UTC 2010 Modified Files: src/distrib/sets/lists/base: mi src/distrib/sets/lists/comp: mi Log Message: +rump.mod* To generate a diff of this commit: cvs rdiff -u -r1.902 -r1.903 src/distrib/sets/lists/base/mi cvs rdiff -u -r1.1539 -r1.1540 src/distrib/sets/lists/comp/mi Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/distrib/sets/lists/base/mi diff -u src/distrib/sets/lists/base/mi:1.902 src/distrib/sets/lists/base/mi:1.903 --- src/distrib/sets/lists/base/mi:1.902 Mon Dec 13 18:02:04 2010 +++ src/distrib/sets/lists/base/mi Mon Dec 13 20:51:11 2010 @@ -1,4 +1,4 @@ -# $NetBSD: mi,v 1.902 2010/12/13 18:02:04 pooka Exp $ +# $NetBSD: mi,v 1.903 2010/12/13 20:51:11 pooka Exp $ # # Note: Don't delete entries from here - mark them as obsolete instead, # unless otherwise stated below. @@ -245,6 +245,9 @@ ./sbin/modload base-sysutil-root ./sbin/modstat base-sysutil-root ./sbin/modunloadbase-sysutil-root +./sbin/rump.modload base-sysutil-root +./sbin/rump.modstat base-sysutil-root +./sbin/rump.modunloadbase-sysutil-root ./sbin/mount base-sysutil-root ./sbin/mount_adosbase-adosfs-root ./sbin/mount_cd9660base-sysutil-root Index: src/distrib/sets/lists/comp/mi diff -u src/distrib/sets/lists/comp/mi:1.1539 src/distrib/sets/lists/comp/mi:1.1540 --- src/distrib/sets/lists/comp/mi:1.1539 Mon Dec 13 18:02:04 2010 +++ src/distrib/sets/lists/comp/mi Mon Dec 13 20:51:11 2010 @@ -1,4 +1,4 @@ -# $NetBSD: mi,v 1.1539 2010/12/13 18:02:04 pooka Exp $ +# $NetBSD: mi,v 1.1540 2010/12/13 20:51:11 pooka Exp $ # # Note: don't delete entries from here - mark them as obsolete instead. # @@ -2984,6 +2984,9 @@ ./usr/libdata/debug/sbin/modload.debug comp-sysutil-debug debug ./usr/libdata/debug/sbin/modstat.debug comp-sysutil-debug debug ./usr/libdata/debug/sbin/modunload.debug comp-sysutil-debug debug +./usr/libdata/debug/sbin/rump.modload.debug comp-sysutil-debug debug +./usr/libdata/debug/sbin/rump.modstat.debug comp-sysutil-debug debug +./usr/libdata/debug/sbin/rump.modunload.debug comp-sysutil-debug debug ./usr/libdata/debug/sbin/mount.debug comp-sysutil-debug debug ./usr/libdata/debug/sbin/mount_ados.debug comp-adosfs-debug debug ./usr/libdata/debug/sbin/mount_cd9660.debug comp-sysutil-debug debug
CVS commit: src/lib/libc
Module Name:src Committed By: pooka Date: Mon Dec 13 21:07:55 UTC 2010 Modified Files: src/lib/libc/gen: sysctlnametomib.c src/lib/libc/net: if_indextoname.c Log Message: last of the RUMP_ACTION syscall swappers To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/lib/libc/gen/sysctlnametomib.c cvs rdiff -u -r1.5 -r1.6 src/lib/libc/net/if_indextoname.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libc/gen/sysctlnametomib.c diff -u src/lib/libc/gen/sysctlnametomib.c:1.4 src/lib/libc/gen/sysctlnametomib.c:1.5 --- src/lib/libc/gen/sysctlnametomib.c:1.4 Tue Apr 29 06:53:01 2008 +++ src/lib/libc/gen/sysctlnametomib.c Mon Dec 13 21:07:55 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: sysctlnametomib.c,v 1.4 2008/04/29 06:53:01 martin Exp $ */ +/* $NetBSD: sysctlnametomib.c,v 1.5 2010/12/13 21:07:55 pooka Exp $ */ /*- * Copyright (c) 2003,2004 The NetBSD Foundation, Inc. @@ -31,10 +31,12 @@ #include sys/cdefs.h #if defined(LIBC_SCCS) !defined(lint) -__RCSID($NetBSD: sysctlnametomib.c,v 1.4 2008/04/29 06:53:01 martin Exp $); +__RCSID($NetBSD: sysctlnametomib.c,v 1.5 2010/12/13 21:07:55 pooka Exp $); #endif /* LIBC_SCCS and not lint */ +#ifndef RUMP_ACTION #include namespace.h +#endif #include sys/param.h #include sys/sysctl.h @@ -42,6 +44,11 @@ __weak_alias(sysctlnametomib,_sysctlnametomib) #endif +#ifdef RUMP_ACTION +#include rump/rump_syscalls.h +#define sysctl(a,b,c,d,e,f) rump_sys___sysctl(a,b,c,d,e,f) +#endif /* RUMP_ACTION */ + /* * freebsd compatible sysctlnametomib() function, implemented as an * extremely thin wrapper around sysctlgetmibinfo(). i think the use Index: src/lib/libc/net/if_indextoname.c diff -u src/lib/libc/net/if_indextoname.c:1.5 src/lib/libc/net/if_indextoname.c:1.6 --- src/lib/libc/net/if_indextoname.c:1.5 Sat Nov 25 23:09:11 2006 +++ src/lib/libc/net/if_indextoname.c Mon Dec 13 21:07:54 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: if_indextoname.c,v 1.5 2006/11/25 23:09:11 elad Exp $ */ +/* $NetBSD: if_indextoname.c,v 1.6 2010/12/13 21:07:54 pooka Exp $ */ /* $KAME: if_indextoname.c,v 1.7 2000/11/08 03:09:30 itojun Exp $ */ /*- @@ -28,10 +28,12 @@ #include sys/cdefs.h #if defined(LIBC_SCCS) !defined(lint) -__RCSID($NetBSD: if_indextoname.c,v 1.5 2006/11/25 23:09:11 elad Exp $); +__RCSID($NetBSD: if_indextoname.c,v 1.6 2010/12/13 21:07:54 pooka Exp $); #endif /* LIBC_SCCS and not lint */ +#ifndef RUMP_ACTION #include namespace.h +#endif #include sys/types.h #include sys/socket.h #include net/if_dl.h
CVS commit: src/usr.bin/sdpquery
Module Name:src Committed By: plunky Date: Mon Dec 13 21:08:38 UTC 2010 Modified Files: src/usr.bin/sdpquery: print.c Log Message: add attributes from the Basic Printing Profile v1.2r00 To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/usr.bin/sdpquery/print.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/sdpquery/print.c diff -u src/usr.bin/sdpquery/print.c:1.5 src/usr.bin/sdpquery/print.c:1.6 --- src/usr.bin/sdpquery/print.c:1.5 Sun Nov 22 18:53:44 2009 +++ src/usr.bin/sdpquery/print.c Mon Dec 13 21:08:37 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: print.c,v 1.5 2009/11/22 18:53:44 plunky Exp $ */ +/* $NetBSD: print.c,v 1.6 2010/12/13 21:08:37 plunky Exp $ */ /*- * Copyright (c) 2009 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include sys/cdefs.h -__RCSID($NetBSD: print.c,v 1.5 2009/11/22 18:53:44 plunky Exp $); +__RCSID($NetBSD: print.c,v 1.6 2010/12/13 21:08:37 plunky Exp $); #include ctype.h #include iconv.h @@ -111,6 +111,7 @@ static void print_pnp_source(sdp_data_t *); static void print_mas_types(sdp_data_t *); static void print_supported_repositories(sdp_data_t *); +static void print_character_repertoires(sdp_data_t *); static void print_rfcomm(sdp_data_t *); static void print_bnep(sdp_data_t *); @@ -238,6 +239,27 @@ { 0x030e, IPv6Subnet,print_string }, }; +attr_t bp_attrs[] = { /* Basic Printing */ + { 0x0350, DocumentFormatsSupported, print_string }, + { 0x0352, CharacterRepertoiresSupported, print_character_repertoires }, + { 0x0354, XHTML-PrintImageFormatsSupported, print_string }, + { 0x0356, ColorSupported, print_bool }, + { 0x0358, 1284ID,print_string }, + { 0x035a, PrinterName, print_string }, + { 0x035c, PrinterLocation, print_string }, + { 0x035e, DuplexSupported, print_bool }, + { 0x0360, MediaTypesSupported, print_string }, + { 0x0362, MaxMediaWidth, print_uint16d }, + { 0x0364, MaxMediaLength, print_uint16d }, + { 0x0366, EnhancedLayoutSupport, print_bool }, + { 0x0368, RUIFormatsSupported, print_string }, + { 0x0370, ReferencePrintingRUISupported, print_bool }, + { 0x0372, DirectPrintingRUISupported, print_bool }, + { 0x0374, ReferencePrintingTopURL, print_url }, + { 0x0376, DirectPrintingTopURL, print_url }, + { 0x037a, DeviceName,print_string }, +}; + attr_t hf_attrs[] = { /* Handsfree */ { 0x0311, SupportedFeatures, print_hf_features }, }; @@ -247,6 +269,11 @@ { 0x0311, SupportedFeatures, print_hfag_features }, }; +attr_t rui_attrs[] = { /* Reflected User Interface */ + { 0x0368, RUIFormatsSupported, print_string }, + { 0x0378, PrinterAdminRUITopURL, print_url }, +}; + attr_t hid_attrs[] = { /* Human Interface Device */ { 0x0200, HIDDeviceReleaseNumber, print_hid_version }, { 0x0201, HIDParserVersion, print_hid_version }, @@ -312,7 +339,7 @@ { 0x1116, Network Access Point, A(nap_attrs) }, { 0x1117, Group Network, A(gn_attrs) }, { 0x1118, Direct Printing, NULL, 0 }, - { 0x1119, Reference Printing, NULL, 0 }, + { 0x1119, Reference Printing, A(bp_attrs) }, { 0x111a, Imaging,NULL, 0 }, { 0x111b, Imaging Responder, NULL, 0 }, { 0x111c, Imaging Automatic Archive, NULL, 0 }, @@ -320,7 +347,7 @@ { 0x111e, Handsfree,A(hf_attrs) }, { 0x111f, Handsfree Audio Gateway, A(hfag_attrs) }, { 0x1120, Direct Printing Reference Objects, NULL, 0 }, - { 0x1121, Reflected User Interface, NULL, 0 }, + { 0x1121, Reflected User Interface, A(rui_attrs) }, { 0x1122, Basic Printing, NULL, 0 }, { 0x1123, Printing Status, NULL, 0 }, { 0x1124, Human Interface Device, A(hid_attrs) }, @@ -1346,6 +1373,50 @@ } static void +print_character_repertoires(sdp_data_t *data) +{ + sdp_data_t d; + uint32_t v0, v1, v2, v3; + + /* + * we have no uint128 type, so need to decode it manually + */ + + if (sdp_data_type(data) != SDP_DATA_UINT128) + return; + + sdp_get_data(data, d); + v0 = be32dec(d.next + 1); + v1 = be32dec(d.next + 5); + v2 = be32dec(d.next + 9); + v3 = be32dec(d.next + 13); + + if (Nflag) + printf((0x%08x%08x%08x%08x), v0, v1, v2, v3); + + printf(\n); + + if (v0 (1 0)) printf(ISO-8859-1\n); + if (v0 (1 1)) printf(ISO-8859-2\n); + if (v0 (1 2)) printf(ISO-8859-3\n); + if (v0 (1 3)) printf(ISO-8859-4\n); + if (v0 (1 4)) printf(ISO-8859-5\n); + if (v0 (1 5)) printf(ISO-8859-6\n); + if (v0 (1 6)) printf(ISO-8859-7\n); + if (v0 (1 7)) printf(ISO-8859-8\n); + if (v0 (1 8)) printf(ISO-8859-9\n); + if (v0 (1 9)) printf(ISO-8859-10\n); + if (v0 (110)) printf(ISO-8859-13\n); + if (v0 (111)) printf(ISO-8859-14\n); + if (v0 (112)) printf(ISO-8859-15\n); + if (v0 (113)) printf(GB18030\n); + if (v0 (114)) printf(JIS X0208-1990, JIS X0201-1976\n); + if (v0 (115)) printf(KSC 5601-1992\n); + if (v0 (116)) printf(Big5\n); + if (v0 (117)) printf(TIS-620\n); +} +
CVS commit: src
Module Name:src Committed By: pooka Date: Mon Dec 13 21:15:31 UTC 2010 Modified Files: src/distrib/sets/lists/base: mi src/distrib/sets/lists/comp: mi src/usr.bin/netstat: Makefile bpf.c if.c inet.c inet6.c main.c mbuf.c show.c unix.c Added Files: src/usr.bin/netstat: netstat_hostops.c netstat_rumpops.c prog_ops.h Log Message: Add netstat rump client. For now, it always sets -X, i.e. will use only sysctl and no kvm (implementing /dev/mem for a rump kernel would probably not be hard, but still a non-zero effort). Note: since there is absolutely no network activity in a fresh rump kernel, rump.netstat usually displays exactly nothing when invoked without parameters. Arguments like -r, -bi, -p icmp etc. produce more stuff. To generate a diff of this commit: cvs rdiff -u -r1.903 -r1.904 src/distrib/sets/lists/base/mi cvs rdiff -u -r1.1540 -r1.1541 src/distrib/sets/lists/comp/mi cvs rdiff -u -r1.29 -r1.30 src/usr.bin/netstat/Makefile \ src/usr.bin/netstat/mbuf.c cvs rdiff -u -r1.9 -r1.10 src/usr.bin/netstat/bpf.c cvs rdiff -u -r1.69 -r1.70 src/usr.bin/netstat/if.c cvs rdiff -u -r1.92 -r1.93 src/usr.bin/netstat/inet.c cvs rdiff -u -r1.52 -r1.53 src/usr.bin/netstat/inet6.c cvs rdiff -u -r1.76 -r1.77 src/usr.bin/netstat/main.c cvs rdiff -u -r0 -r1.1 src/usr.bin/netstat/netstat_hostops.c \ src/usr.bin/netstat/netstat_rumpops.c src/usr.bin/netstat/prog_ops.h cvs rdiff -u -r1.10 -r1.11 src/usr.bin/netstat/show.c cvs rdiff -u -r1.30 -r1.31 src/usr.bin/netstat/unix.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/distrib/sets/lists/base/mi diff -u src/distrib/sets/lists/base/mi:1.903 src/distrib/sets/lists/base/mi:1.904 --- src/distrib/sets/lists/base/mi:1.903 Mon Dec 13 20:51:11 2010 +++ src/distrib/sets/lists/base/mi Mon Dec 13 21:15:30 2010 @@ -1,4 +1,4 @@ -# $NetBSD: mi,v 1.903 2010/12/13 20:51:11 pooka Exp $ +# $NetBSD: mi,v 1.904 2010/12/13 21:15:30 pooka Exp $ # # Note: Don't delete entries from here - mark them as obsolete instead, # unless otherwise stated below. @@ -534,6 +534,7 @@ ./usr/bin/netpgpkeysbase-crypto-bin crypto ./usr/bin/netpgpverifybase-crypto-bin crypto ./usr/bin/netstatbase-netutil-bin +./usr/bin/rump.netstatbase-netutil-bin ./usr/bin/newaliasesbase-mailwrapper-bin ./usr/bin/newgrpbase-util-bin ./usr/bin/newsyslogbase-util-bin Index: src/distrib/sets/lists/comp/mi diff -u src/distrib/sets/lists/comp/mi:1.1540 src/distrib/sets/lists/comp/mi:1.1541 --- src/distrib/sets/lists/comp/mi:1.1540 Mon Dec 13 20:51:11 2010 +++ src/distrib/sets/lists/comp/mi Mon Dec 13 21:15:30 2010 @@ -1,4 +1,4 @@ -# $NetBSD: mi,v 1.1540 2010/12/13 20:51:11 pooka Exp $ +# $NetBSD: mi,v 1.1541 2010/12/13 21:15:30 pooka Exp $ # # Note: don't delete entries from here - mark them as obsolete instead. # @@ -3271,6 +3271,7 @@ ./usr/libdata/debug/usr/bin/netpgpkeys.debug comp-crypto-debug crypto,debug ./usr/libdata/debug/usr/bin/netpgpverify.debug comp-crypto-debug crypto,debug ./usr/libdata/debug/usr/bin/netstat.debug comp-netutil-debug debug +./usr/libdata/debug/usr/bin/rump.netstat.debug comp-netutil-debug debug ./usr/libdata/debug/usr/bin/newgrp.debug comp-util-debug debug ./usr/libdata/debug/usr/bin/newsyslog.debug comp-util-debug debug ./usr/libdata/debug/usr/bin/nfsstat.debug comp-nfsclient-debug debug Index: src/usr.bin/netstat/Makefile diff -u src/usr.bin/netstat/Makefile:1.29 src/usr.bin/netstat/Makefile:1.30 --- src/usr.bin/netstat/Makefile:1.29 Mon Sep 14 10:36:50 2009 +++ src/usr.bin/netstat/Makefile Mon Dec 13 21:15:30 2010 @@ -1,11 +1,11 @@ -# $NetBSD: Makefile,v 1.29 2009/09/14 10:36:50 degroote Exp $ +# $NetBSD: Makefile,v 1.30 2010/12/13 21:15:30 pooka Exp $ # from: @(#)Makefile 8.1 (Berkeley) 6/12/93 .include bsd.own.mk USE_FORT?= yes # setgid -PROG= netstat +RUMPPRG=netstat SRCS= atalk.c bpf.c fast_ipsec.c if.c inet.c inet6.c ipsec.c iso.c \ main.c mbuf.c mroute.c mroute6.c show.c route.c tp_astring.c \ unix.c @@ -17,6 +17,12 @@ CPPFLAGS+= -DIPSEC CPPFLAGS+= -I${NETBSDSRCDIR}/sys/dist/pf +.PATH: ${.CURDIR}/../../lib/libc/gen +.PATH: ${.CURDIR}/../../lib/libc/net +CPPFLAGS+= -DRUMP_ACTION +RUMPSRCS+= sysctlbyname.c sysctlgetmibinfo.c sysctlnametomib.c +RUMPSRCS+= if_indextoname.c getifaddrs.c + .if (${USE_INET6} != no) CPPFLAGS+= -DINET6 .endif Index: src/usr.bin/netstat/mbuf.c diff -u src/usr.bin/netstat/mbuf.c:1.29 src/usr.bin/netstat/mbuf.c:1.30 --- src/usr.bin/netstat/mbuf.c:1.29 Sun Apr 12 16:08:37 2009 +++ src/usr.bin/netstat/mbuf.c Mon Dec 13 21:15:30 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: mbuf.c,v 1.29 2009/04/12 16:08:37 lukem Exp $ */ +/* $NetBSD: mbuf.c,v 1.30 2010/12/13 21:15:30 pooka Exp $ */ /* * Copyright (c) 1983, 1988, 1993 @@ -34,7 +34,7 @@ #if 0 static char sccsid[] = from: @(#)mbuf.c 8.1 (Berkeley) 6/6/93; #else -__RCSID($NetBSD: mbuf.c,v 1.29
CVS commit: src/share/mk
Module Name:src Committed By: pooka Date: Mon Dec 13 21:47:04 UTC 2010 Modified Files: src/share/mk: bsd.prog.mk Log Message: befriend RUMPPRG with CRUNCHEDPRG To generate a diff of this commit: cvs rdiff -u -r1.255 -r1.256 src/share/mk/bsd.prog.mk Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/mk/bsd.prog.mk diff -u src/share/mk/bsd.prog.mk:1.255 src/share/mk/bsd.prog.mk:1.256 --- src/share/mk/bsd.prog.mk:1.255 Mon Dec 13 17:22:26 2010 +++ src/share/mk/bsd.prog.mk Mon Dec 13 21:47:04 2010 @@ -1,4 +1,4 @@ -# $NetBSD: bsd.prog.mk,v 1.255 2010/12/13 17:22:26 pooka Exp $ +# $NetBSD: bsd.prog.mk,v 1.256 2010/12/13 21:47:04 pooka Exp $ # @(#)bsd.prog.mk 8.2 (Berkeley) 4/2/94 .ifndef HOSTPROG @@ -211,6 +211,7 @@ .if defined(RUMPPRG) PROG= ${RUMPPRG} +.ifndef CRUNCHEDPROG PROGS= ${RUMPPRG} rump.${RUMPPRG} . if defined(SRCS) SRCS.rump.${PROG}:= ${SRCS} ${PROG}_rumpops.c ${RUMPSRCS} @@ -223,6 +224,10 @@ DPADD.rump.${PROG}+= ${LIBRUMPCLIENT} MAN.rump.${PROG}= # defined but feeling empty _RUMPINSTALL.rump.${PROG}=# defined +.else # CRUNCHEDPROG +PROGS= ${PROG} +CPPFLAGS+= -DCRUNCHOPS +.endif .endif .if defined(PROG)
CVS commit: src/distrib/utils/x_ifconfig
Module Name:src Committed By: pooka Date: Mon Dec 13 21:47:32 UTC 2010 Modified Files: src/distrib/utils/x_ifconfig: Makefile Log Message: use CRUNCHOPS for a crunched prog To generate a diff of this commit: cvs rdiff -u -r1.30 -r1.31 src/distrib/utils/x_ifconfig/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/distrib/utils/x_ifconfig/Makefile diff -u src/distrib/utils/x_ifconfig/Makefile:1.30 src/distrib/utils/x_ifconfig/Makefile:1.31 --- src/distrib/utils/x_ifconfig/Makefile:1.30 Mon Dec 13 17:35:31 2010 +++ src/distrib/utils/x_ifconfig/Makefile Mon Dec 13 21:47:32 2010 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.30 2010/12/13 17:35:31 pooka Exp $ +# $NetBSD: Makefile,v 1.31 2010/12/13 21:47:32 pooka Exp $ # Build a smaller ifconfig (i.e. for boot media) .include bsd.own.mk @@ -9,7 +9,7 @@ .if defined(SMALLPROG_INET6) (${USE_INET6} != no) -CPPFLAGS+= -DINET6 +CPPFLAGS+= -DINET6 -DCRUNCHOPS SRCS+= af_inet6.c .endif
CVS commit: src/sbin
Module Name:src Committed By: pooka Date: Mon Dec 13 21:48:01 UTC 2010 Modified Files: src/sbin/ifconfig: prog_ops.h src/sbin/modload: prog_ops.h src/sbin/modstat: prog_ops.h src/sbin/modunload: prog_ops.h src/sbin/sysctl: prog_ops.h Log Message: use crunchops for crunchables To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/sbin/ifconfig/prog_ops.h cvs rdiff -u -r1.1 -r1.2 src/sbin/modload/prog_ops.h cvs rdiff -u -r1.1 -r1.2 src/sbin/modstat/prog_ops.h cvs rdiff -u -r1.1 -r1.2 src/sbin/modunload/prog_ops.h cvs rdiff -u -r1.1 -r1.2 src/sbin/sysctl/prog_ops.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sbin/ifconfig/prog_ops.h diff -u src/sbin/ifconfig/prog_ops.h:1.2 src/sbin/ifconfig/prog_ops.h:1.3 --- src/sbin/ifconfig/prog_ops.h:1.2 Mon Dec 13 19:17:20 2010 +++ src/sbin/ifconfig/prog_ops.h Mon Dec 13 21:48:01 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: prog_ops.h,v 1.2 2010/12/13 19:17:20 njoly Exp $ */ +/* $NetBSD: prog_ops.h,v 1.3 2010/12/13 21:48:01 pooka Exp $ */ /* * Copyright (c) 2010 The NetBSD Foundation, Inc. @@ -32,7 +32,7 @@ #include sys/types.h /* ifconfig is compiled outside of src/sbin/ifconfig too */ -#ifdef RUMP_ACTION +#ifndef CRUNCHOPS struct prog_ops { int (*op_init)(void); Index: src/sbin/modload/prog_ops.h diff -u src/sbin/modload/prog_ops.h:1.1 src/sbin/modload/prog_ops.h:1.2 --- src/sbin/modload/prog_ops.h:1.1 Mon Dec 13 20:48:44 2010 +++ src/sbin/modload/prog_ops.h Mon Dec 13 21:48:01 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: prog_ops.h,v 1.1 2010/12/13 20:48:44 pooka Exp $ */ +/* $NetBSD: prog_ops.h,v 1.2 2010/12/13 21:48:01 pooka Exp $ */ /* * Copyright (c) 2010 The NetBSD Foundation, Inc. @@ -31,6 +31,7 @@ #include sys/types.h +#ifndef CRUNCHOPS struct prog_ops { int (*op_init)(void); @@ -40,5 +41,9 @@ #define prog_init prog_ops.op_init #define prog_modctl prog_ops.op_modctl +#else +#define prog_init ((int (*)(void))NULL) +#define prog_modctl modctl +#endif #endif /* _PROG_OPS_H_ */ Index: src/sbin/modstat/prog_ops.h diff -u src/sbin/modstat/prog_ops.h:1.1 src/sbin/modstat/prog_ops.h:1.2 --- src/sbin/modstat/prog_ops.h:1.1 Mon Dec 13 20:48:45 2010 +++ src/sbin/modstat/prog_ops.h Mon Dec 13 21:48:01 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: prog_ops.h,v 1.1 2010/12/13 20:48:45 pooka Exp $ */ +/* $NetBSD: prog_ops.h,v 1.2 2010/12/13 21:48:01 pooka Exp $ */ /* * Copyright (c) 2010 The NetBSD Foundation, Inc. @@ -31,6 +31,7 @@ #include sys/types.h +#ifndef CRUNCHOPS struct prog_ops { int (*op_init)(void); @@ -40,5 +41,9 @@ #define prog_init prog_ops.op_init #define prog_modctl prog_ops.op_modctl +#else +#define prog_init ((int (*)(void))NULL) +#define prog_modctl modctl +#endif #endif /* _PROG_OPS_H_ */ Index: src/sbin/modunload/prog_ops.h diff -u src/sbin/modunload/prog_ops.h:1.1 src/sbin/modunload/prog_ops.h:1.2 --- src/sbin/modunload/prog_ops.h:1.1 Mon Dec 13 20:48:45 2010 +++ src/sbin/modunload/prog_ops.h Mon Dec 13 21:48:01 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: prog_ops.h,v 1.1 2010/12/13 20:48:45 pooka Exp $ */ +/* $NetBSD: prog_ops.h,v 1.2 2010/12/13 21:48:01 pooka Exp $ */ /* * Copyright (c) 2010 The NetBSD Foundation, Inc. @@ -31,6 +31,7 @@ #include sys/types.h +#ifndef CRUNCHOPS struct prog_ops { int (*op_init)(void); @@ -40,5 +41,9 @@ #define prog_init prog_ops.op_init #define prog_modctl prog_ops.op_modctl +#else +#define prog_init ((int (*)(void))NULL) +#define prog_modctl modctl +#endif #endif /* _PROG_OPS_H_ */ Index: src/sbin/sysctl/prog_ops.h diff -u src/sbin/sysctl/prog_ops.h:1.1 src/sbin/sysctl/prog_ops.h:1.2 --- src/sbin/sysctl/prog_ops.h:1.1 Mon Dec 13 17:47:40 2010 +++ src/sbin/sysctl/prog_ops.h Mon Dec 13 21:48:01 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: prog_ops.h,v 1.1 2010/12/13 17:47:40 pooka Exp $ */ +/* $NetBSD: prog_ops.h,v 1.2 2010/12/13 21:48:01 pooka Exp $ */ /* * Copyright (c) 2010 The NetBSD Foundation, Inc. @@ -31,6 +31,7 @@ #include sys/types.h +#ifndef CRUNCHOPS struct prog_ops { int (*op_init)(void); @@ -41,5 +42,9 @@ #define prog_init prog_ops.op_init #define prog_sysctl prog_ops.op_sysctl +#else +#define prog_init ((int (*)(void))NULL) +#define prog_sysctl sysctl +#endif #endif /* _PROG_OPS_H_ */
CVS commit: src/lib/libc
Module Name:src Committed By: pooka Date: Mon Dec 13 23:10:13 UTC 2010 Modified Files: src/lib/libc/gen: sysctlbyname.c sysctlgetmibinfo.c sysctlnametomib.c src/lib/libc/net: if_indextoname.c Log Message: Don't __weak_alias non-existent symbols. Apparently the alpha compiler doesn't like it. To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/lib/libc/gen/sysctlbyname.c cvs rdiff -u -r1.8 -r1.9 src/lib/libc/gen/sysctlgetmibinfo.c cvs rdiff -u -r1.5 -r1.6 src/lib/libc/gen/sysctlnametomib.c cvs rdiff -u -r1.6 -r1.7 src/lib/libc/net/if_indextoname.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libc/gen/sysctlbyname.c diff -u src/lib/libc/gen/sysctlbyname.c:1.6 src/lib/libc/gen/sysctlbyname.c:1.7 --- src/lib/libc/gen/sysctlbyname.c:1.6 Mon Dec 13 14:17:11 2010 +++ src/lib/libc/gen/sysctlbyname.c Mon Dec 13 23:10:13 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: sysctlbyname.c,v 1.6 2010/12/13 14:17:11 pooka Exp $ */ +/* $NetBSD: sysctlbyname.c,v 1.7 2010/12/13 23:10:13 pooka Exp $ */ /*- * Copyright (c) 2003,2004 The NetBSD Foundation, Inc. @@ -31,7 +31,7 @@ #include sys/cdefs.h #if defined(LIBC_SCCS) !defined(lint) -__RCSID($NetBSD: sysctlbyname.c,v 1.6 2010/12/13 14:17:11 pooka Exp $); +__RCSID($NetBSD: sysctlbyname.c,v 1.7 2010/12/13 23:10:13 pooka Exp $); #endif /* LIBC_SCCS and not lint */ #ifndef RUMP_ACTION @@ -40,13 +40,13 @@ #include sys/param.h #include sys/sysctl.h -#ifdef __weak_alias -__weak_alias(sysctlbyname,_sysctlbyname) -#endif - #ifdef RUMP_ACTION #include rump/rump_syscalls.h #define sysctl(a,b,c,d,e,f) rump_sys___sysctl(a,b,c,d,e,f) +#else +#ifdef __weak_alias +__weak_alias(sysctlbyname,_sysctlbyname) +#endif #endif /* Index: src/lib/libc/gen/sysctlgetmibinfo.c diff -u src/lib/libc/gen/sysctlgetmibinfo.c:1.8 src/lib/libc/gen/sysctlgetmibinfo.c:1.9 --- src/lib/libc/gen/sysctlgetmibinfo.c:1.8 Fri Nov 5 15:55:23 2010 +++ src/lib/libc/gen/sysctlgetmibinfo.c Mon Dec 13 23:10:13 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: sysctlgetmibinfo.c,v 1.8 2010/11/05 15:55:23 pooka Exp $ */ +/* $NetBSD: sysctlgetmibinfo.c,v 1.9 2010/12/13 23:10:13 pooka Exp $ */ /*- * Copyright (c) 2003,2004 The NetBSD Foundation, Inc. @@ -31,7 +31,7 @@ #include sys/cdefs.h #if defined(LIBC_SCCS) !defined(lint) -__RCSID($NetBSD: sysctlgetmibinfo.c,v 1.8 2010/11/05 15:55:23 pooka Exp $); +__RCSID($NetBSD: sysctlgetmibinfo.c,v 1.9 2010/12/13 23:10:13 pooka Exp $); #endif /* LIBC_SCCS and not lint */ #ifndef RUMP_ACTION @@ -48,14 +48,14 @@ #include stdlib.h #include string.h +#ifdef RUMP_ACTION +#include rump/rump_syscalls.h +#define sysctl(a,b,c,d,e,f) rump_sys___sysctl(a,b,c,d,e,f) +#else #ifdef __weak_alias __weak_alias(__learn_tree,___learn_tree) __weak_alias(sysctlgetmibinfo,_sysctlgetmibinfo) #endif - -#ifdef RUMP_ACTION -#include rump/rump_syscalls.h -#define sysctl(a,b,c,d,e,f) rump_sys___sysctl(a,b,c,d,e,f) #endif /* Index: src/lib/libc/gen/sysctlnametomib.c diff -u src/lib/libc/gen/sysctlnametomib.c:1.5 src/lib/libc/gen/sysctlnametomib.c:1.6 --- src/lib/libc/gen/sysctlnametomib.c:1.5 Mon Dec 13 21:07:55 2010 +++ src/lib/libc/gen/sysctlnametomib.c Mon Dec 13 23:10:13 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: sysctlnametomib.c,v 1.5 2010/12/13 21:07:55 pooka Exp $ */ +/* $NetBSD: sysctlnametomib.c,v 1.6 2010/12/13 23:10:13 pooka Exp $ */ /*- * Copyright (c) 2003,2004 The NetBSD Foundation, Inc. @@ -31,7 +31,7 @@ #include sys/cdefs.h #if defined(LIBC_SCCS) !defined(lint) -__RCSID($NetBSD: sysctlnametomib.c,v 1.5 2010/12/13 21:07:55 pooka Exp $); +__RCSID($NetBSD: sysctlnametomib.c,v 1.6 2010/12/13 23:10:13 pooka Exp $); #endif /* LIBC_SCCS and not lint */ #ifndef RUMP_ACTION @@ -40,13 +40,13 @@ #include sys/param.h #include sys/sysctl.h -#ifdef __weak_alias -__weak_alias(sysctlnametomib,_sysctlnametomib) -#endif - #ifdef RUMP_ACTION #include rump/rump_syscalls.h #define sysctl(a,b,c,d,e,f) rump_sys___sysctl(a,b,c,d,e,f) +#else +#ifdef __weak_alias +__weak_alias(sysctlnametomib,_sysctlnametomib) +#endif #endif /* RUMP_ACTION */ /* Index: src/lib/libc/net/if_indextoname.c diff -u src/lib/libc/net/if_indextoname.c:1.6 src/lib/libc/net/if_indextoname.c:1.7 --- src/lib/libc/net/if_indextoname.c:1.6 Mon Dec 13 21:07:54 2010 +++ src/lib/libc/net/if_indextoname.c Mon Dec 13 23:10:12 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: if_indextoname.c,v 1.6 2010/12/13 21:07:54 pooka Exp $ */ +/* $NetBSD: if_indextoname.c,v 1.7 2010/12/13 23:10:12 pooka Exp $ */ /* $KAME: if_indextoname.c,v 1.7 2000/11/08 03:09:30 itojun Exp $ */ /*- @@ -28,7 +28,7 @@ #include sys/cdefs.h #if defined(LIBC_SCCS) !defined(lint) -__RCSID($NetBSD: if_indextoname.c,v 1.6 2010/12/13 21:07:54 pooka Exp $); +__RCSID($NetBSD: if_indextoname.c,v 1.7 2010/12/13 23:10:12 pooka Exp $); #endif /* LIBC_SCCS and not lint */ #ifndef RUMP_ACTION @@ -43,9 +43,11 @@
CVS commit: src/external/cddl/osnet/sys/sys
Module Name:src Committed By: haad Date: Tue Dec 14 01:00:26 UTC 2010 Modified Files: src/external/cddl/osnet/sys/sys: mnttab.h Log Message: NetBSD doesn't have /etc/mnttab replace it with /dev/null. To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/external/cddl/osnet/sys/sys/mnttab.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/cddl/osnet/sys/sys/mnttab.h diff -u src/external/cddl/osnet/sys/sys/mnttab.h:1.3 src/external/cddl/osnet/sys/sys/mnttab.h:1.4 --- src/external/cddl/osnet/sys/sys/mnttab.h:1.3 Sun Feb 21 01:46:36 2010 +++ src/external/cddl/osnet/sys/sys/mnttab.h Tue Dec 14 01:00:26 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: mnttab.h,v 1.3 2010/02/21 01:46:36 darran Exp $ */ +/* $NetBSD: mnttab.h,v 1.4 2010/12/14 01:00:26 haad Exp $ */ /* * CDDL HEADER START @@ -42,7 +42,7 @@ extern C { #endif -#define MNTTAB /etc/mnttab +#define MNTTAB /dev/null #define MNT_LINE_MAX 1024 #define MNT_TOOLONG 1 /* entry exceeds MNT_LINE_MAX */
CVS commit: src/external/cddl/osnet/sys
Module Name:src Committed By: haad Date: Tue Dec 14 01:01:41 UTC 2010 Modified Files: src/external/cddl/osnet/sys/kern: string.c src/external/cddl/osnet/sys/sys: string.h Log Message: Simple routine to convert long to string. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/external/cddl/osnet/sys/kern/string.c cvs rdiff -u -r1.3 -r1.4 src/external/cddl/osnet/sys/sys/string.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/cddl/osnet/sys/kern/string.c diff -u src/external/cddl/osnet/sys/kern/string.c:1.1 src/external/cddl/osnet/sys/kern/string.c:1.2 --- src/external/cddl/osnet/sys/kern/string.c:1.1 Fri Aug 7 20:57:57 2009 +++ src/external/cddl/osnet/sys/kern/string.c Tue Dec 14 01:01:40 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: string.c,v 1.1 2009/08/07 20:57:57 haad Exp $ */ +/* $NetBSD: string.c,v 1.2 2010/12/14 01:01:40 haad Exp $ */ /* * CDDL HEADER START @@ -71,3 +71,25 @@ } *s = 0; } + +/* + * Simple-minded conversion of a long into a null-terminated character + * string. Caller must ensure there's enough space to hold the result. + */ +void +numtos(unsigned long num, char *s) +{ + char prbuf[40]; + + char *cp = prbuf; + + do { + *cp++ = 0123456789[num % 10]; + num /= 10; + } while (num); + + do { + *s++ = *--cp; + } while (cp prbuf); + *s = '\0'; +} Index: src/external/cddl/osnet/sys/sys/string.h diff -u src/external/cddl/osnet/sys/sys/string.h:1.3 src/external/cddl/osnet/sys/sys/string.h:1.4 --- src/external/cddl/osnet/sys/sys/string.h:1.3 Sun Feb 21 01:46:36 2010 +++ src/external/cddl/osnet/sys/sys/string.h Tue Dec 14 01:01:41 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: string.h,v 1.3 2010/02/21 01:46:36 darran Exp $ */ +/* $NetBSD: string.h,v 1.4 2010/12/14 01:01:41 haad Exp $ */ /*- * Copyright (c) 2007 Pawel Jakub Dawidek p...@freebsd.org @@ -33,5 +33,6 @@ char *strpbrk(const char *, const char *); void strident_canon(char *s, size_t n); +void numtos(unsigned long num, char *s); #endif /* _OPENSOLARIS_SYS_STRING_H_ */
CVS commit: src/external/cddl/osnet/sbin/zpool
Module Name:src Committed By: haad Date: Tue Dec 14 01:03:10 UTC 2010 Modified Files: src/external/cddl/osnet/sbin/zpool: Makefile Log Message: Define print_timestamp during build, to shut up gcc warning. To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/external/cddl/osnet/sbin/zpool/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/cddl/osnet/sbin/zpool/Makefile diff -u src/external/cddl/osnet/sbin/zpool/Makefile:1.3 src/external/cddl/osnet/sbin/zpool/Makefile:1.4 --- src/external/cddl/osnet/sbin/zpool/Makefile:1.3 Sun Feb 28 14:45:47 2010 +++ src/external/cddl/osnet/sbin/zpool/Makefile Tue Dec 14 01:03:10 2010 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.3 2010/02/28 14:45:47 haad Exp $ +# $NetBSD: Makefile,v 1.4 2010/12/14 01:03:10 haad Exp $ .include ../../Makefile.zfs @@ -7,6 +7,8 @@ USETBL= yes SRCS= zpool_main.c zpool_iter.c zpool_util.c zpool_vdev.c +CFLAGS+=-Dprint_timestamp(a)=((void)0) + DPADD= ${LIBAVL} ${LIBZFS} ${LIBM} ${LIBNVPAIR} ${LIBUUTIL} ${LIBUTIL} ${LIBUMEM} LIBAVL_OBJDIR!= cd ${LIBAVL_SRCDIR} ${PRINTOBJDIR}
CVS commit: src/external/cddl/osnet/sys/kern
Module Name:src Committed By: haad Date: Tue Dec 14 01:18:34 UTC 2010 Modified Files: src/external/cddl/osnet/sys/kern: ddi.c Log Message: Include sys/debug.h to get ASSERT defined. To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/external/cddl/osnet/sys/kern/ddi.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/cddl/osnet/sys/kern/ddi.c diff -u src/external/cddl/osnet/sys/kern/ddi.c:1.3 src/external/cddl/osnet/sys/kern/ddi.c:1.4 --- src/external/cddl/osnet/sys/kern/ddi.c:1.3 Sun Feb 28 14:45:47 2010 +++ src/external/cddl/osnet/sys/kern/ddi.c Tue Dec 14 01:18:34 2010 @@ -32,6 +32,7 @@ #include sys/types.h #include sys/ddi.h +#include sys/debug.h #include sys/errno.h #include sys/param.h #include sys/kernel.h
CVS commit: src/external/cddl/osnet/dist/lib/libzfs/common
Module Name:src Committed By: haad Date: Tue Dec 14 01:22:24 UTC 2010 Modified Files: src/external/cddl/osnet/dist/lib/libzfs/common: libzfs_mount.c Log Message: Fix amd64 build where sysinfo was not defined, disable libshare for now. To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 \ src/external/cddl/osnet/dist/lib/libzfs/common/libzfs_mount.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/cddl/osnet/dist/lib/libzfs/common/libzfs_mount.c diff -u src/external/cddl/osnet/dist/lib/libzfs/common/libzfs_mount.c:1.3 src/external/cddl/osnet/dist/lib/libzfs/common/libzfs_mount.c:1.4 --- src/external/cddl/osnet/dist/lib/libzfs/common/libzfs_mount.c:1.3 Sat Feb 27 23:43:52 2010 +++ src/external/cddl/osnet/dist/lib/libzfs/common/libzfs_mount.c Tue Dec 14 01:22:24 2010 @@ -168,7 +168,7 @@ /* the mountpoint is the first entry on each line */ if ((tab = strchr(buf, '\t')) == NULL) continue; - +#if defined(sun) *tab = '\0'; if (strcmp(buf, mountpoint) == 0) { /* @@ -194,6 +194,11 @@ } } } +#else + if (proto == PROTO_NFS) +return (SHARED_NFS); +#endif + } return (SHARED_NOT_SHARED); @@ -515,7 +520,7 @@ * wrapper functions that check to see that the pointers to functions * initialized in _zfs_init_libshare() are actually present. */ - +#ifdef PORT_SOLARIS static sa_handle_t (*_sa_init)(int); static void (*_sa_fini)(sa_handle_t); static sa_share_t (*_sa_find_share)(sa_handle_t, char *); @@ -528,7 +533,7 @@ static int (*_sa_zfs_process_share)(sa_handle_t, sa_group_t, sa_share_t, char *, char *, zprop_source_t, char *, char *, char *); static void (*_sa_update_sharetab_ts)(sa_handle_t); - +#endif /* * _zfs_init_libshare() * @@ -541,6 +546,7 @@ static void _zfs_init_libshare(void) { +#ifdef PORT_SOLARIS void *libshare; char path[MAXPATHLEN]; char isa[MAXISALEN]; @@ -595,6 +601,7 @@ _sa_update_sharetab_ts = NULL; } } +#endif } /* @@ -609,7 +616,7 @@ zfs_init_libshare(libzfs_handle_t *zhandle, int service) { int ret = SA_OK; - +#ifdef PORT_SOLARIS if (_sa_init == NULL) ret = SA_CONFIG_ERR; @@ -635,7 +642,7 @@ if (ret == SA_OK zhandle-libzfs_sharehdl == NULL) ret = SA_NO_MEMORY; - +#endif return (ret); } @@ -649,8 +656,10 @@ zfs_uninit_libshare(libzfs_handle_t *zhandle) { if (zhandle != NULL zhandle-libzfs_sharehdl != NULL) { +#ifdef PORT_SOLARIS if (_sa_fini != NULL) _sa_fini(zhandle-libzfs_sharehdl); +#endif zhandle-libzfs_sharehdl = NULL; } } @@ -664,13 +673,18 @@ int zfs_parse_options(char *options, zfs_share_proto_t proto) { +#ifdef PORT_SOLARIS if (_sa_parse_legacy_options != NULL) { return (_sa_parse_legacy_options(NULL, options, proto_table[proto].p_name)); } return (SA_CONFIG_ERR); +#else + return (SA_OK); +#endif } +#ifdef PORT_SOLARIS /* * zfs_sa_find_share(handle, path) * @@ -712,7 +726,7 @@ return (_sa_disable_share(share, proto)); return (SA_CONFIG_ERR); } - +#endif /* * Share the given filesystem according to the options in the specified * protocol specific properties (sharenfs, sharesmb). We rely @@ -728,11 +742,11 @@ sa_share_t share; zfs_share_proto_t *curr_proto; zprop_source_t sourcetype; - int ret; + int error, ret; if (!zfs_is_mountable(zhp, mountpoint, sizeof (mountpoint), NULL)) return (0); - +#ifdef PORT_SOLARIS if ((ret = zfs_init_libshare(hdl, SA_INIT_SHARE_API)) != SA_OK) { (void) zfs_error_fmt(hdl, EZFS_SHARENFSFAILED, dgettext(TEXT_DOMAIN, cannot share '%s': %s), @@ -740,7 +754,7 @@ _sa_errorstr(ret) : ); return (-1); } - +#endif for (curr_proto = proto; *curr_proto != PROTO_END; curr_proto++) { /* * Return success if there are no share options. @@ -760,6 +774,7 @@ if (zfs_prop_get_int(zhp, ZFS_PROP_ZONED)) continue; +#ifdef PORT_SOLARIS share = zfs_sa_find_share(hdl-libzfs_sharehdl, mountpoint); if (share == NULL) { /* @@ -803,7 +818,7 @@ zfs_get_name(zhp)); return (-1); } - +#endif } return (0); } @@ -834,6 +849,7 @@ unshare_one(libzfs_handle_t *hdl, const char *name, const char *mountpoint, zfs_share_proto_t proto) { +#ifdef PORT_SOLARIS sa_share_t share; int err; char *mntpt; @@ -867,6 +883,7 @@ dgettext(TEXT_DOMAIN, cannot unshare '%s': not found), name)); } +#endif return (0); } @@ -1027,7 +1044,7 @@ sizeof (shareopts), NULL, NULL, 0, B_FALSE) != 0 || strcmp(shareopts, off) == 0) return (0); - +#ifdef PORT_ISCSI /* NetBSD do not support zfssharing with iscsi, yet */ if (iscsitgt_zfs_share == NULL || iscsitgt_zfs_share(dataset) != 0) { int error = EZFS_SHAREISCSIFAILED; @@ -1042,7 +1059,7 @@ return (zfs_error_fmt(hdl, error, dgettext(TEXT_DOMAIN, cannot share '%s'), dataset)); } - +#endif return (0); } @@ -1052,6 +1069,7 @@
CVS commit: src/external/cddl/osnet/sys/sys
Module Name:src Committed By: haad Date: Tue Dec 14 01:23:44 UTC 2010 Modified Files: src/external/cddl/osnet/sys/sys: zfs_context.h Log Message: Remove now unneeded print_timestamp. To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/external/cddl/osnet/sys/sys/zfs_context.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/cddl/osnet/sys/sys/zfs_context.h diff -u src/external/cddl/osnet/sys/sys/zfs_context.h:1.6 src/external/cddl/osnet/sys/sys/zfs_context.h:1.7 --- src/external/cddl/osnet/sys/sys/zfs_context.h:1.6 Sun Feb 28 14:45:47 2010 +++ src/external/cddl/osnet/sys/sys/zfs_context.h Tue Dec 14 01:23:43 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: zfs_context.h,v 1.6 2010/02/28 14:45:47 haad Exp $ */ +/* $NetBSD: zfs_context.h,v 1.7 2010/12/14 01:23:43 haad Exp $ */ /* * CDDL HEADER START @@ -570,10 +570,6 @@ extern char *kmem_asprintf(const char *fmt, ...); #define strfree(str) kmem_free((str), strlen(str)+1) -//#define print_timestamp(a) 0 - -extern void print_timestamp(int); - #define DEV_PHYS_PATH phys_path #define DDI_SLEEP KM_SLEEP
CVS commit: src/external/cddl/osnet/lib/libumem
Module Name:src Committed By: haad Date: Tue Dec 14 01:25:37 UTC 2010 Modified Files: src/external/cddl/osnet/lib/libumem: stub_stand.c Log Message: Define mutex_owned. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/external/cddl/osnet/lib/libumem/stub_stand.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/cddl/osnet/lib/libumem/stub_stand.c diff -u src/external/cddl/osnet/lib/libumem/stub_stand.c:1.1 src/external/cddl/osnet/lib/libumem/stub_stand.c:1.2 --- src/external/cddl/osnet/lib/libumem/stub_stand.c:1.1 Sun Feb 28 22:45:45 2010 +++ src/external/cddl/osnet/lib/libumem/stub_stand.c Tue Dec 14 01:25:37 2010 @@ -55,6 +55,12 @@ return (1); } +int +mutex_owned(mutex_t *mp) +{ + return (1); +} + /*ARGSUSED*/ int mutex_lock(mutex_t *mp)
CVS commit: src/external/cddl/osnet/dist/uts/common/fs
Module Name:src Committed By: haad Date: Tue Dec 14 01:28:18 UTC 2010 Modified Files: src/external/cddl/osnet/dist/uts/common/fs: gfs.c src/external/cddl/osnet/dist/uts/common/fs/zfs: zfs_ctldir.c Log Message: Add NetBSD version of zfs snapshot management code. IT needs testing it was only compile tested for now, but I would like to have some code in to be sure that it will not be lost. To generate a diff of this commit: cvs rdiff -u -r1.1.1.1 -r1.2 src/external/cddl/osnet/dist/uts/common/fs/gfs.c cvs rdiff -u -r1.1.1.2 -r1.2 \ src/external/cddl/osnet/dist/uts/common/fs/zfs/zfs_ctldir.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/cddl/osnet/dist/uts/common/fs/gfs.c diff -u src/external/cddl/osnet/dist/uts/common/fs/gfs.c:1.1.1.1 src/external/cddl/osnet/dist/uts/common/fs/gfs.c:1.2 --- src/external/cddl/osnet/dist/uts/common/fs/gfs.c:1.1.1.1 Fri Aug 7 18:32:48 2009 +++ src/external/cddl/osnet/dist/uts/common/fs/gfs.c Tue Dec 14 01:28:18 2010 @@ -121,6 +121,7 @@ * both the caller and the vnode type provider need to access gfsv_ops * and gfsv_template, and the caller also needs to know gfsv_name. */ +#ifdef PORT_SOLARIS int gfs_make_opsvec(gfs_opsvec_t *vec) { @@ -143,6 +144,7 @@ } return (error); } +#endif /* * Low level directory routines @@ -257,15 +259,17 @@ static int gfs_readdir_emit_int(gfs_readdir_state_t *st, uio_t *uiop, offset_t next) { - int reclen; + int reclen, namelen; dirent64_t *dp; edirent_t *edp; if (st-grd_flags V_RDDIR_ENTFLAGS) { edp = st-grd_dirent; + namelen = strlen(edp-ed_name); reclen = EDIRENT_RECLEN(strlen(edp-ed_name)); } else { dp = st-grd_dirent; + namelen = strlen(dp-d_name); reclen = DIRENT64_RECLEN(strlen(dp-d_name)); } @@ -282,8 +286,9 @@ edp-ed_off = next; edp-ed_reclen = (ushort_t)reclen; } else { - dp-d_off = next; dp-d_reclen = (ushort_t)reclen; + dp-d_type = DT_DIR; + dp-d_namlen = namelen; } if (uiomove((caddr_t)st-grd_dirent, reclen, UIO_READ, uiop)) @@ -458,12 +463,17 @@ { gfs_file_t *fp; vnode_t *vp; + int error; /* * Allocate vnode and internal data structure */ fp = kmem_zalloc(size, KM_SLEEP); - vp = vn_alloc(KM_SLEEP); + /* XXX FreeBSD adds vfs_t * as parameter to gfs_file_create and + gfs_dir_create */ + error = getnewvnode(VT_ZFS, pvp-v_vfsp, ops, vp); + ASSERT(error == 0); + vn_lock(vp, LK_EXCLUSIVE | LK_RETRY); /* * Set up various pointers @@ -639,6 +649,7 @@ mutex_enter(fp-gfs_parent-v_lock); } mutex_enter(vp-v_lock); +#ifdef PORT_SOLARIS if (vp-v_count == 1) { /* * Really remove this vnode @@ -680,6 +691,7 @@ if (dp) gfs_dir_unlock(dp); } +#endif return (data); } @@ -1093,6 +1105,7 @@ * putpage() routines. */ /* ARGSUSED */ +#ifdef PORT_SOLARIS int gfs_vop_map(vnode_t *vp, offset_t off, struct as *as, caddr_t *addrp, size_t len, uchar_t prot, uchar_t maxprot, uint_t flags, cred_t *cred, @@ -1154,7 +1167,7 @@ return (rv); } - +#endif /* * gfs_vop_inactive: VOP_INACTIVE() entry point * Index: src/external/cddl/osnet/dist/uts/common/fs/zfs/zfs_ctldir.c diff -u src/external/cddl/osnet/dist/uts/common/fs/zfs/zfs_ctldir.c:1.1.1.2 src/external/cddl/osnet/dist/uts/common/fs/zfs/zfs_ctldir.c:1.2 --- src/external/cddl/osnet/dist/uts/common/fs/zfs/zfs_ctldir.c:1.1.1.2 Sat Feb 27 22:31:19 2010 +++ src/external/cddl/osnet/dist/uts/common/fs/zfs/zfs_ctldir.c Tue Dec 14 01:28:18 2010 @@ -111,16 +111,13 @@ return (0); } -vnodeops_t *zfsctl_ops_root; -vnodeops_t *zfsctl_ops_snapdir; -vnodeops_t *zfsctl_ops_snapshot; -vnodeops_t *zfsctl_ops_shares; -vnodeops_t *zfsctl_ops_shares_dir; - -static const fs_operation_def_t zfsctl_tops_root[]; -static const fs_operation_def_t zfsctl_tops_snapdir[]; -static const fs_operation_def_t zfsctl_tops_snapshot[]; -static const fs_operation_def_t zfsctl_tops_shares[]; +//vnodeops_t *zfsctl_ops_shares_dir; + +static struct vnodeopv_entry_desc zfsctl_ops_root; +static struct vnodeopv_entry_desc zfsctl_ops_snapdir; +static struct vnodeopv_entry_desc zfsctl_ops_snapshot; +static struct vnodeopv_entry_desc zfsctl_ops_shares; + static vnode_t *zfsctl_mknode_snapdir(vnode_t *); static vnode_t *zfsctl_mknode_shares(vnode_t *); @@ -159,31 +156,11 @@ void zfsctl_init(void) { - VERIFY(gfs_make_opsvec(zfsctl_opsvec) == 0); } void zfsctl_fini(void) { - /* - * Remove vfsctl vnode ops - */ - if (zfsctl_ops_root) - vn_freevnodeops(zfsctl_ops_root); - if (zfsctl_ops_snapdir) - vn_freevnodeops(zfsctl_ops_snapdir); - if (zfsctl_ops_snapshot) - vn_freevnodeops(zfsctl_ops_snapshot); - if (zfsctl_ops_shares) - vn_freevnodeops(zfsctl_ops_shares); - if (zfsctl_ops_shares_dir) - vn_freevnodeops(zfsctl_ops_shares_dir); - - zfsctl_ops_root = NULL; - zfsctl_ops_snapdir = NULL; - zfsctl_ops_snapshot = NULL; - zfsctl_ops_shares = NULL; -
CVS commit: src
Module Name:src Committed By: joerg Date: Tue Dec 14 02:28:58 UTC 2010 Modified Files: src/gnu/dist/gcc4/libstdc++-v3/config/os/bsd/netbsd: ctype_base.h src/lib/libc/gen: ctype_.c isctype.c src/lib/libc/locale: runetype_misc.h src/sys/sys: ctype_bits.h ctype_inline.h src/usr.sbin/chrtbl: chrtbl.c Log Message: Prefix ctype bitmask macros with _CTYPE To generate a diff of this commit: cvs rdiff -u -r1.1.1.1 -r1.2 \ src/gnu/dist/gcc4/libstdc++-v3/config/os/bsd/netbsd/ctype_base.h cvs rdiff -u -r1.18 -r1.19 src/lib/libc/gen/ctype_.c cvs rdiff -u -r1.20 -r1.21 src/lib/libc/gen/isctype.c cvs rdiff -u -r1.1 -r1.2 src/lib/libc/locale/runetype_misc.h cvs rdiff -u -r1.1 -r1.2 src/sys/sys/ctype_bits.h src/sys/sys/ctype_inline.h cvs rdiff -u -r1.12 -r1.13 src/usr.sbin/chrtbl/chrtbl.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/gnu/dist/gcc4/libstdc++-v3/config/os/bsd/netbsd/ctype_base.h diff -u src/gnu/dist/gcc4/libstdc++-v3/config/os/bsd/netbsd/ctype_base.h:1.1.1.1 src/gnu/dist/gcc4/libstdc++-v3/config/os/bsd/netbsd/ctype_base.h:1.2 --- src/gnu/dist/gcc4/libstdc++-v3/config/os/bsd/netbsd/ctype_base.h:1.1.1.1 Thu Apr 20 10:16:24 2006 +++ src/gnu/dist/gcc4/libstdc++-v3/config/os/bsd/netbsd/ctype_base.h Tue Dec 14 02:28:57 2010 @@ -44,15 +44,15 @@ // NB: Offsets into ctypechar::_M_table force a particular size // on the mask type. Because of this, we don't use an enum. typedef unsigned char mask; -static const mask upper = _U; -static const mask lower = _L; -static const mask alpha = _U | _L; -static const mask digit = _N; -static const mask xdigit = _N | _X; -static const mask space = _S; -static const mask print = _P | _U | _L | _N | _B; -static const mask graph = _P | _U | _L | _N; -static const mask cntrl = _C; -static const mask punct = _P; -static const mask alnum = _U | _L | _N; +static const mask upper = _CTYPE_U; +static const mask lower = _CTYPE_L; +static const mask alpha = _CTYPE_U | _CTYPE_L; +static const mask digit = _CTYPE_N; +static const mask xdigit = _CTYPE_N | _CTYPE_X; +static const mask space = _CTYPE_S; +static const mask print = _CTYPE_P | _CTYPE_U | _CTYPE_L | _CTYPE_N | _CTYPE_B; +static const mask graph = _CTYPE_P | _CTYPE_U | _CTYPE_L | _CTYPE_N; +static const mask cntrl = _CTYPE_C; +static const mask punct = _CTYPE_P; +static const mask alnum = _CTYPE_U | _CTYPE_L | _CTYPE_N; }; Index: src/lib/libc/gen/ctype_.c diff -u src/lib/libc/gen/ctype_.c:1.18 src/lib/libc/gen/ctype_.c:1.19 --- src/lib/libc/gen/ctype_.c:1.18 Tue Jun 1 13:52:08 2010 +++ src/lib/libc/gen/ctype_.c Tue Dec 14 02:28:57 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: ctype_.c,v 1.18 2010/06/01 13:52:08 tnozaki Exp $ */ +/* $NetBSD: ctype_.c,v 1.19 2010/12/14 02:28:57 joerg Exp $ */ /* * Copyright (c) 1989 The Regents of the University of California. @@ -39,7 +39,7 @@ #if 0 /*static char *sccsid = from: @(#)ctype_.c 5.6 (Berkeley) 6/1/90;*/ #else -__RCSID($NetBSD: ctype_.c,v 1.18 2010/06/01 13:52:08 tnozaki Exp $); +__RCSID($NetBSD: ctype_.c,v 1.19 2010/12/14 02:28:57 joerg Exp $); #endif #endif /* LIBC_SCCS and not lint */ @@ -51,6 +51,15 @@ #error EOF != -1 #endif +#define _U _CTYPE_U +#define _L _CTYPE_L +#define _N _CTYPE_N +#define _S _CTYPE_S +#define _P _CTYPE_P +#define _C _CTYPE_C +#define _X _CTYPE_X +#define _B _CTYPE_B + const unsigned char _C_ctype_[1 + _CTYPE_NUM_CHARS] = { 0, _C, _C, _C, _C, _C, _C, _C, _C, Index: src/lib/libc/gen/isctype.c diff -u src/lib/libc/gen/isctype.c:1.20 src/lib/libc/gen/isctype.c:1.21 --- src/lib/libc/gen/isctype.c:1.20 Tue Jun 1 13:52:08 2010 +++ src/lib/libc/gen/isctype.c Tue Dec 14 02:28:57 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: isctype.c,v 1.20 2010/06/01 13:52:08 tnozaki Exp $ */ +/* $NetBSD: isctype.c,v 1.21 2010/12/14 02:28:57 joerg Exp $ */ /*- * Copyright (c)2008 Citrus Project, @@ -28,7 +28,7 @@ #include sys/cdefs.h #if defined(LIBC_SCCS) !defined(lint) -__RCSID($NetBSD: isctype.c,v 1.20 2010/06/01 13:52:08 tnozaki Exp $); +__RCSID($NetBSD: isctype.c,v 1.21 2010/12/14 02:28:57 joerg Exp $); #endif /* LIBC_SCCS and not lint */ #include namespace.h @@ -55,17 +55,17 @@ return (int)(_CTYPE_TAB(ctype_tab, c) (bit)); \ } -_ISCTYPE_FUNC(alnum, _U|_L|_N ) -_ISCTYPE_FUNC(alpha, _U|_L ) -_ISCTYPE_FUNC(cntrl, _C) -_ISCTYPE_FUNC(digit, _N) -_ISCTYPE_FUNC(graph, _P|_U|_L|_N ) -_ISCTYPE_FUNC(lower, _L) -_ISCTYPE_FUNC(print, _P|_U|_L|_N|_B) -_ISCTYPE_FUNC(punct, _P) -_ISCTYPE_FUNC(space, _S) -_ISCTYPE_FUNC(upper, _U) -_ISCTYPE_FUNC(xdigit, _N|_X ) +_ISCTYPE_FUNC(alnum, _CTYPE_U|_CTYPE_L|_CTYPE_N ) +_ISCTYPE_FUNC(alpha, _CTYPE_U|_CTYPE_L )
CVS commit: src/sys/dev/pci
Module Name:src Committed By: dyoung Date: Tue Dec 14 02:51:47 UTC 2010 Modified Files: src/sys/dev/pci: if_wm.c Log Message: Stop wm(4) from needlessly resetting when you add or delete a vlan(4): ifconfig vlan0 create vlan 2 vlanif wm0 ifconfig vlan0 destroy It pays to avoid a reset because after a reset it can take about 30 seconds before wm0 is back on the net. The patch garnered no objections on tech-...@. Sponsored by CoyotePoint Systems Inc. To generate a diff of this commit: cvs rdiff -u -r1.216 -r1.217 src/sys/dev/pci/if_wm.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/pci/if_wm.c diff -u src/sys/dev/pci/if_wm.c:1.216 src/sys/dev/pci/if_wm.c:1.217 --- src/sys/dev/pci/if_wm.c:1.216 Sat Nov 13 13:52:07 2010 +++ src/sys/dev/pci/if_wm.c Tue Dec 14 02:51:46 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: if_wm.c,v 1.216 2010/11/13 13:52:07 uebayasi Exp $ */ +/* $NetBSD: if_wm.c,v 1.217 2010/12/14 02:51:46 dyoung Exp $ */ /* * Copyright (c) 2001, 2002, 2003, 2004 Wasabi Systems, Inc. @@ -76,7 +76,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: if_wm.c,v 1.216 2010/11/13 13:52:07 uebayasi Exp $); +__KERNEL_RCSID(0, $NetBSD: if_wm.c,v 1.217 2010/12/14 02:51:46 dyoung Exp $); #include rnd.h @@ -514,6 +514,7 @@ static void wm_tick(void *); static void wm_set_filter(struct wm_softc *); +static void wm_set_vlan(struct wm_softc *); static int wm_intr(void *); static void wm_txintr(struct wm_softc *); @@ -2736,14 +2737,17 @@ struct wm_softc *sc = ifp-if_softc; int change = ifp-if_flags ^ sc-sc_if_flags; + if (change != 0) + sc-sc_if_flags = ifp-if_flags; + if ((change ~(IFF_CANTCHANGE|IFF_DEBUG)) != 0) return ENETRESET; - else if ((change (IFF_PROMISC | IFF_ALLMULTI)) == 0) - return 0; - wm_set_filter(sc); + if ((change (IFF_PROMISC | IFF_ALLMULTI)) != 0) + wm_set_filter(sc); + + wm_set_vlan(sc); - sc-sc_if_flags = ifp-if_flags; return 0; } @@ -3702,6 +3706,19 @@ /* XXX need special handling for 82580 */ } +static void +wm_set_vlan(struct wm_softc *sc) +{ + /* Deal with VLAN enables. */ + if (VLAN_ATTACHED(sc-sc_ethercom)) + sc-sc_ctrl |= CTRL_VME; + else + sc-sc_ctrl = ~CTRL_VME; + + /* Write the control registers. */ + CSR_WRITE(sc, WMREG_CTRL, sc-sc_ctrl); +} + /* * wm_init: [ifnet interface function] * @@ -3919,14 +3936,8 @@ else CSR_WRITE(sc, WMREG_FCTTV, FCTTV_DFLT); - /* Deal with VLAN enables. */ - if (VLAN_ATTACHED(sc-sc_ethercom)) - sc-sc_ctrl |= CTRL_VME; - else - sc-sc_ctrl = ~CTRL_VME; - - /* Write the control register. */ - CSR_WRITE(sc, WMREG_CTRL, sc-sc_ctrl); + /* Writes the control register. */ + wm_set_vlan(sc); if (sc-sc_flags WM_F_HAS_MII) { int val;
CVS commit: src/usr.sbin/ntp
Module Name:src Committed By: christos Date: Tue Dec 14 03:07:10 UTC 2010 Removed Files: src/usr.sbin/ntp: Makefile Makefile.inc importdate src/usr.sbin/ntp/html: Makefile src/usr.sbin/ntp/include: config.h src/usr.sbin/ntp/libisc: Makefile src/usr.sbin/ntp/libntp: Makefile src/usr.sbin/ntp/libopts: Makefile src/usr.sbin/ntp/libparse: Makefile src/usr.sbin/ntp/ntp-keygen: Makefile ntp-keygen.8 src/usr.sbin/ntp/ntpd: Makefile ntpd.8 src/usr.sbin/ntp/ntpdate: Makefile ntpdate.8 src/usr.sbin/ntp/ntpdc: Makefile ntpdc.8 src/usr.sbin/ntp/ntpq: Makefile ntpq.8 src/usr.sbin/ntp/ntptime: Makefile ntptime.8 src/usr.sbin/ntp/ntptrace: Makefile ntptrace.8 ntptrace.awk src/usr.sbin/ntp/scripts: mkver Log Message: moved to external To generate a diff of this commit: cvs rdiff -u -r1.9 -r0 src/usr.sbin/ntp/Makefile cvs rdiff -u -r1.20 -r0 src/usr.sbin/ntp/Makefile.inc cvs rdiff -u -r1.5 -r0 src/usr.sbin/ntp/importdate cvs rdiff -u -r1.6 -r0 src/usr.sbin/ntp/html/Makefile cvs rdiff -u -r1.19 -r0 src/usr.sbin/ntp/include/config.h cvs rdiff -u -r1.5 -r0 src/usr.sbin/ntp/libisc/Makefile cvs rdiff -u -r1.10 -r0 src/usr.sbin/ntp/libntp/Makefile cvs rdiff -u -r1.2 -r0 src/usr.sbin/ntp/libopts/Makefile cvs rdiff -u -r1.7 -r0 src/usr.sbin/ntp/libparse/Makefile cvs rdiff -u -r1.2 -r0 src/usr.sbin/ntp/ntp-keygen/Makefile cvs rdiff -u -r1.7 -r0 src/usr.sbin/ntp/ntp-keygen/ntp-keygen.8 cvs rdiff -u -r1.17 -r0 src/usr.sbin/ntp/ntpd/Makefile cvs rdiff -u -r1.21 -r0 src/usr.sbin/ntp/ntpd/ntpd.8 cvs rdiff -u -r1.6 -r0 src/usr.sbin/ntp/ntpdate/Makefile cvs rdiff -u -r1.10 -r0 src/usr.sbin/ntp/ntpdate/ntpdate.8 cvs rdiff -u -r1.6 -r0 src/usr.sbin/ntp/ntpdc/Makefile cvs rdiff -u -r1.20 -r0 src/usr.sbin/ntp/ntpdc/ntpdc.8 cvs rdiff -u -r1.7 -r0 src/usr.sbin/ntp/ntpq/Makefile cvs rdiff -u -r1.24 -r0 src/usr.sbin/ntp/ntpq/ntpq.8 cvs rdiff -u -r1.8 -r0 src/usr.sbin/ntp/ntptime/Makefile cvs rdiff -u -r1.7 -r0 src/usr.sbin/ntp/ntptime/ntptime.8 cvs rdiff -u -r1.4 -r0 src/usr.sbin/ntp/ntptrace/Makefile cvs rdiff -u -r1.8 -r0 src/usr.sbin/ntp/ntptrace/ntptrace.8 cvs rdiff -u -r1.6 -r0 src/usr.sbin/ntp/ntptrace/ntptrace.awk cvs rdiff -u -r1.13 -r0 src/usr.sbin/ntp/scripts/mkver Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/dev
Module Name:src Committed By: jmcneill Date: Tue Dec 14 03:25:16 UTC 2010 Modified Files: src/sys/dev: video.c video_if.h Log Message: video(4) changes to support analog tv capture devices: - support interlacing with VIDIOC_G_FMT - set V4L2_CAP_TUNER if driver implements the set_tuner/get_tuner callbacks - set V4L2_CAP_AUDIO if driver implements the set_audio/get_audio/enum_audio callbacks - add support for the following ioctls: VIDIOC_ENUMSTD, VIDIOC_G_STD, VIDIOC_S_STD, VIDIOC_ENUMINPUT, VIDIOC_G_INPUT, VIDIOC_S_INPUT, VIDIOC_ENUMAUDIO, VIDIOC_G_AUDIO, VIDIOC_S_AUDIO, VIDIOC_G_TUNER, VIDIOC_S_TUNER, VIDIOC_G_FREQUENCY, VIDIOC_S_FREQUENCY - in video_submit_payload(), fix support for signaling sample complete using frame numbers - new optional callbacks for drivers: enum_standard, get_standard, set_standard, enum_input, get_input, set_input, enum_audio, get_audio, set_audio, get_tuner, set_tuner, get_frequency, set_frequency for drivers that don't provide enum_standard, get_standard, set_standard, enum_input, get_input and set_input, the original stub implementations are provided To generate a diff of this commit: cvs rdiff -u -r1.23 -r1.24 src/sys/dev/video.c cvs rdiff -u -r1.5 -r1.6 src/sys/dev/video_if.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/video.c diff -u src/sys/dev/video.c:1.23 src/sys/dev/video.c:1.24 --- src/sys/dev/video.c:1.23 Sun Dec 6 22:42:48 2009 +++ src/sys/dev/video.c Tue Dec 14 03:25:16 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: video.c,v 1.23 2009/12/06 22:42:48 dyoung Exp $ */ +/* $NetBSD: video.c,v 1.24 2010/12/14 03:25:16 jmcneill Exp $ */ /* * Copyright (c) 2008 Patrick Mahoney p...@polycrystal.org @@ -36,7 +36,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: video.c,v 1.23 2009/12/06 22:42:48 dyoung Exp $); +__KERNEL_RCSID(0, $NetBSD: video.c,v 1.24 2010/12/14 03:25:16 jmcneill Exp $); #include video.h #if NVIDEO 0 @@ -224,8 +224,24 @@ struct video_format *); static void video_format_to_v4l2_format(const struct video_format *, struct v4l2_format *); +static void v4l2_standard_to_video_standard(v4l2_std_id, + enum video_standard *); +static void video_standard_to_v4l2_standard(enum video_standard, + struct v4l2_standard *); +static void v4l2_input_to_video_input(const struct v4l2_input *, + struct video_input *); +static void video_input_to_v4l2_input(const struct video_input *, + struct v4l2_input *); +static void v4l2_audio_to_video_audio(const struct v4l2_audio *, + struct video_audio *); +static void video_audio_to_v4l2_audio(const struct video_audio *, + struct v4l2_audio *); +static void v4l2_tuner_to_video_tuner(const struct v4l2_tuner *, + struct video_tuner *); +static void video_tuner_to_v4l2_tuner(const struct video_tuner *, + struct v4l2_tuner *); -/* V4L2 api functions, typically called from videoioclt() */ +/* V4L2 api functions, typically called from videoioctl() */ static int video_enum_format(struct video_softc *, struct v4l2_fmtdesc *); static int video_get_format(struct video_softc *, struct v4l2_format *); @@ -233,6 +249,22 @@ struct v4l2_format *); static int video_try_format(struct video_softc *, struct v4l2_format *); +static int video_enum_standard(struct video_softc *, +struct v4l2_standard *); +static int video_get_standard(struct video_softc *, v4l2_std_id *); +static int video_set_standard(struct video_softc *, v4l2_std_id); +static int video_enum_input(struct video_softc *, struct v4l2_input *); +static int video_get_input(struct video_softc *, int *); +static int video_set_input(struct video_softc *, int); +static int video_enum_audio(struct video_softc *, struct v4l2_audio *); +static int video_get_audio(struct video_softc *, struct v4l2_audio *); +static int video_set_audio(struct video_softc *, struct v4l2_audio *); +static int video_get_tuner(struct video_softc *, struct v4l2_tuner *); +static int video_set_tuner(struct video_softc *, struct v4l2_tuner *); +static int video_get_frequency(struct video_softc *, +struct v4l2_frequency *); +static int video_set_frequency(struct video_softc *, +struct v4l2_frequency *); static int video_query_control(struct video_softc *, struct v4l2_queryctrl *); static int video_get_control(struct video_softc *, @@ -586,14 +618,25 @@ dest-type = V4L2_BUF_TYPE_VIDEO_CAPTURE; dest-fmt.pix.width = src-width; dest-fmt.pix.height = src-height; - dest-fmt.pix.field = V4L2_FIELD_NONE; /* TODO: for now, - * just set to - * progressive */ + if (VIDEO_INTERLACED(src-interlace_flags)) + dest-fmt.pix.field = V4L2_FIELD_INTERLACED; + else + dest-fmt.pix.field = V4L2_FIELD_NONE; dest-fmt.pix.bytesperline = src-stride; dest-fmt.pix.sizeimage = src-sample_size; - dest-fmt.pix.colorspace = 0; /* XXX */
CVS commit: src/sbin/resize_ffs
Module Name:src Committed By: riz Date: Tue Dec 14 04:04:20 UTC 2010 Modified Files: src/sbin/resize_ffs: resize_ffs.c Log Message: Don't special-case v1 superblocks - especially with an incorrect calculation. To generate a diff of this commit: cvs rdiff -u -r1.21 -r1.22 src/sbin/resize_ffs/resize_ffs.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sbin/resize_ffs/resize_ffs.c diff -u src/sbin/resize_ffs/resize_ffs.c:1.21 src/sbin/resize_ffs/resize_ffs.c:1.22 --- src/sbin/resize_ffs/resize_ffs.c:1.21 Sun Dec 12 22:48:59 2010 +++ src/sbin/resize_ffs/resize_ffs.c Tue Dec 14 04:04:20 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: resize_ffs.c,v 1.21 2010/12/12 22:48:59 riz Exp $ */ +/* $NetBSD: resize_ffs.c,v 1.22 2010/12/14 04:04:20 riz Exp $ */ /* From sources sent on February 17, 2003 */ /*- * As its sole author, I explicitly place this code in the public @@ -948,8 +948,6 @@ oldcgsize = oldsb-fs_size % oldsb-fs_fpg; set_bits(cg_blksfree(cg, 0), oldcgsize, newcgsize - oldcgsize); cg-cg_old_ncyl = oldsb-fs_old_cpg; - if ((newsb-fs_old_flags FS_FLAGS_UPDATED) == 0) - cg-cg_old_ncyl = newsb-fs_old_ncyl % newsb-fs_old_cpg; cg-cg_ndblk = newcgsize; } /* Fix up the csum info, if necessary. */
CVS commit: src
Module Name:src Committed By: skrll Date: Tue Dec 14 05:57:32 UTC 2010 Modified Files: src/distrib/sets/lists/tests: mi src/tests/libexec/ld.elf_so: Makefile Added Files: src/tests/libexec/ld.elf_so: t_dlerror-cleared.c t_dlerror-false.c Removed Files: src/regress/usr.bin/rtld/dlerror-cleared: Makefile dlerror-cleared.c src/regress/usr.bin/rtld/dlerror-false: Makefile dlerror-false.c src/regress/usr.bin/rtld/dlopen: Makefile dlopen.c dlopen.exp Log Message: Convert a couple of old regress tests to ATF. Remove the regress/usr.bin/rtld/dlopen/dlopen.c test as well as it's covered by existing ATF test(s). To generate a diff of this commit: cvs rdiff -u -r1.172 -r1.173 src/distrib/sets/lists/tests/mi cvs rdiff -u -r1.1 -r0 src/regress/usr.bin/rtld/dlerror-cleared/Makefile cvs rdiff -u -r1.3 -r0 \ src/regress/usr.bin/rtld/dlerror-cleared/dlerror-cleared.c cvs rdiff -u -r1.1 -r0 src/regress/usr.bin/rtld/dlerror-false/Makefile cvs rdiff -u -r1.2 -r0 src/regress/usr.bin/rtld/dlerror-false/dlerror-false.c cvs rdiff -u -r1.8 -r0 src/regress/usr.bin/rtld/dlopen/Makefile cvs rdiff -u -r1.4 -r0 src/regress/usr.bin/rtld/dlopen/dlopen.c cvs rdiff -u -r1.1 -r0 src/regress/usr.bin/rtld/dlopen/dlopen.exp cvs rdiff -u -r1.1 -r1.2 src/tests/libexec/ld.elf_so/Makefile cvs rdiff -u -r0 -r1.1 src/tests/libexec/ld.elf_so/t_dlerror-cleared.c \ src/tests/libexec/ld.elf_so/t_dlerror-false.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/distrib/sets/lists/tests/mi diff -u src/distrib/sets/lists/tests/mi:1.172 src/distrib/sets/lists/tests/mi:1.173 --- src/distrib/sets/lists/tests/mi:1.172 Mon Dec 13 13:39:42 2010 +++ src/distrib/sets/lists/tests/mi Tue Dec 14 05:57:31 2010 @@ -1,4 +1,4 @@ -# $NetBSD: mi,v 1.172 2010/12/13 13:39:42 pooka Exp $ +# $NetBSD: mi,v 1.173 2010/12/14 05:57:31 skrll Exp $ # # Note: don't delete entries from here - mark them as obsolete instead. # @@ -380,6 +380,10 @@ ./usr/libdata/debug/usr/tests/lib/libutil/t_sockaddr_snprintf.debug tests-lib-debug debug,atf ./usr/libdata/debug/usr/tests/libexec tests-lib-debug ./usr/libdata/debug/usr/tests/libexec/ld.elf_sotests-libexec-debug +./usr/libdata/debug/usr/tests/libexec/ld.elf_so/h_df_1_noopen1.debug tests-libexec-debug debug,atf +./usr/libdata/debug/usr/tests/libexec/ld.elf_so/h_df_1_noopen2.debug tests-libexec-debug debug,atf +./usr/libdata/debug/usr/tests/libexec/ld.elf_so/t_dlerror-cleared.debug tests-libexec-debug debug,atf +./usr/libdata/debug/usr/tests/libexec/ld.elf_so/t_dlerror-false.debug tests-libexec-debug debug,atf ./usr/libdata/debug/usr/tests/libexec/ld.elf_so/t_dlinfo.debug tests-libexec-debug debug,atf ./usr/libdata/debug/usr/tests/modules tests-sys-debug ./usr/libdata/debug/usr/tests/modules/t_builtin.debug tests-sys-debug debug,atf @@ -1609,6 +1613,11 @@ ./usr/tests/libexec/Atffile tests-lib-tests atf ./usr/tests/libexec/ld.elf_so tests-libexec-tests ./usr/tests/libexec/ld.elf_so/Atffile tests-libexec-tests atf +./usr/tests/libexec/ld.elf_so/h_df_1_noopen1 tests-libexec-tests atf +./usr/tests/libexec/ld.elf_so/h_df_1_noopen2 tests-libexec-tests atf +./usr/tests/libexec/ld.elf_so/t_df_1_noopen tests-libexec-tests atf +./usr/tests/libexec/ld.elf_so/t_dlerror-cleared tests-libexec-tests atf +./usr/tests/libexec/ld.elf_so/t_dlerror-false tests-libexec-tests atf ./usr/tests/libexec/ld.elf_so/t_dlinfo tests-libexec-tests atf ./usr/tests/modulestests-sys-tests ./usr/tests/net tests-net-tests Index: src/tests/libexec/ld.elf_so/Makefile diff -u src/tests/libexec/ld.elf_so/Makefile:1.1 src/tests/libexec/ld.elf_so/Makefile:1.2 --- src/tests/libexec/ld.elf_so/Makefile:1.1 Thu Sep 24 21:33:45 2009 +++ src/tests/libexec/ld.elf_so/Makefile Tue Dec 14 05:57:32 2010 @@ -5,6 +5,8 @@ TESTSDIR= ${TESTSBASE}/libexec/ld.elf_so -TESTS_C+= t_dlinfo +TESTS_C+= t_dlerror-cleared t_dlerror-false t_dlinfo + +LDADD.t_dlerror-false= -Wl,-rpath,/var/nonexistent/lib .include bsd.test.mk Added files: Index: src/tests/libexec/ld.elf_so/t_dlerror-cleared.c diff -u /dev/null src/tests/libexec/ld.elf_so/t_dlerror-cleared.c:1.1 --- /dev/null Tue Dec 14 05:57:32 2010 +++ src/tests/libexec/ld.elf_so/t_dlerror-cleared.c Tue Dec 14 05:57:32 2010 @@ -0,0 +1,67 @@ +/* $NetBSD: t_dlerror-cleared.c,v 1.1 2010/12/14 05:57:32 skrll Exp $ */ + +/* + * Copyright (c) 2009 The NetBSD Foundation, Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + *notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + *notice, this list of conditions and the following disclaimer in the + *
CVS commit: src/regress/usr.bin/rtld
Module Name:src Committed By: skrll Date: Tue Dec 14 06:02:22 UTC 2010 Modified Files: src/regress/usr.bin/rtld: Makefile Log Message: Remove references to delete tests. To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/regress/usr.bin/rtld/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/regress/usr.bin/rtld/Makefile diff -u src/regress/usr.bin/rtld/Makefile:1.3 src/regress/usr.bin/rtld/Makefile:1.4 --- src/regress/usr.bin/rtld/Makefile:1.3 Mon Dec 14 12:43:48 2009 +++ src/regress/usr.bin/rtld/Makefile Tue Dec 14 06:02:21 2010 @@ -1,11 +1,9 @@ -# $NetBSD: Makefile,v 1.3 2009/12/14 12:43:48 uebayasi Exp $ +# $NetBSD: Makefile,v 1.4 2010/12/14 06:02:21 skrll Exp $ .include bsd.own.mk -SUBDIR+= dlopen .if ${MKCXX} != no SUBDIR+= testlib .endif -SUBDIR+= dlerror-false dlerror-cleared .include bsd.subdir.mk