CVS commit: src/sys/arch/hp700/hp700
Module Name:src Committed By: skrll Date: Wed Jun 30 06:33:52 UTC 2010 Modified Files: src/sys/arch/hp700/hp700: mainbus.c Log Message: Remove some code that snuck in. To generate a diff of this commit: cvs rdiff -u -r1.70 -r1.71 src/sys/arch/hp700/hp700/mainbus.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/hp700/hp700/mainbus.c diff -u src/sys/arch/hp700/hp700/mainbus.c:1.70 src/sys/arch/hp700/hp700/mainbus.c:1.71 --- src/sys/arch/hp700/hp700/mainbus.c:1.70 Tue Jun 1 10:20:29 2010 +++ src/sys/arch/hp700/hp700/mainbus.c Wed Jun 30 06:33:52 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: mainbus.c,v 1.70 2010/06/01 10:20:29 skrll Exp $ */ +/* $NetBSD: mainbus.c,v 1.71 2010/06/30 06:33:52 skrll Exp $ */ /*- * Copyright (c) 2001, 2002 The NetBSD Foundation, Inc. @@ -58,7 +58,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: mainbus.c,v 1.70 2010/06/01 10:20:29 skrll Exp $); +__KERNEL_RCSID(0, $NetBSD: mainbus.c,v 1.71 2010/06/30 06:33:52 skrll Exp $); #include locators.h #include power.h @@ -1005,10 +1005,6 @@ panic(mbus_dmamap_sync: bad length); #endif - /* If the whole DMA map is marked as BUS_DMA_COHERENT, do nothing. */ - if ((map-_dm_flags BUS_DMA_COHERENT) != 0) - return; - /* * For a virtually-indexed write-back cache, we need to do the * following things:
CVS commit: src/sys/external/intel-public/acpica/dist/executer
Module Name:src Committed By: jruoho Date: Wed Jun 30 06:43:37 UTC 2010 Modified Files: src/sys/external/intel-public/acpica/dist/executer: exdebug.c Log Message: Silence debug messages related to the AML Debug() opcode. To enable it, only set the AcpiGbl_EnableAmlDebugObject global. Previously this was enabled also when ACPI_LV_DEBUG_OBJECT was set for AcpiDbgLevel, but this was too noisy, even for ACPI_DEBUG kernels, when the AML makes heavy use of Debug(). To generate a diff of this commit: cvs rdiff -u -r1.1.1.1 -r1.2 \ src/sys/external/intel-public/acpica/dist/executer/exdebug.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/external/intel-public/acpica/dist/executer/exdebug.c diff -u src/sys/external/intel-public/acpica/dist/executer/exdebug.c:1.1.1.1 src/sys/external/intel-public/acpica/dist/executer/exdebug.c:1.2 --- src/sys/external/intel-public/acpica/dist/executer/exdebug.c:1.1.1.1 Sun Jun 6 18:17:10 2010 +++ src/sys/external/intel-public/acpica/dist/executer/exdebug.c Wed Jun 30 06:43:37 2010 @@ -140,10 +140,9 @@ * * This function is not compiled if ACPI_NO_ERROR_MESSAGES is set. * - * This function is only enabled if AcpiGbl_EnableAmlDebugObject is set, or - * if ACPI_LV_DEBUG_OBJECT is set in the AcpiDbgLevel. Thus, in the normal - * operational case, stores to the debug object are ignored but can be easily - * enabled if necessary. + * This function is only enabled if AcpiGbl_EnableAmlDebugObject is set. + * Thus, in the normal operational case, stores to the debug object are + * ignored but can be easily enabled if necessary. * **/ @@ -159,10 +158,9 @@ ACPI_FUNCTION_TRACE_PTR (ExDoDebugObject, SourceDesc); -/* Output must be enabled via the DebugObject global or the DbgLevel */ +/* Output must be enabled via the DebugObject global */ -if (!AcpiGbl_EnableAmlDebugObject -!(AcpiDbgLevel ACPI_LV_DEBUG_OBJECT)) +if (!AcpiGbl_EnableAmlDebugObject) { return_VOID; }
CVS commit: src/sys/arch/sbmips/conf
Module Name:src Committed By: he Date: Wed Jun 30 07:03:26 UTC 2010 Modified Files: src/sys/arch/sbmips/conf: GENERIC Log Message: Bump SYMTAB_SPACE so that the contents fits again. To generate a diff of this commit: cvs rdiff -u -r1.78 -r1.79 src/sys/arch/sbmips/conf/GENERIC 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/sbmips/conf/GENERIC diff -u src/sys/arch/sbmips/conf/GENERIC:1.78 src/sys/arch/sbmips/conf/GENERIC:1.79 --- src/sys/arch/sbmips/conf/GENERIC:1.78 Sat May 8 22:16:30 2010 +++ src/sys/arch/sbmips/conf/GENERIC Wed Jun 30 07:03:26 2010 @@ -1,10 +1,10 @@ -# $NetBSD: GENERIC,v 1.78 2010/05/08 22:16:30 mrg Exp $ +# $NetBSD: GENERIC,v 1.79 2010/06/30 07:03:26 he Exp $ include arch/sbmips/conf/std.sbmips options INCLUDE_CONFIG_FILE # embed config file in kernel binary -#ident GENERIC-$Revision: 1.78 $ +#ident GENERIC-$Revision: 1.79 $ #options LOCKDEBUG # XXX XXX XXX XXX #options DEBUG # extra kernel debugging support @@ -33,7 +33,7 @@ options DDB # kernel dynamic debugger options DDB_HISTORY_SIZE=100 # enable history editing in DDB #makeoptions DEBUG=-g # compile full symbol table -options SYMTAB_SPACE=32 # size for embedded symbol table +options SYMTAB_SPACE=33 # size for embedded symbol table # Compatibility options options COMPAT_43 # compatibility with 4.3BSD binaries
CVS commit: src/usr.bin/netstat
Module Name:src Committed By: wiz Date: Wed Jun 30 07:30:16 UTC 2010 Modified Files: src/usr.bin/netstat: netstat.1 Log Message: Bump date for previous (mpls). To generate a diff of this commit: cvs rdiff -u -r1.57 -r1.58 src/usr.bin/netstat/netstat.1 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.bin/netstat/netstat.1 diff -u src/usr.bin/netstat/netstat.1:1.57 src/usr.bin/netstat/netstat.1:1.58 --- src/usr.bin/netstat/netstat.1:1.57 Tue Jun 29 12:38:12 2010 +++ src/usr.bin/netstat/netstat.1 Wed Jun 30 07:30:16 2010 @@ -1,4 +1,4 @@ -.\ $NetBSD: netstat.1,v 1.57 2010/06/29 12:38:12 kefren Exp $ +.\ $NetBSD: netstat.1,v 1.58 2010/06/30 07:30:16 wiz Exp $ .\ .\ Copyright (c) 1983, 1990, 1992, 1993 .\ The Regents of the University of California. All rights reserved. @@ -29,7 +29,7 @@ .\ .\ @(#)netstat.1 8.8 (Berkeley) 4/18/94 .\ -.Dd February 24, 2009 +.Dd June 29, 2010 .Dt NETSTAT 1 .Os .Sh NAME
CVS commit: src/sys/dev/acpi/wmi
Module Name:src Committed By: jruoho Date: Wed Jun 30 07:58:11 UTC 2010 Modified Files: src/sys/dev/acpi/wmi: wmi_dell.c wmi_hp.c Log Message: Initialize pointers to NULL. Otherwise we may try to free garbage. Tries to address a panic reported by David Demelier in PR kern/43504. To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/sys/dev/acpi/wmi/wmi_dell.c cvs rdiff -u -r1.1 -r1.2 src/sys/dev/acpi/wmi/wmi_hp.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/acpi/wmi/wmi_dell.c diff -u src/sys/dev/acpi/wmi/wmi_dell.c:1.3 src/sys/dev/acpi/wmi/wmi_dell.c:1.4 --- src/sys/dev/acpi/wmi/wmi_dell.c:1.3 Thu Apr 8 12:14:19 2010 +++ src/sys/dev/acpi/wmi/wmi_dell.c Wed Jun 30 07:58:11 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: wmi_dell.c,v 1.3 2010/04/08 12:14:19 jruoho Exp $ */ +/* $NetBSD: wmi_dell.c,v 1.4 2010/06/30 07:58:11 jruoho Exp $ */ /*- * Copyright (c) 2009, 2010 The NetBSD Foundation, Inc. @@ -31,7 +31,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: wmi_dell.c,v 1.3 2010/04/08 12:14:19 jruoho Exp $); +__KERNEL_RCSID(0, $NetBSD: wmi_dell.c,v 1.4 2010/06/30 07:58:11 jruoho Exp $); #include sys/param.h #include sys/device.h @@ -167,6 +167,8 @@ ACPI_STATUS rv; uint32_t val; + buf.Pointer = NULL; + sc = device_private(self); rv = acpi_wmi_event_get(sc-sc_parent, evt, buf); Index: src/sys/dev/acpi/wmi/wmi_hp.c diff -u src/sys/dev/acpi/wmi/wmi_hp.c:1.1 src/sys/dev/acpi/wmi/wmi_hp.c:1.2 --- src/sys/dev/acpi/wmi/wmi_hp.c:1.1 Thu Apr 8 17:32:30 2010 +++ src/sys/dev/acpi/wmi/wmi_hp.c Wed Jun 30 07:58:11 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: wmi_hp.c,v 1.1 2010/04/08 17:32:30 jruoho Exp $ */ +/* $NetBSD: wmi_hp.c,v 1.2 2010/06/30 07:58:11 jruoho Exp $ */ /*- * Copyright (c) 2009, 2010 The NetBSD Foundation, Inc. @@ -57,7 +57,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: wmi_hp.c,v 1.1 2010/04/08 17:32:30 jruoho Exp $); +__KERNEL_RCSID(0, $NetBSD: wmi_hp.c,v 1.2 2010/06/30 07:58:11 jruoho Exp $); #include sys/param.h #include sys/device.h @@ -252,6 +252,8 @@ ACPI_STATUS rv; uint32_t val; + buf.Pointer = NULL; + sc = device_private(self); rv = acpi_wmi_event_get(sc-sc_parent, evt, buf); @@ -343,6 +345,7 @@ KDASSERT(cmd != 0); KDASSERT(sc-sc_arg[0] == WMI_HP_METHOD_ARG_MAGIC); + obuf.Pointer = NULL; ibuf.Pointer = sc-sc_arg; ibuf.Length = WMI_HP_METHOD_ARG_SIZE;
CVS commit: src/lib/libc/stdio
Module Name:src Committed By: jruoho Date: Wed Jun 30 13:38:10 UTC 2010 Modified Files: src/lib/libc/stdio: getdelim.3 Log Message: Use .Fn instead of .Fa for functions. Also rearrange slightly. To generate a diff of this commit: cvs rdiff -u -r1.7 -r1.8 src/lib/libc/stdio/getdelim.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/stdio/getdelim.3 diff -u src/lib/libc/stdio/getdelim.3:1.7 src/lib/libc/stdio/getdelim.3:1.8 --- src/lib/libc/stdio/getdelim.3:1.7 Wed Dec 9 18:06:08 2009 +++ src/lib/libc/stdio/getdelim.3 Wed Jun 30 13:38:10 2010 @@ -1,4 +1,4 @@ -.\ $NetBSD: getdelim.3,v 1.7 2009/12/09 18:06:08 joerg Exp $ +.\ $NetBSD: getdelim.3,v 1.8 2010/06/30 13:38:10 jruoho Exp $ .\ .\ Copyright (c) 2009 The NetBSD Foundation, Inc. .\ All rights reserved. @@ -27,7 +27,7 @@ .\ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\ POSSIBILITY OF SUCH DAMAGE. .\ -.Dd November 30, 2009 +.Dd June 30, 2010 .Dt GETDELIM 3 .Os .Sh NAME @@ -47,13 +47,16 @@ .Fn getdelim function reads from the .Fa stream -until it encounters a character matching the -.Fa delimiter -character, storing the input in +until it encounters a character matching +.Fa delimiter , +storing the input in .Fa *lineptr . The buffer is .Dv NUL Ns No -terminated and includes the delimiter. +The +.Fa delimiter +character must be representable as an unsigned char. .Pp If .Fa *n @@ -62,6 +65,10 @@ must be pre-allocated to at least .Fa *n bytes. +The buffer should be allocated dynamically; +it must be possible to +.Xr free 3 +.Fa *lineptr . .Fn getdelim ensures that .Fa *lineptr @@ -69,17 +76,13 @@ .Fa *n to reflect the new size. .Pp +The +.Fn getline +function is equivalent to +.Fn getdelim +with .Fa delimiter -must be representable as an unsigned char, and -.Fa *lineptr -must be a -.Xr free 3 Ns No able -buffer. -.Pp -.Fa getline -is equivalent to -.Fa getdelim -with the delimiter set to the newline character. +set to the newline character. .Sh RETURN VALUES The .Fn getdelim
CVS commit: src/tests/fs/union
Module Name:src Committed By: hannken Date: Wed Jun 30 14:10:14 UTC 2010 Modified Files: src/tests/fs/union: t_pr.c Log Message: Test no longer fails with rev. 1.62 of src/sys/fs/union/union_vfsops.c. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/tests/fs/union/t_pr.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/fs/union/t_pr.c diff -u src/tests/fs/union/t_pr.c:1.1 src/tests/fs/union/t_pr.c:1.2 --- src/tests/fs/union/t_pr.c:1.1 Tue Jun 29 15:25:28 2010 +++ src/tests/fs/union/t_pr.c Wed Jun 30 14:10:14 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: t_pr.c,v 1.1 2010/06/29 15:25:28 pooka Exp $ */ +/* $NetBSD: t_pr.c,v 1.2 2010/06/30 14:10:14 hannken Exp $ */ #include sys/types.h #include sys/mount.h @@ -25,7 +25,7 @@ { atf_tc_set_md_var(tc, descr, mount_union -b twice); atf_tc_set_md_var(tc, use.fs, true); - atf_tc_set_md_var(tc, xfail, PR kern/23986); + /* atf_tc_set_md_var(tc, xfail, PR kern/23986); */ } #define IMG1 atf1.img
CVS commit: src/sys/rump/librump/rumpvfs
Module Name:src Committed By: pooka Date: Wed Jun 30 14:50:35 UTC 2010 Modified Files: src/sys/rump/librump/rumpvfs: rumpfs.c Log Message: Implement VOP_SYMLINK/READLINK. The allows me to be a little lazier in other places. To generate a diff of this commit: cvs rdiff -u -r1.57 -r1.58 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.57 src/sys/rump/librump/rumpvfs/rumpfs.c:1.58 --- src/sys/rump/librump/rumpvfs/rumpfs.c:1.57 Thu Jun 24 13:03:18 2010 +++ src/sys/rump/librump/rumpvfs/rumpfs.c Wed Jun 30 14:50:35 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: rumpfs.c,v 1.57 2010/06/24 13:03:18 hannken Exp $ */ +/* $NetBSD: rumpfs.c,v 1.58 2010/06/30 14:50:35 pooka Exp $ */ /* * Copyright (c) 2009 Antti Kantee. All Rights Reserved. @@ -26,7 +26,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: rumpfs.c,v 1.57 2010/06/24 13:03:18 hannken Exp $); +__KERNEL_RCSID(0, $NetBSD: rumpfs.c,v 1.58 2010/06/30 14:50:35 pooka Exp $); #include sys/param.h #include sys/atomic.h @@ -69,6 +69,8 @@ static int rump_vop_read(void *); static int rump_vop_write(void *); static int rump_vop_open(void *); +static int rump_vop_symlink(void *); +static int rump_vop_readlink(void *); int (**fifo_vnodeop_p)(void *); const struct vnodeopv_entry_desc fifo_vnodeop_entries[] = { @@ -87,7 +89,8 @@ { vop_rmdir_desc, rump_vop_rmdir }, { vop_mknod_desc, rump_vop_mknod }, { vop_create_desc, rump_vop_create }, - { vop_symlink_desc, genfs_eopnotsupp }, + { vop_symlink_desc, rump_vop_symlink }, + { vop_readlink_desc, rump_vop_readlink }, { vop_access_desc, rump_vop_success }, { vop_readdir_desc, rump_vop_readdir }, { vop_read_desc, rump_vop_read }, @@ -144,12 +147,18 @@ LIST_HEAD(, rumpfs_dent) dents; int flags; } dir; + struct { + char *target; + size_t len; + } link; } rn_u; }; #define rn_readfd rn_u.reg.readfd #define rn_writefd rn_u.reg.writefd #define rn_offset rn_u.reg.offset #define rn_dir rn_u.dir.dents +#define rn_linktarg rn_u.link.target +#define rn_linklen rn_u.link.len #define RUMPNODE_CANRECLAIM 0x01 #define RUMPNODE_DIR_ET 0x02 @@ -485,7 +494,7 @@ } if (vpops != rump_specop_p va-va_type != VDIR !(va-va_type == VREG rn-rn_hostpath != NULL) - va-va_type != VSOCK) + va-va_type != VSOCK va-va_type != VLNK) return EOPNOTSUPP; rv = getnewvnode(VT_RUMP, mp, vpops, vp); @@ -808,6 +817,58 @@ } static int +rump_vop_symlink(void *v) +{ + struct vop_symlink_args /* { + struct vnode *a_dvp; + struct vnode **a_vpp; + struct componentname *a_cnp; + struct vattr *a_vap; + char *a_target; + }; */ *ap = v; + struct vnode *dvp = ap-a_dvp; + struct vnode **vpp = ap-a_vpp; + struct componentname *cnp = ap-a_cnp; + struct rumpfs_node *rnd = dvp-v_data, *rn; + const char *target = ap-a_target; + size_t linklen; + int rv; + + linklen = strlen(target); + KASSERT(linklen MAXPATHLEN); + rn = makeprivate(VLNK, NODEV, linklen); + rv = makevnode(dvp-v_mount, rn, vpp); + if (rv) + goto out; + + makedir(rnd, cnp, rn); + + KASSERT(linklen MAXPATHLEN); + rn-rn_linktarg = PNBUF_GET(); + rn-rn_linklen = linklen; + strcpy(rn-rn_linktarg, target); + + out: + vput(dvp); + return rv; +} + +static int +rump_vop_readlink(void *v) +{ + struct vop_readlink_args /* { + struct vnode *a_vp; + struct uio *a_uio; + kauth_cred_t a_cred; + }; */ *ap = v; + struct vnode *vp = ap-a_vp; + struct rumpfs_node *rn = vp-v_data; + struct uio *uio = ap-a_uio; + + return uiomove(rn-rn_linktarg, rn-rn_linklen, uio); +} + +static int rump_vop_open(void *v) { struct vop_open_args /* { @@ -1018,6 +1079,8 @@ vp-v_data = NULL; if (rn-rn_flags RUMPNODE_CANRECLAIM) { + if (vp-v_type == VLNK) + PNBUF_PUT(rn-rn_linktarg); if (rn-rn_hostpath) free(rn-rn_hostpath, M_TEMP); kmem_free(rn, sizeof(*rn));
CVS commit: src/crypto/external/bsd/netpgp/dist/src/lib
Module Name:src Committed By: agc Date: Wed Jun 30 15:18:10 UTC 2010 Modified Files: src/crypto/external/bsd/netpgp/dist/src/lib: create.c Log Message: also calculate the length of DSA keys as well as RSA ones To generate a diff of this commit: cvs rdiff -u -r1.29 -r1.30 \ src/crypto/external/bsd/netpgp/dist/src/lib/create.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/crypto/external/bsd/netpgp/dist/src/lib/create.c diff -u src/crypto/external/bsd/netpgp/dist/src/lib/create.c:1.29 src/crypto/external/bsd/netpgp/dist/src/lib/create.c:1.30 --- src/crypto/external/bsd/netpgp/dist/src/lib/create.c:1.29 Fri Jun 25 03:37:27 2010 +++ src/crypto/external/bsd/netpgp/dist/src/lib/create.c Wed Jun 30 15:18:10 2010 @@ -57,7 +57,7 @@ #if defined(__NetBSD__) __COPYRIGHT(@(#) Copyright (c) 2009 The NetBSD Foundation, Inc. All rights reserved.); -__RCSID($NetBSD: create.c,v 1.29 2010/06/25 03:37:27 agc Exp $); +__RCSID($NetBSD: create.c,v 1.30 2010/06/30 15:18:10 agc Exp $); #endif #include sys/types.h @@ -169,6 +169,10 @@ pubkey_length(const __ops_pubkey_t *key) { switch (key-alg) { + case OPS_PKA_DSA: + return mpi_length(key-key.dsa.p) + mpi_length(key-key.dsa.q) + + mpi_length(key-key.dsa.g) + mpi_length(key-key.dsa.y); + case OPS_PKA_RSA: return mpi_length(key-key.rsa.n) + mpi_length(key-key.rsa.e); @@ -186,6 +190,8 @@ len = 0; switch (key-pubkey.alg) { + case OPS_PKA_DSA: + return (unsigned)(mpi_length(key-key.dsa.x) + pubkey_length(key-pubkey)); case OPS_PKA_RSA: len = mpi_length(key-key.rsa.d) + mpi_length(key-key.rsa.p) + mpi_length(key-key.rsa.q) + mpi_length(key-key.rsa.u);
CVS commit: src/sys/dev/acpi
Module Name:src Committed By: jruoho Date: Wed Jun 30 15:38:27 UTC 2010 Modified Files: src/sys/dev/acpi: acpi_bat.c Log Message: Only aprint*() the battery information if the battery has changed. Based on suggestion from m...@. The used serial number is hopefully unique enough as an identifier. Should fix PR kern/43505 by David Demelier. To generate a diff of this commit: cvs rdiff -u -r1.102 -r1.103 src/sys/dev/acpi/acpi_bat.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/acpi/acpi_bat.c diff -u src/sys/dev/acpi/acpi_bat.c:1.102 src/sys/dev/acpi/acpi_bat.c:1.103 --- src/sys/dev/acpi/acpi_bat.c:1.102 Tue Apr 27 05:57:43 2010 +++ src/sys/dev/acpi/acpi_bat.c Wed Jun 30 15:38:27 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: acpi_bat.c,v 1.102 2010/04/27 05:57:43 jruoho Exp $ */ +/* $NetBSD: acpi_bat.c,v 1.103 2010/06/30 15:38:27 jruoho Exp $ */ /*- * Copyright (c) 2003 The NetBSD Foundation, Inc. @@ -75,7 +75,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: acpi_bat.c,v 1.102 2010/04/27 05:57:43 jruoho Exp $); +__KERNEL_RCSID(0, $NetBSD: acpi_bat.c,v 1.103 2010/06/30 15:38:27 jruoho Exp $); #include sys/param.h #include sys/condvar.h @@ -149,6 +149,7 @@ struct acpi_devnode *sc_node; struct sysmon_envsys *sc_sme; envsys_data_t *sc_sensor; + char sc_serial[64]; kmutex_t sc_mutex; kcondvar_t sc_condvar; int32_t sc_lcapacity; @@ -237,6 +238,7 @@ cv_init(sc-sc_condvar, device_xname(self)); (void)pmf_device_register(self, NULL, acpibat_resume); + (void)memset(sc-sc_serial, '\0', sizeof(sc-sc_serial)); (void)acpi_register_notify(sc-sc_node, acpibat_notify_handler); sc-sc_sensor = kmem_zalloc(ACPIBAT_COUNT * @@ -427,7 +429,8 @@ static void acpibat_print_info(device_t dv, ACPI_OBJECT *elm) { - const char *tech, *unit; + struct acpibat_softc *sc = device_private(dv); + const char *model, *serial, *tech, *unit; int i; for (i = ACPIBAT_BIF_OEM; i ACPIBAT_BIF_GRANULARITY2; i--) { @@ -437,6 +440,25 @@ if (elm[i].String.Pointer == NULL) return; + + if (elm[i].String.Pointer[0] == '\0') + return; + } + + model = elm[ACPIBAT_BIF_MODEL].String.Pointer; + serial = elm[ACPIBAT_BIF_SERIAL].String.Pointer; + + if (elm[ACPIBAT_BIF_SERIAL].String.Length sizeof(sc-sc_serial)) + return; + + if (sc-sc_serial[0] == '\0') + (void)strlcpy(sc-sc_serial, serial, sizeof(sc-sc_serial)); + else { + if (strcmp(sc-sc_serial, serial) == 0) + return; + + (void)memset(sc-sc_serial, '\0', sizeof(sc-sc_serial)); + (void)strlcpy(sc-sc_serial, serial, sizeof(sc-sc_serial)); } tech = (elm[ACPIBAT_BIF_TECHNOLOGY].Integer.Value != 0) ? @@ -446,24 +468,8 @@ elm[ACPIBAT_BIF_OEM].String.Pointer, elm[ACPIBAT_BIF_TYPE].String.Pointer, tech); - if (elm[ACPIBAT_BIF_SERIAL].String.Pointer[0] || - elm[ACPIBAT_BIF_MODEL].String.Pointer[0]) { - int comma; - aprint_verbose_dev(dv, ); - - if (elm[ACPIBAT_BIF_SERIAL].String.Pointer[0]) { - aprint_verbose(serial number %s, - elm[ACPIBAT_BIF_SERIAL].String.Pointer); - comma = 1; - } else - comma = 0; - - if (elm[ACPIBAT_BIF_MODEL].String.Pointer[0]) - aprint_verbose(%smodel number %s, - comma ? , : , - elm[ACPIBAT_BIF_MODEL].String.Pointer); - aprint_verbose(\n); - } + aprint_verbose_dev(dv, model number %s, serial number %s\n, + model, serial); #define SCALE(x) (((int)x) / 100), int)x) % 100) / 1000) @@ -482,8 +488,9 @@ unit = Ah; else unit = Wh; - aprint_verbose_dev(dv, low-warn granularity: %d.%03d%s, - warn-full granularity: %d.%03d%s\n, + + aprint_verbose_dev(dv, granularity: + low-warn %d.%03d %s, warn-full %d.%03d %s\n, SCALE(elm[ACPIBAT_BIF_GRANULARITY1].Integer.Value * 1000), unit, SCALE(elm[ACPIBAT_BIF_GRANULARITY2].Integer.Value * 1000), unit); }
CVS commit: src/sys/rump/librump/rumpvfs
Module Name:src Committed By: pooka Date: Wed Jun 30 15:40:31 UTC 2010 Modified Files: src/sys/rump/librump/rumpvfs: rumpfs.c Log Message: plug memory leaks (of course the function i copypasted for the previous commit was the only one with the leak ...) To generate a diff of this commit: cvs rdiff -u -r1.58 -r1.59 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.58 src/sys/rump/librump/rumpvfs/rumpfs.c:1.59 --- src/sys/rump/librump/rumpvfs/rumpfs.c:1.58 Wed Jun 30 14:50:35 2010 +++ src/sys/rump/librump/rumpvfs/rumpfs.c Wed Jun 30 15:40:30 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: rumpfs.c,v 1.58 2010/06/30 14:50:35 pooka Exp $ */ +/* $NetBSD: rumpfs.c,v 1.59 2010/06/30 15:40:30 pooka Exp $ */ /* * Copyright (c) 2009 Antti Kantee. All Rights Reserved. @@ -26,7 +26,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: rumpfs.c,v 1.58 2010/06/30 14:50:35 pooka Exp $); +__KERNEL_RCSID(0, $NetBSD: rumpfs.c,v 1.59 2010/06/30 15:40:30 pooka Exp $); #include sys/param.h #include sys/atomic.h @@ -780,6 +780,7 @@ makedir(rnd, cnp, rn); out: + PNBUF_PUT(cnp-cn_pnbuf); vput(dvp); return rv; } @@ -812,6 +813,7 @@ makedir(rnd, cnp, rn); out: + PNBUF_PUT(cnp-cn_pnbuf); vput(dvp); return rv; }
CVS commit: src/sys
Module Name:src Committed By: pooka Date: Wed Jun 30 15:44:55 UTC 2010 Modified Files: src/sys/kern: vfs_syscalls.c src/sys/sys: vfs_syscalls.h Log Message: Enable kernel-internal symlink creation with do_sys_symlink(). I did this a while ago already, but can't remember why i didn't commit it then. To generate a diff of this commit: cvs rdiff -u -r1.406 -r1.407 src/sys/kern/vfs_syscalls.c cvs rdiff -u -r1.13 -r1.14 src/sys/sys/vfs_syscalls.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/kern/vfs_syscalls.c diff -u src/sys/kern/vfs_syscalls.c:1.406 src/sys/kern/vfs_syscalls.c:1.407 --- src/sys/kern/vfs_syscalls.c:1.406 Thu Jun 24 13:03:12 2010 +++ src/sys/kern/vfs_syscalls.c Wed Jun 30 15:44:54 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: vfs_syscalls.c,v 1.406 2010/06/24 13:03:12 hannken Exp $ */ +/* $NetBSD: vfs_syscalls.c,v 1.407 2010/06/30 15:44:54 pooka Exp $ */ /*- * Copyright (c) 2008, 2009 The NetBSD Foundation, Inc. @@ -66,7 +66,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: vfs_syscalls.c,v 1.406 2010/06/24 13:03:12 hannken Exp $); +__KERNEL_RCSID(0, $NetBSD: vfs_syscalls.c,v 1.407 2010/06/30 15:44:54 pooka Exp $); #ifdef _KERNEL_OPT #include opt_fileassoc.h @@ -2024,29 +2024,24 @@ return (error); } -/* - * Make a symbolic link. - */ -/* ARGSUSED */ int -sys_symlink(struct lwp *l, const struct sys_symlink_args *uap, register_t *retval) +do_sys_symlink(const char *patharg, const char *link, enum uio_seg seg) { - /* { - syscallarg(const char *) path; - syscallarg(const char *) link; - } */ - struct proc *p = l-l_proc; + struct proc *p = curproc; struct vattr vattr; char *path; int error; struct nameidata nd; path = PNBUF_GET(); - error = copyinstr(SCARG(uap, path), path, MAXPATHLEN, NULL); - if (error) - goto out; - NDINIT(nd, CREATE, LOCKPARENT | TRYEMULROOT, UIO_USERSPACE, - SCARG(uap, link)); + if (seg == UIO_USERSPACE) { + if ((error = copyinstr(patharg, path, MAXPATHLEN, NULL)) != 0) + goto out; + } else { + KASSERT(strlen(patharg) MAXPATHLEN); + strcpy(path, patharg); + } + NDINIT(nd, CREATE, LOCKPARENT | TRYEMULROOT, seg, link); if ((error = namei(nd)) != 0) goto out; if (nd.ni_vp) { @@ -2072,6 +2067,22 @@ } /* + * Make a symbolic link. + */ +/* ARGSUSED */ +int +sys_symlink(struct lwp *l, const struct sys_symlink_args *uap, register_t *retval) +{ + /* { + syscallarg(const char *) path; + syscallarg(const char *) link; + } */ + + return do_sys_symlink(SCARG(uap, path), SCARG(uap, link), + UIO_USERSPACE); +} + +/* * Delete a whiteout from the filesystem. */ /* ARGSUSED */ Index: src/sys/sys/vfs_syscalls.h diff -u src/sys/sys/vfs_syscalls.h:1.13 src/sys/sys/vfs_syscalls.h:1.14 --- src/sys/sys/vfs_syscalls.h:1.13 Sun Aug 9 22:49:00 2009 +++ src/sys/sys/vfs_syscalls.h Wed Jun 30 15:44:55 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: vfs_syscalls.h,v 1.13 2009/08/09 22:49:00 haad Exp $*/ +/* $NetBSD: vfs_syscalls.h,v 1.14 2010/06/30 15:44:55 pooka Exp $*/ /* * Copyright (c) 2007, 2008, 2009 The NetBSD Foundation, Inc. @@ -65,6 +65,7 @@ int do_sys_mknod(struct lwp *, const char *, mode_t, dev_t, register_t *, enum uio_seg); int do_sys_mkdir(const char *, mode_t, enum uio_seg); +int do_sys_symlink(const char *, const char *, enum uio_seg); int chdir_lookup(const char *, int, struct vnode **, struct lwp *); void change_root(struct cwdinfo *, struct vnode *, struct lwp *);
CVS commit: src/sys/rump/librump/rumpvfs
Module Name:src Committed By: pooka Date: Wed Jun 30 15:48:59 UTC 2010 Modified Files: src/sys/rump/librump/rumpvfs: rump_vfs.c Log Message: Run vfs component constructors. To generate a diff of this commit: cvs rdiff -u -r1.55 -r1.56 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.55 src/sys/rump/librump/rumpvfs/rump_vfs.c:1.56 --- src/sys/rump/librump/rumpvfs/rump_vfs.c:1.55 Thu Jun 24 13:03:18 2010 +++ src/sys/rump/librump/rumpvfs/rump_vfs.c Wed Jun 30 15:48:59 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: rump_vfs.c,v 1.55 2010/06/24 13:03:18 hannken Exp $ */ +/* $NetBSD: rump_vfs.c,v 1.56 2010/06/30 15:48:59 pooka Exp $ */ /* * Copyright (c) 2008 Antti Kantee. All Rights Reserved. @@ -29,7 +29,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: rump_vfs.c,v 1.55 2010/06/24 13:03:18 hannken Exp $); +__KERNEL_RCSID(0, $NetBSD: rump_vfs.c,v 1.56 2010/06/30 15:48:59 pooka Exp $); #include sys/param.h #include sys/buf.h @@ -161,6 +161,8 @@ module_init_class(MODULE_CLASS_VFS); rump_vfs_builddevs(devsw_conv0, max_devsw_convs); + + rump_component_init(RUMP_COMPONENT_VFS); } void
CVS commit: src/sys/rump/fs/lib/libsyspuffs
Module Name:src Committed By: pooka Date: Wed Jun 30 15:50:20 UTC 2010 Modified Files: src/sys/rump/fs/lib/libsyspuffs: Makefile Added Files: src/sys/rump/fs/lib/libsyspuffs: component.c Log Message: add component constructor to create /dev/puffs - putter symlink To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/sys/rump/fs/lib/libsyspuffs/Makefile cvs rdiff -u -r0 -r1.1 src/sys/rump/fs/lib/libsyspuffs/component.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/fs/lib/libsyspuffs/Makefile diff -u src/sys/rump/fs/lib/libsyspuffs/Makefile:1.4 src/sys/rump/fs/lib/libsyspuffs/Makefile:1.5 --- src/sys/rump/fs/lib/libsyspuffs/Makefile:1.4 Wed Oct 14 17:29:19 2009 +++ src/sys/rump/fs/lib/libsyspuffs/Makefile Wed Jun 30 15:50:20 2010 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.4 2009/10/14 17:29:19 pooka Exp $ +# $NetBSD: Makefile,v 1.5 2010/06/30 15:50:20 pooka Exp $ # .PATH: ${.CURDIR}/../../../../fs/puffs @@ -10,8 +10,10 @@ SRCS+= putter.c SRCS+= puffs_rumpglue.c +SRCS+= component.c CPPFLAGS+= -DPUFFSDEBUG -DPUTTERDEBUG -I${RUMPTOP}/librump/rumpvfs +CPPFLAGS+= -I${RUMPTOP}/librump/rumpkern .include bsd.lib.mk .include bsd.klinks.mk Added files: Index: src/sys/rump/fs/lib/libsyspuffs/component.c diff -u /dev/null src/sys/rump/fs/lib/libsyspuffs/component.c:1.1 --- /dev/null Wed Jun 30 15:50:20 2010 +++ src/sys/rump/fs/lib/libsyspuffs/component.c Wed Jun 30 15:50:20 2010 @@ -0,0 +1,44 @@ +/* $NetBSD: component.c,v 1.1 2010/06/30 15:50:20 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 ``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. + */ + +#include sys/cdefs.h +__KERNEL_RCSID(0, $NetBSD: component.c,v 1.1 2010/06/30 15:50:20 pooka Exp $); + +#include sys/param.h +#include sys/conf.h +#include sys/device.h +#include sys/filedesc.h +#include sys/stat.h +#include sys/vfs_syscalls.h + +#include rump_private.h + +RUMP_COMPONENT(RUMP_COMPONENT_VFS) +{ + + FLAWLESSCALL(do_sys_symlink(putter, /dev/puffs, UIO_SYSSPACE)); +}
CVS commit: src/sys/rump
Module Name:src Committed By: pooka Date: Wed Jun 30 16:14:18 UTC 2010 Modified Files: src/sys/rump/dev: Makefile.rumpdev src/sys/rump/fs/lib/libsyspuffs: Makefile Added Files: src/sys/rump/dev/lib/libputter: Makefile shlib_version Log Message: Make putter its own component: rumpdev_putter. It was coupled in with rumpfs_puffs for prehistoric reasons which are no longer valid (namely, only fs components existed back then and there was no /dev support in rump fs namespace). To generate a diff of this commit: cvs rdiff -u -r1.13 -r1.14 src/sys/rump/dev/Makefile.rumpdev cvs rdiff -u -r0 -r1.1 src/sys/rump/dev/lib/libputter/Makefile \ src/sys/rump/dev/lib/libputter/shlib_version cvs rdiff -u -r1.5 -r1.6 src/sys/rump/fs/lib/libsyspuffs/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/rump/dev/Makefile.rumpdev diff -u src/sys/rump/dev/Makefile.rumpdev:1.13 src/sys/rump/dev/Makefile.rumpdev:1.14 --- src/sys/rump/dev/Makefile.rumpdev:1.13 Sat May 1 23:24:40 2010 +++ src/sys/rump/dev/Makefile.rumpdev Wed Jun 30 16:14:18 2010 @@ -1,9 +1,8 @@ -# $NetBSD: Makefile.rumpdev,v 1.13 2010/05/01 23:24:40 pooka Exp $ +# $NetBSD: Makefile.rumpdev,v 1.14 2010/06/30 16:14:18 pooka Exp $ # -RUMPDEVLIST= audio bpf cgd disk dm fss netsmb pad raidframe rnd \ - sysmon ubt ucom ugenhc ulpt umass usb wscons - +RUMPDEVLIST= audio bpf cgd disk dm fss netsmb pad putter raidframe \ + rnd sysmon ubt ucom ugenhc ulpt umass usb wscons .for var in ${RUMPDEVLIST} RUMPDEVLIBS+=lib${var} Index: src/sys/rump/fs/lib/libsyspuffs/Makefile diff -u src/sys/rump/fs/lib/libsyspuffs/Makefile:1.5 src/sys/rump/fs/lib/libsyspuffs/Makefile:1.6 --- src/sys/rump/fs/lib/libsyspuffs/Makefile:1.5 Wed Jun 30 15:50:20 2010 +++ src/sys/rump/fs/lib/libsyspuffs/Makefile Wed Jun 30 16:14:18 2010 @@ -1,18 +1,16 @@ -# $NetBSD: Makefile,v 1.5 2010/06/30 15:50:20 pooka Exp $ +# $NetBSD: Makefile,v 1.6 2010/06/30 16:14:18 pooka Exp $ # .PATH: ${.CURDIR}/../../../../fs/puffs -.PATH: ${.CURDIR}/../../../../dev/putter LIB= rumpfs_syspuffs SRCS= puffs_msgif.c puffs_node.c puffs_subr.c puffs_vfsops.c puffs_vnops.c -SRCS+= putter.c SRCS+= puffs_rumpglue.c SRCS+= component.c -CPPFLAGS+= -DPUFFSDEBUG -DPUTTERDEBUG -I${RUMPTOP}/librump/rumpvfs +CPPFLAGS+= -DPUFFSDEBUG -I${RUMPTOP}/librump/rumpvfs CPPFLAGS+= -I${RUMPTOP}/librump/rumpkern .include bsd.lib.mk Added files: Index: src/sys/rump/dev/lib/libputter/Makefile diff -u /dev/null src/sys/rump/dev/lib/libputter/Makefile:1.1 --- /dev/null Wed Jun 30 16:14:18 2010 +++ src/sys/rump/dev/lib/libputter/Makefile Wed Jun 30 16:14:18 2010 @@ -0,0 +1,11 @@ +# $NetBSD: Makefile,v 1.1 2010/06/30 16:14:18 pooka Exp $ +# + +.PATH: ${.CURDIR}/../../../../dev/putter + +LIB= rumpdev_putter + +SRCS= putter.c + +.include bsd.lib.mk +.include bsd.klinks.mk Index: src/sys/rump/dev/lib/libputter/shlib_version diff -u /dev/null src/sys/rump/dev/lib/libputter/shlib_version:1.1 --- /dev/null Wed Jun 30 16:14:18 2010 +++ src/sys/rump/dev/lib/libputter/shlib_version Wed Jun 30 16:14:18 2010 @@ -0,0 +1,4 @@ +# $NetBSD: shlib_version,v 1.1 2010/06/30 16:14:18 pooka Exp $ +# +major=0 +minor=0
CVS commit: src/distrib/sets/lists
Module Name:src Committed By: pooka Date: Wed Jun 30 16:17:13 UTC 2010 Modified Files: src/distrib/sets/lists/base: shl.elf shl.mi src/distrib/sets/lists/comp: mi shl.mi Log Message: +rumpdev_putter To generate a diff of this commit: cvs rdiff -u -r1.219 -r1.220 src/distrib/sets/lists/base/shl.elf cvs rdiff -u -r1.542 -r1.543 src/distrib/sets/lists/base/shl.mi cvs rdiff -u -r1.1474 -r1.1475 src/distrib/sets/lists/comp/mi cvs rdiff -u -r1.124 -r1.125 src/distrib/sets/lists/comp/shl.mi Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/distrib/sets/lists/base/shl.elf diff -u src/distrib/sets/lists/base/shl.elf:1.219 src/distrib/sets/lists/base/shl.elf:1.220 --- src/distrib/sets/lists/base/shl.elf:1.219 Mon Jun 21 21:46:58 2010 +++ src/distrib/sets/lists/base/shl.elf Wed Jun 30 16:17:12 2010 @@ -1,4 +1,4 @@ -# $NetBSD: shl.elf,v 1.219 2010/06/21 21:46:58 pooka Exp $ +# $NetBSD: shl.elf,v 1.220 2010/06/30 16:17:12 pooka Exp $ # # Note: Do not mark old major and major.minor shared libraries as # obsolete; just remove the entry, as third-party applications @@ -262,6 +262,8 @@ ./usr/lib/librumpdev_netsmb.so.0 base-rump-shlib ./usr/lib/librumpdev_pad.so base-rump-shlib ./usr/lib/librumpdev_pad.so.0 base-rump-shlib +./usr/lib/librumpdev_putter.so base-rump-shlib +./usr/lib/librumpdev_putter.so.0 base-rump-shlib ./usr/lib/librumpdev_raidframe.so base-rump-shlib ./usr/lib/librumpdev_raidframe.so.0 base-rump-shlib ./usr/lib/librumpdev_rnd.so base-rump-shlib Index: src/distrib/sets/lists/base/shl.mi diff -u src/distrib/sets/lists/base/shl.mi:1.542 src/distrib/sets/lists/base/shl.mi:1.543 --- src/distrib/sets/lists/base/shl.mi:1.542 Mon Jun 21 21:46:58 2010 +++ src/distrib/sets/lists/base/shl.mi Wed Jun 30 16:17:12 2010 @@ -1,4 +1,4 @@ -# $NetBSD: shl.mi,v 1.542 2010/06/21 21:46:58 pooka Exp $ +# $NetBSD: shl.mi,v 1.543 2010/06/30 16:17:12 pooka Exp $ # # Note: Don't delete entries from here - mark them as obsolete instead, # unless otherwise stated below. @@ -138,8 +138,8 @@ ./usr/lib/librumpdev_fss.so.0.0 base-rump-shlib ./usr/lib/librumpdev_netsmb.so.0.0 base-rump-shlib ./usr/lib/librumpdev_pad.so.0.0 base-rump-shlib +./usr/lib/librumpdev_putter.so.0.0 base-rump-shlib ./usr/lib/librumpdev_raidframe.so.0.0 base-rump-shlib -./usr/lib/librumpdev_rnd.so.0.0 base-rump-shlib ./usr/lib/librumpdev_sysmon.so.0.0 base-rump-shlib ./usr/lib/librumpdev_ubt.so.0.0 base-rump-shlib ./usr/lib/librumpdev_ucom.so.0.0 base-rump-shlib Index: src/distrib/sets/lists/comp/mi diff -u src/distrib/sets/lists/comp/mi:1.1474 src/distrib/sets/lists/comp/mi:1.1475 --- src/distrib/sets/lists/comp/mi:1.1474 Sat Jun 26 14:27:55 2010 +++ src/distrib/sets/lists/comp/mi Wed Jun 30 16:17:12 2010 @@ -1,4 +1,4 @@ -# $NetBSD: mi,v 1.1474 2010/06/26 14:27:55 kefren Exp $ +# $NetBSD: mi,v 1.1475 2010/06/30 16:17:12 pooka Exp $ # # Note: don't delete entries from here - mark them as obsolete instead. # @@ -2612,6 +2612,9 @@ ./usr/lib/librumpdev_pad.a comp-c-lib ./usr/lib/librumpdev_pad_g.a -unknown- debuglib ./usr/lib/librumpdev_pad_p.a comp-c-proflib profile +./usr/lib/librumpdev_putter.a comp-c-lib +./usr/lib/librumpdev_putter_g.a -unknown- debuglib +./usr/lib/librumpdev_putter_p.a comp-c-proflib profile ./usr/lib/librumpdev_raidframe.a comp-c-lib ./usr/lib/librumpdev_raidframe_g.a -unknown- debuglib ./usr/lib/librumpdev_raidframe_p.a comp-c-proflib profile Index: src/distrib/sets/lists/comp/shl.mi diff -u src/distrib/sets/lists/comp/shl.mi:1.124 src/distrib/sets/lists/comp/shl.mi:1.125 --- src/distrib/sets/lists/comp/shl.mi:1.124 Mon Jun 21 21:46:59 2010 +++ src/distrib/sets/lists/comp/shl.mi Wed Jun 30 16:17:13 2010 @@ -1,4 +1,4 @@ -# $NetBSD: shl.mi,v 1.124 2010/06/21 21:46:59 pooka Exp $ +# $NetBSD: shl.mi,v 1.125 2010/06/30 16:17:13 pooka Exp $ # # Note: don't delete entries from here - mark them as obsolete instead. # @@ -100,6 +100,7 @@ ./usr/lib/librumpdev_netsmb_pic.a comp-c-piclib ./usr/lib/librumpdev_pic.a comp-c-piclib ./usr/lib/librumpdev_pad_pic.a comp-c-piclib +./usr/lib/librumpdev_putter_pic.a comp-c-piclib ./usr/lib/librumpdev_raidframe_pic.a comp-c-piclib ./usr/lib/librumpdev_rnd_pic.a comp-c-piclib ./usr/lib/librumpdev_sysmon_pic.a comp-c-piclib @@ -277,6 +278,7 @@ ./usr/libdata/debug/usr/lib/librumpdev_fss.so.0.0.debug comp-rump-debug debug ./usr/libdata/debug/usr/lib/librumpdev_netsmb.so.0.0.debug comp-rump-debug debug ./usr/libdata/debug/usr/lib/librumpdev_pad.so.0.0.debug comp-rump-debug debug +./usr/libdata/debug/usr/lib/librumpdev_putter.so.0.0.debug comp-rump-debug debug ./usr/libdata/debug/usr/lib/librumpdev_raidframe.so.0.0.debug comp-rump-debug debug ./usr/libdata/debug/usr/lib/librumpdev_rnd.so.0.0.debug comp-rump-debug debug ./usr/libdata/debug/usr/lib/librumpdev_sysmon.so.0.0.debug comp-rump-debug
CVS commit: src/usr.sbin/puffs/rump_syspuffs
Module Name:src Committed By: pooka Date: Wed Jun 30 16:22:49 UTC 2010 Modified Files: src/usr.sbin/puffs/rump_syspuffs: Makefile Log Message: link putter now that it's a separate component To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/usr.sbin/puffs/rump_syspuffs/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.sbin/puffs/rump_syspuffs/Makefile diff -u src/usr.sbin/puffs/rump_syspuffs/Makefile:1.3 src/usr.sbin/puffs/rump_syspuffs/Makefile:1.4 --- src/usr.sbin/puffs/rump_syspuffs/Makefile:1.3 Sat Aug 9 11:07:26 2008 +++ src/usr.sbin/puffs/rump_syspuffs/Makefile Wed Jun 30 16:22:49 2010 @@ -1,9 +1,9 @@ -# $NetBSD: Makefile,v 1.3 2008/08/09 11:07:26 pooka Exp $ +# $NetBSD: Makefile,v 1.4 2010/06/30 16:22:49 pooka Exp $ # PROG= rump_syspuffs -LDADD+= -lrumpfs_syspuffs +LDADD+= -lrumpfs_syspuffs -lrumpdev_putter DPADD+= ${LIBRUMPFS_SYSPUFFS} ISRUMP= # indubitably
CVS commit: src/tests/fs/ffs
Module Name:src Committed By: pooka Date: Wed Jun 30 16:37:12 UTC 2010 Modified Files: src/tests/fs/ffs: t_renamerace.c Log Message: qemu has been fixed, so remove timeout (not that it helped in the first place ...) To generate a diff of this commit: cvs rdiff -u -r1.11 -r1.12 src/tests/fs/ffs/t_renamerace.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/fs/ffs/t_renamerace.c diff -u src/tests/fs/ffs/t_renamerace.c:1.11 src/tests/fs/ffs/t_renamerace.c:1.12 --- src/tests/fs/ffs/t_renamerace.c:1.11 Fri Jun 4 08:39:40 2010 +++ src/tests/fs/ffs/t_renamerace.c Wed Jun 30 16:37:12 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: t_renamerace.c,v 1.11 2010/06/04 08:39:40 jmmv Exp $ */ +/* $NetBSD: t_renamerace.c,v 1.12 2010/06/30 16:37:12 pooka Exp $ */ /* * Modified for rump and atf from a program supplied @@ -30,8 +30,6 @@ { atf_tc_set_md_var(tc, descr, rename(2) race against files unlinked mid-operation, kern/40948); - /* XXX: test hangs in qemu for unknown reasons */ - atf_tc_set_md_var(tc, timeout, 20); atf_tc_set_md_var(tc, use.fs, true); } @@ -132,5 +130,6 @@ ATF_TP_ADD_TCS(tp) { ATF_TP_ADD_TC(tp, renamerace); - return 0; /* ??? */ + + return atf_no_error(); }
CVS commit: src/distrib/sets/lists/base
Module Name:src Committed By: pooka Date: Wed Jun 30 17:41:55 UTC 2010 Modified Files: src/distrib/sets/lists/base: shl.mi Log Message: unsnafu previous To generate a diff of this commit: cvs rdiff -u -r1.543 -r1.544 src/distrib/sets/lists/base/shl.mi Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/distrib/sets/lists/base/shl.mi diff -u src/distrib/sets/lists/base/shl.mi:1.543 src/distrib/sets/lists/base/shl.mi:1.544 --- src/distrib/sets/lists/base/shl.mi:1.543 Wed Jun 30 16:17:12 2010 +++ src/distrib/sets/lists/base/shl.mi Wed Jun 30 17:41:55 2010 @@ -1,4 +1,4 @@ -# $NetBSD: shl.mi,v 1.543 2010/06/30 16:17:12 pooka Exp $ +# $NetBSD: shl.mi,v 1.544 2010/06/30 17:41:55 pooka Exp $ # # Note: Don't delete entries from here - mark them as obsolete instead, # unless otherwise stated below. @@ -140,6 +140,7 @@ ./usr/lib/librumpdev_pad.so.0.0 base-rump-shlib ./usr/lib/librumpdev_putter.so.0.0 base-rump-shlib ./usr/lib/librumpdev_raidframe.so.0.0 base-rump-shlib +./usr/lib/librumpdev_rnd.so.0.0 base-rump-shlib ./usr/lib/librumpdev_sysmon.so.0.0 base-rump-shlib ./usr/lib/librumpdev_ubt.so.0.0 base-rump-shlib ./usr/lib/librumpdev_ucom.so.0.0 base-rump-shlib
CVS commit: src/sys/arch/sandpoint/conf
Module Name:src Committed By: phx Date: Wed Jun 30 17:49:32 UTC 2010 Modified Files: src/sys/arch/sandpoint/conf: ENCPP1 GENERIC SANDPOINT Log Message: Add file system snapshot device. To generate a diff of this commit: cvs rdiff -u -r1.7 -r1.8 src/sys/arch/sandpoint/conf/ENCPP1 cvs rdiff -u -r1.48 -r1.49 src/sys/arch/sandpoint/conf/GENERIC cvs rdiff -u -r1.6 -r1.7 src/sys/arch/sandpoint/conf/SANDPOINT 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/sandpoint/conf/ENCPP1 diff -u src/sys/arch/sandpoint/conf/ENCPP1:1.7 src/sys/arch/sandpoint/conf/ENCPP1:1.8 --- src/sys/arch/sandpoint/conf/ENCPP1:1.7 Sat Dec 5 20:11:16 2009 +++ src/sys/arch/sandpoint/conf/ENCPP1 Wed Jun 30 17:49:32 2010 @@ -1,4 +1,4 @@ -# $NetBSD: ENCPP1,v 1.7 2009/12/05 20:11:16 pooka Exp $ +# $NetBSD: ENCPP1,v 1.8 2010/06/30 17:49:32 phx Exp $ # # Ampro EnCorePP1 machine description file # @@ -23,7 +23,7 @@ options INCLUDE_CONFIG_FILE # embed config file in kernel binary -#ident ENCPP1-$Revision: 1.7 $ +#ident ENCPP1-$Revision: 1.8 $ maxusers 32 @@ -122,6 +122,8 @@ pseudo-device ksyms # /dev/ksyms #pseudo-device pf # PF packet filter #pseudo-device pflog # PF log if +pseudo-device fss # file system snapshot device + # # device # Index: src/sys/arch/sandpoint/conf/GENERIC diff -u src/sys/arch/sandpoint/conf/GENERIC:1.48 src/sys/arch/sandpoint/conf/GENERIC:1.49 --- src/sys/arch/sandpoint/conf/GENERIC:1.48 Wed Jun 9 17:34:32 2010 +++ src/sys/arch/sandpoint/conf/GENERIC Wed Jun 30 17:49:32 2010 @@ -1,4 +1,4 @@ -# $NetBSD: GENERIC,v 1.48 2010/06/09 17:34:32 phx Exp $ +# $NetBSD: GENERIC,v 1.49 2010/06/30 17:49:32 phx Exp $ # # machine description file for GENERIC NAS # @@ -22,7 +22,7 @@ options INCLUDE_CONFIG_FILE # embed config file in kernel binary -#ident GENERIC-$Revision: 1.48 $ +#ident GENERIC-$Revision: 1.49 $ maxusers 32 @@ -141,6 +141,7 @@ pseudo-device ksyms # /dev/ksyms #pseudo-device pf # PF packet filter #pseudo-device pflog # PF log if +pseudo-device fss # file system snapshot device # # device Index: src/sys/arch/sandpoint/conf/SANDPOINT diff -u src/sys/arch/sandpoint/conf/SANDPOINT:1.6 src/sys/arch/sandpoint/conf/SANDPOINT:1.7 --- src/sys/arch/sandpoint/conf/SANDPOINT:1.6 Sat Dec 5 20:11:16 2009 +++ src/sys/arch/sandpoint/conf/SANDPOINT Wed Jun 30 17:49:32 2010 @@ -1,4 +1,4 @@ -# $NetBSD: SANDPOINT,v 1.6 2009/12/05 20:11:16 pooka Exp $ +# $NetBSD: SANDPOINT,v 1.7 2010/06/30 17:49:32 phx Exp $ # # Sandpoint X3/X2 machine description file # @@ -23,7 +23,7 @@ options INCLUDE_CONFIG_FILE # embed config file in kernel binary -#ident SANDPOINT-$Revision: 1.6 $ +#ident SANDPOINT-$Revision: 1.7 $ maxusers 32 @@ -124,6 +124,8 @@ pseudo-device ksyms # /dev/ksyms #pseudo-device pf # PF packet filter #pseudo-device pflog # PF log if +pseudo-device fss # file system snapshot device + # # device #
CVS commit: src/sys/arch/sandpoint/sandpoint
Module Name:src Committed By: phx Date: Wed Jun 30 17:50:34 UTC 2010 Modified Files: src/sys/arch/sandpoint/sandpoint: autoconf.c Log Message: Determine the boot disk with bootinfo cookie. Patch submitted by Toru Nishimura. To generate a diff of this commit: cvs rdiff -u -r1.21 -r1.22 src/sys/arch/sandpoint/sandpoint/autoconf.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/sandpoint/sandpoint/autoconf.c diff -u src/sys/arch/sandpoint/sandpoint/autoconf.c:1.21 src/sys/arch/sandpoint/sandpoint/autoconf.c:1.22 --- src/sys/arch/sandpoint/sandpoint/autoconf.c:1.21 Tue May 18 15:07:50 2010 +++ src/sys/arch/sandpoint/sandpoint/autoconf.c Wed Jun 30 17:50:34 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: autoconf.c,v 1.21 2010/05/18 15:07:50 phx Exp $ */ +/* $NetBSD: autoconf.c,v 1.22 2010/06/30 17:50:34 phx Exp $ */ /*- * Copyright (c) 1990 The Regents of the University of California. @@ -35,7 +35,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: autoconf.c,v 1.21 2010/05/18 15:07:50 phx Exp $); +__KERNEL_RCSID(0, $NetBSD: autoconf.c,v 1.22 2010/06/30 17:50:34 phx Exp $); #include sys/param.h #include sys/systm.h @@ -137,37 +137,9 @@ } } if (bi_rdev != NULL dev-dv_class == DV_DISK - device_is_a(dev, bi_rdev-devname)) { + device_is_a(dev, bi_rdev-devname) + dev-dv_unit == bi_rdev-cookie) { booted_device = dev; booted_partition = 0; } } - -#if 0 -void -findroot(void) -{ - int unit, part; - device_t dv; - const char *name; - -#if 0 - printf(howto %x bootdev %x , boothowto, bootdev); -#endif - - if ((bootdev B_MAGICMASK) != (u_long)B_DEVMAGIC) - return; - - name = devsw_blk2name((bootdev B_TYPESHIFT) B_TYPEMASK); - if (name == NULL) - return; - - part = (bootdev B_PARTITIONSHIFT) B_PARTITIONMASK; - unit = (bootdev B_UNITSHIFT) B_UNITMASK; - - if ((dv = device_find_by_driver_unit(name, unit)) != NULL) { - booted_device = dv; - booted_partition = part; - } -} -#endif
CVS commit: src/tests/fs/common
Module Name:src Committed By: njoly Date: Wed Jun 30 20:39:39 UTC 2010 Added Files: src/tests/fs/common: ext2fs.c ffs.c h_fsmacros.h msdosfs.c sysvbfs.c tmpfs.c Log Message: Add helper code and macros to ease writing filesystem tests with rump. Support currently limited to ext2fs, ffs, msdos, sysvbfs and tmpfs. To generate a diff of this commit: cvs rdiff -u -r0 -r1.1 src/tests/fs/common/ext2fs.c src/tests/fs/common/ffs.c \ src/tests/fs/common/h_fsmacros.h src/tests/fs/common/msdosfs.c \ src/tests/fs/common/sysvbfs.c src/tests/fs/common/tmpfs.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Added files: Index: src/tests/fs/common/ext2fs.c diff -u /dev/null src/tests/fs/common/ext2fs.c:1.1 --- /dev/null Wed Jun 30 20:39:39 2010 +++ src/tests/fs/common/ext2fs.c Wed Jun 30 20:39:39 2010 @@ -0,0 +1,135 @@ +/* $NetBSD: ext2fs.c,v 1.1 2010/06/30 20:39:39 njoly Exp $ */ + +/*- + * Copyright (c) 2010 The NetBSD Foundation, Inc. + * All rights reserved. + * + * This code is derived from software contributed to The NetBSD Foundation + * by + * + * 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 sys/mount.h +#include sys/stat.h + +#include stdio.h +#include stdlib.h +#include string.h +#include unistd.h + +#include ufs/ufs/ufsmount.h + +#include rump/rump.h +#include rump/rump_syscalls.h + +struct ext2fstestargs { +struct ufs_args ta_uargs; +char ta_devpath[MAXPATHLEN]; +char ta_imgpath[MAXPATHLEN]; +}; + +static int +ext2fs_newfs(void **buf, const char *image, off_t size) +{ + char cmd[1024]; + int res; + static unsigned int num = 0; + struct ext2fstestargs *args; + + size /= 512; + snprintf(cmd, 1024, newfs_ext2fs -F -s %PRId64 %s /dev/null, + size, image); + res = system(cmd); + if (res != 0) + return res; + + res = rump_init(); + if (res != 0) + return res; + + args = calloc(1, sizeof(*args)); + if (args == NULL) + return -1; + + snprintf(args-ta_devpath, MAXPATHLEN, /dev/device%d.ext2fs, num); + snprintf(args-ta_imgpath, MAXPATHLEN, %s, image); + args-ta_uargs.fspec = args-ta_devpath; + + res = rump_pub_etfs_register(args-ta_devpath, image, RUMP_ETFS_BLK); + if (res != 0) { + free(args); + return res; + } + + *buf = args; + num++; + + return res; +} + +static int +ext2fs_delfs(void *buf) +{ + int res; + struct ext2fstestargs *args = buf; + + res = rump_pub_etfs_remove(args-ta_devpath); + if (res != 0) + return res; + + res = unlink(args-ta_imgpath); + if (res != 0) + return res; + + free(args); + + return 0; +} + +static int +ext2fs_mount(void *buf, const char *path, int flags) +{ + int res; + struct ext2fstestargs *args = buf; + + res = rump_sys_mkdir(path, 0777); + if (res == -1) + return res; + + res = rump_sys_mount(MOUNT_EXT2FS, path, flags, args-ta_uargs, + sizeof(args-ta_uargs)); + return res; +} + +static int +ext2fs_unmount(const char *path, int flags) +{ + int res; + + res = rump_sys_unmount(path, flags); + if (res == -1) + return res; + + res = rump_sys_rmdir(path); + return res; +} Index: src/tests/fs/common/ffs.c diff -u /dev/null src/tests/fs/common/ffs.c:1.1 --- /dev/null Wed Jun 30 20:39:39 2010 +++ src/tests/fs/common/ffs.c Wed Jun 30 20:39:39 2010 @@ -0,0 +1,134 @@ +/* $NetBSD: ffs.c,v 1.1 2010/06/30 20:39:39 njoly Exp $ */ + +/*- + * Copyright (c) 2010 The NetBSD Foundation, Inc. + * All rights reserved. + * + * This code is derived from software contributed to The NetBSD Foundation + * by + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of
CVS commit: src
Module Name:src Committed By: njoly Date: Wed Jun 30 21:54:56 UTC 2010 Modified Files: src/distrib/sets/lists/tests: mi src/tests/fs/ffs: Makefile Added Files: src/tests/fs/ffs: t_mount.c Log Message: Small xfail testcase to exercise 48k ffs image mount, from problem reported by Hubert Feyrer on netbsd-us...@. To generate a diff of this commit: cvs rdiff -u -r1.92 -r1.93 src/distrib/sets/lists/tests/mi cvs rdiff -u -r1.7 -r1.8 src/tests/fs/ffs/Makefile cvs rdiff -u -r0 -r1.1 src/tests/fs/ffs/t_mount.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/distrib/sets/lists/tests/mi diff -u src/distrib/sets/lists/tests/mi:1.92 src/distrib/sets/lists/tests/mi:1.93 --- src/distrib/sets/lists/tests/mi:1.92 Tue Jun 29 15:26:13 2010 +++ src/distrib/sets/lists/tests/mi Wed Jun 30 21:54:56 2010 @@ -1,4 +1,4 @@ -# $NetBSD: mi,v 1.92 2010/06/29 15:26:13 pooka Exp $ +# $NetBSD: mi,v 1.93 2010/06/30 21:54:56 njoly Exp $ # # Note: don't delete entries from here - mark them as obsolete instead. # @@ -130,6 +130,7 @@ ./usr/libdata/debug/usr/tests/fs tests-fs-debug ./usr/libdata/debug/usr/tests/fs/ffs tests-fs-debug ./usr/libdata/debug/usr/tests/fs/ffs/t_fifos.debug tests-fs-debug debug,atf +./usr/libdata/debug/usr/tests/fs/ffs/t_mount.debug tests-fs-debug debug,atf ./usr/libdata/debug/usr/tests/fs/ffs/t_renamerace.debug tests-fs-debug debug,atf ./usr/libdata/debug/usr/tests/fs/ffs/t_snapshot.debug tests-fs-debug debug,atf ./usr/libdata/debug/usr/tests/fs/kernfs tests-fs-debug @@ -715,6 +716,7 @@ ./usr/tests/fs/ffstests-fs-tests ./usr/tests/fs/ffs/Atffile tests-fs-tests atf ./usr/tests/fs/ffs/t_fifos tests-fs-tests atf +./usr/tests/fs/ffs/t_mount tests-fs-tests atf ./usr/tests/fs/ffs/t_renamerace tests-fs-tests atf ./usr/tests/fs/ffs/t_snapshot tests-fs-tests atf ./usr/tests/fs/kernfstests-fs-tests Index: src/tests/fs/ffs/Makefile diff -u src/tests/fs/ffs/Makefile:1.7 src/tests/fs/ffs/Makefile:1.8 --- src/tests/fs/ffs/Makefile:1.7 Mon Apr 12 22:58:53 2010 +++ src/tests/fs/ffs/Makefile Wed Jun 30 21:54:56 2010 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.7 2010/04/12 22:58:53 pooka Exp $ +# $NetBSD: Makefile,v 1.8 2010/06/30 21:54:56 njoly Exp $ # TESTSDIR= ${TESTSBASE}/fs/ffs @@ -7,6 +7,7 @@ TESTS_C= t_renamerace TESTS_C+= t_fifos TESTS_C+= t_snapshot +TESTS_C+= t_mount LDADD+=-lrumpfs_ffs # ffs LDADD+=-lrumpdev_fss # snapshot dev Added files: Index: src/tests/fs/ffs/t_mount.c diff -u /dev/null src/tests/fs/ffs/t_mount.c:1.1 --- /dev/null Wed Jun 30 21:54:56 2010 +++ src/tests/fs/ffs/t_mount.c Wed Jun 30 21:54:56 2010 @@ -0,0 +1,45 @@ +/* $NetBSD: t_mount.c,v 1.1 2010/06/30 21:54:56 njoly Exp $ */ + +/* + * Adapted for rump and atf from a testcase supplied + * by Hubert Feyrer on netbsd-users@ + */ + +#include atf-c.h + +#include ../common/ffs.c + +#define IMGNAME image.ffs +#define IMGSIZE (96 * 512) + +#define MNTDIR /mnt + +ATF_TC(48Kimage); +ATF_TC_HEAD(48Kimage, tc) +{ + atf_tc_set_md_var(tc, descr, mount small 48K ffs image); + atf_tc_set_md_var(tc, use.fs, true); + atf_tc_set_md_var(tc, xfail, No PR yet); +} + +ATF_TC_BODY(48Kimage, tc) +{ + void *tmp; + + if (ffs_newfs(tmp, IMGNAME, IMGSIZE) != 0) + atf_tc_fail(newfs failed); + + if (ffs_mount(tmp, MNTDIR, 0) != 0) + atf_tc_fail(mount failed); + if (ffs_unmount(MNTDIR, 0) != 0) + atf_tc_fail(unmount failed); + + if (ffs_delfs(tmp) != 0) + atf_tc_fail(delfs failed); +} + +ATF_TP_ADD_TCS(tp) +{ + ATF_TP_ADD_TC(tp, 48Kimage); + return atf_no_error(); +}
CVS commit: src/crypto/external/bsd/netpgp/dist/src/lib
Module Name:src Committed By: agc Date: Thu Jul 1 00:42:51 UTC 2010 Modified Files: src/crypto/external/bsd/netpgp/dist/src/lib: netpgp.c Log Message: factor out the code which recognises ASCII-armour into its own function. To generate a diff of this commit: cvs rdiff -u -r1.60 -r1.61 \ src/crypto/external/bsd/netpgp/dist/src/lib/netpgp.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/crypto/external/bsd/netpgp/dist/src/lib/netpgp.c diff -u src/crypto/external/bsd/netpgp/dist/src/lib/netpgp.c:1.60 src/crypto/external/bsd/netpgp/dist/src/lib/netpgp.c:1.61 --- src/crypto/external/bsd/netpgp/dist/src/lib/netpgp.c:1.60 Wed Jun 30 15:17:40 2010 +++ src/crypto/external/bsd/netpgp/dist/src/lib/netpgp.c Thu Jul 1 00:42:51 2010 @@ -34,7 +34,7 @@ #if defined(__NetBSD__) __COPYRIGHT(@(#) Copyright (c) 2009 The NetBSD Foundation, Inc. All rights reserved.); -__RCSID($NetBSD: netpgp.c,v 1.60 2010/06/30 15:17:40 agc Exp $); +__RCSID($NetBSD: netpgp.c,v 1.61 2010/07/01 00:42:51 agc Exp $); #endif #include sys/types.h @@ -437,6 +437,26 @@ return 1; } +/* return 1 if the file contains ascii-armoured text */ +static unsigned +isarmoured(__ops_io_t *io, const char *f, const char *text) +{ + unsigned armoured; + FILE *fp; + char buf[BUFSIZ]; + + armoured = 0; + if ((fp = fopen(f, r)) == NULL) { + (void) fprintf(io-errs, isarmoured: can't open '%s'\n, f); + return 0; + } + if (fgets(buf, sizeof(buf), fp) != NULL) { + armoured = (strncmp(buf, text, strlen(text)) == 0); + } + (void) fclose(fp); + return armoured; +} + /***/ /* exported functions start here */ /***/ @@ -754,25 +774,13 @@ #endif __ops_io_t *io; unsigned realarmor; - FILE *fp; #if 0 char ringfile[MAXPATHLEN]; #endif - char buf[BUFSIZ]; int done; io = netpgp-io; - realarmor = 0; - if ((fp = fopen(f, r)) == NULL) { - (void) fprintf(io-errs, netpgp_import_key: can't open '%s'\n, f); - return 0; - } - if (fgets(buf, sizeof(buf), fp) == NULL) { - realarmor = 0; - } else { - realarmor = (strncmp(buf, IMPORT_ARMOR_HEAD, strlen(IMPORT_ARMOR_HEAD)) == 0); - } - (void) fclose(fp); + realarmor = isarmoured(io, f, IMPORT_ARMOR_HEAD); done = __ops_keyring_fileread(netpgp-pubring, realarmor, f); if (!done) { (void) fprintf(io-errs, Cannot import key from file %s\n, f); @@ -901,30 +909,18 @@ const unsigned overwrite = 1; __ops_io_t *io; unsigned realarmor; - FILE *fp; - char buf[BUFSIZ]; + __OPS_USED(armored); io = netpgp-io; if (f == NULL) { (void) fprintf(io-errs, netpgp_decrypt_file: no filename specified\n); return 0; } - realarmor = (unsigned)armored; - if ((fp = fopen(f, r)) == NULL) { - (void) fprintf(io-errs, - netpgp_decrypt_file: can't open '%s'\n, f); - return 0; - } - if (fgets(buf, sizeof(buf), fp) == NULL) { - realarmor = 0; - } else { - realarmor = (strcmp(buf, ARMOR_HEAD) == 0); - } - (void) fclose(fp); + realarmor = isarmoured(io, f, ARMOR_HEAD); return __ops_decrypt_file(netpgp-io, f, out, netpgp-secring, netpgp-pubring, -(unsigned)realarmor, overwrite, +realarmor, overwrite, netpgp-passfp, get_passphrase_cb); } @@ -1014,9 +1010,8 @@ __ops_validation_t result; __ops_io_t *io; unsigned realarmor; - FILE *fp; - char buf[BUFSIZ]; + __OPS_USED(armored); (void) memset(result, 0x0, sizeof(result)); io = netpgp-io; if (in == NULL) { @@ -1024,18 +1019,7 @@ netpgp_verify_file: no filename specified\n); return 0; } - realarmor = (unsigned)armored; - if ((fp = fopen(in, r)) == NULL) { - (void) fprintf(io-errs, - netpgp_decrypt_file: can't open '%s'\n, in); - return 0; - } - if (fgets(buf, sizeof(buf), fp) == NULL) { - realarmor = 0; - } else { - realarmor = (strcmp(buf, ARMOR_SIG_HEAD) == 0); - } - (void) fclose(fp); + realarmor = isarmoured(io, in, ARMOR_SIG_HEAD); if (__ops_validate_file(io, result, in, out, (const int)realarmor, netpgp-pubring)) { resultp(io, in, result, netpgp-pubring); return 1;
CVS commit: src/crypto/external/bsd/netpgp/dist
Module Name:src Committed By: agc Date: Thu Jul 1 03:51:07 UTC 2010 Modified Files: src/crypto/external/bsd/netpgp/dist: tst Log Message: check both host and user ssh keys match the host and user keys from netpgpkeys. also echo the keys being compared To generate a diff of this commit: cvs rdiff -u -r1.24 -r1.25 src/crypto/external/bsd/netpgp/dist/tst Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/crypto/external/bsd/netpgp/dist/tst diff -u src/crypto/external/bsd/netpgp/dist/tst:1.24 src/crypto/external/bsd/netpgp/dist/tst:1.25 --- src/crypto/external/bsd/netpgp/dist/tst:1.24 Fri Jun 25 03:37:27 2010 +++ src/crypto/external/bsd/netpgp/dist/tst Thu Jul 1 03:51:07 2010 @@ -31,7 +31,7 @@ su root -c make install' passed=0 -total=33 +total=34 rm -f passed date passed echo == sign/verify 180938 file @@ -164,10 +164,17 @@ echo == ascii detached armoured sig detection and verification /usr/bin/netpgp --verify i.asc passed=$(expr $passed + 1) echo 32 $passed passed -echo == ssh fingerprint and netpgp fingerprint -/usr/bin/netpgpkeys --ssh-keys --sshkeyfile=/etc/ssh/ssh_host_rsa_key.pub --list-keys --hash=md5 -/usr/bin/ssh-keygen -l -f /etc/ssh/ssh_host_rsa_key.pub -passed=$(expr $passed + 1) +echo == host ssh fingerprint and netpgp fingerprint +netpgpkey=$(/usr/bin/netpgpkeys --ssh-keys --sshkeyfile=/etc/ssh/ssh_host_rsa_key.pub --list-keys --hash=md5 | awk 'NR == 3 { print $3 $4 $5 $6 $7 $8 $9 $10 }') +sshkey=$(/usr/bin/ssh-keygen -l -f /etc/ssh/ssh_host_rsa_key.pub | awk '{ gsub(:, , $2); print $2 }') +echo host sshkey \$sshkey\ = netpgpkey \$netpgpkey\ +[ $sshkey = $netpgpkey ] passed=$(expr $passed + 1) echo 33 $passed passed +echo == user ssh fingerprint and netpgp fingerprint +netpgpkey=$(/usr/bin/netpgpkeys --ssh-keys --sshkeyfile=/home/agc/.ssh/id_rsa.pub --list-keys --hash=md5 | awk 'NR == 3 { print $3 $4 $5 $6 $7 $8 $9 $10 }') +sshkey=$(/usr/bin/ssh-keygen -l -f /home/agc/.ssh/id_rsa.pub | awk '{ gsub(:, , $2); print $2 }') +echo user sshkey \$sshkey\ = netpgpkey \$netpgpkey\ +[ $sshkey = $netpgpkey ] passed=$(expr $passed + 1) +echo 34 $passed passed rm -f a a.gpg b b.gpg c c.gpg d d.gpg e f f.sig g g.asc g2 a2 a3 a4 a5 h h.sig i i.asc echo Passed ${passed}/${total} tests
CVS commit: src/crypto/external/bsd/netpgp/dist/src/lib
Module Name:src Committed By: agc Date: Thu Jul 1 03:52:13 UTC 2010 Modified Files: src/crypto/external/bsd/netpgp/dist/src/lib: netpgp.c Log Message: Use the correct default ssh user key file (just a typo). Use the portable strcasecmp() function. To generate a diff of this commit: cvs rdiff -u -r1.61 -r1.62 \ src/crypto/external/bsd/netpgp/dist/src/lib/netpgp.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/crypto/external/bsd/netpgp/dist/src/lib/netpgp.c diff -u src/crypto/external/bsd/netpgp/dist/src/lib/netpgp.c:1.61 src/crypto/external/bsd/netpgp/dist/src/lib/netpgp.c:1.62 --- src/crypto/external/bsd/netpgp/dist/src/lib/netpgp.c:1.61 Thu Jul 1 00:42:51 2010 +++ src/crypto/external/bsd/netpgp/dist/src/lib/netpgp.c Thu Jul 1 03:52:13 2010 @@ -34,7 +34,7 @@ #if defined(__NetBSD__) __COPYRIGHT(@(#) Copyright (c) 2009 The NetBSD Foundation, Inc. All rights reserved.); -__RCSID($NetBSD: netpgp.c,v 1.61 2010/07/01 00:42:51 agc Exp $); +__RCSID($NetBSD: netpgp.c,v 1.62 2010/07/01 03:52:13 agc Exp $); #endif #include sys/types.h @@ -255,7 +255,7 @@ char *filename; if ((filename = netpgp_getvar(netpgp, sshkeyfile)) == NULL) { - (void) snprintf(f, sizeof(f), %s/.ssh/is_rsa.pub, homedir); + (void) snprintf(f, sizeof(f), %s/.ssh/id_rsa.pub, homedir); filename = f; } if ((pubring = calloc(1, sizeof(*pubring))) == NULL) { @@ -266,11 +266,11 @@ hashtype = OPS_HASH_MD5; if ((hash = netpgp_getvar(netpgp, hash)) != NULL) { /* openssh 2 hasn't really caught up to anything else yet */ - if (strcasecmp(hash, md5) == 0) { + if (netpgp_strcasecmp(hash, md5) == 0) { hashtype = OPS_HASH_MD5; - } else if (strcasecmp(hash, sha1) == 0) { + } else if (netpgp_strcasecmp(hash, sha1) == 0) { hashtype = OPS_HASH_SHA1; - } else if (strcasecmp(hash, sha256) == 0) { + } else if (netpgp_strcasecmp(hash, sha256) == 0) { hashtype = OPS_HASH_SHA256; } }
CVS commit: src/crypto/external/bsd/netpgp/dist/src
Module Name:src Committed By: agc Date: Thu Jul 1 04:27:21 UTC 2010 Modified Files: src/crypto/external/bsd/netpgp/dist/src/lib: netpgp.c src/crypto/external/bsd/netpgp/dist/src/netpgp: netpgp.c src/crypto/external/bsd/netpgp/dist/src/netpgpkeys: netpgpkeys.c src/crypto/external/bsd/netpgp/dist/src/netpgpverify: verify.c Log Message: if using ssh keys with any of the netpgp programs, set the home directory appropriately. add some aliases for long command options across all programs To generate a diff of this commit: cvs rdiff -u -r1.62 -r1.63 \ src/crypto/external/bsd/netpgp/dist/src/lib/netpgp.c cvs rdiff -u -r1.11 -r1.12 \ src/crypto/external/bsd/netpgp/dist/src/netpgp/netpgp.c cvs rdiff -u -r1.13 -r1.14 \ src/crypto/external/bsd/netpgp/dist/src/netpgpkeys/netpgpkeys.c cvs rdiff -u -r1.13 -r1.14 \ src/crypto/external/bsd/netpgp/dist/src/netpgpverify/verify.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/crypto/external/bsd/netpgp/dist/src/lib/netpgp.c diff -u src/crypto/external/bsd/netpgp/dist/src/lib/netpgp.c:1.62 src/crypto/external/bsd/netpgp/dist/src/lib/netpgp.c:1.63 --- src/crypto/external/bsd/netpgp/dist/src/lib/netpgp.c:1.62 Thu Jul 1 03:52:13 2010 +++ src/crypto/external/bsd/netpgp/dist/src/lib/netpgp.c Thu Jul 1 04:27:21 2010 @@ -34,7 +34,7 @@ #if defined(__NetBSD__) __COPYRIGHT(@(#) Copyright (c) 2009 The NetBSD Foundation, Inc. All rights reserved.); -__RCSID($NetBSD: netpgp.c,v 1.62 2010/07/01 03:52:13 agc Exp $); +__RCSID($NetBSD: netpgp.c,v 1.63 2010/07/01 04:27:21 agc Exp $); #endif #include sys/types.h @@ -255,7 +255,7 @@ char *filename; if ((filename = netpgp_getvar(netpgp, sshkeyfile)) == NULL) { - (void) snprintf(f, sizeof(f), %s/.ssh/id_rsa.pub, homedir); + (void) snprintf(f, sizeof(f), %s/id_rsa.pub, homedir); filename = f; } if ((pubring = calloc(1, sizeof(*pubring))) == NULL) { Index: src/crypto/external/bsd/netpgp/dist/src/netpgp/netpgp.c diff -u src/crypto/external/bsd/netpgp/dist/src/netpgp/netpgp.c:1.11 src/crypto/external/bsd/netpgp/dist/src/netpgp/netpgp.c:1.12 --- src/crypto/external/bsd/netpgp/dist/src/netpgp/netpgp.c:1.11 Sat Feb 6 02:24:34 2010 +++ src/crypto/external/bsd/netpgp/dist/src/netpgp/netpgp.c Thu Jul 1 04:27:21 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: netpgp.c,v 1.11 2010/02/06 02:24:34 agc Exp $ */ +/* $NetBSD: netpgp.c,v 1.12 2010/07/01 04:27:21 agc Exp $ */ /*- * Copyright (c) 2009 The NetBSD Foundation, Inc. @@ -125,6 +125,7 @@ {show-keys, no_argument, NULL, SHOW_KEYS}, {showkeys, no_argument, NULL, SHOW_KEYS}, /* options */ + {ssh, no_argument, NULL, SSHKEYS}, {ssh-keys, no_argument, NULL, SSHKEYS}, {sshkeyfile, required_argument, NULL, SSHKEYFILE}, {coredumps, no_argument, NULL, COREDUMPS}, @@ -132,6 +133,7 @@ {userid, required_argument, NULL, USERID}, {home, required_argument, NULL, HOMEDIR}, {homedir, required_argument, NULL, HOMEDIR}, + {ascii, no_argument, NULL, ARMOUR}, {armor, no_argument, NULL, ARMOUR}, {armour, no_argument, NULL, ARMOUR}, {detach, no_argument, NULL, DETACHED}, @@ -337,6 +339,7 @@ { netpgp_t netpgp; prog_t p; + int homeset; int optindex; int ret; int ch; @@ -355,7 +358,7 @@ netpgp_setvar(netpgp, hash, DEFAULT_HASH_ALG); /* 4 MiB for a memory file */ netpgp_setvar(netpgp, max mem alloc, 4194304); - netpgp_set_homedir(netpgp, getenv(HOME), /.gnupg, 1); + homeset = 0; optindex = 0; while ((ch = getopt_long(argc, argv, , options, optindex)) != -1) { switch (options[optindex].val) { @@ -420,6 +423,7 @@ exit(EXIT_ERROR); } netpgp_set_homedir(netpgp, optarg, NULL, 0); + homeset = 1; break; case HASH_ALG: if (optarg == NULL) { @@ -476,6 +480,10 @@ break; } } + if (!homeset) { + netpgp_set_homedir(netpgp, getenv(HOME), + netpgp_getvar(netpgp, ssh keys) ? /.ssh : /.gnupg, 1); + } /* initialise, and read keys from file */ if (!netpgp_init(netpgp)) { printf(can't initialise\n); Index: src/crypto/external/bsd/netpgp/dist/src/netpgpkeys/netpgpkeys.c diff -u src/crypto/external/bsd/netpgp/dist/src/netpgpkeys/netpgpkeys.c:1.13 src/crypto/external/bsd/netpgp/dist/src/netpgpkeys/netpgpkeys.c:1.14 --- src/crypto/external/bsd/netpgp/dist/src/netpgpkeys/netpgpkeys.c:1.13 Fri Jun 25 03:37:28 2010 +++ src/crypto/external/bsd/netpgp/dist/src/netpgpkeys/netpgpkeys.c Thu Jul 1 04:27:21 2010 @@ -103,8 +103,13 @@ {list-keys, no_argument, NULL, LIST_KEYS}, {list-sigs, no_argument, NULL, LIST_SIGS}, {find-key, no_argument, NULL, FIND_KEY}, + {export, no_argument, NULL, EXPORT_KEY}, {export-key, no_argument, NULL, EXPORT_KEY}, + {import, no_argument, NULL, IMPORT_KEY}, {import-key, no_argument, NULL, IMPORT_KEY}, + {gen, optional_argument, NULL, GENERATE_KEY}, + {gen-key,
CVS commit: src/crypto/external/bsd/netpgp/dist
Module Name:src Committed By: agc Date: Thu Jul 1 04:28:33 UTC 2010 Modified Files: src/crypto/external/bsd/netpgp/dist: tst Log Message: take advantage of appropriate defaults when calling ssh key commands To generate a diff of this commit: cvs rdiff -u -r1.25 -r1.26 src/crypto/external/bsd/netpgp/dist/tst Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/crypto/external/bsd/netpgp/dist/tst diff -u src/crypto/external/bsd/netpgp/dist/tst:1.25 src/crypto/external/bsd/netpgp/dist/tst:1.26 --- src/crypto/external/bsd/netpgp/dist/tst:1.25 Thu Jul 1 03:51:07 2010 +++ src/crypto/external/bsd/netpgp/dist/tst Thu Jul 1 04:28:33 2010 @@ -165,13 +165,13 @@ /usr/bin/netpgp --verify i.asc passed=$(expr $passed + 1) echo 32 $passed passed echo == host ssh fingerprint and netpgp fingerprint -netpgpkey=$(/usr/bin/netpgpkeys --ssh-keys --sshkeyfile=/etc/ssh/ssh_host_rsa_key.pub --list-keys --hash=md5 | awk 'NR == 3 { print $3 $4 $5 $6 $7 $8 $9 $10 }') +netpgpkey=$(/usr/bin/netpgpkeys --ssh --sshkeyfile=/etc/ssh/ssh_host_rsa_key.pub --list-keys --hash=md5 | awk 'NR == 3 { print $3 $4 $5 $6 $7 $8 $9 $10 }') sshkey=$(/usr/bin/ssh-keygen -l -f /etc/ssh/ssh_host_rsa_key.pub | awk '{ gsub(:, , $2); print $2 }') echo host sshkey \$sshkey\ = netpgpkey \$netpgpkey\ [ $sshkey = $netpgpkey ] passed=$(expr $passed + 1) echo 33 $passed passed echo == user ssh fingerprint and netpgp fingerprint -netpgpkey=$(/usr/bin/netpgpkeys --ssh-keys --sshkeyfile=/home/agc/.ssh/id_rsa.pub --list-keys --hash=md5 | awk 'NR == 3 { print $3 $4 $5 $6 $7 $8 $9 $10 }') +netpgpkey=$(/usr/bin/netpgpkeys --ssh --list-keys --hash=md5 | awk 'NR == 3 { print $3 $4 $5 $6 $7 $8 $9 $10 }') sshkey=$(/usr/bin/ssh-keygen -l -f /home/agc/.ssh/id_rsa.pub | awk '{ gsub(:, , $2); print $2 }') echo user sshkey \$sshkey\ = netpgpkey \$netpgpkey\ [ $sshkey = $netpgpkey ] passed=$(expr $passed + 1)