CVS commit: src/tests/lib/libc/stdio
Module Name:src Committed By: pooka Date: Wed Dec 1 07:12:03 UTC 2010 Modified Files: src/tests/lib/libc/stdio: t_format.c Log Message: comment why vax is left out of all the fun To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/tests/lib/libc/stdio/t_format.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/tests/lib/libc/stdio/t_format.c diff -u src/tests/lib/libc/stdio/t_format.c:1.2 src/tests/lib/libc/stdio/t_format.c:1.3 --- src/tests/lib/libc/stdio/t_format.c:1.2 Mon Nov 22 08:47:58 2010 +++ src/tests/lib/libc/stdio/t_format.c Wed Dec 1 07:12:03 2010 @@ -46,6 +46,7 @@ ATF_CHECK(sprintf(str, "%010f", 0.0) == 10); ATF_REQUIRE_STREQ(str, "000.00"); + /* ieeefp */ #ifndef __vax__ /* PR/44113: printf(3) should ignore zero padding for nan/inf */ ATF_CHECK(sprintf(str, "%010f", NAN) == 10);
CVS commit: src
Module Name:src Committed By: pooka Date: Wed Dec 1 07:03:21 UTC 2010 Modified Files: src/distrib/sets/lists/tests: mi src/etc/mtree: NetBSD.dist.base Log Message: adjust previous a bit to attempt to deal with MKMONKEY To generate a diff of this commit: cvs rdiff -u -r1.164 -r1.165 src/distrib/sets/lists/tests/mi cvs rdiff -u -r1.64 -r1.65 src/etc/mtree/NetBSD.dist.base 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.164 src/distrib/sets/lists/tests/mi:1.165 --- src/distrib/sets/lists/tests/mi:1.164 Tue Nov 30 23:18:25 2010 +++ src/distrib/sets/lists/tests/mi Wed Dec 1 07:03:21 2010 @@ -1,4 +1,4 @@ -# $NetBSD: mi,v 1.164 2010/11/30 23:18:25 riz Exp $ +# $NetBSD: mi,v 1.165 2010/12/01 07:03:21 pooka Exp $ # # Note: don't delete entries from here - mark them as "obsolete" instead. # @@ -418,6 +418,9 @@ ./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 +./usr/libdata/debug/usr/tests/sbin tests-sbin-tests +./usr/libdata/debug/usr/tests/sbin/resize_ffstests-sbin-tests +./usr/libdata/debug/usr/tests/sbin/resize_ffs/t_resize_ffs.debug tests-sbin-tests debug,atf ./usr/libdata/debug/usr/tests/syscall tests-syscall-debug ./usr/libdata/debug/usr/tests/syscall/t_cmsg.debug tests-syscall-debug debug,atf ./usr/libdata/debug/usr/tests/syscall/t_timer.debug tests-syscall-debug debug,atf @@ -1653,9 +1656,9 @@ ./usr/tests/rump/rumpvfs/Atffile tests-rump-tests atf ./usr/tests/rump/rumpvfs/t_etfs tests-rump-tests atf ./usr/tests/rump/rumpvfs/t_p2kifs tests-rump-tests atf -./usr/tests/sbintests-sbin-tests atf +./usr/tests/sbintests-sbin-tests ./usr/tests/sbin/Atffile tests-sbin-tests atf -./usr/tests/sbin/resize_ffs tests-sbin-tests atf +./usr/tests/sbin/resize_ffs tests-sbin-tests ./usr/tests/sbin/resize_ffs/Atffile tests-sbin-tests atf ./usr/tests/sbin/resize_ffs/t_resize_ffs tests-sbin-tests atf ./usr/tests/systests-sys-tests Index: src/etc/mtree/NetBSD.dist.base diff -u src/etc/mtree/NetBSD.dist.base:1.64 src/etc/mtree/NetBSD.dist.base:1.65 --- src/etc/mtree/NetBSD.dist.base:1.64 Tue Nov 30 23:18:25 2010 +++ src/etc/mtree/NetBSD.dist.base Wed Dec 1 07:03:21 2010 @@ -1,4 +1,4 @@ -# $NetBSD: NetBSD.dist.base,v 1.64 2010/11/30 23:18:25 riz Exp $ +# $NetBSD: NetBSD.dist.base,v 1.65 2010/12/01 07:03:21 pooka Exp $ # @(#)4.4BSD.dist 8.1 (Berkeley) 6/13/93 # Do not customize this file as it may be overwritten on upgrades. @@ -274,6 +274,8 @@ ./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 ./usr/libdata/debug/usr/tests/syscall ./usr/libdata/debug/usr/tests/util ./usr/libdata/debug/usr/tests/util/df
CVS commit: src/sys/arch/cats/include
Module Name:src Committed By: skrll Date: Wed Dec 1 06:47:17 UTC 2010 Modified Files: src/sys/arch/cats/include: param.h Log Message: Define PCI_MAGIC_IO_RANGE, so that Xorg drivers can mmap PCI IO space. To generate a diff of this commit: cvs rdiff -u -r1.7 -r1.8 src/sys/arch/cats/include/param.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/cats/include/param.h diff -u src/sys/arch/cats/include/param.h:1.7 src/sys/arch/cats/include/param.h:1.8 --- src/sys/arch/cats/include/param.h:1.7 Fri Jan 3 02:40:57 2003 +++ src/sys/arch/cats/include/param.h Wed Dec 1 06:47:16 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: param.h,v 1.7 2003/01/03 02:40:57 thorpej Exp $ */ +/* $NetBSD: param.h,v 1.8 2010/12/01 06:47:16 skrll Exp $ */ /* * Copyright (c) 1994,1995 Mark Brinicombe. @@ -51,4 +51,7 @@ #include +/* at this offset we mmap() the PCI IO range in display drivers */ +#define PCI_MAGIC_IO_RANGE 0x7c00 + #endif /* _CATS_PARAM_H_ */
CVS commit: src/share/misc
Module Name:src Committed By: jruoho Date: Wed Dec 1 05:18:10 UTC 2010 Modified Files: src/share/misc: acronyms Log Message: OWITE -> OWTTE, as in the original patch. To generate a diff of this commit: cvs rdiff -u -r1.194 -r1.195 src/share/misc/acronyms Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/misc/acronyms diff -u src/share/misc/acronyms:1.194 src/share/misc/acronyms:1.195 --- src/share/misc/acronyms:1.194 Tue Nov 30 19:07:15 2010 +++ src/share/misc/acronyms Wed Dec 1 05:18:09 2010 @@ -1,4 +1,4 @@ -$NetBSD: acronyms,v 1.194 2010/11/30 19:07:15 jruoho Exp $ +$NetBSD: acronyms,v 1.195 2010/12/01 05:18:09 jruoho Exp $ 10Q thank you 10X thanks 1337 leet/elite @@ -259,7 +259,7 @@ OTOH on the other hand OTT over the top OTTOMH off the top of my head -OWITE or words to that effect +OWTTE or words to that effect PDQ pretty darn quick PEBKAC problem exists between keyboard and chair PFO please fuck off
CVS commit: src/distrib/notes/common
Module Name:src Committed By: mef Date: Wed Dec 1 01:57:10 UTC 2010 Modified Files: src/distrib/notes/common: main Log Message: Add Makoto Fujiwara mef@, thanks To generate a diff of this commit: cvs rdiff -u -r1.468 -r1.469 src/distrib/notes/common/main Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/distrib/notes/common/main diff -u src/distrib/notes/common/main:1.468 src/distrib/notes/common/main:1.469 --- src/distrib/notes/common/main:1.468 Sun Nov 14 11:19:49 2010 +++ src/distrib/notes/common/main Wed Dec 1 01:57:09 2010 @@ -1,4 +1,4 @@ -.\" $NetBSD: main,v 1.468 2010/11/14 11:19:49 kiyohara Exp $ +.\" $NetBSD: main,v 1.469 2010/12/01 01:57:09 mef Exp $ .\" .\" Copyright (c) 1999-2008 The NetBSD Foundation, Inc. .\" All rights reserved. @@ -1155,6 +1155,7 @@ .It Ta Matt Fredette Ta Mt frede...@netbsd.org .It Ta Thorsten Frueauf Ta Mt frue...@netbsd.org .It Ta Castor Fu Ta Mt cas...@netbsd.org +.It Ta Makoto Fujiwara Ta Mt m...@netbsd.org .It Ta Ichiro Fukuhara Ta Mt ich...@netbsd.org .It Ta Quentin Garnier Ta Mt c...@netbsd.org .It Ta Thomas Gerner Ta Mt tho...@netbsd.org
CVS commit: src
Module Name:src Committed By: riz Date: Tue Nov 30 23:18:25 UTC 2010 Modified Files: src/distrib/sets/lists/tests: mi src/etc/mtree: NetBSD.dist.base Log Message: Add sets/mtree goop for new test program and accompanying dirs. To generate a diff of this commit: cvs rdiff -u -r1.163 -r1.164 src/distrib/sets/lists/tests/mi cvs rdiff -u -r1.63 -r1.64 src/etc/mtree/NetBSD.dist.base 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.163 src/distrib/sets/lists/tests/mi:1.164 --- src/distrib/sets/lists/tests/mi:1.163 Tue Nov 30 22:14:03 2010 +++ src/distrib/sets/lists/tests/mi Tue Nov 30 23:18:25 2010 @@ -1,4 +1,4 @@ -# $NetBSD: mi,v 1.163 2010/11/30 22:14:03 pooka Exp $ +# $NetBSD: mi,v 1.164 2010/11/30 23:18:25 riz Exp $ # # Note: don't delete entries from here - mark them as "obsolete" instead. # @@ -1653,6 +1653,11 @@ ./usr/tests/rump/rumpvfs/Atffile tests-rump-tests atf ./usr/tests/rump/rumpvfs/t_etfs tests-rump-tests atf ./usr/tests/rump/rumpvfs/t_p2kifs tests-rump-tests atf +./usr/tests/sbintests-sbin-tests atf +./usr/tests/sbin/Atffile tests-sbin-tests atf +./usr/tests/sbin/resize_ffs tests-sbin-tests atf +./usr/tests/sbin/resize_ffs/Atffile tests-sbin-tests atf +./usr/tests/sbin/resize_ffs/t_resize_ffs tests-sbin-tests atf ./usr/tests/systests-sys-tests ./usr/tests/sys/Atffile tests-sys-tests atf ./usr/tests/sys/rctests-sys-tests Index: src/etc/mtree/NetBSD.dist.base diff -u src/etc/mtree/NetBSD.dist.base:1.63 src/etc/mtree/NetBSD.dist.base:1.64 --- src/etc/mtree/NetBSD.dist.base:1.63 Tue Nov 30 22:14:02 2010 +++ src/etc/mtree/NetBSD.dist.base Tue Nov 30 23:18:25 2010 @@ -1,4 +1,4 @@ -# $NetBSD: NetBSD.dist.base,v 1.63 2010/11/30 22:14:02 pooka Exp $ +# $NetBSD: NetBSD.dist.base,v 1.64 2010/11/30 23:18:25 riz Exp $ # @(#)4.4BSD.dist 8.1 (Berkeley) 6/13/93 # Do not customize this file as it may be overwritten on upgrades. @@ -1220,6 +1220,8 @@ ./usr/tests/rump/rumpkern/h_client ./usr/tests/rump/rumpkern/h_server ./usr/tests/rump/rumpvfs +./usr/tests/sbin +./usr/tests/sbin/resize_ffs ./usr/tests/sys ./usr/tests/sys/rc ./usr/tests/syscall
CVS commit: src/tests
Module Name:src Committed By: riz Date: Tue Nov 30 23:17:27 UTC 2010 Modified Files: src/tests: Makefile Added Files: src/tests/sbin: Makefile Makefile.inc src/tests/sbin/resize_ffs: Makefile t_resize_ffs.sh Log Message: Add some basic tests of resize_ffs(8). The 'grow' test does nothing more than create an empty file system, grow it, and makes sure fsck finds the result clean. The 'shrink' test does likewise for shrinking, but is an expected failure at the moment due to PR bin/44177. To generate a diff of this commit: cvs rdiff -u -r1.23 -r1.24 src/tests/Makefile cvs rdiff -u -r0 -r1.1 src/tests/sbin/Makefile src/tests/sbin/Makefile.inc cvs rdiff -u -r0 -r1.1 src/tests/sbin/resize_ffs/Makefile \ src/tests/sbin/resize_ffs/t_resize_ffs.sh Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/tests/Makefile diff -u src/tests/Makefile:1.23 src/tests/Makefile:1.24 --- src/tests/Makefile:1.23 Wed Aug 4 13:15:15 2010 +++ src/tests/Makefile Tue Nov 30 23:17:27 2010 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.23 2010/08/04 13:15:15 pooka Exp $ +# $NetBSD: Makefile,v 1.24 2010/11/30 23:17:27 riz Exp $ .include @@ -8,7 +8,7 @@ SUBDIR= crypto games ipf util .if ${MKATF} != "no" -SUBDIR+= dev fs include kernel lib libexec net rump sys syscall +SUBDIR+= dev fs include kernel lib libexec net rump sbin sys syscall . if ${MACHINE} != "evbppc" && ${MKKMOD} != "no" SUBDIR+= modules Added files: Index: src/tests/sbin/Makefile diff -u /dev/null src/tests/sbin/Makefile:1.1 --- /dev/null Tue Nov 30 23:17:28 2010 +++ src/tests/sbin/Makefile Tue Nov 30 23:17:27 2010 @@ -0,0 +1,10 @@ +# $NetBSD: Makefile,v 1.1 2010/11/30 23:17:27 riz Exp $ +# + +.include + +TESTSDIR= ${TESTSBASE}/sbin + +TESTS_SUBDIRS+= resize_ffs + +.include Index: src/tests/sbin/Makefile.inc diff -u /dev/null src/tests/sbin/Makefile.inc:1.1 --- /dev/null Tue Nov 30 23:17:28 2010 +++ src/tests/sbin/Makefile.inc Tue Nov 30 23:17:27 2010 @@ -0,0 +1 @@ +.include "../Makefile.inc" Index: src/tests/sbin/resize_ffs/Makefile diff -u /dev/null src/tests/sbin/resize_ffs/Makefile:1.1 --- /dev/null Tue Nov 30 23:17:28 2010 +++ src/tests/sbin/resize_ffs/Makefile Tue Nov 30 23:17:27 2010 @@ -0,0 +1,9 @@ +# $NetBSD: Makefile,v 1.1 2010/11/30 23:17:27 riz Exp $ + +.include + +TESTSDIR= ${TESTSBASE}/sbin/resize_ffs + +TESTS_SH= t_resize_ffs + +.include Index: src/tests/sbin/resize_ffs/t_resize_ffs.sh diff -u /dev/null src/tests/sbin/resize_ffs/t_resize_ffs.sh:1.1 --- /dev/null Tue Nov 30 23:17:28 2010 +++ src/tests/sbin/resize_ffs/t_resize_ffs.sh Tue Nov 30 23:17:27 2010 @@ -0,0 +1,108 @@ +# $NetBSD: t_resize_ffs.sh,v 1.1 2010/11/30 23:17:27 riz Exp $ +# +# Copyright (c) 2010 The NetBSD Foundation, Inc. +# All rights reserved. +# +# This code is derived from software contributed to The NetBSD Foundation +# by Jeffrey C. Rizzo. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +#notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +#notice, this list of conditions and the following disclaimer in the +#documentation and/or other materials provided with the distribution. +# +# THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS +# ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED +# TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS +# BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +# POSSIBILITY OF SUCH DAMAGE. +# + +IMG=diskimage +VND=vnd0 + +# misc routines + +atf_test_case grow cleanup +grow_head() +{ + atf_set "descr" "Checks successful fs growth" + atf_set "require.user" "root" +} +grow_body() +{ + cat >disktab
CVS commit: src/lib/librumpuser
Module Name:src Committed By: pooka Date: Tue Nov 30 22:32:01 UTC 2010 Modified Files: src/lib/librumpuser: rumpuser_sp.c Log Message: lint care To generate a diff of this commit: cvs rdiff -u -r1.21 -r1.22 src/lib/librumpuser/rumpuser_sp.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/librumpuser/rumpuser_sp.c diff -u src/lib/librumpuser/rumpuser_sp.c:1.21 src/lib/librumpuser/rumpuser_sp.c:1.22 --- src/lib/librumpuser/rumpuser_sp.c:1.21 Mon Nov 29 16:08:03 2010 +++ src/lib/librumpuser/rumpuser_sp.c Tue Nov 30 22:32:01 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: rumpuser_sp.c,v 1.21 2010/11/29 16:08:03 pooka Exp $ */ +/* $NetBSD: rumpuser_sp.c,v 1.22 2010/11/30 22:32:01 pooka Exp $ */ /* * Copyright (c) 2010 Antti Kantee. All Rights Reserved. @@ -38,7 +38,7 @@ */ #include -__RCSID("$NetBSD: rumpuser_sp.c,v 1.21 2010/11/29 16:08:03 pooka Exp $"); +__RCSID("$NetBSD: rumpuser_sp.c,v 1.22 2010/11/30 22:32:01 pooka Exp $"); #include #include @@ -375,6 +375,7 @@ * Nobody's going to attempt to send/receive anymore, * so reinit info relevant to that. */ + /*LINTED:pointer casts may be ok*/ memset((char *)spc + SPC_ZEROFF, 0, sizeof(*spc) - SPC_ZEROFF); spcrelease(spc);
CVS commit: src/lib/librumpclient
Module Name:src Committed By: pooka Date: Tue Nov 30 22:30:44 UTC 2010 Modified Files: src/lib/librumpclient: rumpclient.c Log Message: lintsquelch To generate a diff of this commit: cvs rdiff -u -r1.7 -r1.8 src/lib/librumpclient/rumpclient.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/librumpclient/rumpclient.c diff -u src/lib/librumpclient/rumpclient.c:1.7 src/lib/librumpclient/rumpclient.c:1.8 --- src/lib/librumpclient/rumpclient.c:1.7 Tue Nov 30 14:24:40 2010 +++ src/lib/librumpclient/rumpclient.c Tue Nov 30 22:30:43 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: rumpclient.c,v 1.7 2010/11/30 14:24:40 pooka Exp $ */ +/* $NetBSD: rumpclient.c,v 1.8 2010/11/30 22:30:43 pooka Exp $ */ /* * Copyright (c) 2010 Antti Kantee. All Rights Reserved. @@ -226,7 +226,7 @@ if (s == -1) return -1; - if (connect(s, sap, sap->sa_len) == -1) { + if (connect(s, sap, (socklen_t)sap->sa_len) == -1) { error = errno; fprintf(stderr, "rump_sp: client connect failed\n"); errno = error;
CVS commit: src/tests/dev/md
Module Name:src Committed By: pooka Date: Tue Nov 30 22:15:02 UTC 2010 Modified Files: src/tests/dev/md: t_md.sh Log Message: cleanup server after use (XXX: need better way to reboot it) To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/tests/dev/md/t_md.sh Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/tests/dev/md/t_md.sh diff -u src/tests/dev/md/t_md.sh:1.2 src/tests/dev/md/t_md.sh:1.3 --- src/tests/dev/md/t_md.sh:1.2 Tue Nov 30 14:29:05 2010 +++ src/tests/dev/md/t_md.sh Tue Nov 30 22:15:02 2010 @@ -1,4 +1,4 @@ -# $NetBSD: t_md.sh,v 1.2 2010/11/30 14:29:05 pooka Exp $ +# $NetBSD: t_md.sh,v 1.3 2010/11/30 22:15:02 pooka Exp $ # # Copyright (c) 2010 The NetBSD Foundation, Inc. # All rights reserved. @@ -25,8 +25,8 @@ # POSSIBILITY OF SUCH DAMAGE. # -atf_test_case basic -basic() +atf_test_case basic cleanup +basic_head() { atf_set "descr" "Check that md can be created, read and written" @@ -47,6 +47,13 @@ atf_check -s exit:0 -e ignore -o file:testfile dd if=/bin/ls count=10 } +basic_cleanup() +{ + + export RUMP_SERVER=unix://commsock + $(atf_get_srcdir)/../../rump/rumpkern/h_client/h_reboot +} + atf_init_test_cases() {
CVS commit: src
Module Name:src Committed By: pooka Date: Tue Nov 30 22:14:03 UTC 2010 Modified Files: src/distrib/sets/lists/tests: mi src/etc/mtree: NetBSD.dist.base Log Message: build system gobbeldygook for tests To generate a diff of this commit: cvs rdiff -u -r1.162 -r1.163 src/distrib/sets/lists/tests/mi cvs rdiff -u -r1.62 -r1.63 src/etc/mtree/NetBSD.dist.base 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.162 src/distrib/sets/lists/tests/mi:1.163 --- src/distrib/sets/lists/tests/mi:1.162 Tue Nov 30 16:16:33 2010 +++ src/distrib/sets/lists/tests/mi Tue Nov 30 22:14:03 2010 @@ -1,4 +1,4 @@ -# $NetBSD: mi,v 1.162 2010/11/30 16:16:33 pooka Exp $ +# $NetBSD: mi,v 1.163 2010/11/30 22:14:03 pooka Exp $ # # Note: don't delete entries from here - mark them as "obsolete" instead. # @@ -409,6 +409,12 @@ ./usr/libdata/debug/usr/tests/rump/rumpkern/t_threads.debug tests-syscall-debug debug,atf ./usr/libdata/debug/usr/tests/rump/rumpkern/t_tsleep.debug tests-syscall-debug debug,atf ./usr/libdata/debug/usr/tests/rump/rumpkern/t_vm.debug tests-syscall-debug debug,atf +./usr/libdata/debug/usr/tests/rump/rumpkern/h_client tests-syscall-debug +./usr/libdata/debug/usr/tests/rump/rumpkern/h_client/h_reboot.debug tests-syscall-debug debug,atf +./usr/libdata/debug/usr/tests/rump/rumpkern/h_client/h_simplecli.debug tests-syscall-debug debug,atf +./usr/libdata/debug/usr/tests/rump/rumpkern/h_client/h_stresscli.debug tests-syscall-debug debug,atf +./usr/libdata/debug/usr/tests/rump/rumpkern/h_server tests-syscall-debug +./usr/libdata/debug/usr/tests/rump/rumpkern/h_server/h_simpleserver.debug tests-syscall-debug debug,atf ./usr/libdata/debug/usr/tests/rump/rumpvfstests-syscall-debug ./usr/libdata/debug/usr/tests/rump/rumpvfs/t_etfs.debug tests-syscall-debug debug,atf ./usr/libdata/debug/usr/tests/rump/rumpvfs/t_p2kifs.debug tests-syscall-debug debug,atf @@ -1633,9 +1639,16 @@ ./usr/tests/rump/rumpkern/t_lwproc tests-rump-tests atf ./usr/tests/rump/rumpkern/t_modcmd tests-rump-tests atf ./usr/tests/rump/rumpkern/t_modlinkset tests-rump-tests atf +./usr/tests/rump/rumpkern/t_sp tests-rump-tests atf ./usr/tests/rump/rumpkern/t_threads tests-rump-tests atf ./usr/tests/rump/rumpkern/t_tsleep tests-rump-tests atf ./usr/tests/rump/rumpkern/t_vm tests-rump-tests atf +./usr/tests/rump/rumpkern/h_client tests-rump-tests +./usr/tests/rump/rumpkern/h_client/h_reboot tests-rump-tests atf +./usr/tests/rump/rumpkern/h_client/h_simplecli tests-rump-tests atf +./usr/tests/rump/rumpkern/h_client/h_stresscli tests-rump-tests atf +./usr/tests/rump/rumpkern/h_server tests-rump-tests +./usr/tests/rump/rumpkern/h_server/h_simpleserver tests-rump-tests atf ./usr/tests/rump/rumpvfs tests-rump-tests ./usr/tests/rump/rumpvfs/Atffile tests-rump-tests atf ./usr/tests/rump/rumpvfs/t_etfs tests-rump-tests atf Index: src/etc/mtree/NetBSD.dist.base diff -u src/etc/mtree/NetBSD.dist.base:1.62 src/etc/mtree/NetBSD.dist.base:1.63 --- src/etc/mtree/NetBSD.dist.base:1.62 Tue Nov 23 15:38:53 2010 +++ src/etc/mtree/NetBSD.dist.base Tue Nov 30 22:14:02 2010 @@ -1,4 +1,4 @@ -# $NetBSD: NetBSD.dist.base,v 1.62 2010/11/23 15:38:53 pooka Exp $ +# $NetBSD: NetBSD.dist.base,v 1.63 2010/11/30 22:14:02 pooka Exp $ # @(#)4.4BSD.dist 8.1 (Berkeley) 6/13/93 # Do not customize this file as it may be overwritten on upgrades. @@ -271,6 +271,8 @@ ./usr/libdata/debug/usr/tests/rump ./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/syscall ./usr/libdata/debug/usr/tests/util @@ -1215,6 +1217,8 @@ ./usr/tests/rump ./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/sys ./usr/tests/sys/rc
CVS commit: src/tests/rump/rumpkern
Module Name:src Committed By: pooka Date: Tue Nov 30 22:09:15 UTC 2010 Modified Files: src/tests/rump/rumpkern: Makefile Added Files: src/tests/rump/rumpkern: t_sp.sh src/tests/rump/rumpkern/h_client: Makefile h_reboot.c h_simplecli.c h_stresscli.c src/tests/rump/rumpkern/h_server: Makefile h_simpleserver.c Log Message: Add a simple and stress test cases for the rump remote syscall code. Fun fact: since the server daemonizes into its own process group, it's not in atf's pgrp. Use rump_sys_reboot() in atf cleanup to kill the server after the test. To generate a diff of this commit: cvs rdiff -u -r1.9 -r1.10 src/tests/rump/rumpkern/Makefile cvs rdiff -u -r0 -r1.1 src/tests/rump/rumpkern/t_sp.sh cvs rdiff -u -r0 -r1.1 src/tests/rump/rumpkern/h_client/Makefile \ src/tests/rump/rumpkern/h_client/h_reboot.c \ src/tests/rump/rumpkern/h_client/h_simplecli.c \ src/tests/rump/rumpkern/h_client/h_stresscli.c cvs rdiff -u -r0 -r1.1 src/tests/rump/rumpkern/h_server/Makefile \ src/tests/rump/rumpkern/h_server/h_simpleserver.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/tests/rump/rumpkern/Makefile diff -u src/tests/rump/rumpkern/Makefile:1.9 src/tests/rump/rumpkern/Makefile:1.10 --- src/tests/rump/rumpkern/Makefile:1.9 Tue Nov 9 15:25:19 2010 +++ src/tests/rump/rumpkern/Makefile Tue Nov 30 22:09:15 2010 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.9 2010/11/09 15:25:19 pooka Exp $ +# $NetBSD: Makefile,v 1.10 2010/11/30 22:09:15 pooka Exp $ .include @@ -12,6 +12,10 @@ TESTS_C+= t_tsleep TESTS_C+= t_vm +TESTS_SH= t_sp + +SUBDIR+= h_server h_client + ADD_TO_LD= -lrumpvfs -lrump -lrumpuser -lpthread LDADD.t_modlinkset+= -lukfs -lrumpdev_disk -lrumpdev -lrumpfs_msdos LDADD.t_modlinkset+= -lrumpfs_cd9660 ${ADD_TO_LD} Added files: Index: src/tests/rump/rumpkern/t_sp.sh diff -u /dev/null src/tests/rump/rumpkern/t_sp.sh:1.1 --- /dev/null Tue Nov 30 22:09:15 2010 +++ src/tests/rump/rumpkern/t_sp.sh Tue Nov 30 22:09:15 2010 @@ -0,0 +1,87 @@ +# $NetBSD: t_sp.sh,v 1.1 2010/11/30 22:09:15 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 must retain the above copyright +#notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +#notice, this list of conditions and the following disclaimer in the +#documentation and/or other materials provided with the distribution. +# +# THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS +# ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED +# TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS +# BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +# POSSIBILITY OF SUCH DAMAGE. +# + +atf_test_case basic cleanup +basic_head() +{ + + atf_set "descr" "Check that basic remote server communication works" +} + +basic_body() +{ + + export RUMP_SERVER=unix://commsock + + atf_check -s exit:0 \ + $(atf_get_srcdir)/h_server/h_simpleserver ${RUMP_SERVER} + + atf_check -s exit:0 $(atf_get_srcdir)/h_client/h_simplecli +} + +basic_cleanup() +{ + + docleanup +} + +stresst=10 +atf_test_case stress cleanup +stress_head() +{ + + atf_set "descr" "Stress/robustness test (~${stresst}s)" +} + +stress_body() +{ + + export RUMP_SERVER=unix://commsock + + atf_check -s exit:0 \ + $(atf_get_srcdir)/h_server/h_simpleserver ${RUMP_SERVER} + + atf_check -s exit:0 $(atf_get_srcdir)/h_client/h_stresscli ${stresst} +} + +stress_cleanup() +{ + + docleanup +} + +docleanup() +{ + RUMP_SERVER=unix://commsock $(atf_get_srcdir)/h_client/h_reboot +} + +atf_init_test_cases() +{ + + atf_add_test_case basic + atf_add_test_case stress +} Index: src/tests/rump/rumpkern/h_client/Makefile diff -u /dev/null src/tests/rump/rumpkern/h_client/Makefile:1.1 --- /dev/null Tue Nov 30 22:09:15 2010 +++ src/tests/rump/rumpkern/h_client/Makefile Tue Nov 30 22:09:15 2010 @@ -0,0 +1,20 @@ +# $NetBSD: Makefile,v 1.1 2010/11/30 22:09:15 pooka Exp $ +# + +.include + +TESTSDIR= ${TESTSBASE}/rump/rumpkern/h_client + +TESTS_C+= h_reboot +TESTS_C+= h_simplecli +TESTS_C+= h_stresscli + +ATFFILE= no + +LDADD+= -lrumpclient
CVS commit: src/lib/librumpvfs
Module Name:src Committed By: wiz Date: Tue Nov 30 22:00:01 UTC 2010 Modified Files: src/lib/librumpvfs: rump_etfs.3 Log Message: Add some consistency dots though they make not much typographic sense; however, just as much as in the other places in the enumeration. Use Pa for a path. To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/lib/librumpvfs/rump_etfs.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/librumpvfs/rump_etfs.3 diff -u src/lib/librumpvfs/rump_etfs.3:1.3 src/lib/librumpvfs/rump_etfs.3:1.4 --- src/lib/librumpvfs/rump_etfs.3:1.3 Tue Nov 30 19:50:25 2010 +++ src/lib/librumpvfs/rump_etfs.3 Tue Nov 30 22:00:01 2010 @@ -1,4 +1,4 @@ -.\" $NetBSD: rump_etfs.3,v 1.3 2010/11/30 19:50:25 pooka Exp $ +.\" $NetBSD: rump_etfs.3,v 1.4 2010/11/30 22:00:01 wiz Exp $ .\" .\" Copyright (c) 2010 Antti Kantee. All rights reserved. .\" @@ -77,12 +77,12 @@ Possible values are: .Bl -tag -width RUMP_ETFS_DIR_SUBDIRSXXX .It Dv RUMP_ETFS_REG -regular file +regular file. .It Dv RUMP_ETFS_BLK block device. This is often used when mapping file system images. .It Dv RUMP_ETFS_CHR -character device +character device. .It Dv RUMP_ETFS_DIR directory. This option is valid only when @@ -122,8 +122,9 @@ is not in use. .El .Sh EXAMPLES -Map a host image file to a mountable /dev/harddisk path using -window offsets from the disklabel. +Map a host image file to a mountable +.Pa /dev/harddisk +path using window offsets from the disklabel. .Bd -literal -offset indent rump_pub_etfs_register_withsize("/dev/harddisk", "disk.img", RUMP_ETFS_BLK,
CVS commit: src/share/man/man7
Module Name:src Committed By: jruoho Date: Tue Nov 30 21:22:39 UTC 2010 Modified Files: src/share/man/man7: intro.7 Log Message: Update. To generate a diff of this commit: cvs rdiff -u -r1.16 -r1.17 src/share/man/man7/intro.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/intro.7 diff -u src/share/man/man7/intro.7:1.16 src/share/man/man7/intro.7:1.17 --- src/share/man/man7/intro.7:1.16 Tue Mar 23 07:43:54 2010 +++ src/share/man/man7/intro.7 Tue Nov 30 21:22:38 2010 @@ -1,4 +1,4 @@ -.\" $NetBSD: intro.7,v 1.16 2010/03/23 07:43:54 jruoho Exp $ +.\" $NetBSD: intro.7,v 1.17 2010/11/30 21:22:38 jruoho Exp $ .\" .\" Copyright (c) 1983, 1990, 1993 .\" The Regents of the University of California. All rights reserved. @@ -29,7 +29,7 @@ .\" .\" @(#)intro.7 8.1 (Berkeley) 6/5/93 .\" -.Dd March 23, 2010 +.Dd November 30, 2010 .Dt INTRO 7 .Os .Sh NAME @@ -42,8 +42,12 @@ map of .Tn ASCII character set +.It Xr c 7 +the C programming language .It Xr environ 7 user environment +.It Xr glob 7 +shell-style pattern matching .\" .It Sy eqnchar .\" special character definitions for eqn .It Xr hier 7 @@ -70,6 +74,8 @@ overview of national language support .It Xr operator 7 C operator precedence and order of evaluation +.It Xr orders 7 +orders of magnitude .It Xr pkgsrc 7 the .Nx
CVS commit: src/lib/libc/gen
Module Name:src Committed By: jruoho Date: Tue Nov 30 21:03:07 UTC 2010 Modified Files: src/lib/libc/gen: fnmatch.3 glob.3 Log Message: Xref glob(7). To generate a diff of this commit: cvs rdiff -u -r1.21 -r1.22 src/lib/libc/gen/fnmatch.3 cvs rdiff -u -r1.38 -r1.39 src/lib/libc/gen/glob.3 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libc/gen/fnmatch.3 diff -u src/lib/libc/gen/fnmatch.3:1.21 src/lib/libc/gen/fnmatch.3:1.22 --- src/lib/libc/gen/fnmatch.3:1.21 Thu Aug 7 16:42:48 2003 +++ src/lib/libc/gen/fnmatch.3 Tue Nov 30 21:03:07 2010 @@ -1,4 +1,4 @@ -.\" $NetBSD: fnmatch.3,v 1.21 2003/08/07 16:42:48 agc Exp $ +.\" $NetBSD: fnmatch.3,v 1.22 2010/11/30 21:03:07 jruoho Exp $ .\" .\" Copyright (c) 1989, 1991, 1993 .\" The Regents of the University of California. All rights reserved. @@ -31,7 +31,7 @@ .\" .\" @(#)fnmatch.3 8.3 (Berkeley) 4/28/95 .\" -.Dd October 7, 2002 +.Dd November 30, 2010 .Dt FNMATCH 3 .Os .Sh NAME @@ -115,7 +115,8 @@ .Sh SEE ALSO .Xr sh 1 , .Xr glob 3 , -.Xr regex 3 +.Xr regex 3 , +.Xr glob 7 .Sh STANDARDS The .Fn fnmatch Index: src/lib/libc/gen/glob.3 diff -u src/lib/libc/gen/glob.3:1.38 src/lib/libc/gen/glob.3:1.39 --- src/lib/libc/gen/glob.3:1.38 Mon Sep 6 14:40:24 2010 +++ src/lib/libc/gen/glob.3 Tue Nov 30 21:03:07 2010 @@ -1,4 +1,4 @@ -.\" $NetBSD: glob.3,v 1.38 2010/09/06 14:40:24 christos Exp $ +.\" $NetBSD: glob.3,v 1.39 2010/11/30 21:03:07 jruoho Exp $ .\" .\" Copyright (c) 1989, 1991, 1993, 1994 .\" The Regents of the University of California. All rights reserved. @@ -31,7 +31,7 @@ .\" .\" @(#)glob.3 8.3 (Berkeley) 4/16/94 .\" -.Dd September 3, 2010 +.Dd November 30, 2010 .Dt GLOB 3 .Os .Sh NAME @@ -475,7 +475,8 @@ .Sh SEE ALSO .Xr sh 1 , .Xr fnmatch 3 , -.Xr regexp 3 +.Xr regexp 3 , +.Xr glob 7 .Sh STANDARDS The .Fn glob
CVS commit: src/share/man/man7
Module Name:src Committed By: jruoho Date: Tue Nov 30 21:00:00 UTC 2010 Modified Files: src/share/man/man7: c.7 Log Message: Fix botched CVS identifier. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 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.1 src/share/man/man7/c.7:1.2 --- src/share/man/man7/c.7:1.1 Tue Nov 30 20:50:28 2010 +++ src/share/man/man7/c.7 Tue Nov 30 20:59:59 2010 @@ -1,4 +1,4 @@ -.\" +.\" $NetBSD: c.7,v 1.2 2010/11/30 20:59:59 jruoho Exp $ .\" .\" Copyright (C) 2007, 2010 Gabor Kovesdan. All rights reserved. .\"
CVS commit: src
Module Name:src Committed By: jruoho Date: Tue Nov 30 20:59:10 UTC 2010 Modified Files: src/distrib/sets/lists/man: mi src/share/man/man7: Makefile Added Files: src/share/man/man7: glob.7 Log Message: Add glob(7). >From OpenBSD. Written by Todd C. Miller. To generate a diff of this commit: cvs rdiff -u -r1.1257 -r1.1258 src/distrib/sets/lists/man/mi cvs rdiff -u -r1.24 -r1.25 src/share/man/man7/Makefile cvs rdiff -u -r0 -r1.1 src/share/man/man7/glob.7 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.1257 src/distrib/sets/lists/man/mi:1.1258 --- src/distrib/sets/lists/man/mi:1.1257 Tue Nov 30 20:50:28 2010 +++ src/distrib/sets/lists/man/mi Tue Nov 30 20:59:10 2010 @@ -1,4 +1,4 @@ -# $NetBSD: mi,v 1.1257 2010/11/30 20:50:28 jruoho Exp $ +# $NetBSD: mi,v 1.1258 2010/11/30 20:59:10 jruoho Exp $ # # Note: don't delete entries from here - mark them as "obsolete" instead. # @@ -1963,6 +1963,7 @@ ./usr/share/man/cat7/c99.0 man-reference-catman .cat ./usr/share/man/cat7/des_modes.0 man-reference-catman crypto,.cat ./usr/share/man/cat7/environ.0 man-reference-catman .cat +./usr/share/man/cat7/glob.0 man-reference-catman .cat ./usr/share/man/cat7/hier.0 man-reference-catman .cat ./usr/share/man/cat7/hostname.0 man-reference-catman .cat ./usr/share/man/cat7/intro.0 man-reference-catman .cat @@ -4574,6 +4575,7 @@ ./usr/share/man/html7/c99.html man-reference-htmlman html ./usr/share/man/html7/des_modes.html man-reference-htmlman crypto,html ./usr/share/man/html7/environ.html man-reference-htmlman html +./usr/share/man/html7/glob.html man-reference-htmlman html ./usr/share/man/html7/hier.html man-reference-htmlman html ./usr/share/man/html7/hostname.html man-reference-htmlman html ./usr/share/man/html7/intro.html man-reference-htmlman html @@ -7161,6 +7163,7 @@ ./usr/share/man/man7/c99.7 man-reference-man .man ./usr/share/man/man7/des_modes.7 man-reference-man crypto,.man ./usr/share/man/man7/environ.7 man-reference-man .man +./usr/share/man/man7/glob.7 man-reference-man .man ./usr/share/man/man7/hier.7 man-reference-man .man ./usr/share/man/man7/hostname.7 man-reference-man .man ./usr/share/man/man7/intro.7 man-reference-man .man Index: src/share/man/man7/Makefile diff -u src/share/man/man7/Makefile:1.24 src/share/man/man7/Makefile:1.25 --- src/share/man/man7/Makefile:1.24 Tue Nov 30 20:50:28 2010 +++ src/share/man/man7/Makefile Tue Nov 30 20:59:10 2010 @@ -1,9 +1,9 @@ -# $NetBSD: Makefile,v 1.24 2010/11/30 20:50:28 jruoho Exp $ +# $NetBSD: Makefile,v 1.25 2010/11/30 20:59:10 jruoho Exp $ # @(#)Makefile 8.1 (Berkeley) 6/5/93 # missing: eqnchar.7 man.7 ms.7 term.7 -MAN= ascii.7 c.7 environ.7 hier.7 hostname.7 intro.7 mailaddr.7 \ +MAN= ascii.7 c.7 environ.7 glob.7 hier.7 hostname.7 intro.7 mailaddr.7 \ nls.7 operator.7 orders.7 pkgsrc.7 release.7 \ script.7 setuid.7 signal.7 sticky.7 symlink.7 sysctl.7 \ tests.7 Added files: Index: src/share/man/man7/glob.7 diff -u /dev/null src/share/man/man7/glob.7:1.1 --- /dev/null Tue Nov 30 20:59:11 2010 +++ src/share/man/man7/glob.7 Tue Nov 30 20:59:10 2010 @@ -0,0 +1,153 @@ +.\" $NetBSD: glob.7,v 1.1 2010/11/30 20:59:10 jruoho Exp $ +.\" +.\" $OpenBSD: glob.7,v 1.3 2009/12/26 15:24:54 schwarze Exp $ +.\" +.\" Copyright (c) 2009 Todd C. Miller +.\" +.\" Permission to use, copy, modify, and distribute this software for any +.\" purpose with or without fee is hereby granted, provided that the above +.\" copyright notice and this permission notice appear in all copies. +.\" +.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. +.\" +.Dd November 30, 2010 +.Dt GLOB 7 +.Os +.Sh NAME +.Nm glob +.Nd shell-style pattern matching +.Sh DESCRIPTION +Globbing characters +.Pq wildcards +are special characters used to perform pattern matching of pathnames and +command arguments in the +.Xr csh 1 , +.Xr ksh 1 , +and +.Xr sh 1 +shells as well as +the C library functions +.Xr fnmatch 3 +and +.Xr glob 3 . +A glob pattern is a word containing one or more unquoted +.Ql \&? +or +.Ql * +characters, or +.Dq [..] +sequences. +.Pp +Globs should not be confused with the more powerful +regular expressions used by programs such as +.Xr grep 1 . +While there is some overlap in the special characters used in regular +expressions and globs, their meaning is different. +.Pp +The patt
CVS commit: src
Module Name:src Committed By: jruoho Date: Tue Nov 30 20:50:29 UTC 2010 Modified Files: src/distrib/sets/lists/man: mi src/share/man/man7: Makefile Added Files: src/share/man/man7: c.7 Log Message: Add c(7). Pillaged from FreeBSD. Written by Gabor Kovesdan. To generate a diff of this commit: cvs rdiff -u -r1.1256 -r1.1257 src/distrib/sets/lists/man/mi cvs rdiff -u -r1.23 -r1.24 src/share/man/man7/Makefile cvs rdiff -u -r0 -r1.1 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/distrib/sets/lists/man/mi diff -u src/distrib/sets/lists/man/mi:1.1256 src/distrib/sets/lists/man/mi:1.1257 --- src/distrib/sets/lists/man/mi:1.1256 Tue Nov 30 20:19:30 2010 +++ src/distrib/sets/lists/man/mi Tue Nov 30 20:50:28 2010 @@ -1,4 +1,4 @@ -# $NetBSD: mi,v 1.1256 2010/11/30 20:19:30 jruoho Exp $ +# $NetBSD: mi,v 1.1257 2010/11/30 20:50:28 jruoho Exp $ # # Note: don't delete entries from here - mark them as "obsolete" instead. # @@ -1956,6 +1956,11 @@ ./usr/share/man/cat5/ypserv.acl.0 man-obsolete obsolete ./usr/share/man/cat7/ascii.0 man-reference-catman .cat ./usr/share/man/cat7/atf.0 man-atf-catman .cat,atf +./usr/share/man/cat7/c.0 man-reference-catman .cat +./usr/share/man/cat7/c78.0 man-reference-catman .cat +./usr/share/man/cat7/c89.0 man-reference-catman .cat +./usr/share/man/cat7/c90.0 man-reference-catman .cat +./usr/share/man/cat7/c99.0 man-reference-catman .cat ./usr/share/man/cat7/des_modes.0 man-reference-catman crypto,.cat ./usr/share/man/cat7/environ.0 man-reference-catman .cat ./usr/share/man/cat7/hier.0 man-reference-catman .cat @@ -4562,6 +4567,11 @@ ./usr/share/man/html5/wtmpx.html man-sys-htmlman html ./usr/share/man/html7/ascii.html man-reference-htmlman html ./usr/share/man/html7/atf.html man-atf-htmlman html,atf +./usr/share/man/html7/c.html man-reference-htmlman html +./usr/share/man/html7/c78.html man-reference-htmlman html +./usr/share/man/html7/c89.html man-reference-htmlman html +./usr/share/man/html7/c90.html man-reference-htmlman html +./usr/share/man/html7/c99.html man-reference-htmlman html ./usr/share/man/html7/des_modes.html man-reference-htmlman crypto,html ./usr/share/man/html7/environ.html man-reference-htmlman html ./usr/share/man/html7/hier.html man-reference-htmlman html @@ -7144,6 +7154,11 @@ ./usr/share/man/man5/ypserv.acl.5 man-obsolete obsolete ./usr/share/man/man7/ascii.7 man-reference-man .man ./usr/share/man/man7/atf.7 man-atf-man .man,atf +./usr/share/man/man7/c.7 man-reference-man .man +./usr/share/man/man7/c78.7 man-reference-man .man +./usr/share/man/man7/c89.7 man-reference-man .man +./usr/share/man/man7/c90.7 man-reference-man .man +./usr/share/man/man7/c99.7 man-reference-man .man ./usr/share/man/man7/des_modes.7 man-reference-man crypto,.man ./usr/share/man/man7/environ.7 man-reference-man .man ./usr/share/man/man7/hier.7 man-reference-man .man Index: src/share/man/man7/Makefile diff -u src/share/man/man7/Makefile:1.23 src/share/man/man7/Makefile:1.24 --- src/share/man/man7/Makefile:1.23 Tue Nov 30 20:19:31 2010 +++ src/share/man/man7/Makefile Tue Nov 30 20:50:28 2010 @@ -1,11 +1,16 @@ -# $NetBSD: Makefile,v 1.23 2010/11/30 20:19:31 jruoho Exp $ +# $NetBSD: Makefile,v 1.24 2010/11/30 20:50:28 jruoho Exp $ # @(#)Makefile 8.1 (Berkeley) 6/5/93 # missing: eqnchar.7 man.7 ms.7 term.7 -MAN= ascii.7 environ.7 hier.7 hostname.7 intro.7 mailaddr.7 \ +MAN= ascii.7 c.7 environ.7 hier.7 hostname.7 intro.7 mailaddr.7 \ nls.7 operator.7 orders.7 pkgsrc.7 release.7 \ script.7 setuid.7 signal.7 sticky.7 symlink.7 sysctl.7 \ tests.7 +MLINKS+=c.7 c78.7 \ + c.7 c89.7 \ + c.7 c90.7 \ + c.7 c99.7 + .include Added files: Index: src/share/man/man7/c.7 diff -u /dev/null src/share/man/man7/c.7:1.1 --- /dev/null Tue Nov 30 20:50:29 2010 +++ src/share/man/man7/c.7 Tue Nov 30 20:50:28 2010 @@ -0,0 +1,195 @@ +.\" +.\" +.\" Copyright (C) 2007, 2010 Gabor Kovesdan. 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 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 AUTHOR OR CONTRIBUTORS BE LIABLE +.\" FOR ANY DIRECT, INDIRECT, INCID
CVS commit: src/lib/librumpuser
Module Name:src Committed By: pooka Date: Tue Nov 30 20:33:44 UTC 2010 Modified Files: src/lib/librumpuser: sp_common.c Log Message: Hands off of stuff we need to keep hands off of. To generate a diff of this commit: cvs rdiff -u -r1.13 -r1.14 src/lib/librumpuser/sp_common.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/librumpuser/sp_common.c diff -u src/lib/librumpuser/sp_common.c:1.13 src/lib/librumpuser/sp_common.c:1.14 --- src/lib/librumpuser/sp_common.c:1.13 Mon Nov 29 16:08:03 2010 +++ src/lib/librumpuser/sp_common.c Tue Nov 30 20:33:43 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: sp_common.c,v 1.13 2010/11/29 16:08:03 pooka Exp $ */ +/* $NetBSD: sp_common.c,v 1.14 2010/11/30 20:33:43 pooka Exp $ */ /* * Copyright (c) 2010 Antti Kantee. All Rights Reserved. @@ -282,6 +282,7 @@ kickwaiter(struct spclient *spc) { struct respwait *rw; + int error; pthread_mutex_lock(&spc->spc_mtx); TAILQ_FOREACH(rw, &spc->spc_respwait, rw_entries) { @@ -297,14 +298,14 @@ rw->rw_data = spc->spc_buf; rw->rw_dlen = (size_t)(spc->spc_off - HDRSZ); if (spc->spc_hdr.rsp_class == RUMPSP_ERROR) { - rw->rw_error = spc->spc_hdr.rsp_error; + error = rw->rw_error = spc->spc_hdr.rsp_error; } else { - rw->rw_error = 0; + error = rw->rw_error = 0; } pthread_cond_signal(&rw->rw_cv); pthread_mutex_unlock(&spc->spc_mtx); - if (rw->rw_error) + if (error) spcfreebuf(spc); else spcresetbuf(spc);
CVS commit: src
Module Name:src Committed By: jruoho Date: Tue Nov 30 20:19:31 UTC 2010 Modified Files: src/distrib/sets/lists/man: mi src/share/man/man7: Makefile Added Files: src/share/man/man7: orders.7 Log Message: Add orders(7) as a miscellaneous manual page. To generate a diff of this commit: cvs rdiff -u -r1.1255 -r1.1256 src/distrib/sets/lists/man/mi cvs rdiff -u -r1.22 -r1.23 src/share/man/man7/Makefile cvs rdiff -u -r0 -r1.1 src/share/man/man7/orders.7 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.1255 src/distrib/sets/lists/man/mi:1.1256 --- src/distrib/sets/lists/man/mi:1.1255 Sun Nov 28 01:58:39 2010 +++ src/distrib/sets/lists/man/mi Tue Nov 30 20:19:30 2010 @@ -1,4 +1,4 @@ -# $NetBSD: mi,v 1.1255 2010/11/28 01:58:39 christos Exp $ +# $NetBSD: mi,v 1.1256 2010/11/30 20:19:30 jruoho Exp $ # # Note: don't delete entries from here - mark them as "obsolete" instead. # @@ -1968,6 +1968,7 @@ ./usr/share/man/cat7/miscellaneous.0 man-obsolete obsolete ./usr/share/man/cat7/msafer.0 man-obsolete obsolete ./usr/share/man/cat7/nls.0 man-reference-catman .cat +./usr/share/man/cat7/orders.0 man-reference-catman .cat ./usr/share/man/cat7/packages.0 man-obsolete obsolete ./usr/share/man/cat7/pkgsrc.0 man-reference-catman .cat ./usr/share/man/cat7/re_format.0 man-reference-catman .cat @@ -4570,6 +4571,7 @@ ./usr/share/man/html7/mailaddr.html man-reference-htmlman html ./usr/share/man/html7/mdoc.html man-groff-htmlman html,groff ./usr/share/man/html7/nls.html man-reference-htmlman html +./usr/share/man/html7/orders.html man-reference-htmlman html ./usr/share/man/html7/pkgsrc.html man-reference-htmlman html ./usr/share/man/html7/re_format.html man-reference-htmlman html ./usr/share/man/html7/release.html man-reference-htmlman html @@ -7153,6 +7155,7 @@ ./usr/share/man/man7/mdoc.7 man-groff-man .man,groff ./usr/share/man/man7/msafer.7 man-obsolete obsolete ./usr/share/man/man7/nls.7 man-reference-man .man +./usr/share/man/man7/orders.7 man-reference-man .man ./usr/share/man/man7/packages.7 man-obsolete obsolete ./usr/share/man/man7/pkgsrc.7 man-reference-man .man ./usr/share/man/man7/re_format.7 man-reference-man .man Index: src/share/man/man7/Makefile diff -u src/share/man/man7/Makefile:1.22 src/share/man/man7/Makefile:1.23 --- src/share/man/man7/Makefile:1.22 Sat Jun 26 11:15:27 2010 +++ src/share/man/man7/Makefile Tue Nov 30 20:19:31 2010 @@ -1,10 +1,10 @@ -# $NetBSD: Makefile,v 1.22 2010/06/26 11:15:27 jmmv Exp $ +# $NetBSD: Makefile,v 1.23 2010/11/30 20:19:31 jruoho Exp $ # @(#)Makefile 8.1 (Berkeley) 6/5/93 # missing: eqnchar.7 man.7 ms.7 term.7 MAN= ascii.7 environ.7 hier.7 hostname.7 intro.7 mailaddr.7 \ - nls.7 operator.7 pkgsrc.7 release.7 \ + nls.7 operator.7 orders.7 pkgsrc.7 release.7 \ script.7 setuid.7 signal.7 sticky.7 symlink.7 sysctl.7 \ tests.7 Added files: Index: src/share/man/man7/orders.7 diff -u /dev/null src/share/man/man7/orders.7:1.1 --- /dev/null Tue Nov 30 20:19:31 2010 +++ src/share/man/man7/orders.7 Tue Nov 30 20:19:31 2010 @@ -0,0 +1,87 @@ +.\" $NetBSD: orders.7,v 1.1 2010/11/30 20:19:31 jruoho Exp $ +.\" +.\" Copyright (c) 2010 The NetBSD Foundation, Inc. +.\" All rights reserved. +.\" +.\" This code is derived from software contributed to The NetBSD Foundation +.\" by Jukka Ruohonen. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\"notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\"notice, this list of conditions and the following disclaimer in the +.\"documentation and/or other materials provided with the distribution. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS +.\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED +.\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +.\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS +.\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +.\" POSSIBILITY OF SUCH DAMAGE. +.\" +.Dd November 30, 2010 +.Dt ORDERS 7 +.Os +.Sh NAME +.Nm orders +.Nd orders of magnitude +.Sh DESCRIPTION +
CVS commit: src/lib/librumpvfs
Module Name:src Committed By: pooka Date: Tue Nov 30 19:50:26 UTC 2010 Modified Files: src/lib/librumpvfs: rump_etfs.3 Log Message: Add missing .El Maybe next we can have typoed comments break builds? To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/lib/librumpvfs/rump_etfs.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/librumpvfs/rump_etfs.3 diff -u src/lib/librumpvfs/rump_etfs.3:1.2 src/lib/librumpvfs/rump_etfs.3:1.3 --- src/lib/librumpvfs/rump_etfs.3:1.2 Tue Nov 30 18:08:46 2010 +++ src/lib/librumpvfs/rump_etfs.3 Tue Nov 30 19:50:25 2010 @@ -1,4 +1,4 @@ -.\" $NetBSD: rump_etfs.3,v 1.2 2010/11/30 18:08:46 pooka Exp $ +.\" $NetBSD: rump_etfs.3,v 1.3 2010/11/30 19:50:25 pooka Exp $ .\" .\" Copyright (c) 2010 Antti Kantee. All rights reserved. .\" @@ -120,6 +120,7 @@ .Fa key . This routine may be called only if the file related to the mapping is not in use. +.El .Sh EXAMPLES Map a host image file to a mountable /dev/harddisk path using window offsets from the disklabel.
CVS commit: src/share/misc
Module Name:src Committed By: jruoho Date: Tue Nov 30 19:07:15 UTC 2010 Modified Files: src/share/misc: acronyms Log Message: Add numerous entries from Roland Kammerer. Couple of good ones, FTFY, AMOL, AINEC, GLHF, IAWTC, OOI, OWTTE, ... To generate a diff of this commit: cvs rdiff -u -r1.193 -r1.194 src/share/misc/acronyms Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/misc/acronyms diff -u src/share/misc/acronyms:1.193 src/share/misc/acronyms:1.194 --- src/share/misc/acronyms:1.193 Sun Nov 28 16:08:28 2010 +++ src/share/misc/acronyms Tue Nov 30 19:07:15 2010 @@ -1,23 +1,34 @@ -$NetBSD: acronyms,v 1.193 2010/11/28 16:08:28 is Exp $ +$NetBSD: acronyms,v 1.194 2010/11/30 19:07:15 jruoho Exp $ +10Q thank you +10X thanks +1337 leet/elite +224 today, tomorrow, forever +4TW for the win +AC audible chuckle AEAP as early as possible +AFAIAC as far as I am concerned AFAIC as far as I'm concerned AFAICR as far as I can recall +AFAICS as far as I can see AFAICT as far as I can tell AFAIK as far as I know -AFAIR as far as I recall +AFAIR as far as I {recall, remember} AFAIU as far as I understand AFD away from desktop AFK away from keyboard AFU all fucked up AFW away from window +AINEC and it's not even close AIU as I understand AIUI as I understand it AKA also known as +AMOL a mountain of love ASAIC as soon as I can ASAP as soon as possible ATEOTD at the end of the day ATM at the moment ATM automatic teller machine +ATW around the world AWOL absent without official leave AYBABTU all your base are belong to us AYT are you there @@ -31,14 +42,18 @@ BBT be back tomorrow BCNU be seeing you BCNUL8R be seeing you later +BF best friend +BF boyfriend BCP best current practice BFD big fucking deal +BFF best friend forever BFH big fucking hammer BIAB back in a bit BIAF back in a few BIALW back in a little while BIAS back in a second BIAW back in a while +BNYA burned now you are BOATILAS bend over and take it like a slut BOFH bastard operator from hell BOGAHICA bend over, grab ankles, here it comes again @@ -57,6 +72,7 @@ CU see you CYA see you around D/L download +DBEYR don't believe everything you read DGAS don't give a shit DIY do it yourself DKDC don't know, don't care @@ -74,25 +90,34 @@ EOL end of life EOM end of message ETA estimated time of arrival +ETA edited to add ETLA extended three letter acronym EWAG experienced wild-ass guess +F9 fine FAQ frequently asked question FCFS first come first served FFS for fuck's sake +FFS free for shipping FIGJAM fuck I'm good, just ask me FIIK fuck[ed] if I know FIIR fuck[ed] if I remember FM fucking magic +FML fuck my life FNO from now on FNO for nerds only FOAD {fuck off,fall over} and die FOS full of shit +FSCK fuck FSDO for some definition of FSVO for some value of FTBFS fails to build from source +FTFA from the fucking article FTFM fuck the fuckin' manual! +FTFY fixed that for you FTHOI for the {heck,hell} of it FTL for the loss +FTMFW for the motherfucking win +FTS fuck that shit FTW for the win FUBAR fucked up beyond all recognition FUD fear, uncertainty and doubt @@ -100,18 +125,29 @@ FYI for your information G grin G/C garbage collect +G2G got to go +G2K good to know GAC get a clue GAL get a life GBTW get back to work +GF girlfriend GFU good for you +GFY good for you +GFY go fuck yourself GIGO garbage in, garbage out +GIYF google is your friend GJ good job GL good luck +GLHF good luck, have fun GMTA great minds think alike +GR8 great GTFO get the fuck out GTG got to go +GTH go to hell GWS get well soon +H8 hate HAND have a nice day +HE how embarrasing HF have fun HFIW HOLY FUCK IT WORKS HHIS hanging head in shame @@ -122,10 +158,12 @@ HTH hope this helps IAC in any case IANAL I am not a lawyer +IAWTC I agree with this comment IC I see ICBW I could be wrong ICCL I couldn't care less IDK I don't know +IDRC I don't really care IHAFC I haven't a fucking clue IHBW I have been wrong IHNFC I have no fucking clue @@ -140,6 +178,7 @@ IMNSHO in my not so humble opinion IMO in my opinion IOW in other words +IPML I pissed myself laughing IRL in real life ISAGN I see a great need ISTM it seems to me @@ -160,17 +199,26 @@ JTLYK just to let you know KISS keep it simple, stupid KITA kick in the ass +KK okay, okay KNF kernel normal form KOS kill on sight +KTHX okay, thanks +L8 late L8R later LART luser attitude readjustment tool (ie, hammer) LBNL last but not least LGTM looks good to me LJBF let's just be friends LMAO laughing my ass off +LMB lick my balls +LMFAO laughing my fucking ass off +LMHO laughing my head off +LMNO laughing my nuts off LMSO laughing my socks off LOL laughing out loud LTNS long time no see +LWYL laugh with you later +M8 mate MIA missing in action MOTAS member of the appropriate sex MOTOS member of the opposite sex @@ -178,7 +
CVS commit: src/tests/dev/md
Module Name:src Committed By: pooka Date: Tue Nov 30 19:03:44 UTC 2010 Modified Files: src/tests/dev/md: Makefile Log Message: don't include librump twice To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/tests/dev/md/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/tests/dev/md/Makefile diff -u src/tests/dev/md/Makefile:1.1 src/tests/dev/md/Makefile:1.2 --- src/tests/dev/md/Makefile:1.1 Tue Nov 23 15:38:54 2010 +++ src/tests/dev/md/Makefile Tue Nov 30 19:03:44 2010 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.1 2010/11/23 15:38:54 pooka Exp $ +# $NetBSD: Makefile,v 1.2 2010/11/30 19:03:44 pooka Exp $ # .include @@ -14,7 +14,6 @@ LDADD+= -lrumpdev_md -lrumpdev_disk -lrumpdev -lrumpvfs LDADD+= -lrump LDADD+= -lrumpuser -LDADD+= -lrump LDADD+= -lpthread WARNS= 4
CVS commit: src/sys/arch/x86/acpi
Module Name:src Committed By: jruoho Date: Tue Nov 30 18:44:07 UTC 2010 Modified Files: src/sys/arch/x86/acpi: acpi_cpu_md.c Log Message: Fix boolean brain freeze. To generate a diff of this commit: cvs rdiff -u -r1.35 -r1.36 src/sys/arch/x86/acpi/acpi_cpu_md.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/x86/acpi/acpi_cpu_md.c diff -u src/sys/arch/x86/acpi/acpi_cpu_md.c:1.35 src/sys/arch/x86/acpi/acpi_cpu_md.c:1.36 --- src/sys/arch/x86/acpi/acpi_cpu_md.c:1.35 Tue Nov 30 04:31:00 2010 +++ src/sys/arch/x86/acpi/acpi_cpu_md.c Tue Nov 30 18:44:07 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: acpi_cpu_md.c,v 1.35 2010/11/30 04:31:00 jruoho Exp $ */ +/* $NetBSD: acpi_cpu_md.c,v 1.36 2010/11/30 18:44:07 jruoho Exp $ */ /*- * Copyright (c) 2010 Jukka Ruohonen @@ -27,7 +27,7 @@ * SUCH DAMAGE. */ #include -__KERNEL_RCSID(0, "$NetBSD: acpi_cpu_md.c,v 1.35 2010/11/30 04:31:00 jruoho Exp $"); +__KERNEL_RCSID(0, "$NetBSD: acpi_cpu_md.c,v 1.36 2010/11/30 18:44:07 jruoho Exp $"); #include #include @@ -603,7 +603,11 @@ xc = xc_broadcast(0, (xcfunc_t)x86_msr_xcall, &msr, NULL); xc_wait(xc); - if (acpicpu_pstate_status != false) { + /* + * Due several problems, we bypass the + * relatively expensive status check. + */ + if (acpicpu_pstate_status != true) { DELAY(ps->ps_latency); return 0; }
CVS commit: src/tests/lib
Module Name:src Committed By: joerg Date: Tue Nov 30 18:38:54 UTC 2010 Modified Files: src/tests/lib/csu: Makefile h_initfini_common.cxx src/tests/lib/csu/dso: Makefile h_initfini3_dso.cxx src/tests/lib/libpthread: Makefile t_join.c Added Files: src/tests/lib/csu: Makefile.check_stack src/tests/lib/csu/dso: h_initfini_align.S h_initfini_align.S Log Message: Test alignment of constructor / destructor calls as well as the stack of new threads. Currently implement for i386 and AMD64. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/tests/lib/csu/Makefile cvs rdiff -u -r0 -r1.1 src/tests/lib/csu/Makefile.check_stack cvs rdiff -u -r1.1 -r1.2 src/tests/lib/csu/h_initfini_common.cxx cvs rdiff -u -r1.3 -r1.4 src/tests/lib/csu/dso/Makefile cvs rdiff -u -r1.1 -r1.2 src/tests/lib/csu/dso/h_initfini3_dso.cxx cvs rdiff -u -r0 -r1.1 src/tests/lib/csu/dso/h_initfini_align.S cvs rdiff -u -r0 -r1.2 src/tests/lib/csu/dso/h_initfini_align.S cvs rdiff -u -r1.2 -r1.3 src/tests/lib/libpthread/Makefile cvs rdiff -u -r1.4 -r1.5 src/tests/lib/libpthread/t_join.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/tests/lib/csu/Makefile diff -u src/tests/lib/csu/Makefile:1.2 src/tests/lib/csu/Makefile:1.3 --- src/tests/lib/csu/Makefile:1.2 Wed Jul 28 13:51:38 2010 +++ src/tests/lib/csu/Makefile Tue Nov 30 18:38:53 2010 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.2 2010/07/28 13:51:38 joerg Exp $ +# $NetBSD: Makefile,v 1.3 2010/11/30 18:38:53 joerg Exp $ NOMAN= # defined @@ -9,12 +9,19 @@ TESTS_SUBDIRS= SUBDIR+= dso +.include "Makefile.check_stack" + +CPPFLAGS+= ${CPPFLAGS_CHECK_STACK} + BINDIR= ${TESTSDIR} PROG_CXX= h_initfini1 h_initfini2 h_initfini3 -SRCS.h_initfini1= h_initfini1.cxx h_initfini_common.cxx -SRCS.h_initfini2= h_initfini1.cxx h_initfini_common.cxx +SRCS.h_initfini1= h_initfini1.cxx h_initfini_common.cxx \ + ${SRCS_CHECK_STACK} +SRCS.h_initfini2= h_initfini1.cxx h_initfini_common.cxx \ + ${SRCS_CHECK_STACK} LDADD.h_initfini2+= -static -SRCS.h_initfini3= h_initfini3.cxx h_initfini_common.cxx +SRCS.h_initfini3= h_initfini3.cxx h_initfini_common.cxx \ + ${SRCS_CHECK_STACK} LDADD.h_initfini3+= -Wl,-rpath,${TESTSDIR} .include Index: src/tests/lib/csu/h_initfini_common.cxx diff -u src/tests/lib/csu/h_initfini_common.cxx:1.1 src/tests/lib/csu/h_initfini_common.cxx:1.2 --- src/tests/lib/csu/h_initfini_common.cxx:1.1 Wed Jul 28 13:51:38 2010 +++ src/tests/lib/csu/h_initfini_common.cxx Tue Nov 30 18:38:53 2010 @@ -1,16 +1,36 @@ #include +#ifdef CHECK_STACK_ALIGNMENT +#include + +extern "C" int check_stack_alignment(void); +#endif + class Test { public: Test() { static const char msg[] = "constructor executed\n"; write(STDOUT_FILENO, msg, sizeof(msg) - 1); +#ifdef CHECK_STACK_ALIGNMENT + if (!check_stack_alignment()) { + static const char msg2[] = "stack unaligned \n"; + write(STDOUT_FILENO, msg2, sizeof(msg2) - 1); + exit(1); + } +#endif } ~Test() { static const char msg[] = "destructor executed\n"; write(STDOUT_FILENO, msg, sizeof(msg) - 1); +#ifdef CHECK_STACK_ALIGNMENT + if (!check_stack_alignment()) { + static const char msg2[] = "stack unaligned \n"; + write(STDOUT_FILENO, msg2, sizeof(msg2) - 1); + exit(1); + } +#endif } }; Index: src/tests/lib/csu/dso/Makefile diff -u src/tests/lib/csu/dso/Makefile:1.3 src/tests/lib/csu/dso/Makefile:1.4 --- src/tests/lib/csu/dso/Makefile:1.3 Wed Aug 4 13:56:10 2010 +++ src/tests/lib/csu/dso/Makefile Tue Nov 30 18:38:53 2010 @@ -1,11 +1,14 @@ -# $NetBSD: Makefile,v 1.3 2010/08/04 13:56:10 joerg Exp $ +# $NetBSD: Makefile,v 1.4 2010/11/30 18:38:53 joerg Exp $ NOMAN= # defined .include +.include "${.PARSEDIR}/../Makefile.check_stack" + LIB= h_initfini3_dso -SRCS= h_initfini3_dso.cxx +SRCS= h_initfini3_dso.cxx ${SRCS_CHECK_STACK} +CPPFLAGS+= ${CPPFLAGS_CHECK_STACK} LIBDIR= ${TESTSBASE}/lib/csu SHLIBDIR= ${TESTSBASE}/lib/csu @@ -14,4 +17,5 @@ LIBISMODULE= yes LIBISCXX= yes + .include Index: src/tests/lib/csu/dso/h_initfini3_dso.cxx diff -u src/tests/lib/csu/dso/h_initfini3_dso.cxx:1.1 src/tests/lib/csu/dso/h_initfini3_dso.cxx:1.2 --- src/tests/lib/csu/dso/h_initfini3_dso.cxx:1.1 Wed Jul 28 13:51:40 2010 +++ src/tests/lib/csu/dso/h_initfini3_dso.cxx Tue Nov 30 18:38:54 2010 @@ -1,16 +1,36 @@ #include +#ifdef CHECK_STACK_ALIGNMENT +#include + +extern "C" int check_stack_alignment(void); +#endif + class Test2 { public: Test2() { static const char msg[] = "constructor2 executed\n"; write(STDOUT_FILENO, msg, sizeof(msg) - 1); +#ifdef CHECK_STACK_ALIGNMENT + if (!check_stack_alignment()) { + static const char msg2[] = "stack unaligned \n"; + write(STDOUT_FILENO, msg2, sizeof(msg2) - 1); + exit(1); + } +#endif } ~Test2() { static const char msg[] = "destructor2 executed\n"; write(STDOUT_FILENO, msg
CVS commit: src/lib/csu/arch/x86_64
Module Name:src Committed By: joerg Date: Tue Nov 30 18:37:59 UTC 2010 Modified Files: src/lib/csu/arch/x86_64: crtbegin.S Log Message: Fix stack alignment for non-constructor/destructor calls. AMD64 stack is 16 Byte aligned at the start of the function, so always push rbx. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/lib/csu/arch/x86_64/crtbegin.S Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/csu/arch/x86_64/crtbegin.S diff -u src/lib/csu/arch/x86_64/crtbegin.S:1.1 src/lib/csu/arch/x86_64/crtbegin.S:1.2 --- src/lib/csu/arch/x86_64/crtbegin.S:1.1 Sat Aug 7 18:01:34 2010 +++ src/lib/csu/arch/x86_64/crtbegin.S Tue Nov 30 18:37:59 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: crtbegin.S,v 1.1 2010/08/07 18:01:34 joerg Exp $ */ +/* $NetBSD: crtbegin.S,v 1.2 2010/11/30 18:37:59 joerg Exp $ */ /*- * Copyright (c) 2010 Joerg Sonnenberger * All rights reserved. @@ -30,7 +30,7 @@ #include -RCSID("$NetBSD: crtbegin.S,v 1.1 2010/08/07 18:01:34 joerg Exp $") +RCSID("$NetBSD: crtbegin.S,v 1.2 2010/11/30 18:37:59 joerg Exp $") .section .ctors, "aw", @progbits .align 8 @@ -82,6 +82,7 @@ je 1f ret 1: + pushq %rbx movb $1, __finished(%rip) @@ -93,7 +94,6 @@ 2: #endif - pushq %rbx leaq 8+__DTOR_LIST__(%rip), %rbx 3: movq (%rbx), %rax @@ -103,14 +103,13 @@ addq $8, %rbx jmp 3b 4: - popq %rbx cmpq $0, __deregister_frame_i...@gotpcrel(%rip) je 5f leaq __EH_FRAME_LIST__(%rip), %rdi call __deregister_frame_i...@plt 5: - + popq %rbx ret @@ -119,6 +118,7 @@ je 1f ret 1: + pushq %rbx movb $1, __initialized(%rip) cmpq $0, __register_frame_i...@gotpcrel(%rip) @@ -136,7 +136,6 @@ call _jv_registerclas...@plt 3: - pushq %rbx leaq -8+__CTOR_LIST_END__(%rip), %rbx 4: movq (%rbx), %rax
CVS commit: src/sys/rump/librump/rumpvfs
Module Name:src Committed By: pooka Date: Tue Nov 30 18:20:41 UTC 2010 Modified Files: src/sys/rump/librump/rumpvfs: rumpfs.c Log Message: simplify To generate a diff of this commit: cvs rdiff -u -r1.76 -r1.77 src/sys/rump/librump/rumpvfs/rumpfs.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/rump/librump/rumpvfs/rumpfs.c diff -u src/sys/rump/librump/rumpvfs/rumpfs.c:1.76 src/sys/rump/librump/rumpvfs/rumpfs.c:1.77 --- src/sys/rump/librump/rumpvfs/rumpfs.c:1.76 Tue Nov 30 10:48:27 2010 +++ src/sys/rump/librump/rumpvfs/rumpfs.c Tue Nov 30 18:20:41 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: rumpfs.c,v 1.76 2010/11/30 10:48:27 dholland Exp $ */ +/* $NetBSD: rumpfs.c,v 1.77 2010/11/30 18:20:41 pooka Exp $ */ /* * Copyright (c) 2009, 2010 Antti Kantee. All Rights Reserved. @@ -26,7 +26,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: rumpfs.c,v 1.76 2010/11/30 10:48:27 dholland Exp $"); +__KERNEL_RCSID(0, "$NetBSD: rumpfs.c,v 1.77 2010/11/30 18:20:41 pooka Exp $"); #include #include @@ -661,16 +661,8 @@ mutex_exit(&etfs_lock); if (found) { - const char *offset; - - /* pointless as et_key is always the whole string */ - /*offset = strstr(cnp->cn_nameptr, et->et_key);*/ - offset = cnp->cn_nameptr; - KASSERT(offset); - rn = et->et_rn; - cnp->cn_consume += et->et_keylen - - (cnp->cn_nameptr - offset) - cnp->cn_namelen; + cnp->cn_consume += et->et_keylen - cnp->cn_namelen; if (rn->rn_va.va_type != VDIR) cnp->cn_flags &= ~REQUIREDIR; goto getvnode;
CVS commit: src/tests/rump/rumpvfs
Module Name:src Committed By: pooka Date: Tue Nov 30 18:19:47 UTC 2010 Modified Files: src/tests/rump/rumpvfs: t_etfs.c Log Message: one more test To generate a diff of this commit: cvs rdiff -u -r1.8 -r1.9 src/tests/rump/rumpvfs/t_etfs.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/tests/rump/rumpvfs/t_etfs.c diff -u src/tests/rump/rumpvfs/t_etfs.c:1.8 src/tests/rump/rumpvfs/t_etfs.c:1.9 --- src/tests/rump/rumpvfs/t_etfs.c:1.8 Tue Nov 30 18:14:38 2010 +++ src/tests/rump/rumpvfs/t_etfs.c Tue Nov 30 18:19:47 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: t_etfs.c,v 1.8 2010/11/30 18:14:38 pooka Exp $ */ +/* $NetBSD: t_etfs.c,v 1.9 2010/11/30 18:19:47 pooka Exp $ */ /*- * Copyright (c) 2010 The NetBSD Foundation, Inc. @@ -279,9 +279,12 @@ RL(rump_sys_open("/key//with/slashes", O_RDONLY)); RL(rump_sys_open("key//with/slashes", O_RDONLY)); - ATF_REQUIRE_ERRNO(ENOENT, rump_sys_open("/key/with/slashes", O_RDONLY) == -1); + + RL(rump_sys_mkdir("/a", 0777)); + ATF_REQUIRE_ERRNO(ENOENT, + rump_sys_open("/a/key//with/slashes", O_RDONLY) == -1); } ATF_TP_ADD_TCS(tp)
CVS commit: src/tests/rump/rumpvfs
Module Name:src Committed By: pooka Date: Tue Nov 30 18:14:38 UTC 2010 Modified Files: src/tests/rump/rumpvfs: t_etfs.c Log Message: check etfs key rules To generate a diff of this commit: cvs rdiff -u -r1.7 -r1.8 src/tests/rump/rumpvfs/t_etfs.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/tests/rump/rumpvfs/t_etfs.c diff -u src/tests/rump/rumpvfs/t_etfs.c:1.7 src/tests/rump/rumpvfs/t_etfs.c:1.8 --- src/tests/rump/rumpvfs/t_etfs.c:1.7 Sun Nov 7 17:51:21 2010 +++ src/tests/rump/rumpvfs/t_etfs.c Tue Nov 30 18:14:38 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: t_etfs.c,v 1.7 2010/11/07 17:51:21 jmmv Exp $ */ +/* $NetBSD: t_etfs.c,v 1.8 2010/11/30 18:14:38 pooka Exp $ */ /*- * Copyright (c) 2010 The NetBSD Foundation, Inc. @@ -253,6 +253,37 @@ ATF_REQUIRE_EQ(memcmp(buf, cmpbuf, sizeof(buf)), 0); } +ATF_TC(key); +ATF_TC_HEAD(key, tc) +{ + + atf_tc_set_md_var(tc, "descr", "Checks key format"); +} + +ATF_TC_BODY(key, tc) +{ + + RZ(rump_init()); + + RL(open("hostfile", O_RDWR | O_CREAT, 0777)); + + RZ(rump_pub_etfs_register("/key", "hostfile", RUMP_ETFS_REG)); + ATF_REQUIRE_EQ(rump_pub_etfs_register("key", "hostfile", RUMP_ETFS_REG), + EINVAL); + + RL(rump_sys_open("/key", O_RDONLY)); + RL(rump_sys_open("key", O_RDONLY)); + + RZ(rump_pub_etfs_register("key//with/slashes", "hostfile", + RUMP_ETFS_REG)); + + RL(rump_sys_open("/key//with/slashes", O_RDONLY)); + RL(rump_sys_open("key//with/slashes", O_RDONLY)); + + ATF_REQUIRE_ERRNO(ENOENT, + rump_sys_open("/key/with/slashes", O_RDONLY) == -1); +} + ATF_TP_ADD_TCS(tp) { @@ -260,6 +291,7 @@ ATF_TP_ADD_TC(tp, reregister_blk); ATF_TP_ADD_TC(tp, large_blk); ATF_TP_ADD_TC(tp, range_blk); + ATF_TP_ADD_TC(tp, key); return atf_no_error(); }
CVS commit: src/lib/librumpvfs
Module Name:src Committed By: pooka Date: Tue Nov 30 18:08:46 UTC 2010 Modified Files: src/lib/librumpvfs: rump_etfs.3 Log Message: ahem, use public interface names in the doc To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/lib/librumpvfs/rump_etfs.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/librumpvfs/rump_etfs.3 diff -u src/lib/librumpvfs/rump_etfs.3:1.1 src/lib/librumpvfs/rump_etfs.3:1.2 --- src/lib/librumpvfs/rump_etfs.3:1.1 Tue Nov 30 17:32:29 2010 +++ src/lib/librumpvfs/rump_etfs.3 Tue Nov 30 18:08:46 2010 @@ -1,4 +1,4 @@ -.\" $NetBSD: rump_etfs.3,v 1.1 2010/11/30 17:32:29 pooka Exp $ +.\" $NetBSD: rump_etfs.3,v 1.2 2010/11/30 18:08:46 pooka Exp $ .\" .\" Copyright (c) 2010 Antti Kantee. All rights reserved. .\" @@ -34,16 +34,16 @@ .Sh SYNOPSIS .In rump/rump.h .Ft int -.Fo etfs_register +.Fo rump_pub_etfs_register .Fa "const char *key" "const char *hostpath" "enum rump_etfs_type ftype" .Fc .Ft int -.Fo etfs_register_withsize +.Fo rump_pub_etfs_register_withsize .Fa "const char *key" "const char *hostpath" "enum rump_etfs_type ftype" .Fa "uint64_t begin" "uint64_t end" .Fc .Ft int -.Fn etfs_remove "const char *key" +.Fn rump_pub_etfs_remove "const char *key" .Sh DESCRIPTION The rump ExtraTerrestrial File System .Nm ( ) @@ -101,21 +101,21 @@ .Pp The interfaces are: .Bl -tag -width -.It Fn etfs_register "key" "hostpath" "ftype" +.It Fn rump_pub_etfs_register "key" "hostpath" "ftype" Map .Fa key to a file of type .Fa ftype with the contents of .Fa hostpath . -.It Fn etfs_register_withsize "key" "hostpath" "ftype" "begin" "size" +.It Fn rump_pub_etfs_register_withsize "key" "hostpath" "ftype" "begin" "size" Like the above, but map only .Fa [ begin , begin+size ] from .Fa hostpath . This is useful when mapping disk images where only one partition is relevant to the application. -.It Fn etfs_remove "key" +.It Fn rump_pub_etfs_remove "key" Remove etfs mapping for .Fa key . This routine may be called only if the file related to the mapping @@ -124,7 +124,7 @@ Map a host image file to a mountable /dev/harddisk path using window offsets from the disklabel. .Bd -literal -offset indent -rump_etfs_register_withsize("/dev/harddisk", "disk.img", +rump_pub_etfs_register_withsize("/dev/harddisk", "disk.img", RUMP_ETFS_BLK, pp->p_offset << DEV_BSHIFT, pp->p_size << DEV_BSHIFT); .Ed @@ -132,7 +132,7 @@ Make the host kernel module directory hierarchy available within the rump kernel. .Bd -literal -offset indent -rump_etfs_register("/stand/i386/5.99.41", +rump_pub_etfs_register("/stand/i386/5.99.41", "/stand/i386/5.99.41", RUMP_ETFS_DIR_SUBDIRS); .Ed .Sh SEE ALSO
CVS commit: src
Module Name:src Committed By: pooka Date: Tue Nov 30 17:32:29 UTC 2010 Modified Files: src/distrib/sets/lists/comp: mi src/lib/librumpvfs: Makefile Added Files: src/lib/librumpvfs: rump_etfs.3 Log Message: document rump_etfs To generate a diff of this commit: cvs rdiff -u -r1.1526 -r1.1527 src/distrib/sets/lists/comp/mi cvs rdiff -u -r1.2 -r1.3 src/lib/librumpvfs/Makefile cvs rdiff -u -r0 -r1.1 src/lib/librumpvfs/rump_etfs.3 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/distrib/sets/lists/comp/mi diff -u src/distrib/sets/lists/comp/mi:1.1526 src/distrib/sets/lists/comp/mi:1.1527 --- src/distrib/sets/lists/comp/mi:1.1526 Mon Nov 22 22:20:26 2010 +++ src/distrib/sets/lists/comp/mi Tue Nov 30 17:32:28 2010 @@ -1,4 +1,4 @@ -# $NetBSD: mi,v 1.1526 2010/11/22 22:20:26 pooka Exp $ +# $NetBSD: mi,v 1.1527 2010/11/30 17:32:28 pooka Exp $ # # Note: don't delete entries from here - mark them as "obsolete" instead. # @@ -7916,6 +7916,7 @@ ./usr/share/man/cat3/rresvport_af.0 comp-c-catman .cat ./usr/share/man/cat3/rsa.0 comp-obsolete obsolete ./usr/share/man/cat3/rump.0 comp-c-catman .cat +./usr/share/man/cat3/rump_etfs.0 comp-c-catman .cat ./usr/share/man/cat3/rump_lwproc.0 comp-c-catman .cat ./usr/share/man/cat3/rumpuser.0 comp-c-catman .cat ./usr/share/man/cat3/ruserok.0 comp-c-catman .cat @@ -13819,6 +13820,7 @@ ./usr/share/man/html3/rresvport.html comp-c-htmlman html ./usr/share/man/html3/rresvport_af.html comp-c-htmlman html ./usr/share/man/html3/rump.html comp-c-htmlman html +./usr/share/man/html3/rump_etfs.html comp-c-htmlman html ./usr/share/man/html3/rump_lwproc.html comp-c-htmlman html ./usr/share/man/html3/rumpuser.html comp-c-htmlman html ./usr/share/man/html3/ruserok.html comp-c-htmlman html @@ -19730,6 +19732,7 @@ ./usr/share/man/man3/rresvport_af.3 comp-c-man .man ./usr/share/man/man3/rsa.3 comp-obsolete obsolete ./usr/share/man/man3/rump.3 comp-c-man .man +./usr/share/man/man3/rump_etfs.3 comp-c-man .man ./usr/share/man/man3/rump_lwproc.3 comp-c-man .man ./usr/share/man/man3/rumpuser.3 comp-c-man .man ./usr/share/man/man3/ruserok.3 comp-c-man .man Index: src/lib/librumpvfs/Makefile diff -u src/lib/librumpvfs/Makefile:1.2 src/lib/librumpvfs/Makefile:1.3 --- src/lib/librumpvfs/Makefile:1.2 Thu Feb 12 13:20:17 2009 +++ src/lib/librumpvfs/Makefile Tue Nov 30 17:32:29 2010 @@ -1,9 +1,10 @@ -# $NetBSD: Makefile,v 1.2 2009/02/12 13:20:17 lukem Exp $ +# $NetBSD: Makefile,v 1.3 2010/11/30 17:32:29 pooka Exp $ # RUMPTOP= ${.CURDIR}/../../sys/rump LIBDPLIBS+= rump ${.CURDIR}/../librump +MAN= rump_etfs.3 WARNS= 3 # XXX: kernel isn't ready for -Wsign-compare Added files: Index: src/lib/librumpvfs/rump_etfs.3 diff -u /dev/null src/lib/librumpvfs/rump_etfs.3:1.1 --- /dev/null Tue Nov 30 17:32:29 2010 +++ src/lib/librumpvfs/rump_etfs.3 Tue Nov 30 17:32:29 2010 @@ -0,0 +1,143 @@ +.\" $NetBSD: rump_etfs.3,v 1.1 2010/11/30 17:32:29 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 November 30, 2010 +.Dt RUMP_ETFS 3 +.Os +.Sh NAME +.Nm rump_etfs +.Nd rump host file system interface +.Sh LIBRARY +rump kernel (librump, \-lrump) +.Sh SYNOPSIS +.In rump/rump.h +.Ft int +.Fo etfs_register +.Fa "const char *key" "const char *hostpath" "enum rump_etfs_type ftype" +.Fc +.Ft int +.Fo etfs_register_withsize +.Fa "const char *key" "const char *hostpath" "enum rump_etfs_type ftype" +.Fa "uint64_t begin" "uint64_t end" +.Fc +.Ft int +.Fn etfs_remove "const c
CVS commit: src/sys/rump
Module Name:src Committed By: pooka Date: Tue Nov 30 16:27:31 UTC 2010 Modified Files: src/sys/rump/include/rump: rumpvfs_if_pub.h src/sys/rump/librump/rumpvfs: rumpvfs_if_priv.h rumpvfs_if_wrappers.c Log Message: regen: checksavecn is gone To generate a diff of this commit: cvs rdiff -u -r1.8 -r1.9 src/sys/rump/include/rump/rumpvfs_if_pub.h cvs rdiff -u -r1.8 -r1.9 src/sys/rump/librump/rumpvfs/rumpvfs_if_priv.h \ src/sys/rump/librump/rumpvfs/rumpvfs_if_wrappers.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/rump/include/rump/rumpvfs_if_pub.h diff -u src/sys/rump/include/rump/rumpvfs_if_pub.h:1.8 src/sys/rump/include/rump/rumpvfs_if_pub.h:1.9 --- src/sys/rump/include/rump/rumpvfs_if_pub.h:1.8 Tue Sep 7 17:14:18 2010 +++ src/sys/rump/include/rump/rumpvfs_if_pub.h Tue Nov 30 16:27:30 2010 @@ -1,8 +1,8 @@ -/* $NetBSD: rumpvfs_if_pub.h,v 1.8 2010/09/07 17:14:18 pooka Exp $ */ +/* $NetBSD: rumpvfs_if_pub.h,v 1.9 2010/11/30 16:27:30 pooka Exp $ */ /* * Automatically generated. DO NOT EDIT. - * from: NetBSD: rumpvfs.ifspec,v 1.6 2010/09/07 17:13:03 pooka Exp + * from: NetBSD: rumpvfs.ifspec,v 1.7 2010/11/30 15:41:35 pooka Exp * by: NetBSD: makerumpif.sh,v 1.5 2010/09/01 19:32:11 pooka Exp */ @@ -22,7 +22,6 @@ int rump_pub_etfs_register_withsize(const char *, const char *, enum rump_etfs_type, uint64_t, uint64_t); int rump_pub_etfs_remove(const char *); void rump_pub_freecn(struct componentname *, int); -int rump_pub_checksavecn(struct componentname *); int rump_pub_namei(uint32_t, uint32_t, const char *, struct vnode **, struct vnode **, struct componentname **); struct componentname * rump_pub_makecn(u_long, u_long, const char *, size_t, struct kauth_cred *, struct lwp *); int rump_pub_vfs_unmount(struct mount *, int); Index: src/sys/rump/librump/rumpvfs/rumpvfs_if_priv.h diff -u src/sys/rump/librump/rumpvfs/rumpvfs_if_priv.h:1.8 src/sys/rump/librump/rumpvfs/rumpvfs_if_priv.h:1.9 --- src/sys/rump/librump/rumpvfs/rumpvfs_if_priv.h:1.8 Tue Sep 7 17:14:19 2010 +++ src/sys/rump/librump/rumpvfs/rumpvfs_if_priv.h Tue Nov 30 16:27:31 2010 @@ -1,8 +1,8 @@ -/* $NetBSD: rumpvfs_if_priv.h,v 1.8 2010/09/07 17:14:19 pooka Exp $ */ +/* $NetBSD: rumpvfs_if_priv.h,v 1.9 2010/11/30 16:27:31 pooka Exp $ */ /* * Automatically generated. DO NOT EDIT. - * from: NetBSD: rumpvfs.ifspec,v 1.6 2010/09/07 17:13:03 pooka Exp + * from: NetBSD: rumpvfs.ifspec,v 1.7 2010/11/30 15:41:35 pooka Exp * by: NetBSD: makerumpif.sh,v 1.5 2010/09/01 19:32:11 pooka Exp */ @@ -22,7 +22,6 @@ int rump_etfs_register_withsize(const char *, const char *, enum rump_etfs_type, uint64_t, uint64_t); int rump_etfs_remove(const char *); void rump_freecn(struct componentname *, int); -int rump_checksavecn(struct componentname *); int rump_namei(uint32_t, uint32_t, const char *, struct vnode **, struct vnode **, struct componentname **); struct componentname * rump_makecn(u_long, u_long, const char *, size_t, struct kauth_cred *, struct lwp *); int rump_vfs_unmount(struct mount *, int); Index: src/sys/rump/librump/rumpvfs/rumpvfs_if_wrappers.c diff -u src/sys/rump/librump/rumpvfs/rumpvfs_if_wrappers.c:1.8 src/sys/rump/librump/rumpvfs/rumpvfs_if_wrappers.c:1.9 --- src/sys/rump/librump/rumpvfs/rumpvfs_if_wrappers.c:1.8 Tue Sep 7 17:14:19 2010 +++ src/sys/rump/librump/rumpvfs/rumpvfs_if_wrappers.c Tue Nov 30 16:27:31 2010 @@ -1,8 +1,8 @@ -/* $NetBSD: rumpvfs_if_wrappers.c,v 1.8 2010/09/07 17:14:19 pooka Exp $ */ +/* $NetBSD: rumpvfs_if_wrappers.c,v 1.9 2010/11/30 16:27:31 pooka Exp $ */ /* * Automatically generated. DO NOT EDIT. - * from: NetBSD: rumpvfs.ifspec,v 1.6 2010/09/07 17:13:03 pooka Exp + * from: NetBSD: rumpvfs.ifspec,v 1.7 2010/11/30 15:41:35 pooka Exp * by: NetBSD: makerumpif.sh,v 1.5 2010/09/01 19:32:11 pooka Exp */ @@ -189,18 +189,6 @@ } int -rump_pub_checksavecn(struct componentname *arg1) -{ - int rv; - - rump_schedule(); - rv = rump_checksavecn(arg1); - rump_unschedule(); - - return rv; -} - -int rump_pub_namei(uint32_t arg1, uint32_t arg2, const char *arg3, struct vnode **arg4, struct vnode **arg5, struct componentname **arg6) { int rv;
CVS commit: src
Module Name:src Committed By: pooka Date: Tue Nov 30 16:16:33 UTC 2010 Modified Files: src/distrib/sets/lists/tests: mi src/tests/rump/rumpvfs: Makefile Added Files: src/tests/rump/rumpvfs: t_p2kifs.c Log Message: test makecn/freecn To generate a diff of this commit: cvs rdiff -u -r1.161 -r1.162 src/distrib/sets/lists/tests/mi cvs rdiff -u -r1.1 -r1.2 src/tests/rump/rumpvfs/Makefile cvs rdiff -u -r0 -r1.1 src/tests/rump/rumpvfs/t_p2kifs.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.161 src/distrib/sets/lists/tests/mi:1.162 --- src/distrib/sets/lists/tests/mi:1.161 Mon Nov 29 19:29:47 2010 +++ src/distrib/sets/lists/tests/mi Tue Nov 30 16:16:33 2010 @@ -1,4 +1,4 @@ -# $NetBSD: mi,v 1.161 2010/11/29 19:29:47 njoly Exp $ +# $NetBSD: mi,v 1.162 2010/11/30 16:16:33 pooka Exp $ # # Note: don't delete entries from here - mark them as "obsolete" instead. # @@ -411,6 +411,7 @@ ./usr/libdata/debug/usr/tests/rump/rumpkern/t_vm.debug tests-syscall-debug debug,atf ./usr/libdata/debug/usr/tests/rump/rumpvfstests-syscall-debug ./usr/libdata/debug/usr/tests/rump/rumpvfs/t_etfs.debug tests-syscall-debug debug,atf +./usr/libdata/debug/usr/tests/rump/rumpvfs/t_p2kifs.debug tests-syscall-debug debug,atf ./usr/libdata/debug/usr/tests/syscall tests-syscall-debug ./usr/libdata/debug/usr/tests/syscall/t_cmsg.debug tests-syscall-debug debug,atf ./usr/libdata/debug/usr/tests/syscall/t_timer.debug tests-syscall-debug debug,atf @@ -1638,6 +1639,7 @@ ./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 +./usr/tests/rump/rumpvfs/t_p2kifs tests-rump-tests atf ./usr/tests/systests-sys-tests ./usr/tests/sys/Atffile tests-sys-tests atf ./usr/tests/sys/rctests-sys-tests Index: src/tests/rump/rumpvfs/Makefile diff -u src/tests/rump/rumpvfs/Makefile:1.1 src/tests/rump/rumpvfs/Makefile:1.2 --- src/tests/rump/rumpvfs/Makefile:1.1 Wed Jun 16 19:29:33 2010 +++ src/tests/rump/rumpvfs/Makefile Tue Nov 30 16:16:33 2010 @@ -1,10 +1,11 @@ -# $NetBSD: Makefile,v 1.1 2010/06/16 19:29:33 pooka Exp $ +# $NetBSD: Makefile,v 1.2 2010/11/30 16:16:33 pooka Exp $ .include TESTSDIR= ${TESTSBASE}/rump/rumpvfs TESTS_C= t_etfs +TESTS_C+= t_p2kifs LDADD= -lrumpvfs -lrump -lrumpuser -lpthread Added files: Index: src/tests/rump/rumpvfs/t_p2kifs.c diff -u /dev/null src/tests/rump/rumpvfs/t_p2kifs.c:1.1 --- /dev/null Tue Nov 30 16:16:34 2010 +++ src/tests/rump/rumpvfs/t_p2kifs.c Tue Nov 30 16:16:33 2010 @@ -0,0 +1,94 @@ +/* $NetBSD: t_p2kifs.c,v 1.1 2010/11/30 16:16:33 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 must retain the above copyright + *notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + *notice, this list of conditions and the following disclaimer in the + *documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND + * CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, + * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS BE LIABLE FOR ANY + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE + * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR + * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN + * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include +#include +#include + +#include +#include + +#include +#include +#include +#include +#include + +#include "../../h_macros.h" + +ATF_TC(makecn); +ATF_TC_HEAD(makecn, tc) +{ + + atf_tc_set_md_var(tc, "descr", "Tests makecn/LOOKUP/freecn"); +} + +#define TESTFILE "testi" + +ATF_TC_BODY(makecn, tc) +{ + struct componentname *cn; + char pathstr[] = TESTFILE; + struct vnode *vp; + extern struct vnode *rumpns_rootvnode; + + rump_init(); + + /* + * Strategy is to create a componentname, edit the passed + * string, and then do a lookup with the componentname. + */ + RL(rump_sys_mkdir("/" TESTFILE, 0777)); + + /* need stable lwp for componentname */ + RZ(rump_pub_lwproc_newproc()); + + /* try it once with the right pat
CVS commit: src/sys/arch/mac68k/obio
Module Name:src Committed By: hauke Date: Tue Nov 30 16:05:56 UTC 2010 Modified Files: src/sys/arch/mac68k/obio: iwm.s Log Message: Fix an embarassing tyop. gcc should run aspell over the comments... To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/sys/arch/mac68k/obio/iwm.s Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/mac68k/obio/iwm.s diff -u src/sys/arch/mac68k/obio/iwm.s:1.5 src/sys/arch/mac68k/obio/iwm.s:1.6 --- src/sys/arch/mac68k/obio/iwm.s:1.5 Mon May 26 17:58:37 2008 +++ src/sys/arch/mac68k/obio/iwm.s Tue Nov 30 16:05:55 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: iwm.s,v 1.5 2008/05/26 17:58:37 hauke Exp $ */ +/* $NetBSD: iwm.s,v 1.6 2010/11/30 16:05:55 hauke Exp $ */ /* * Copyright (c) 1996-99 Hauke Fath. All rights reserved. @@ -514,7 +514,7 @@ /* * iwmTrack00 -- move head to track 00 for drive calibration. * - * XXX Drive makes funny noises during resore. Tune delay/retry count? + * XXX Drive makes funny noises during restore. Tune delay/retry count? * * Parameters: - * Returns: %d0 result code
CVS commit: src/lib/libp2k
Module Name:src Committed By: pooka Date: Tue Nov 30 15:42:12 UTC 2010 Modified Files: src/lib/libp2k: p2k.c Log Message: Remove dead code from previous revision. To generate a diff of this commit: cvs rdiff -u -r1.46 -r1.47 src/lib/libp2k/p2k.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libp2k/p2k.c diff -u src/lib/libp2k/p2k.c:1.46 src/lib/libp2k/p2k.c:1.47 --- src/lib/libp2k/p2k.c:1.46 Tue Nov 30 10:49:22 2010 +++ src/lib/libp2k/p2k.c Tue Nov 30 15:42:11 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: p2k.c,v 1.46 2010/11/30 10:49:22 dholland Exp $ */ +/* $NetBSD: p2k.c,v 1.47 2010/11/30 15:42:11 pooka Exp $ */ /* * Copyright (c) 2007, 2008, 2009 Antti Kantee. All Rights Reserved. @@ -84,7 +84,6 @@ struct p2k_node { struct vnode *p2n_vp; - struct componentname *p2n_cn; /* * Ok, then, uhm, we need .. *drumroll*.. two componentname @@ -134,21 +133,21 @@ } static struct componentname * -makecn(const struct puffs_cn *pcn, int myflags) +makecn(const struct puffs_cn *pcn) { struct kauth_cred *cred; cred = cred_create(pcn->pcn_cred); /* LINTED: prehistoric types in first two args */ - return rump_pub_makecn(pcn->pcn_nameiop, pcn->pcn_flags | myflags, + return rump_pub_makecn(pcn->pcn_nameiop, pcn->pcn_flags, pcn->pcn_name, pcn->pcn_namelen, cred, rump_pub_lwproc_curlwp()); } static __inline void -freecn(struct componentname *cnp, int flags) +freecn(struct componentname *cnp) { - rump_pub_freecn(cnp, flags | RUMPCN_FREECRED); + rump_pub_freecn(cnp, RUMPCN_FREECRED); } static void @@ -218,7 +217,6 @@ { assert(p2n->p2n_vp == NULL); - assert(p2n->p2n_cn == NULL); LIST_REMOVE(p2n, p2n_entries); free(p2n); } @@ -675,48 +673,42 @@ uint64_t rdev; /* XXX: uint64_t because of stack overwrite in compat */ int rv; - cn = makecn(pcn, 0); + cn = makecn(pcn); RUMP_VOP_LOCK(dvp, LK_EXCLUSIVE); rv = RUMP_VOP_LOOKUP(dvp, &vp, cn); RUMP_VOP_UNLOCK(dvp); - if (rump_pub_checksavecn(cn)) { - /* - * XXX the rename lookup protocol is currently horribly - * broken. We get 1) DELETE with SAVESTART 2) DELETE - * without SAVESTART 3) RENAME. Hold on to this like - * it were the absolute truth for now. However, do - * not sprinkle asserts based on this due to abovementioned - * brokenness -- some file system drivers might not - * even issue ABORT properly, so just free resources - * on the fly and hope for the best. PR kern/42348 - */ - if (pcn->pcn_flags & RUMP_NAMEI_INRENAME) { - if (pcn->pcn_nameiop == RUMP_NAMEI_DELETE) { -/* save path from the first lookup */ -if (pcn->pcn_flags & RUMP_NAMEI_SAVESTART) { - if (p2n_dir->p2n_cn_ren_src) - freecn(p2n_dir->p2n_cn_ren_src, - 0); - p2n_dir->p2n_cn_ren_src = cn; -} else { - freecn(cn, 0); - cn = NULL; -} + + /* + * XXX the rename lookup protocol is currently horribly + * broken. We get 1) DELETE with SAVESTART 2) DELETE + * without SAVESTART 3) RENAME. Hold on to this like + * it were the absolute truth for now. However, do + * not sprinkle asserts based on this due to abovementioned + * brokenness -- some file system drivers might not + * even issue ABORT properly, so just free resources + * on the fly and hope for the best. PR kern/42348 + */ + if (pcn->pcn_flags & RUMP_NAMEI_INRENAME) { + if (pcn->pcn_nameiop == RUMP_NAMEI_DELETE) { + /* save path from the first lookup */ + if (pcn->pcn_flags & RUMP_NAMEI_SAVESTART) { +if (p2n_dir->p2n_cn_ren_src) + freecn(p2n_dir->p2n_cn_ren_src); +p2n_dir->p2n_cn_ren_src = cn; } else { -assert(pcn->pcn_nameiop == RUMP_NAMEI_RENAME); -if (p2n_dir->p2n_cn_ren_targ) - freecn(p2n_dir->p2n_cn_ren_targ, - 0); -p2n_dir->p2n_cn_ren_targ = cn; +freecn(cn); +cn = NULL; } } else { - assert(p2n_dir->p2n_cn == NULL); - p2n_dir->p2n_cn = cn; + assert(pcn->pcn_nameiop == RUMP_NAMEI_RENAME); + if (p2n_dir->p2n_cn_ren_targ) +freecn(p2n_dir->p2n_cn_ren_targ); + p2n_dir->p2n_cn_ren_targ = cn; } } else { - freecn(cn, 0); - cn = NULL; + freecn(cn); } + if (rv) { if (rv == EJUSTRETURN) { rv = ENOENT; @@ -733,11 +725,9 @@ } else { p2n_dir->p2n_cn_ren_targ = NULL; } - } else { - p2n_dir->p2n_cn = NULL; + + RUMP_VOP_ABORTOP(dvp, cn); } - /* XXX: what in the world should happen with SAVESTART? */ - RUMP_VOP_ABORTOP(dvp, cn); return ENOMEM; } @@ -799,13 +789,7 @@ return ENOMEM; DOCOMPAT(vap, va_x); - if (p2n_dir->p2n_cn) { - cn = p2n_dir->p2n_cn; - p2n_dir->p2n_cn = NULL; - } else { - cn = makecn(pcn, 0); - } - + cn = makecn(pcn); RUMP_VOP_LOCK(dvp, LK_EXCLUSIVE); rump_pub_vp_incref(dvp); if (makefn) { @@ -814,7 +798,7 @@ rv = symfn(dvp, &vp, cn, va_x, link_target); } assert(RUMP_VOP_ISLOCKED(dvp) == 0); - freecn(cn, 0); + freecn(cn); if (rv == 0) { RUMP_VOP_UNL
CVS commit: src/sys/rump/librump/rumpvfs
Module Name:src Committed By: pooka Date: Tue Nov 30 15:41:35 UTC 2010 Modified Files: src/sys/rump/librump/rumpvfs: rump_vfs.c rumpvfs.ifspec Log Message: remove unnecessary interface To generate a diff of this commit: cvs rdiff -u -r1.62 -r1.63 src/sys/rump/librump/rumpvfs/rump_vfs.c cvs rdiff -u -r1.6 -r1.7 src/sys/rump/librump/rumpvfs/rumpvfs.ifspec Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/rump/librump/rumpvfs/rump_vfs.c diff -u src/sys/rump/librump/rumpvfs/rump_vfs.c:1.62 src/sys/rump/librump/rumpvfs/rump_vfs.c:1.63 --- src/sys/rump/librump/rumpvfs/rump_vfs.c:1.62 Tue Nov 30 15:39:27 2010 +++ src/sys/rump/librump/rumpvfs/rump_vfs.c Tue Nov 30 15:41:35 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: rump_vfs.c,v 1.62 2010/11/30 15:39:27 pooka Exp $ */ +/* $NetBSD: rump_vfs.c,v 1.63 2010/11/30 15:41:35 pooka Exp $ */ /* * Copyright (c) 2008 Antti Kantee. All Rights Reserved. @@ -29,7 +29,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: rump_vfs.c,v 1.62 2010/11/30 15:39:27 pooka Exp $"); +__KERNEL_RCSID(0, "$NetBSD: rump_vfs.c,v 1.63 2010/11/30 15:41:35 pooka Exp $"); #include #include @@ -214,18 +214,7 @@ rump_cred_put(cnp->cn_cred); PNBUF_PUT(rcn->rcn_path); - kmem_free(cnp, sizeof(*cnp)); -} - -int -rump_checksavecn(struct componentname *cnp) -{ - - if ((cnp->cn_flags & SAVESTART) == 0) { - return 0; - } else { - return 1; - } + kmem_free(rcn, sizeof(*rcn)); } /* hey baby, what's your namei? */ Index: src/sys/rump/librump/rumpvfs/rumpvfs.ifspec diff -u src/sys/rump/librump/rumpvfs/rumpvfs.ifspec:1.6 src/sys/rump/librump/rumpvfs/rumpvfs.ifspec:1.7 --- src/sys/rump/librump/rumpvfs/rumpvfs.ifspec:1.6 Tue Sep 7 17:13:03 2010 +++ src/sys/rump/librump/rumpvfs/rumpvfs.ifspec Tue Nov 30 15:41:35 2010 @@ -1,4 +1,4 @@ -; $NetBSD: rumpvfs.ifspec,v 1.6 2010/09/07 17:13:03 pooka Exp $ +; $NetBSD: rumpvfs.ifspec,v 1.7 2010/11/30 15:41:35 pooka Exp $ NAME|vfs PUBHDR|include/rump/rumpvfs_if_pub.h @@ -32,7 +32,6 @@ int |etfs_remove |const char * void |freecn |struct componentname *, int -int |checksavecn |struct componentname * int |namei |uint32_t, uint32_t, const char *, \ struct vnode **, struct vnode **, \ struct componentname **
CVS commit: src/sys/rump/librump/rumpvfs
Module Name:src Committed By: pooka Date: Tue Nov 30 15:39:27 UTC 2010 Modified Files: src/sys/rump/librump/rumpvfs: rump_vfs.c Log Message: fix broken rototill To generate a diff of this commit: cvs rdiff -u -r1.61 -r1.62 src/sys/rump/librump/rumpvfs/rump_vfs.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/rump/librump/rumpvfs/rump_vfs.c diff -u src/sys/rump/librump/rumpvfs/rump_vfs.c:1.61 src/sys/rump/librump/rumpvfs/rump_vfs.c:1.62 --- src/sys/rump/librump/rumpvfs/rump_vfs.c:1.61 Tue Nov 30 10:48:27 2010 +++ src/sys/rump/librump/rumpvfs/rump_vfs.c Tue Nov 30 15:39:27 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: rump_vfs.c,v 1.61 2010/11/30 10:48:27 dholland Exp $ */ +/* $NetBSD: rump_vfs.c,v 1.62 2010/11/30 15:39:27 pooka Exp $ */ /* * Copyright (c) 2008 Antti Kantee. All Rights Reserved. @@ -29,7 +29,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: rump_vfs.c,v 1.61 2010/11/30 10:48:27 dholland Exp $"); +__KERNEL_RCSID(0, "$NetBSD: rump_vfs.c,v 1.62 2010/11/30 15:39:27 pooka Exp $"); #include #include @@ -174,19 +174,29 @@ vfs_shutdown(); } +struct rumpcn { + struct componentname rcn_cn; + char *rcn_path; +}; + struct componentname * rump_makecn(u_long nameiop, u_long flags, const char *name, size_t namelen, kauth_cred_t creds, struct lwp *l) { + struct rumpcn *rcn; struct componentname *cnp; const char *cp = NULL; - cnp = kmem_zalloc(sizeof(struct componentname), KM_SLEEP); + rcn = kmem_zalloc(sizeof(*rcn), KM_SLEEP); + cnp = &rcn->rcn_cn; + + rcn->rcn_path = PNBUF_GET(); + strlcpy(rcn->rcn_path, name, MAXPATHLEN); + cnp->cn_nameptr = rcn->rcn_path; cnp->cn_nameiop = nameiop; cnp->cn_flags = flags; - cnp->cn_nameptr = name; cnp->cn_namelen = namelen; cnp->cn_hash = namei_hash(name, &cp); @@ -198,10 +208,12 @@ void rump_freecn(struct componentname *cnp, int flags) { + struct rumpcn *rcn = (void *)cnp; if (flags & RUMPCN_FREECRED) rump_cred_put(cnp->cn_cred); + PNBUF_PUT(rcn->rcn_path); kmem_free(cnp, sizeof(*cnp)); }
CVS commit: src/sys/dev/usb
Module Name:src Committed By: bsh Date: Tue Nov 30 15:26:22 UTC 2010 Modified Files: src/sys/dev/usb: ucom.c Log Message: don't clear TS_BUSY in ucomclose(). This fixes kernel crash in ucomstart() with "echo Hello > /dev/ttyU0". To generate a diff of this commit: cvs rdiff -u -r1.85 -r1.86 src/sys/dev/usb/ucom.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/usb/ucom.c diff -u src/sys/dev/usb/ucom.c:1.85 src/sys/dev/usb/ucom.c:1.86 --- src/sys/dev/usb/ucom.c:1.85 Wed Nov 3 22:34:23 2010 +++ src/sys/dev/usb/ucom.c Tue Nov 30 15:26:22 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: ucom.c,v 1.85 2010/11/03 22:34:23 dyoung Exp $ */ +/* $NetBSD: ucom.c,v 1.86 2010/11/30 15:26:22 bsh Exp $ */ /* * Copyright (c) 1998, 2000 The NetBSD Foundation, Inc. @@ -34,7 +34,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: ucom.c,v 1.85 2010/11/03 22:34:23 dyoung Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ucom.c,v 1.86 2010/11/30 15:26:22 bsh Exp $"); #include #include @@ -596,7 +596,6 @@ s = spltty(); sc->sc_refcnt++; - CLR(tp->t_state, TS_BUSY); (*tp->t_linesw->l_close)(tp, flag); ttyclose(tp);
CVS commit: src/lib/libc/locale
Module Name:src Committed By: tnozaki Date: Tue Nov 30 15:25:05 UTC 2010 Modified Files: src/lib/libc/locale: rune.c Log Message: variable must to be nul terminated before "CODESET=foo". ISO2022 module doesn't understand this and may fail setlocale(3). To generate a diff of this commit: cvs rdiff -u -r1.40 -r1.41 src/lib/libc/locale/rune.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/locale/rune.c diff -u src/lib/libc/locale/rune.c:1.40 src/lib/libc/locale/rune.c:1.41 --- src/lib/libc/locale/rune.c:1.40 Sat Jun 19 14:48:16 2010 +++ src/lib/libc/locale/rune.c Tue Nov 30 15:25:05 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: rune.c,v 1.40 2010/06/19 14:48:16 tnozaki Exp $ */ +/* $NetBSD: rune.c,v 1.41 2010/11/30 15:25:05 tnozaki Exp $ */ /*- * Copyright (c)2010 Citrus Project, @@ -107,14 +107,18 @@ static __inline void _rune_find_codeset(char *s, size_t n, -const char *var, size_t lenvar) +char *var, size_t *plenvar) { + size_t lenvar; const char *endvar; #define _RUNE_CODESET_LEN (sizeof(_RUNE_CODESET)-1) + lenvar = *plenvar; for (/**/; lenvar > _RUNE_CODESET_LEN; ++var, --lenvar) { if (!memcmp(var, _RUNE_CODESET, _RUNE_CODESET_LEN)) { + *var = '\0'; + *plenvar -= lenvar; endvar = &var[_RUNE_CODESET_LEN]; while (n-- > 1 && lenvar-- > _RUNE_CODESET_LEN) { if (*endvar == ' ' || *endvar == '\t') @@ -226,7 +230,7 @@ } _rune_find_codeset(rlp->rlp_codeset, sizeof(rlp->rlp_codeset), - (const char *)rl->rl_variable, rl->rl_variable_len); + (char *)rl->rl_variable, &rl->rl_variable_len); ret = _citrus_ctype_open(&rl->rl_citrus_ctype, frl->frl_encoding, rl->rl_variable, rl->rl_variable_len, _PRIVSIZE);
CVS commit: src/usr.sbin/postinstall
Module Name:src Committed By: njoly Date: Tue Nov 30 14:35:39 UTC 2010 Modified Files: src/usr.sbin/postinstall: postinstall Log Message: Adjust obsolete_libs to handle both the libraries (unchanged) and the corresponding .debug files if exists. To generate a diff of this commit: cvs rdiff -u -r1.110 -r1.111 src/usr.sbin/postinstall/postinstall 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/postinstall/postinstall diff -u src/usr.sbin/postinstall/postinstall:1.110 src/usr.sbin/postinstall/postinstall:1.111 --- src/usr.sbin/postinstall/postinstall:1.110 Sun Nov 21 22:50:37 2010 +++ src/usr.sbin/postinstall/postinstall Tue Nov 30 14:35:38 2010 @@ -1,6 +1,6 @@ #!/bin/sh # -# $NetBSD: postinstall,v 1.110 2010/11/21 22:50:37 christos Exp $ +# $NetBSD: postinstall,v 1.111 2010/11/30 14:35:38 njoly Exp $ # # Copyright (c) 2002-2008 The NetBSD Foundation, Inc. # All rights reserved. @@ -482,6 +482,14 @@ [ $# -eq 1 ] || err 3 "USAGE: obsolete_libs dir" dir="$1" + _obsolete_libs "${dir}" + _obsolete_libs "/usr/libdata/debug/${dir}" +} + +_obsolete_libs() +{ + dir="$1" + ( if [ ! -e "${DEST_DIR}/${dir}" ] @@ -522,7 +530,7 @@ } } -/^lib.*\.so\.[0-9]+\.[0-9]+(\.[0-9]+)?$/ { +/^lib.*\.so\.[0-9]+\.[0-9]+(\.[0-9]+)?(\.debug)?$/ { if (AllLibs) checklib(minor, $0, "^lib.*\\.so\\.") else
CVS commit: src/tests/dev/md
Module Name:src Committed By: pooka Date: Tue Nov 30 14:31:14 UTC 2010 Modified Files: src/tests/dev/md: h_mdserv.c Log Message: comment tyops To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/tests/dev/md/h_mdserv.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/tests/dev/md/h_mdserv.c diff -u src/tests/dev/md/h_mdserv.c:1.2 src/tests/dev/md/h_mdserv.c:1.3 --- src/tests/dev/md/h_mdserv.c:1.2 Tue Nov 30 14:29:05 2010 +++ src/tests/dev/md/h_mdserv.c Tue Nov 30 14:31:14 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: h_mdserv.c,v 1.2 2010/11/30 14:29:05 pooka Exp $ */ +/* $NetBSD: h_mdserv.c,v 1.3 2010/11/30 14:31:14 pooka Exp $ */ #include #include @@ -88,11 +88,11 @@ /* * Now, configuring the md driver also causes our process - * to start acting as the worker for the md. Splitting is + * to start acting as the worker for the md. Splitting it * into two steps in the driver is not easy, since md is * supposed to be unconfigured when the process dies * (process may exit between calling ioctl1 and ioctl2). - * So, start a probe thread which attempt to read the md + * So, start a probe thread which attempts to read the md * and declares the md as configured when the read is * succesful. */
CVS commit: src/tests/dev/md
Module Name:src Committed By: pooka Date: Tue Nov 30 14:29:05 UTC 2010 Modified Files: src/tests/dev/md: h_mdserv.c t_md.sh Log Message: Get rid of the "sleep 1" by using rump_daemonize_begin/end(). Notably, md is a little tricky for this, since the ioctl that configures the service also blocks in the kernel. Therefore, use an additional pthread to probe when the service is fully configured and the server can detach. Also, rawpart love. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/tests/dev/md/h_mdserv.c src/tests/dev/md/t_md.sh Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/tests/dev/md/h_mdserv.c diff -u src/tests/dev/md/h_mdserv.c:1.1 src/tests/dev/md/h_mdserv.c:1.2 --- src/tests/dev/md/h_mdserv.c:1.1 Tue Nov 23 15:38:54 2010 +++ src/tests/dev/md/h_mdserv.c Tue Nov 30 14:29:05 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: h_mdserv.c,v 1.1 2010/11/23 15:38:54 pooka Exp $ */ +/* $NetBSD: h_mdserv.c,v 1.2 2010/11/30 14:29:05 pooka Exp $ */ #include #include @@ -6,28 +6,104 @@ #include +#include +#include #include +#include +#include +#include #include #include #include -#include "../../h_macros.h" - #define MDSIZE (1024*1024) +#define REQUIRE(a, msg) if ((a) != 0) err(1, msg); + +static void * +prober(void *arg) +{ + int fd, error; + char buf[4]; + ssize_t n; + + fd = rump_sys_open(arg, O_RDONLY); + for (;;) { + n = rump_sys_read(fd, buf, sizeof(buf)); + + switch (n) { + case 4: + error = 0; + goto out; + + case -1: + if (errno == ENXIO) { +usleep(1000); +continue; + } + + /* FALLTHROUGH */ + default: + error = EPIPE; + goto out; + } + } + out: + + error = rump_daemonize_done(error); + REQUIRE(error, "rump_daemonize_done"); + + if (error) + exit(1); + + return NULL; +} + int -main(void) +main(int argc, char *argv[]) { + pthread_t pt; struct md_conf md; - int fd; + int fd, error; + + if (argc != 2) + exit(1); md.md_addr = malloc(MDSIZE); md.md_size = MDSIZE; md.md_type = MD_UMEM_SERVER; - RL(rump_init()); - RL(fd = rump_sys_open("/dev/rmd0d", O_RDWR)); - RL(rump_sys_ioctl(fd, MD_SETCONF, &md)); - pause(); + error = rump_daemonize_begin(); + REQUIRE(error, "rump_daemonize_begin"); + + error = rump_init(); + REQUIRE(error, "rump_init"); + + error = rump_init_server("unix://commsock"); + REQUIRE(error, "init server"); + + if ((fd = rump_sys_open(argv[1], O_RDWR)) == -1) + err(1, "open"); + + /* + * Now, configuring the md driver also causes our process + * to start acting as the worker for the md. Splitting is + * into two steps in the driver is not easy, since md is + * supposed to be unconfigured when the process dies + * (process may exit between calling ioctl1 and ioctl2). + * So, start a probe thread which attempt to read the md + * and declares the md as configured when the read is + * succesful. + */ + error = pthread_create(&pt, NULL, prober, argv[1]); + REQUIRE(error, "pthread_create"); + pthread_detach(pt); + + if (rump_sys_ioctl(fd, MD_SETCONF, &md) == -1) { + rump_daemonize_done(errno); + exit(1); + } + + return 0; } Index: src/tests/dev/md/t_md.sh diff -u src/tests/dev/md/t_md.sh:1.1 src/tests/dev/md/t_md.sh:1.2 --- src/tests/dev/md/t_md.sh:1.1 Tue Nov 23 15:38:54 2010 +++ src/tests/dev/md/t_md.sh Tue Nov 30 14:29:05 2010 @@ -1,4 +1,4 @@ -# $NetBSD: t_md.sh,v 1.1 2010/11/23 15:38:54 pooka Exp $ +# $NetBSD: t_md.sh,v 1.2 2010/11/30 14:29:05 pooka Exp $ # # Copyright (c) 2010 The NetBSD Foundation, Inc. # All rights reserved. @@ -35,12 +35,13 @@ basic_body() { - RUMPSOCK=unix://commsock - env RUMP_SP_SERVER=${RUMPSOCK} $(atf_get_srcdir)/h_mdserv & + # Scope out raw part. This is actually the *host* raw partition, + # but just let it slide for now, since they *should* be the same. + rawpart=`sysctl -n kern.rawpartition | tr '01234' 'abcde'` - sleep 1 # XXX: wait for server to start + atf_check -s exit:0 $(atf_get_srcdir)/h_mdserv /dev/rmd0${rawpart} - export RUMP_SP_CLIENT=${RUMPSOCK} + export RUMP_SERVER=unix://commsock atf_check -s exit:0 -e ignore dd if=/bin/ls rof=/dev/rmd0d seek=100 count=10 atf_check -s exit:0 -e ignore dd of=testfile rif=/dev/rmd0d skip=100 count=10 atf_check -s exit:0 -e ignore -o file:testfile dd if=/bin/ls count=10
CVS commit: src/lib/librumpclient
Module Name:src Committed By: pooka Date: Tue Nov 30 14:24:40 UTC 2010 Modified Files: src/lib/librumpclient: rumpclient.c Log Message: Change RUMP_SP_CLIENT to RUMP_SERVER. The former was, in addition to being annoying to write, slightly misguiding, since it contains the server url. To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/lib/librumpclient/rumpclient.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/librumpclient/rumpclient.c diff -u src/lib/librumpclient/rumpclient.c:1.6 src/lib/librumpclient/rumpclient.c:1.7 --- src/lib/librumpclient/rumpclient.c:1.6 Mon Nov 29 16:08:03 2010 +++ src/lib/librumpclient/rumpclient.c Tue Nov 30 14:24:40 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: rumpclient.c,v 1.6 2010/11/29 16:08:03 pooka Exp $ */ +/* $NetBSD: rumpclient.c,v 1.7 2010/11/30 14:24:40 pooka Exp $ */ /* * Copyright (c) 2010 Antti Kantee. All Rights Reserved. @@ -212,7 +212,7 @@ unsigned idx; int error, s; - if ((p = getenv("RUMP_SP_CLIENT")) == NULL) { + if ((p = getenv("RUMP_SERVER")) == NULL) { errno = ENOENT; return -1; }
CVS commit: src
Module Name:src Committed By: pooka Date: Tue Nov 30 14:23:24 UTC 2010 Modified Files: src/lib/librumpuser: Makefile src/sys/rump/include/rump: rump.h rumpuser.h src/sys/rump/librump/rumpkern: rump.c Added Files: src/lib/librumpuser: rumpuser_daemonize.c Log Message: Require server to be explicitly initialized with rump_init_server(url). Also, add rump_daemonize_begin() / rump_daemonize_end() to help with the "can't daemon() after pthread_create()" problem. Applications could accomplish the same, but since it's such a common operation, provide a little help. To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/lib/librumpuser/Makefile cvs rdiff -u -r0 -r1.1 src/lib/librumpuser/rumpuser_daemonize.c cvs rdiff -u -r1.48 -r1.49 src/sys/rump/include/rump/rump.h cvs rdiff -u -r1.53 -r1.54 src/sys/rump/include/rump/rumpuser.h cvs rdiff -u -r1.206 -r1.207 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/lib/librumpuser/Makefile diff -u src/lib/librumpuser/Makefile:1.4 src/lib/librumpuser/Makefile:1.5 --- src/lib/librumpuser/Makefile:1.4 Tue Nov 30 14:08:39 2010 +++ src/lib/librumpuser/Makefile Tue Nov 30 14:23:24 2010 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.4 2010/11/30 14:08:39 pooka Exp $ +# $NetBSD: Makefile,v 1.5 2010/11/30 14:23:24 pooka Exp $ # WARNS= 4 @@ -12,7 +12,7 @@ SRCS= rumpuser.c rumpuser_net.c SRCS+= rumpuser_pth.c -SRCS+= rumpuser_dl.c rumpuser_sp.c +SRCS+= rumpuser_dl.c rumpuser_sp.c rumpuser_daemonize.c INCSDIR= /usr/include/rump INCS= rumpuser.h Index: src/sys/rump/include/rump/rump.h diff -u src/sys/rump/include/rump/rump.h:1.48 src/sys/rump/include/rump/rump.h:1.49 --- src/sys/rump/include/rump/rump.h:1.48 Tue Nov 30 10:46:59 2010 +++ src/sys/rump/include/rump/rump.h Tue Nov 30 14:23:24 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: rump.h,v 1.48 2010/11/30 10:46:59 dholland Exp $ */ +/* $NetBSD: rump.h,v 1.49 2010/11/30 14:23:24 pooka Exp $ */ /* * Copyright (c) 2007 Antti Kantee. All Rights Reserved. @@ -88,8 +88,8 @@ * Something like rump capabilities would be nicer, but let's * do this for a start. */ -#define RUMP_VERSION 01 -#define rump_init() rump__init(RUMP_VERSION) +#define RUMP_VERSION 01 +#define rump_init() rump__init(RUMP_VERSION) /* um, what's the point ?-) */ #ifdef _BEGIN_DECLS @@ -105,7 +105,11 @@ void rump_printevcnts(void); +int rump_daemonize_begin(void); int rump__init(int); +int rump_init_server(const char *); +int rump_daemonize_done(int); +#define RUMP_DAEMONIZE_SUCCESS 0 #ifndef _KERNEL #include Index: src/sys/rump/include/rump/rumpuser.h diff -u src/sys/rump/include/rump/rumpuser.h:1.53 src/sys/rump/include/rump/rumpuser.h:1.54 --- src/sys/rump/include/rump/rumpuser.h:1.53 Thu Nov 25 17:59:02 2010 +++ src/sys/rump/include/rump/rumpuser.h Tue Nov 30 14:23:24 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: rumpuser.h,v 1.53 2010/11/25 17:59:02 pooka Exp $ */ +/* $NetBSD: rumpuser.h,v 1.54 2010/11/30 14:23:24 pooka Exp $ */ /* * Copyright (c) 2007 Antti Kantee. All Rights Reserved. @@ -39,6 +39,9 @@ #define RUMPUSER_VERSION 6 int rumpuser_getversion(void); +int rumpuser_daemonize_begin(void); +int rumpuser_daemonize_done(int); + struct msghdr; struct pollfd; struct sockaddr; Index: src/sys/rump/librump/rumpkern/rump.c diff -u src/sys/rump/librump/rumpkern/rump.c:1.206 src/sys/rump/librump/rumpkern/rump.c:1.207 --- src/sys/rump/librump/rumpkern/rump.c:1.206 Mon Nov 22 20:42:19 2010 +++ src/sys/rump/librump/rumpkern/rump.c Tue Nov 30 14:23:24 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: rump.c,v 1.206 2010/11/22 20:42:19 pooka Exp $ */ +/* $NetBSD: rump.c,v 1.207 2010/11/30 14:23:24 pooka Exp $ */ /* * Copyright (c) 2007 Antti Kantee. All Rights Reserved. @@ -28,7 +28,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: rump.c,v 1.206 2010/11/22 20:42:19 pooka Exp $"); +__KERNEL_RCSID(0, "$NetBSD: rump.c,v 1.207 2010/11/30 14:23:24 pooka Exp $"); #include #define ELFSIZE ARCH_ELFSIZE @@ -205,6 +205,23 @@ }; int +rump_daemonize_begin(void) +{ + + if (rump_inited) + return EALREADY; + + return rumpuser_daemonize_begin(); +} + +int +rump_daemonize_done(int error) +{ + + return rumpuser_daemonize_done(error); +} + +int rump__init(int rump_version) { char buf[256]; @@ -222,13 +239,6 @@ else rump_inited = 1; - /* Check our role as a rump proxy */ - if (rumpuser_getenv("RUMP_SP_SERVER", buf, sizeof(buf), &error) == 0) { - error = rumpuser_sp_init(&spops, buf); - if (error) - return error; - } - if (rumpuser_getversion() != RUMPUSER_VERSION) { /* let's hope the ABI of rumpuser_dprintf is the same ;) */ rumpuser_dprintf("rumpuser version mismatch: %d vs. %d\n", @@ -434,6 +444,13 @@ return 0; } +int +rump_init_server(const char *url) +{ + + return rumpuser_sp_init(&spops, url); +} + void cpu_reboot(int howto, char *boots
CVS commit: src/lib/librumpuser
Module Name:src Committed By: pooka Date: Tue Nov 30 14:08:39 UTC 2010 Modified Files: src/lib/librumpuser: Makefile Log Message: add commented-out -D_DIAGNOSTIC To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/lib/librumpuser/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/librumpuser/Makefile diff -u src/lib/librumpuser/Makefile:1.3 src/lib/librumpuser/Makefile:1.4 --- src/lib/librumpuser/Makefile:1.3 Wed Oct 27 20:44:50 2010 +++ src/lib/librumpuser/Makefile Tue Nov 30 14:08:39 2010 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.3 2010/10/27 20:44:50 pooka Exp $ +# $NetBSD: Makefile,v 1.4 2010/11/30 14:08:39 pooka Exp $ # WARNS= 4 @@ -7,7 +7,8 @@ .PATH: ${.CURDIR}/../../sys/rump/include/rump LIB= rumpuser -LIBDPLIBS+= pthread ${.CURDIR}/../libpthread +LIBDPLIBS+= pthread ${.CURDIR}/../libpthread +#CPPFLAGS+= -D_DIAGNOSTIC SRCS= rumpuser.c rumpuser_net.c SRCS+= rumpuser_pth.c
CVS commit: src/sys/arch/evbarm/conf
Module Name:src Committed By: bsh Date: Tue Nov 30 13:07:29 UTC 2010 Modified Files: src/sys/arch/evbarm/conf: NETWALKER files.netwalker Log Message: Support USB on NetWalker. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/sys/arch/evbarm/conf/NETWALKER cvs rdiff -u -r1.1 -r1.2 src/sys/arch/evbarm/conf/files.netwalker Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/evbarm/conf/NETWALKER diff -u src/sys/arch/evbarm/conf/NETWALKER:1.2 src/sys/arch/evbarm/conf/NETWALKER:1.3 --- src/sys/arch/evbarm/conf/NETWALKER:1.2 Tue Nov 23 11:13:56 2010 +++ src/sys/arch/evbarm/conf/NETWALKER Tue Nov 30 13:07:29 2010 @@ -1,4 +1,4 @@ -# $NetBSD: NETWALKER,v 1.2 2010/11/23 11:13:56 hannken Exp $ +# $NetBSD: NETWALKER,v 1.3 2010/11/30 13:07:29 bsh Exp $ # # NETWALKER -- Sharp # @@ -23,7 +23,7 @@ # Architecture options -optionsIMX51_IPGCLK_FREQ=5000 +optionsIMX51_IPGCLK_FREQ=5000 # XXX This value is not correct. # File systems @@ -184,6 +184,74 @@ imxclock0 at axi? addr 0x73fac000 size 0x4000 irq 40 imxclock1 at axi? addr 0x73fb size 0x4000 irq 41 +# IOMUX +imxiomux0 at axi? addr 0x73fa8000 + +# GPIO +imxgpio0 at axi? addr 0x73f84000 +imxgpio1 at axi? addr 0x73f88000 +imxgpio2 at axi? addr 0x73f8c000 +imxgpio3 at axi? addr 0x73f9 + +# USB +imxusbc0 at axi? addr 0x73f8 +ehci0 at imxusbc0 unit 0 irq 18 # OTG +ehci1 at imxusbc0 unit 1 irq 14 # Host1 +#ehci2 at imxusbc0 unit 2 irq 16 # Host2 +#ehci3 at imxusbc0 unit 3 irq 17 # Host3 + +usb* at ehci? +uhub* at usb? +uhub* at uhub? port ? +ugen* at uhub? port ? + +# USB HID device +uhidev* at uhub? port ? configuration ? interface ? + +# USB Mice +ums* at uhidev? reportid ? +wsmouse* at ums? mux 0 + +# USB Keyboards +ukbd* at uhidev? reportid ? +wskbd* at ukbd? console ? mux 1 + +# USB Mass Storage +umass* at uhub? port ? configuration ? interface ? +wd* at umass? + +# Serial adapters +ubsa* at uhub? port ? # Belkin serial adapter +ucom* at ubsa? portno ? + +uchcom* at uhub? port ? # WinChipHead CH341/CH340 serial adapter +ucom* at uchcom? portno ? + +uftdi* at uhub? port ? # FTDI FT8U100AX serial adapter +ucom* at uftdi? portno ? + +umct* at uhub? port ? # MCT USB-RS232 serial adapter +ucom* at umct? portno ? + +uplcom* at uhub? port ? # I/O DATA USB-RSAQ2 serial adapter +ucom* at uplcom? portno ? + +uslsa* at uhub? port ? # Silicon Labs USB-RS232 serial adapter +ucom* at uslsa? portno ? + +uvscom* at uhub? port ? # SUNTAC Slipper U VS-10U serial adapter +ucom* at uvscom? portno ? + +# USB generic serial port (e.g., data over cellular) +ugensa* at uhub? port ? +ucom* at ugensa? + +# SCSI bus support +scsibus* at scsi? + +# SCSI devices +sd* at scsibus? target ? lun ? # SCSI disk drives + # Pseudo-Devices pseudo-device crypto # /dev/crypto device Index: src/sys/arch/evbarm/conf/files.netwalker diff -u src/sys/arch/evbarm/conf/files.netwalker:1.1 src/sys/arch/evbarm/conf/files.netwalker:1.2 --- src/sys/arch/evbarm/conf/files.netwalker:1.1 Sat Nov 13 07:31:32 2010 +++ src/sys/arch/evbarm/conf/files.netwalker Tue Nov 30 13:07:29 2010 @@ -1,4 +1,4 @@ -# $NetBSD: files.netwalker,v 1.1 2010/11/13 07:31:32 bsh Exp $ +# $NetBSD: files.netwalker,v 1.2 2010/11/30 13:07:29 bsh Exp $ # # Sharp # @@ -11,3 +11,6 @@ # CPU support and integrated peripherals include "arch/arm/imx/files.imx51" +device imxusbc_axi +attach imxusbc at axi with imxusbc_axi +file arch/evbarm/netwalker/netwalker_usb.c imxusbc_axi
CVS commit: src/sys/arch/arm/imx
Module Name:src Committed By: bsh Date: Tue Nov 30 13:05:27 UTC 2010 Modified Files: src/sys/arch/arm/imx: files.imx51 imx51_axi.c imx51reg.h imx51var.h imxgpioreg.h imxkppreg.h Added Files: src/sys/arch/arm/imx: imx51_gpio.c imx51_iomux.c imx51_usb.c imxgpio.c imxgpiovar.h imxusb.c imxusbreg.h imxusbvar.h Log Message: Support GPIO, IOMUX, and USB on i.MX51. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/sys/arch/arm/imx/files.imx51 \ src/sys/arch/arm/imx/imx51_axi.c src/sys/arch/arm/imx/imx51reg.h \ src/sys/arch/arm/imx/imx51var.h src/sys/arch/arm/imx/imxgpioreg.h \ src/sys/arch/arm/imx/imxkppreg.h cvs rdiff -u -r0 -r1.1 src/sys/arch/arm/imx/imx51_gpio.c \ src/sys/arch/arm/imx/imx51_iomux.c src/sys/arch/arm/imx/imx51_usb.c \ src/sys/arch/arm/imx/imxgpio.c src/sys/arch/arm/imx/imxgpiovar.h \ src/sys/arch/arm/imx/imxusb.c src/sys/arch/arm/imx/imxusbreg.h \ src/sys/arch/arm/imx/imxusbvar.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/arm/imx/files.imx51 diff -u src/sys/arch/arm/imx/files.imx51:1.1 src/sys/arch/arm/imx/files.imx51:1.2 --- src/sys/arch/arm/imx/files.imx51:1.1 Sat Nov 13 07:11:02 2010 +++ src/sys/arch/arm/imx/files.imx51 Tue Nov 30 13:05:27 2010 @@ -1,4 +1,4 @@ -# $NetBSD: files.imx51,v 1.1 2010/11/13 07:11:02 bsh Exp $ +# $NetBSD: files.imx51,v 1.2 2010/11/30 13:05:27 bsh Exp $ # # Configuration info for the Freescale i.MX51 # @@ -46,14 +46,15 @@ defparam opt_imx51clk.h IMX51_IPGCLK_FREQ # iMX GPIO -# device imxgpio: gpiobus -# attach imxgpio at ahb -# file arch/arm/imx/imx31_gpio.c imxgpio needs-flag +device imxgpio: gpiobus +attach imxgpio at axi +file arch/arm/imx/imxgpio.c imxgpio needs-flag +file arch/arm/imx/imx51_gpio.c imxgpio # iMX IOMUX device imxiomux : bus_space_generic attach imxiomux at axi -file arch/arm/imx/imx31_iomux.c imxiomux +file arch/arm/imx/imx51_iomux.c imxiomux # LCD controller # device lcd : bus_dma_generic, wsemuldisplaydev, rasops16, rasops8, rasops4, rasops_rotation @@ -73,8 +74,13 @@ file arch/arm/imx/imx51_uart.c imxuart defflag opt_imxuart.hIMXUARTCONSOLE -# attach ohci at ahb with ohci_ahb : bus_dma_generic -# file arch/arm/imx/ochi_axi.c ohci_axi +# USB controller +# attach of this driver need to be specified in paltform configuration +device imxusbc { unit, irq } : bus_dma_generic +file arch/arm/imx/imx51_usb.c imxusbc + +attach ehci at imxusbc with imxehci +file arch/arm/imx/imxusb.c imxehci # attach wdc at ahb with wdc_ahb : bus_dma_generic # file arch/arm/imx/wdc_axi.c wdc_axi Index: src/sys/arch/arm/imx/imx51_axi.c diff -u src/sys/arch/arm/imx/imx51_axi.c:1.1 src/sys/arch/arm/imx/imx51_axi.c:1.2 --- src/sys/arch/arm/imx/imx51_axi.c:1.1 Sat Nov 13 07:11:02 2010 +++ src/sys/arch/arm/imx/imx51_axi.c Tue Nov 30 13:05:27 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: imx51_axi.c,v 1.1 2010/11/13 07:11:02 bsh Exp $ */ +/* $NetBSD: imx51_axi.c,v 1.2 2010/11/30 13:05:27 bsh Exp $ */ /*- * Copyright (c) 2010 SHIMIZU Ryo @@ -27,7 +27,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: imx51_axi.c,v 1.1 2010/11/13 07:11:02 bsh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: imx51_axi.c,v 1.2 2010/11/30 13:05:27 bsh Exp $"); #include #include @@ -101,9 +101,11 @@ aa = aux; if ((strcmp(cf->cf_name, "tzic") != 0) && - (strcmp(cf->cf_name, "imxuart") != 0)) + (strcmp(cf->cf_name, "imxuart") != 0) && + (strcmp(cf->cf_name, "imxgpio") != 0)) return 0; + aa->aa_name = cf->cf_name; aa->aa_addr = cf->cf_loc[AXICF_ADDR]; aa->aa_size = cf->cf_loc[AXICF_SIZE]; aa->aa_irq = cf->cf_loc[AXICF_IRQ]; Index: src/sys/arch/arm/imx/imx51reg.h diff -u src/sys/arch/arm/imx/imx51reg.h:1.1 src/sys/arch/arm/imx/imx51reg.h:1.2 --- src/sys/arch/arm/imx/imx51reg.h:1.1 Sat Nov 13 07:11:03 2010 +++ src/sys/arch/arm/imx/imx51reg.h Tue Nov 30 13:05:27 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: imx51reg.h,v 1.1 2010/11/13 07:11:03 bsh Exp $ */ +/* $NetBSD: imx51reg.h,v 1.2 2010/11/30 13:05:27 bsh Exp $ */ /*- * Copyright (c) 2007 The NetBSD Foundation, Inc. * All rights reserved. @@ -89,12 +89,72 @@ #define USBOH3_BASE 0x73f8 #define USBOH3_PL301_BASE 0x73fc4000 -#define USB_OTG_BASE 0x43F88000 -#define USB_EHCI1_BASE 0x43F88200 -#define USB_EHCI2_BASE 0x43F88400 -#define USB_EHCI_SIZE 0x0200 -#define USB_CONTROL 0x43F88600 +#define USBOH3_EHCI_SIZE 0x200 +#define USBOH3_OTG 0x000 +#define USBOH3_EHCI(n) (USBOH3_EHCI_SIZE*(n)) /* n=1,2,3 */ + +/* USB_CTRL register */ +#define USBOH3_USBCTRL 0x800 +#define USBCTRL_OWIR __BIT(31) /* OTG Wakeup interrupt request */ +#define USBCTRL_OSIC_SHIFT 29 +#define USBCTRL_OSIC __BITS(29,30) /* OTG Serial interface configuration */ +#define USBCTRL_OUIE __BIT(28) /* OTG Wake-up interrupt enable */ +#define USBCTRL_OBPAL __BITS(25,26) /* OTG Bypass value */ +#define USBCTRL_OPM __
CVS commit: src/sys/arch/arm/conf
Module Name:src Committed By: bsh Date: Tue Nov 30 12:42:48 UTC 2010 Modified Files: src/sys/arch/arm/conf: majors.arm32 Log Message: define major device number for UARTs on i.MX SoCs To generate a diff of this commit: cvs rdiff -u -r1.31 -r1.32 src/sys/arch/arm/conf/majors.arm32 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/arm/conf/majors.arm32 diff -u src/sys/arch/arm/conf/majors.arm32:1.31 src/sys/arch/arm/conf/majors.arm32:1.32 --- src/sys/arch/arm/conf/majors.arm32:1.31 Sat Mar 6 23:45:39 2010 +++ src/sys/arch/arm/conf/majors.arm32 Tue Nov 30 12:42:48 2010 @@ -1,4 +1,4 @@ -# $NetBSD: majors.arm32,v 1.31 2010/03/06 23:45:39 plunky Exp $ +# $NetBSD: majors.arm32,v 1.32 2010/11/30 12:42:48 bsh Exp $ # # Device majors for arm32 # @@ -97,6 +97,7 @@ device-major dmoverio char 102 dmoverio device-major apm char 103 apm device-major sscom char 104 sscom +device-major imxcom char 104 imxuart device-major ksyms char 105 ksyms device-major isdnbchan char 106 isdnbchan device-major epcom char 107 epcom
CVS commit: src/sbin/wsconsctl
Module Name:src Committed By: phx Date: Tue Nov 30 12:22:07 UTC 2010 Modified Files: src/sbin/wsconsctl: map_parse.y map_scan.l Log Message: Allow standalone commands to be recognized, as in the in-kernel keymaps. Also allow the Cmd token. Examples: keycode 210 = Cmd Cmd_BrightnessUp keycode 211 = Cmd_VolumeToggle To generate a diff of this commit: cvs rdiff -u -r1.8 -r1.9 src/sbin/wsconsctl/map_parse.y cvs rdiff -u -r1.5 -r1.6 src/sbin/wsconsctl/map_scan.l Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sbin/wsconsctl/map_parse.y diff -u src/sbin/wsconsctl/map_parse.y:1.8 src/sbin/wsconsctl/map_parse.y:1.9 --- src/sbin/wsconsctl/map_parse.y:1.8 Mon Apr 6 12:35:20 2009 +++ src/sbin/wsconsctl/map_parse.y Tue Nov 30 12:22:06 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: map_parse.y,v 1.8 2009/04/06 12:35:20 lukem Exp $ */ +/* $NetBSD: map_parse.y,v 1.9 2010/11/30 12:22:06 phx Exp $ */ /*- * Copyright (c) 1998 The NetBSD Foundation, Inc. @@ -89,7 +89,7 @@ int ival; } -%token T_KEYSYM T_KEYCODE +%token T_KEYSYM T_KEYCODE T_CMD %token T_KEYSYM_VAR T_KEYSYM_CMD_VAR %token T_NUMBER @@ -147,9 +147,14 @@ | T_KEYSYM_CMD_VAR = { cur_mp->command = $1; } + | T_CMD T_KEYSYM_CMD_VAR = { + cur_mp->command = KS_Cmd; + cur_mp->group1[0] = $2; + } ; -keysym_list : keysym_var = { +keysym_list : /* empty */ + | keysym_var = { cur_mp->group1[0] = $1; cur_mp->group1[1] = ksym_upcase(cur_mp->group1[0]); cur_mp->group2[0] = cur_mp->group1[0]; Index: src/sbin/wsconsctl/map_scan.l diff -u src/sbin/wsconsctl/map_scan.l:1.5 src/sbin/wsconsctl/map_scan.l:1.6 --- src/sbin/wsconsctl/map_scan.l:1.5 Wed Oct 28 19:43:56 2009 +++ src/sbin/wsconsctl/map_scan.l Tue Nov 30 12:22:06 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: map_scan.l,v 1.5 2009/10/28 19:43:56 christos Exp $ */ +/* $NetBSD: map_scan.l,v 1.6 2010/11/30 12:22:06 phx Exp $ */ /*- * Copyright (c) 1998 The NetBSD Foundation, Inc. @@ -70,6 +70,10 @@ return(T_KEYSYM); } +Cmd { + return(T_CMD); + } + [a-zA-Z][a-zA-Z0-9_]* { int i;
CVS commit: src/sys/dev/usb
Module Name:src Committed By: phx Date: Tue Nov 30 11:35:30 UTC 2010 Modified Files: src/sys/dev/usb: ukbd.c usb_quirks.c usb_quirks.h Log Message: Support for Apple notebook keyboards, which have a few quirks. 1. On ISO-keyboard the keycodes for the key left of '1' and right of Shift are swapped. 2. Find the Apple FN key in the report descriptor and do the translations needed, before passing the keycodes to wscons. 3. Those keyboards only have the left Alt key. AltGr is missing. So it is emulated when holding down FN together with Alt. To generate a diff of this commit: cvs rdiff -u -r1.108 -r1.109 src/sys/dev/usb/ukbd.c cvs rdiff -u -r1.69 -r1.70 src/sys/dev/usb/usb_quirks.c cvs rdiff -u -r1.25 -r1.26 src/sys/dev/usb/usb_quirks.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/usb/ukbd.c diff -u src/sys/dev/usb/ukbd.c:1.108 src/sys/dev/usb/ukbd.c:1.109 --- src/sys/dev/usb/ukbd.c:1.108 Wed Nov 3 22:34:24 2010 +++ src/sys/dev/usb/ukbd.c Tue Nov 30 11:35:30 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: ukbd.c,v 1.108 2010/11/03 22:34:24 dyoung Exp $*/ +/* $NetBSD: ukbd.c,v 1.109 2010/11/30 11:35:30 phx Exp $*/ /* * Copyright (c) 1998 The NetBSD Foundation, Inc. @@ -35,7 +35,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: ukbd.c,v 1.108 2010/11/03 22:34:24 dyoung Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ukbd.c,v 1.109 2010/11/30 11:35:30 phx Exp $"); #include #include @@ -92,6 +92,57 @@ #define RELEASE 0x100 #define CODEMASK 0x0ff +struct ukbd_keycodetrans { + u_int8_t from; + u_int8_t to; +}; + +Static const struct ukbd_keycodetrans trtab_apple_fn[] = { + { 0x0c, 0x5d }, /* i -> KP 5 */ + { 0x0d, 0x59 }, /* j -> KP 1 */ + { 0x0e, 0x5a }, /* k -> KP 2 */ + { 0x0f, 0x5b }, /* l -> KP 3 */ + { 0x10, 0x62 }, /* m -> KP 0 */ + { 0x12, 0x5e }, /* o -> KP 6 */ + { 0x13, 0x55 }, /* o -> KP * */ + { 0x18, 0x5c }, /* u -> KP 4 */ + { 0x0c, 0x5d }, /* i -> KP 5 */ + { 0x2a, 0x4c }, /* Backspace -> Delete */ + { 0x28, 0x49 }, /* Return -> Insert */ + { 0x24, 0x5f }, /* 7 -> KP 7 */ + { 0x25, 0x60 }, /* 8 -> KP 8 */ + { 0x26, 0x61 }, /* 9 -> KP 9 */ + { 0x27, 0x54 }, /* 0 -> KP / */ + { 0x2d, 0x67 }, /* - -> KP = */ + { 0x33, 0x56 }, /* ; -> KP - */ + { 0x37, 0x63 }, /* . -> KP . */ + { 0x38, 0x57 }, /* / -> KP + */ + { 0x3a, 0xd1 }, /* F1..F12 mapped to reserved codes 0xd1..0xdc */ + { 0x3b, 0xd2 }, + { 0x3c, 0xd3 }, + { 0x3d, 0xd4 }, + { 0x3e, 0xd5 }, + { 0x3f, 0xd6 }, + { 0x40, 0xd7 }, + { 0x41, 0xd8 }, + { 0x42, 0xd9 }, + { 0x43, 0xda }, + { 0x44, 0xdb }, + { 0x45, 0xdc }, + { 0x4f, 0x4d }, /* Right -> End */ + { 0x50, 0x4a }, /* Left -> Home */ + { 0x51, 0x4e }, /* Down -> PageDown */ + { 0x52, 0x4b }, /* Up -> PageUp */ + { 0x00, 0x00 } +}; + +Static const struct ukbd_keycodetrans trtab_apple_iso[] = { + { 0x35, 0x64 }, /* swap the key above tab with key right of shift */ + { 0x64, 0x35 }, + { 0x31, 0x32 }, /* key left of return is Europe1, not "\|" */ + { 0x00, 0x00 } +}; + #if defined(__NetBSD__) && defined(WSDISPLAY_COMPAT_RAWKBD) #define NN 0 /* no translation */ /* @@ -160,14 +211,21 @@ struct hid_location sc_keycodeloc; u_int sc_nkeycode; - char sc_enabled; + u_int sc_flags; /* flags */ +#define FLAG_ENABLED 0x0001 +#define FLAG_POLLING 0x0002 +#define FLAG_DEBOUNCE 0x0004 /* for quirk handling */ +#define FLAG_APPLE_FIX_ISO 0x0008 +#define FLAG_APPLE_FN 0x0010 +#define FLAG_FN_PRESSED 0x0100 /* FN key is held down */ +#define FLAG_FN_ALT 0x0200 /* Last Alt key was FN-Alt = AltGr */ int sc_console_keyboard; /* we are the console keyboard */ - char sc_debounce; /* for quirk handling */ - struct callout sc_delay; /* for quirk handling */ + struct callout sc_delay; /* for quirk handling */ struct ukbd_data sc_data; /* for quirk handling */ + struct hid_location sc_apple_fn; struct hid_location sc_numloc; struct hid_location sc_capsloc; struct hid_location sc_scroloc; @@ -187,7 +245,6 @@ #endif /* defined(WSDISPLAY_COMPAT_RAWKBD) */ int sc_spl; - int sc_polling; int sc_npollchar; u_int16_t sc_pollchars[MAXKEYS]; #endif /* defined(__NetBSD__) */ @@ -317,6 +374,7 @@ sc->sc_hdev.sc_intr = ukbd_intr; sc->sc_hdev.sc_parent = uha->parent; sc->sc_hdev.sc_report_id = uha->reportid; + sc->sc_flags = 0; if (!pmf_device_register(self, NULL, NULL)) { aprint_normal("\n"); @@ -330,15 +388,23 @@ return; } + /* Quirks */ + qflags = usbd_get_quirks(uha->parent->sc_udev)->uq_flags; + if (qflags & UQ_SPUR_BUT_UP) + sc->sc_flags |= FLAG_DEBOUNCE; + if (qflags & UQ_APPLE_ISO) + sc->sc_flags |= FLAG_APPLE_FIX_ISO; + #ifdef DIAGNOSTIC aprint_normal(": %d modifier keys, %d key codes", sc->sc_nmod, sc->sc_nkeycode); + if (sc->sc_flags & FLAG_APPLE_FN) + aprint_normal(", apple fn key"); + if (sc->sc_flags & FLAG_APPLE_FIX_ISO) + aprint_normal(", fix apple iso"); #endif aprint_normal("\n
CVS commit: src/sys/dev/usb
Module Name:src Committed By: phx Date: Tue Nov 30 11:28:44 UTC 2010 Modified Files: src/sys/dev/usb: usbdevs.h usbdevs_data.h Log Message: regen To generate a diff of this commit: cvs rdiff -u -r1.561 -r1.562 src/sys/dev/usb/usbdevs.h cvs rdiff -u -r1.562 -r1.563 src/sys/dev/usb/usbdevs_data.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/usb/usbdevs.h diff -u src/sys/dev/usb/usbdevs.h:1.561 src/sys/dev/usb/usbdevs.h:1.562 --- src/sys/dev/usb/usbdevs.h:1.561 Thu Nov 25 14:16:55 2010 +++ src/sys/dev/usb/usbdevs.h Tue Nov 30 11:28:44 2010 @@ -1,10 +1,10 @@ -/* $NetBSD: usbdevs.h,v 1.561 2010/11/25 14:16:55 sborrill Exp $ */ +/* $NetBSD: usbdevs.h,v 1.562 2010/11/30 11:28:44 phx Exp $ */ /* * THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT. * * generated from: - * NetBSD: usbdevs,v 1.568 2010/11/25 14:16:24 sborrill Exp + * NetBSD: usbdevs,v 1.569 2010/11/30 11:25:25 phx Exp */ /* @@ -762,9 +762,29 @@ /* Apple Computer products */ #define USB_PRODUCT_APPLE_EXT_KBD 0x020c /* Apple Extended USB Keyboard */ +#define USB_PRODUCT_APPLE_FOUNTAIN_ANSI 0x020e /* Apple Internal Keyboard/Trackpad (Fountain/ANSI) */ +#define USB_PRODUCT_APPLE_FOUNTAIN_ISO 0x020f /* Apple Internal Keyboard/Trackpad (Fountain/ISO) */ +#define USB_PRODUCT_APPLE_GEYSER_ANSI 0x0214 /* Apple Internal Keyboard/Trackpad (Geyser/ANSI) */ +#define USB_PRODUCT_APPLE_GEYSER_ISO 0x0215 /* Apple Internal Keyboard/Trackpad (Geyser/ISO) */ +#define USB_PRODUCT_APPLE_GEYSER_JIS 0x0216 /* Apple Internal Keyboard/Trackpad (Geyser/JIS) */ +#define USB_PRODUCT_APPLE_GEYSER3_ANSI 0x0217 /* Apple Internal Keyboard/Trackpad (Geyser3/ANSI) */ +#define USB_PRODUCT_APPLE_GEYSER3_ISO 0x0218 /* Apple Internal Keyboard/Trackpad (Geyser3/ISO) */ +#define USB_PRODUCT_APPLE_GEYSER3_JIS 0x0219 /* Apple Internal Keyboard/Trackpad (Geyser3/JIS) */ +#define USB_PRODUCT_APPLE_GEYSER4_ANSI 0x021a /* Apple Internal Keyboard/Trackpad (Geyser4/ANSI) */ +#define USB_PRODUCT_APPLE_GEYSER4_ISO 0x021b /* Apple Internal Keyboard/Trackpad (Geyser4/ISO) */ +#define USB_PRODUCT_APPLE_GEYSER4_JIS 0x021c /* Apple Internal Keyboard/Trackpad (Geyser4/JIS) */ +#define USB_PRODUCT_APPLE_WELLSPRING_ANSI 0x0223 /* Apple Internal Keyboard/Trackpad (Wellspring/ANSI) */ +#define USB_PRODUCT_APPLE_WELLSPRING_ISO 0x0224 /* Apple Internal Keyboard/Trackpad (Wellspring/ISO) */ +#define USB_PRODUCT_APPLE_WELLSPRING_JIS 0x0225 /* Apple Internal Keyboard/Trackpad (Wellspring/JIS) */ +#define USB_PRODUCT_APPLE_WELLSPRING2_ANSI 0x0230 /* Apple Internal Keyboard/Trackpad (Wellspring2/ANSI) */ +#define USB_PRODUCT_APPLE_WELLSPRING2_ISO 0x0231 /* Apple Internal Keyboard/Trackpad (Wellspring2/ISO) */ +#define USB_PRODUCT_APPLE_WELLSPRING2_JIS 0x0232 /* Apple Internal Keyboard/Trackpad (Wellspring2/JIS) */ #define USB_PRODUCT_APPLE_OPTMOUSE 0x0302 /* Optical mouse */ #define USB_PRODUCT_APPLE_MIGHTYMOUSE 0x0304 /* Mighty Mouse */ +#define USB_PRODUCT_APPLE_FOUNTAIN_TP 0x030a /* Apple Internal Trackpad (Fountain) */ +#define USB_PRODUCT_APPLE_GEYSER1_TP 0x030b /* Apple Internal Trackpad (Geyser) */ #define USB_PRODUCT_APPLE_MAGICMOUSE 0x030d /* Magic Mouse */ +#define USB_PRODUCT_APPLE_ADB 0x1000 /* Internal ADB device */ #define USB_PRODUCT_APPLE_EXT_KBD_HUB 0x1003 /* Hub in Apple Extended USB Keyboard */ #define USB_PRODUCT_APPLE_SPEAKERS 0x1101 /* Speakers */ #define USB_PRODUCT_APPLE_IPHONE 0x1290 /* iPhone */ Index: src/sys/dev/usb/usbdevs_data.h diff -u src/sys/dev/usb/usbdevs_data.h:1.562 src/sys/dev/usb/usbdevs_data.h:1.563 --- src/sys/dev/usb/usbdevs_data.h:1.562 Thu Nov 25 14:16:55 2010 +++ src/sys/dev/usb/usbdevs_data.h Tue Nov 30 11:28:44 2010 @@ -1,10 +1,10 @@ -/* $NetBSD: usbdevs_data.h,v 1.562 2010/11/25 14:16:55 sborrill Exp $ */ +/* $NetBSD: usbdevs_data.h,v 1.563 2010/11/30 11:28:44 phx Exp $ */ /* * THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT. * * generated from: - * NetBSD: usbdevs,v 1.568 2010/11/25 14:16:24 sborrill Exp + * NetBSD: usbdevs,v 1.569 2010/11/30 11:25:25 phx Exp */ /* @@ -2527,6 +2527,74 @@ "Apple Extended USB Keyboard", }, { + USB_VENDOR_APPLE, USB_PRODUCT_APPLE_FOUNTAIN_ANSI, + "Apple Internal Keyboard/Trackpad (Fountain/ANSI)", + }, + { + USB_VENDOR_APPLE, USB_PRODUCT_APPLE_FOUNTAIN_ISO, + "Apple Internal Keyboard/Trackpad (Fountain/ISO)", + }, + { + USB_VENDOR_APPLE, USB_PRODUCT_APPLE_GEYSER_ANSI, + "Apple Internal Keyboard/Trackpad (Geyser/ANSI)", + }, + { + USB_VENDOR_APPLE, USB_PRODUCT_APPLE_GEYSER_ISO, + "Apple Internal Keyboard/Trackpad (Geyser/ISO)", + }, + { + USB_VENDOR_APPLE, USB_PRODUCT_APPLE_GEYSER_JIS, + "Apple Internal Keyboard/Trackpad (Geyser/JIS)", + }, + { + USB_VENDOR_APPLE, USB_PRODUCT_APPLE_GEYSER3_ANSI, + "Apple Internal Keyboard/Trackpad (Geyser3/ANSI)", + }, + { + USB_VENDOR_APPLE, USB
CVS commit: src/sys/dev/usb
Module Name:src Committed By: phx Date: Tue Nov 30 11:25:25 UTC 2010 Modified Files: src/sys/dev/usb: usbdevs Log Message: Added some Apple trackpad devices for use in usb_quirks.c and macppc/dev/pbms.c To generate a diff of this commit: cvs rdiff -u -r1.568 -r1.569 src/sys/dev/usb/usbdevs Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/usb/usbdevs diff -u src/sys/dev/usb/usbdevs:1.568 src/sys/dev/usb/usbdevs:1.569 --- src/sys/dev/usb/usbdevs:1.568 Thu Nov 25 14:16:24 2010 +++ src/sys/dev/usb/usbdevs Tue Nov 30 11:25:25 2010 @@ -1,4 +1,4 @@ -$NetBSD: usbdevs,v 1.568 2010/11/25 14:16:24 sborrill Exp $ +$NetBSD: usbdevs,v 1.569 2010/11/30 11:25:25 phx Exp $ /* * Copyright (c) 1998-2004 The NetBSD Foundation, Inc. @@ -755,9 +755,29 @@ /* Apple Computer products */ product APPLE EXT_KBD 0x020c Apple Extended USB Keyboard +product APPLE FOUNTAIN_ANSI 0x020e Apple Internal Keyboard/Trackpad (Fountain/ANSI) +product APPLE FOUNTAIN_ISO 0x020f Apple Internal Keyboard/Trackpad (Fountain/ISO) +product APPLE GEYSER_ANSI 0x0214 Apple Internal Keyboard/Trackpad (Geyser/ANSI) +product APPLE GEYSER_ISO 0x0215 Apple Internal Keyboard/Trackpad (Geyser/ISO) +product APPLE GEYSER_JIS 0x0216 Apple Internal Keyboard/Trackpad (Geyser/JIS) +product APPLE GEYSER3_ANSI 0x0217 Apple Internal Keyboard/Trackpad (Geyser3/ANSI) +product APPLE GEYSER3_ISO 0x0218 Apple Internal Keyboard/Trackpad (Geyser3/ISO) +product APPLE GEYSER3_JIS 0x0219 Apple Internal Keyboard/Trackpad (Geyser3/JIS) +product APPLE GEYSER4_ANSI 0x021a Apple Internal Keyboard/Trackpad (Geyser4/ANSI) +product APPLE GEYSER4_ISO 0x021b Apple Internal Keyboard/Trackpad (Geyser4/ISO) +product APPLE GEYSER4_JIS 0x021c Apple Internal Keyboard/Trackpad (Geyser4/JIS) +product APPLE WELLSPRING_ANSI 0x0223 Apple Internal Keyboard/Trackpad (Wellspring/ANSI) +product APPLE WELLSPRING_ISO 0x0224 Apple Internal Keyboard/Trackpad (Wellspring/ISO) +product APPLE WELLSPRING_JIS 0x0225 Apple Internal Keyboard/Trackpad (Wellspring/JIS) +product APPLE WELLSPRING2_ANSI 0x0230 Apple Internal Keyboard/Trackpad (Wellspring2/ANSI) +product APPLE WELLSPRING2_ISO 0x0231 Apple Internal Keyboard/Trackpad (Wellspring2/ISO) +product APPLE WELLSPRING2_JIS 0x0232 Apple Internal Keyboard/Trackpad (Wellspring2/JIS) product APPLE OPTMOUSE 0x0302 Optical mouse product APPLE MIGHTYMOUSE 0x0304 Mighty Mouse +product APPLE FOUNTAIN_TP 0x030a Apple Internal Trackpad (Fountain) +product APPLE GEYSER1_TP 0x030b Apple Internal Trackpad (Geyser) product APPLE MAGICMOUSE 0x030d Magic Mouse +product APPLE ADB 0x1000 Internal ADB device product APPLE EXT_KBD_HUB 0x1003 Hub in Apple Extended USB Keyboard product APPLE SPEAKERS 0x1101 Speakers product APPLE IPHONE 0x1290 iPhone
CVS commit: xsrc/external/mit/xorg-server/dist/hw/xfree86/xaa
Module Name:xsrc Committed By: skrll Date: Tue Nov 30 11:09:02 UTC 2010 Modified Files: xsrc/external/mit/xorg-server/dist/hw/xfree86/xaa: xaaPCache.c Log Message: Avoid unaligned accesses. Needed to make my CATS start X without an xorg.conf. Reviewed and tested by macal...@. thanks. To generate a diff of this commit: cvs rdiff -u -r1.1.1.3 -r1.2 \ xsrc/external/mit/xorg-server/dist/hw/xfree86/xaa/xaaPCache.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: xsrc/external/mit/xorg-server/dist/hw/xfree86/xaa/xaaPCache.c diff -u xsrc/external/mit/xorg-server/dist/hw/xfree86/xaa/xaaPCache.c:1.1.1.3 xsrc/external/mit/xorg-server/dist/hw/xfree86/xaa/xaaPCache.c:1.2 --- xsrc/external/mit/xorg-server/dist/hw/xfree86/xaa/xaaPCache.c:1.1.1.3 Tue Nov 23 05:21:41 2010 +++ xsrc/external/mit/xorg-server/dist/hw/xfree86/xaa/xaaPCache.c Tue Nov 30 11:09:01 2010 @@ -1188,6 +1188,22 @@ return TRUE; } +static inline CARD32 +load_24bits(void *where) +{ +unsigned char *bytes = where; + +if (__predict_true(((uintptr_t)where & 0x3) == 0)) { +return (*(CARD32 *)where) & 0x00ff; +} + +#if X_BYTE_ORDER == X_LITTLE_ENDIAN +return bytes[2] << 16 + bytes[1] << 8 + bytes[0]; +#endif +#if X_BYTE_ORDER == X_BIG_ENDIAN +return bytes[0] << 16 + bytes[1] << 8 + bytes[2]; +#endif +} Bool XAACheckTileReducibility(PixmapPtr pPixmap, Bool checkMono) @@ -1323,13 +1339,13 @@ } else if(pPixmap->drawable.bitsPerPixel == 24) { CARD32 val; unsigned char *srcp = pPixmap->devPrivate.ptr; - fg = *((CARD32*)srcp) & 0x00FF; + fg = load_24bits(srcp); pitch = pPixmap->devKind; j *= 3; for(y = 0; y < i; y++) { bits[y] = 0; for(x = 0; x < j; x+=3) { - val = *((CARD32*)(srcp+x)) & 0x00FF; + val = load_24bits(srcp+x); if(val != fg) { if(bg == -1) bg = val; else if(bg != val)
CVS commit: src/sys
Module Name:src Committed By: hannken Date: Tue Nov 30 10:55:26 UTC 2010 Modified Files: src/sys/miscfs/genfs: genfs_io.c src/sys/uvm: uvm_bio.c Log Message: Always take the object lock before changing vmpage flags. Fixes a deadlock where a thread is waiting on "genput" but the page in question is neither BUSY nor WANTED. No objections from tech-k...@. To generate a diff of this commit: cvs rdiff -u -r1.43 -r1.44 src/sys/miscfs/genfs/genfs_io.c cvs rdiff -u -r1.70 -r1.71 src/sys/uvm/uvm_bio.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/miscfs/genfs/genfs_io.c diff -u src/sys/miscfs/genfs/genfs_io.c:1.43 src/sys/miscfs/genfs/genfs_io.c:1.44 --- src/sys/miscfs/genfs/genfs_io.c:1.43 Fri Nov 19 05:38:10 2010 +++ src/sys/miscfs/genfs/genfs_io.c Tue Nov 30 10:55:25 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: genfs_io.c,v 1.43 2010/11/19 05:38:10 uebayasi Exp $ */ +/* $NetBSD: genfs_io.c,v 1.44 2010/11/30 10:55:25 hannken Exp $ */ /* * Copyright (c) 1982, 1986, 1989, 1993 @@ -31,7 +31,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: genfs_io.c,v 1.43 2010/11/19 05:38:10 uebayasi Exp $"); +__KERNEL_RCSID(0, "$NetBSD: genfs_io.c,v 1.44 2010/11/30 10:55:25 hannken Exp $"); #include #include @@ -569,6 +569,7 @@ iobytes); skipbytes += iobytes; + mutex_enter(&uobj->vmobjlock); for (i = 0; i < holepages; i++) { if (memwrite) { pgs[pidx + i]->flags &= ~PG_CLEAN; @@ -577,6 +578,7 @@ pgs[pidx + i]->flags |= PG_RDONLY; } } + mutex_exit(&uobj->vmobjlock); continue; } @@ -638,6 +640,7 @@ UVMHIST_LOG(ubchist, "gop_alloc off 0x%x/0x%x -> %d", startoffset, npages << PAGE_SHIFT, error,0); if (!error) { + mutex_enter(&uobj->vmobjlock); for (i = 0; i < npages; i++) { struct vm_page *pg = pgs[i]; @@ -648,6 +651,7 @@ UVMHIST_LOG(ubchist, "mark dirty pg %p", pg,0,0,0); } + mutex_exit(&uobj->vmobjlock); } } if (!glocked) { Index: src/sys/uvm/uvm_bio.c diff -u src/sys/uvm/uvm_bio.c:1.70 src/sys/uvm/uvm_bio.c:1.71 --- src/sys/uvm/uvm_bio.c:1.70 Tue Jun 22 18:34:50 2010 +++ src/sys/uvm/uvm_bio.c Tue Nov 30 10:55:25 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: uvm_bio.c,v 1.70 2010/06/22 18:34:50 rmind Exp $ */ +/* $NetBSD: uvm_bio.c,v 1.71 2010/11/30 10:55:25 hannken Exp $ */ /* * Copyright (c) 1998 Chuck Silvers. @@ -34,7 +34,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: uvm_bio.c,v 1.70 2010/06/22 18:34:50 rmind Exp $"); +__KERNEL_RCSID(0, "$NetBSD: uvm_bio.c,v 1.71 2010/11/30 10:55:25 hannken Exp $"); #include "opt_uvmhist.h" #include "opt_ubc.h" @@ -645,6 +645,7 @@ memset((char *)umapva + endoff, 0, zerolen); } umap->flags &= ~UMAP_PAGES_LOCKED; + mutex_enter(&uobj->vmobjlock); mutex_enter(&uvm_pageqlock); for (i = 0; i < npages; i++) { rv = pmap_extract(pmap_kernel(), @@ -658,7 +659,6 @@ mutex_exit(&uvm_pageqlock); pmap_kremove(umapva, ubc_winsize); pmap_update(pmap_kernel()); - mutex_enter(&uobj->vmobjlock); uvm_page_unbusy(pgs, npages); mutex_exit(&uobj->vmobjlock); unmapped = true;
CVS commit: src/sys/sys
Module Name:src Committed By: dholland Date: Tue Nov 30 10:50:29 UTC 2010 Modified Files: src/sys/sys: param.h Log Message: Time for 5.99.41 - struct componentbuf and struct nameidata both changed. To generate a diff of this commit: cvs rdiff -u -r1.376 -r1.377 src/sys/sys/param.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/param.h diff -u src/sys/sys/param.h:1.376 src/sys/sys/param.h:1.377 --- src/sys/sys/param.h:1.376 Fri Nov 19 06:46:33 2010 +++ src/sys/sys/param.h Tue Nov 30 10:50:29 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: param.h,v 1.376 2010/11/19 06:46:33 dholland Exp $ */ +/* $NetBSD: param.h,v 1.377 2010/11/30 10:50:29 dholland Exp $ */ /*- * Copyright (c) 1982, 1986, 1989, 1993 @@ -63,7 +63,7 @@ * 2.99.9 (299000900) */ -#define __NetBSD_Version__ 599004000 /* NetBSD 5.99.40 */ +#define __NetBSD_Version__ 599004100 /* NetBSD 5.99.41 */ #define __NetBSD_Prereq__(M,m,p) (M) * 1) + \ (m) * 100) + (p) * 100) <= __NetBSD_Version__)
CVS commit: src/lib/libp2k
Module Name:src Committed By: dholland Date: Tue Nov 30 10:49:23 UTC 2010 Modified Files: src/lib/libp2k: p2k.c Log Message: SAVENAME and HASBUF namei flags have been removed; update accordingly. (pooka@ says not to worry about compat.) To generate a diff of this commit: cvs rdiff -u -r1.45 -r1.46 src/lib/libp2k/p2k.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libp2k/p2k.c diff -u src/lib/libp2k/p2k.c:1.45 src/lib/libp2k/p2k.c:1.46 --- src/lib/libp2k/p2k.c:1.45 Fri Nov 26 11:12:06 2010 +++ src/lib/libp2k/p2k.c Tue Nov 30 10:49:22 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: p2k.c,v 1.45 2010/11/26 11:12:06 pooka Exp $ */ +/* $NetBSD: p2k.c,v 1.46 2010/11/30 10:49:22 dholland Exp $ */ /* * Copyright (c) 2007, 2008, 2009 Antti Kantee. All Rights Reserved. @@ -696,17 +696,17 @@ if (pcn->pcn_flags & RUMP_NAMEI_SAVESTART) { if (p2n_dir->p2n_cn_ren_src) freecn(p2n_dir->p2n_cn_ren_src, - RUMPCN_FORCEFREE); + 0); p2n_dir->p2n_cn_ren_src = cn; } else { - freecn(cn, RUMPCN_FORCEFREE); + freecn(cn, 0); cn = NULL; } } else { assert(pcn->pcn_nameiop == RUMP_NAMEI_RENAME); if (p2n_dir->p2n_cn_ren_targ) freecn(p2n_dir->p2n_cn_ren_targ, - RUMPCN_FORCEFREE); + 0); p2n_dir->p2n_cn_ren_targ = cn; } } else { @@ -803,7 +803,7 @@ cn = p2n_dir->p2n_cn; p2n_dir->p2n_cn = NULL; } else { - cn = makecn(pcn, RUMP_NAMEI_HASBUF); + cn = makecn(pcn, 0); } RUMP_VOP_LOCK(dvp, LK_EXCLUSIVE); @@ -1032,11 +1032,11 @@ p2n_dir->p2n_cn = NULL; } if ((cnp = p2n_dir->p2n_cn_ren_src) != NULL) { - freecn(cnp, RUMPCN_FORCEFREE); + freecn(cnp, 0); p2n_dir->p2n_cn_ren_src = NULL; } if ((cnp = p2n_dir->p2n_cn_ren_targ) != NULL) { - freecn(cnp, RUMPCN_FORCEFREE); + freecn(cnp, 0); p2n_dir->p2n_cn_ren_targ = NULL; } @@ -1056,7 +1056,7 @@ cn = p2n_dir->p2n_cn; p2n_dir->p2n_cn = NULL; } else { - cn = makecn(pcn, RUMP_NAMEI_HASBUF); + cn = makecn(pcn, 0); } RUMP_VOP_LOCK(dvp, LK_EXCLUSIVE); @@ -1095,7 +1095,7 @@ cn = p2n_dir->p2n_cn; p2n_dir->p2n_cn = NULL; } else { - cn = makecn(pcn, RUMP_NAMEI_HASBUF); + cn = makecn(pcn, 0); } RUMP_VOP_LOCK(dvp, LK_EXCLUSIVE); @@ -1123,14 +1123,14 @@ cn_src = p2n_srcdir->p2n_cn_ren_src; p2n_srcdir->p2n_cn_ren_src = NULL; } else { - cn_src = makecn(pcn_src, RUMP_NAMEI_HASBUF); + cn_src = makecn(pcn_src, 0); } if (p2n_targdir->p2n_cn_ren_targ) { cn_targ = p2n_targdir->p2n_cn_ren_targ; p2n_targdir->p2n_cn_ren_targ = NULL; } else { - cn_targ = makecn(pcn_targ, RUMP_NAMEI_HASBUF); + cn_targ = makecn(pcn_targ, 0); } dvp = OPC2VP(src_dir); @@ -1153,8 +1153,8 @@ if (tvp) { assert(RUMP_VOP_ISLOCKED(tvp) == 0); } - freecn(cn_src, RUMPCN_FORCEFREE); - freecn(cn_targ, RUMPCN_FORCEFREE); + freecn(cn_src, 0); + freecn(cn_targ, 0); return rv; }
CVS commit: src/sys/rump/librump/rumpvfs
Module Name:src Committed By: dholland Date: Tue Nov 30 10:48:27 UTC 2010 Modified Files: src/sys/rump/librump/rumpvfs: rump_vfs.c rumpfs.c Log Message: SAVENAME and HASBUF namei flags have been removed; update rumpvfs accordingly. To generate a diff of this commit: cvs rdiff -u -r1.60 -r1.61 src/sys/rump/librump/rumpvfs/rump_vfs.c cvs rdiff -u -r1.75 -r1.76 src/sys/rump/librump/rumpvfs/rumpfs.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/rump/librump/rumpvfs/rump_vfs.c diff -u src/sys/rump/librump/rumpvfs/rump_vfs.c:1.60 src/sys/rump/librump/rumpvfs/rump_vfs.c:1.61 --- src/sys/rump/librump/rumpvfs/rump_vfs.c:1.60 Sun Nov 21 16:19:19 2010 +++ src/sys/rump/librump/rumpvfs/rump_vfs.c Tue Nov 30 10:48:27 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: rump_vfs.c,v 1.60 2010/11/21 16:19:19 pooka Exp $ */ +/* $NetBSD: rump_vfs.c,v 1.61 2010/11/30 10:48:27 dholland Exp $ */ /* * Copyright (c) 2008 Antti Kantee. All Rights Reserved. @@ -29,7 +29,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: rump_vfs.c,v 1.60 2010/11/21 16:19:19 pooka Exp $"); +__KERNEL_RCSID(0, "$NetBSD: rump_vfs.c,v 1.61 2010/11/30 10:48:27 dholland Exp $"); #include #include @@ -186,9 +186,7 @@ cnp->cn_nameiop = nameiop; cnp->cn_flags = flags; - cnp->cn_pnbuf = PNBUF_GET(); - strcpy(cnp->cn_pnbuf, name); - cnp->cn_nameptr = cnp->cn_pnbuf; + cnp->cn_nameptr = name; cnp->cn_namelen = namelen; cnp->cn_hash = namei_hash(name, &cp); @@ -204,8 +202,6 @@ if (flags & RUMPCN_FREECRED) rump_cred_put(cnp->cn_cred); - if ((cnp->cn_flags & SAVENAME) == 0 || flags & RUMPCN_FORCEFREE) - PNBUF_PUT(cnp->cn_pnbuf); kmem_free(cnp, sizeof(*cnp)); } @@ -213,10 +209,9 @@ rump_checksavecn(struct componentname *cnp) { - if ((cnp->cn_flags & (SAVENAME | SAVESTART)) == 0) { + if ((cnp->cn_flags & SAVESTART) == 0) { return 0; } else { - cnp->cn_flags |= HASBUF; return 1; } } @@ -265,8 +260,6 @@ cnp = kmem_alloc(sizeof(*cnp), KM_SLEEP); memcpy(cnp, &nd.ni_cnd, sizeof(*cnp)); *cnpp = cnp; - } else if (nd.ni_cnd.cn_flags & HASBUF) { - panic("%s: pathbuf mismatch", __func__); } pathbuf_destroy(pb); Index: src/sys/rump/librump/rumpvfs/rumpfs.c diff -u src/sys/rump/librump/rumpvfs/rumpfs.c:1.75 src/sys/rump/librump/rumpvfs/rumpfs.c:1.76 --- src/sys/rump/librump/rumpvfs/rumpfs.c:1.75 Tue Nov 30 01:22:50 2010 +++ src/sys/rump/librump/rumpvfs/rumpfs.c Tue Nov 30 10:48:27 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: rumpfs.c,v 1.75 2010/11/30 01:22:50 dholland Exp $ */ +/* $NetBSD: rumpfs.c,v 1.76 2010/11/30 10:48:27 dholland Exp $ */ /* * Copyright (c) 2009, 2010 Antti Kantee. All Rights Reserved. @@ -26,7 +26,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: rumpfs.c,v 1.75 2010/11/30 01:22:50 dholland Exp $"); +__KERNEL_RCSID(0, "$NetBSD: rumpfs.c,v 1.76 2010/11/30 10:48:27 dholland Exp $"); #include #include @@ -731,11 +731,8 @@ return ENOENT; if (!rd && (cnp->cn_flags & ISLASTCN) && cnp->cn_nameiop == CREATE) { - cnp->cn_flags |= SAVENAME; return EJUSTRETURN; } - if ((cnp->cn_flags & ISLASTCN) && cnp->cn_nameiop == DELETE) - cnp->cn_flags |= SAVENAME; rn = rd->rd_node; @@ -814,7 +811,6 @@ makedir(rnd, cnp, rn); out: - PNBUF_PUT(cnp->cn_pnbuf); vput(dvp); return rv; } @@ -843,7 +839,6 @@ rn->rn_flags |= RUMPNODE_CANRECLAIM; out: - PNBUF_PUT(cnp->cn_pnbuf); vput(dvp); vput(vp); @@ -875,7 +870,6 @@ freedir(rnd, cnp); rn->rn_flags |= RUMPNODE_CANRECLAIM; - PNBUF_PUT(cnp->cn_pnbuf); vput(dvp); vput(vp); @@ -906,7 +900,6 @@ makedir(rnd, cnp, rn); out: - PNBUF_PUT(cnp->cn_pnbuf); vput(dvp); return rv; } @@ -937,7 +930,6 @@ makedir(rnd, cnp, rn); out: - PNBUF_PUT(cnp->cn_pnbuf); vput(dvp); return rv; }
CVS commit: src/sys/rump/include/rump
Module Name:src Committed By: dholland Date: Tue Nov 30 10:46:59 UTC 2010 Modified Files: src/sys/rump/include/rump: rump.h Log Message: RUMPCN_FORCEFREE is no longer needed. To generate a diff of this commit: cvs rdiff -u -r1.47 -r1.48 src/sys/rump/include/rump/rump.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/rump/include/rump/rump.h diff -u src/sys/rump/include/rump/rump.h:1.47 src/sys/rump/include/rump/rump.h:1.48 --- src/sys/rump/include/rump/rump.h:1.47 Mon Nov 15 20:37:21 2010 +++ src/sys/rump/include/rump/rump.h Tue Nov 30 10:46:59 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: rump.h,v 1.47 2010/11/15 20:37:21 pooka Exp $ */ +/* $NetBSD: rump.h,v 1.48 2010/11/30 10:46:59 dholland Exp $ */ /* * Copyright (c) 2007 Antti Kantee. All Rights Reserved. @@ -75,7 +75,6 @@ /* rumpvfs */ #define RUMPCN_FREECRED 0x02 -#define RUMPCN_FORCEFREE 0x04 #define RUMP_ETFS_SIZE_ENDOFF ((uint64_t)-1) enum rump_etfs_type { RUMP_ETFS_REG,
CVS commit: src/external/cddl/osnet/dist/uts/common/fs/zfs
Module Name:src Committed By: dholland Date: Tue Nov 30 10:45:27 UTC 2010 Modified Files: src/external/cddl/osnet/dist/uts/common/fs/zfs: zfs_replay.c zfs_vnops.c Log Message: SAVENAME and HASBUF namei flags have been abolished; update zfs to match. To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 \ src/external/cddl/osnet/dist/uts/common/fs/zfs/zfs_replay.c \ src/external/cddl/osnet/dist/uts/common/fs/zfs/zfs_vnops.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/cddl/osnet/dist/uts/common/fs/zfs/zfs_replay.c diff -u src/external/cddl/osnet/dist/uts/common/fs/zfs/zfs_replay.c:1.6 src/external/cddl/osnet/dist/uts/common/fs/zfs/zfs_replay.c:1.7 --- src/external/cddl/osnet/dist/uts/common/fs/zfs/zfs_replay.c:1.6 Thu Jun 24 13:03:05 2010 +++ src/external/cddl/osnet/dist/uts/common/fs/zfs/zfs_replay.c Tue Nov 30 10:45:27 2010 @@ -474,7 +474,7 @@ } cn.cn_cred = kcred; - cn.cn_flags = SAVENAME; + cn.cn_flags = 0; vn_lock(ZTOV(dzp), LK_EXCLUSIVE | LK_RETRY); switch (txtype) { @@ -563,7 +563,7 @@ cn.cn_nameptr = name; cn.cn_namelen = strlen(name); cn.cn_nameiop = DELETE; - cn.cn_flags = ISLASTCN | SAVENAME; + cn.cn_flags = ISLASTCN; //cn.cn_lkflags = LK_EXCLUSIVE | LK_RETRY; cn.cn_cred = kcred; vn_lock(ZTOV(dzp), LK_EXCLUSIVE | LK_RETRY); @@ -615,7 +615,7 @@ vflg |= FIGNORECASE; cn.cn_nameptr = name; cn.cn_cred = kcred; - cn.cn_flags = SAVENAME; + cn.cn_flags = 0; vn_lock(ZTOV(dzp), LK_EXCLUSIVE | LK_RETRY); vn_lock(ZTOV(zp), LK_EXCLUSIVE | LK_RETRY); @@ -659,7 +659,7 @@ scn.cn_nameptr = sname; scn.cn_namelen = strlen(sname); scn.cn_nameiop = DELETE; - scn.cn_flags = ISLASTCN | SAVENAME; + scn.cn_flags = ISLASTCN; // scn.cn_lkflags = LK_EXCLUSIVE | LK_RETRY; scn.cn_cred = kcred; vn_lock(ZTOV(sdzp), LK_EXCLUSIVE | LK_RETRY); @@ -672,7 +672,7 @@ tcn.cn_nameptr = tname; tcn.cn_namelen = strlen(tname); tcn.cn_nameiop = RENAME; - tcn.cn_flags = ISLASTCN | SAVENAME; + tcn.cn_flags = ISLASTCN; // tcn.cn_lkflags = LK_EXCLUSIVE | LK_RETRY; tcn.cn_cred = kcred; vn_lock(ZTOV(tdzp), LK_EXCLUSIVE | LK_RETRY); Index: src/external/cddl/osnet/dist/uts/common/fs/zfs/zfs_vnops.c diff -u src/external/cddl/osnet/dist/uts/common/fs/zfs/zfs_vnops.c:1.6 src/external/cddl/osnet/dist/uts/common/fs/zfs/zfs_vnops.c:1.7 --- src/external/cddl/osnet/dist/uts/common/fs/zfs/zfs_vnops.c:1.6 Sun Jul 25 10:31:45 2010 +++ src/external/cddl/osnet/dist/uts/common/fs/zfs/zfs_vnops.c Tue Nov 30 10:45:27 2010 @@ -1331,13 +1331,10 @@ case RENAME: if (error == ENOENT) { error = EJUSTRETURN; -cnp->cn_flags |= SAVENAME; break; } /* FALLTHROUGH */ case DELETE: - if (error == 0) -cnp->cn_flags |= SAVENAME; break; } } @@ -4863,8 +4860,6 @@ vattr_t *vap = ap->a_vap; int mode; - ASSERT(cnp->cn_flags & SAVENAME); - vattr_init_mask(vap); mode = vap->va_mode & ALLPERMS; @@ -4876,8 +4871,6 @@ zfs_netbsd_remove(struct vop_remove_args *ap) { - ASSERT(ap->a_cnp->cn_flags & SAVENAME); - return (zfs_remove(ap->a_dvp, (char *)ap->a_cnp->cn_nameptr, ap->a_cnp->cn_cred, NULL, 0)); } @@ -4887,8 +4880,6 @@ { vattr_t *vap = ap->a_vap; - ASSERT(ap->a_cnp->cn_flags & SAVENAME); - vattr_init_mask(vap); return (zfs_mkdir(ap->a_dvp, (char *)ap->a_cnp->cn_nameptr, vap, ap->a_vpp, @@ -4900,8 +4891,6 @@ { struct componentname *cnp = ap->a_cnp; - ASSERT(cnp->cn_flags & SAVENAME); - return (zfs_rmdir(ap->a_dvp, (char *)cnp->cn_nameptr, NULL, cnp->cn_cred, NULL, 0)); } @@ -5053,8 +5042,8 @@ vnode_t *tvp = ap->a_tvp; int error; - ASSERT(ap->a_fcnp->cn_flags & (SAVENAME|SAVESTART)); - ASSERT(ap->a_tcnp->cn_flags & (SAVENAME|SAVESTART)); + ASSERT(ap->a_fcnp->cn_flags & SAVESTART); + ASSERT(ap->a_tcnp->cn_flags & SAVESTART); error = zfs_rename(fdvp, (char *)ap->a_fcnp->cn_nameptr, tdvp, (char *)ap->a_tcnp->cn_nameptr, ap->a_fcnp->cn_cred, NULL, 0); @@ -5077,8 +5066,6 @@ struct componentname *cnp = ap->a_cnp; vattr_t *vap = ap->a_vap; - ASSERT(cnp->cn_flags & SAVENAME); - vap->va_type = VLNK; /* Netbsd: Syscall only sets va_mode. */ vattr_init_mask(vap); @@ -5264,8 +5251,6 @@ { struct componentname *cnp = ap->a_cnp; - ASSERT(cnp->cn_flags & SAVENAME); - return (zfs_link(ap->a_dvp, ap->a_vp, (char *)cnp->cn_nameptr, cnp->cn_cred, NULL, 0)); }
CVS commit: src/sys
Module Name:src Committed By: dholland Date: Tue Nov 30 10:44:46 UTC 2010 Modified Files: src/sys/rump/include/rump: rump_namei.h src/sys/sys: namei.h Log Message: Regen for both preceding commits of namei.src together. I suppose I should technically have regen'd separately for each but it didn't seem worthwhile. To generate a diff of this commit: cvs rdiff -u -r1.8 -r1.9 src/sys/rump/include/rump/rump_namei.h cvs rdiff -u -r1.69 -r1.70 src/sys/sys/namei.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/rump/include/rump/rump_namei.h diff -u src/sys/rump/include/rump/rump_namei.h:1.8 src/sys/rump/include/rump/rump_namei.h:1.9 --- src/sys/rump/include/rump/rump_namei.h:1.8 Fri Nov 19 06:45:29 2010 +++ src/sys/rump/include/rump/rump_namei.h Tue Nov 30 10:44:45 2010 @@ -1,11 +1,11 @@ -/* $NetBSD: rump_namei.h,v 1.8 2010/11/19 06:45:29 dholland Exp $ */ +/* $NetBSD: rump_namei.h,v 1.9 2010/11/30 10:44:45 dholland Exp $ */ /* * WARNING: GENERATED FILE. DO NOT EDIT * (edit namei.src and run make namei in src/sys/sys) * by: NetBSD: gennameih.awk,v 1.5 2009/12/23 14:17:19 pooka Exp - * from: NetBSD: namei.src,v 1.15 2010/11/19 06:44:34 dholland Exp + * from: NetBSD: namei.src,v 1.17 2010/11/30 10:43:01 dholland Exp */ #ifndef _RUMP_RUMP_NAMEI_H_ @@ -27,8 +27,6 @@ #define RUMP_NAMEI_MODMASK 0x01fc #define RUMP_NAMEI_NOCROSSMOUNT 0x100 #define RUMP_NAMEI_RDONLY 0x200 -#define RUMP_NAMEI_HASBUF 0x400 -#define RUMP_NAMEI_SAVENAME 0x800 #define RUMP_NAMEI_SAVESTART 0x0001000 #define RUMP_NAMEI_ISDOTDOT 0x0002000 #define RUMP_NAMEI_MAKEENTRY 0x0004000 Index: src/sys/sys/namei.h diff -u src/sys/sys/namei.h:1.69 src/sys/sys/namei.h:1.70 --- src/sys/sys/namei.h:1.69 Fri Nov 19 06:45:29 2010 +++ src/sys/sys/namei.h Tue Nov 30 10:44:44 2010 @@ -1,11 +1,11 @@ -/* $NetBSD: namei.h,v 1.69 2010/11/19 06:45:29 dholland Exp $ */ +/* $NetBSD: namei.h,v 1.70 2010/11/30 10:44:44 dholland Exp $ */ /* * WARNING: GENERATED FILE. DO NOT EDIT * (edit namei.src and run make namei in src/sys/sys) * by: NetBSD: gennameih.awk,v 1.5 2009/12/23 14:17:19 pooka Exp - * from: NetBSD: namei.src,v 1.15 2010/11/19 06:44:34 dholland Exp + * from: NetBSD: namei.src,v 1.17 2010/11/30 10:43:01 dholland Exp */ /* @@ -60,10 +60,17 @@ * STRUCT NAMEIDATA IS DEAD, call pathbuf_destroy. Don't destroy the * pathbuf before you've finished using the nameidata, or mysterious * bad things may happen. + * + * pathbuf_assimilate is like pathbuf_create but assumes ownership of + * the string buffer passed in, which MUST BE of size PATH_MAX and + * have been allocated with PNBUF_GET(). This should only be used when + * absolutely necessary; e.g. nfsd uses it for loading paths from + * mbufs. */ struct pathbuf; struct pathbuf *pathbuf_create(const char *path); +struct pathbuf *pathbuf_assimilate(char *path); int pathbuf_copyin(const char *userpath, struct pathbuf **ret); void pathbuf_destroy(struct pathbuf *); @@ -85,8 +92,7 @@ * Arguments to namei/lookup. */ struct pathbuf *ni_pathbuf; /* pathname container */ - //const char *ni_dirp; /* pathname pointer */ - //enum uio_seg ni_segflg; /* location of pathname */ + char *ni_pnbuf; /* extra pathname buffer ref (XXX) */ /* * Arguments to lookup. */ @@ -119,7 +125,6 @@ /* * Shared between lookup and commit routines. */ - char *cn_pnbuf; /* pathname buffer */ const char *cn_nameptr; /* pointer to looked up name */ size_t cn_namelen; /* length of looked up comp */ u_long cn_hash; /* hash val of looked up name */ @@ -153,21 +158,13 @@ /* * Namei parameter descriptors. * - * SAVENAME may be set by either the callers of namei or by VOP_LOOKUP. - * If the caller of namei sets the flag (for example execve wants to - * know the name of the program that is being executed), then it must - * free the buffer. If VOP_LOOKUP sets the flag, then the buffer must - * be freed by either the commit routine or the VOP_ABORT routine. - * SAVESTART is set only by the callers of namei. It implies SAVENAME - * plus the addition of saving the parent directory that contains the - * name in ni_startdir. It allows repeated calls to lookup for the - * name being sought. The caller is responsible for releasing the - * buffer and for vrele'ing ni_startdir. + * SAVESTART is set only by the callers of namei. It implies saving + * the parent directory that contains the name in ni_startdir. It + * allows repeated calls to lookup for the name being sought. The + * caller is responsible for vrele'ing ni_startdir. */ #define NOCROSSMOUNT 0x100 /* do not cross mount points */ #define RDONLY 0x200 /* lookup with read-only semantics */ -#define HASBUF 0x400 /* has allocated pathname buffer */ -#define SAVENAME 0x800 /* save pathname buffer */ #define SAVESTART 0x000
CVS commit: src/sys
Module Name:src Committed By: dholland Date: Tue Nov 30 10:43:06 UTC 2010 Modified Files: src/sys/coda: coda_vnops.c src/sys/compat/svr4: svr4_misc.c src/sys/compat/svr4_32: svr4_32_misc.c src/sys/fs/adosfs: adlookup.c src/sys/fs/efs: efs_vnops.c src/sys/fs/msdosfs: msdosfs_lookup.c msdosfs_vnops.c src/sys/fs/nilfs: nilfs_vnops.c src/sys/fs/puffs: puffs_vnops.c src/sys/fs/smbfs: smbfs_vnops.c src/sys/fs/sysvbfs: sysvbfs_vnops.c src/sys/fs/tmpfs: tmpfs_subr.c tmpfs_vnops.c src/sys/fs/udf: udf_vnops.c src/sys/fs/union: union_subr.c src/sys/fs/unionfs: unionfs_subr.c unionfs_vnops.c src/sys/kern: kern_exec.c vfs_lookup.c src/sys/miscfs/genfs: genfs_vnops.c src/sys/nfs: nfs_vnops.c src/sys/sys: namei.src src/sys/ufs/ext2fs: ext2fs_lookup.c ext2fs_vnops.c src/sys/ufs/ufs: ufs_lookup.c ufs_vnops.c ufs_wapbl.c Log Message: Abolish the SAVENAME and HASBUF flags. There is now always a buffer, so the path in a struct componentname is now always valid during VOP calls. To generate a diff of this commit: cvs rdiff -u -r1.77 -r1.78 src/sys/coda/coda_vnops.c cvs rdiff -u -r1.153 -r1.154 src/sys/compat/svr4/svr4_misc.c cvs rdiff -u -r1.72 -r1.73 src/sys/compat/svr4_32/svr4_32_misc.c cvs rdiff -u -r1.14 -r1.15 src/sys/fs/adosfs/adlookup.c cvs rdiff -u -r1.22 -r1.23 src/sys/fs/efs/efs_vnops.c cvs rdiff -u -r1.22 -r1.23 src/sys/fs/msdosfs/msdosfs_lookup.c cvs rdiff -u -r1.69 -r1.70 src/sys/fs/msdosfs/msdosfs_vnops.c cvs rdiff -u -r1.8 -r1.9 src/sys/fs/nilfs/nilfs_vnops.c cvs rdiff -u -r1.148 -r1.149 src/sys/fs/puffs/puffs_vnops.c cvs rdiff -u -r1.76 -r1.77 src/sys/fs/smbfs/smbfs_vnops.c cvs rdiff -u -r1.34 -r1.35 src/sys/fs/sysvbfs/sysvbfs_vnops.c cvs rdiff -u -r1.60 -r1.61 src/sys/fs/tmpfs/tmpfs_subr.c cvs rdiff -u -r1.74 -r1.75 src/sys/fs/tmpfs/tmpfs_vnops.c cvs rdiff -u -r1.60 -r1.61 src/sys/fs/udf/udf_vnops.c cvs rdiff -u -r1.40 -r1.41 src/sys/fs/union/union_subr.c cvs rdiff -u -r1.10 -r1.11 src/sys/fs/unionfs/unionfs_subr.c cvs rdiff -u -r1.3 -r1.4 src/sys/fs/unionfs/unionfs_vnops.c cvs rdiff -u -r1.302 -r1.303 src/sys/kern/kern_exec.c cvs rdiff -u -r1.124 -r1.125 src/sys/kern/vfs_lookup.c cvs rdiff -u -r1.184 -r1.185 src/sys/miscfs/genfs/genfs_vnops.c cvs rdiff -u -r1.286 -r1.287 src/sys/nfs/nfs_vnops.c cvs rdiff -u -r1.16 -r1.17 src/sys/sys/namei.src cvs rdiff -u -r1.62 -r1.63 src/sys/ufs/ext2fs/ext2fs_lookup.c cvs rdiff -u -r1.95 -r1.96 src/sys/ufs/ext2fs/ext2fs_vnops.c cvs rdiff -u -r1.105 -r1.106 src/sys/ufs/ufs/ufs_lookup.c cvs rdiff -u -r1.184 -r1.185 src/sys/ufs/ufs/ufs_vnops.c cvs rdiff -u -r1.10 -r1.11 src/sys/ufs/ufs/ufs_wapbl.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/coda/coda_vnops.c diff -u src/sys/coda/coda_vnops.c:1.77 src/sys/coda/coda_vnops.c:1.78 --- src/sys/coda/coda_vnops.c:1.77 Tue Nov 30 10:29:57 2010 +++ src/sys/coda/coda_vnops.c Tue Nov 30 10:43:01 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: coda_vnops.c,v 1.77 2010/11/30 10:29:57 dholland Exp $ */ +/* $NetBSD: coda_vnops.c,v 1.78 2010/11/30 10:43:01 dholland Exp $ */ /* * @@ -46,7 +46,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: coda_vnops.c,v 1.77 2010/11/30 10:29:57 dholland Exp $"); +__KERNEL_RCSID(0, "$NetBSD: coda_vnops.c,v 1.78 2010/11/30 10:43:01 dholland Exp $"); #include #include @@ -997,24 +997,10 @@ && (error == ENOENT)) { error = EJUSTRETURN; - cnp->cn_flags |= SAVENAME; *ap->a_vpp = NULL; } /* - * If we are removing, and we are at the last element, and we - * found it, then we need to keep the name around so that the - * removal will go ahead as planned. - * XXX Check against new lookup rules. - */ -if ((cnp->cn_nameiop == DELETE) - && (cnp->cn_flags & ISLASTCN) - && !error) -{ - cnp->cn_flags |= SAVENAME; -} - -/* * If the lookup succeeded, we must generally lock the returned * vnode. This could be a ., .., or normal lookup. See * vnodeops(9) for the details. Index: src/sys/compat/svr4/svr4_misc.c diff -u src/sys/compat/svr4/svr4_misc.c:1.153 src/sys/compat/svr4/svr4_misc.c:1.154 --- src/sys/compat/svr4/svr4_misc.c:1.153 Tue Nov 30 10:29:58 2010 +++ src/sys/compat/svr4/svr4_misc.c Tue Nov 30 10:43:02 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: svr4_misc.c,v 1.153 2010/11/30 10:29:58 dholland Exp $ */ +/* $NetBSD: svr4_misc.c,v 1.154 2010/11/30 10:43:02 dholland Exp $ */ /*- * Copyright (c) 1994, 2008 The NetBSD Foundation, Inc. @@ -37,7 +37,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: svr4_misc.c,v 1.153 2010/11/30 10:29:58 dholland Exp $"); +__KERNEL_RCSID(0, "$NetBSD: svr4_misc.c,v 1.154 2010/11/30 10:43:02 dholland Exp $"); #include #include @@ -1328,7 +1328,7 @@ return ENOMEM; } - NDINIT(&nd, LOOKUP, NOFOLLOW | SAVENAME | TRYEMULROOT, pb); + N
CVS commit: src/share/man/man9
Module Name:src Committed By: dholland Date: Tue Nov 30 10:32:47 UTC 2010 Modified Files: src/share/man/man9: pathbuf.9 Log Message: Document pathbuf_assimilate, used by nfsd to move pathnames from mbufs to pathbufs. It is like pathbuf_create but takes responsibility for the path buffer passed in. (Because this is asymmetric, it carries an extra risk of error and therefore shouldn't be used except where it's really needed.) To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/share/man/man9/pathbuf.9 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/man/man9/pathbuf.9 diff -u src/share/man/man9/pathbuf.9:1.1 src/share/man/man9/pathbuf.9:1.2 --- src/share/man/man9/pathbuf.9:1.1 Fri Nov 19 06:44:48 2010 +++ src/share/man/man9/pathbuf.9 Tue Nov 30 10:32:46 2010 @@ -1,4 +1,4 @@ -.\" $NetBSD: pathbuf.9,v 1.1 2010/11/19 06:44:48 dholland Exp $ +.\" $NetBSD: pathbuf.9,v 1.2 2010/11/30 10:32:46 dholland Exp $ .\" .\" Copyright (c) 2010 The NetBSD Foundation, Inc. .\" All rights reserved. @@ -27,12 +27,13 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.Dd November 16, 2010 +.Dd November 30, 2010 .Dt PATHBUF 9 .Os .Sh NAME .Nm pathbuf , .Nm pathbuf_create , +.Nm pathbuf_assimilate , .Nm pathbuf_copyin , .Nm pathbuf_destroy .Nd path buffer abstraction @@ -40,6 +41,8 @@ .In sys/namei.h .Ft struct pathbuf * .Fn pathbuf_create "const char *path" +.Ft struct pathbuf * +.Fn pathbuf_assimilate "char *pnbuf" .Ft int .Fn pathbuf_copyin "const char *userpath" "struct pathbuf **ret" .Ft void @@ -78,6 +81,23 @@ It returns an error code. .Pp The +.Fn pathbuf_assimilate +function creates a pathbuf using the string buffer provided as +.Fa pnbuf . +This buffer must be of size +.Dv PATH_MAX +and must have been allocated with +.Fn PNBUF_GET . +The buffer is +.Dq taken over +by the returned pathbuf and will be released when the pathbuf is +destroyed. +Note: to avoid confusion and pointer bugs, +.Fn pathbuf_assimilate +should only be used where absolutely necessary; e.g. the NFS server +code uses it to generate pathbufs from strings fetched from mbufs. +.Pp +The .Fn pathbuf_destroy function deallocates a pathbuf. Caution: because calling