CVS commit: src/lib/libp2k

2011-01-07 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Fri Jan  7 10:18:06 UTC 2011

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

Log Message:
Fix file handles.  Problem reported  fix tested by kefren.


To generate a diff of this commit:
cvs rdiff -u -r1.49 -r1.50 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.49 src/lib/libp2k/p2k.c:1.50
--- src/lib/libp2k/p2k.c:1.49	Sun Jan  2 13:01:45 2011
+++ src/lib/libp2k/p2k.c	Fri Jan  7 10:18:06 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: p2k.c,v 1.49 2011/01/02 13:01:45 pooka Exp $	*/
+/*	$NetBSD: p2k.c,v 1.50 2011/01/07 10:18:06 pooka Exp $	*/
 
 /*
  * Copyright (c) 2007, 2008, 2009  Antti Kantee.  All Rights Reserved.
@@ -634,7 +634,7 @@
 p2k_fs_nodetofh(struct puffs_usermount *pu, puffs_cookie_t cookie, void *fid,
 	size_t *fidsize)
 {
-	struct vnode *vp = cookie;
+	struct vnode *vp = OPC2VP(cookie);
 
 	return rump_pub_vfs_vptofh(vp, fid, fidsize);
 }



CVS commit: src/tests/fs/common

2011-01-07 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Fri Jan  7 10:45:46 UTC 2011

Modified Files:
src/tests/fs/common: fstest_puffs.c h_fsmacros.h

Log Message:
Add a puffs-p2k-ffs file system type to automated tests.  Inspired
by the file handle problem in p2k.


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/tests/fs/common/fstest_puffs.c
cvs rdiff -u -r1.24 -r1.25 src/tests/fs/common/h_fsmacros.h

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/common/fstest_puffs.c
diff -u src/tests/fs/common/fstest_puffs.c:1.7 src/tests/fs/common/fstest_puffs.c:1.8
--- src/tests/fs/common/fstest_puffs.c:1.7	Wed Dec 29 22:56:59 2010
+++ src/tests/fs/common/fstest_puffs.c	Fri Jan  7 10:45:45 2011
@@ -1,7 +1,7 @@
-/*	$NetBSD: fstest_puffs.c,v 1.7 2010/12/29 22:56:59 yamt Exp $	*/
+/*	$NetBSD: fstest_puffs.c,v 1.8 2011/01/07 10:45:45 pooka Exp $	*/
 
 /*
- * Copyright (c) 2010 The NetBSD Foundation, Inc.
+ * Copyright (c) 2010, 2011 The NetBSD Foundation, Inc.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -242,14 +242,11 @@
 struct puffstestargs *theargs; /* XXX */
 
 /* XXX: we don't support size */
-int
-puffs_fstest_newfs(const atf_tc_t *tc, void **argp,
-	const char *image, off_t size, void *fspriv)
+static int
+donewfs(const atf_tc_t *tc, void **argp,
+	const char *image, off_t size, void *fspriv, char **theargv)
 {
 	struct puffstestargs *args;
-	char dtfs_path[MAXPATHLEN];
-	char *dtfsargv[6];
-	char **theargv;
 	pid_t childpid;
 	int *pflags;
 	char comfd[16];
@@ -266,24 +263,6 @@
 
 	pflags = args-pta_pflags;
 
-	/* build dtfs exec path from atf test dir */
-	sprintf(dtfs_path, %s/../puffs/h_dtfs/h_dtfs,
-	atf_tc_get_config_var(tc, srcdir));
-
-	if (fspriv) {
-		theargv = fspriv;
-		theargv[0] = dtfs_path;
-	} else {
-		dtfsargv[0] = dtfs_path;
-		dtfsargv[1] = __UNCONST(-i);
-		dtfsargv[2] = __UNCONST(-s);
-		dtfsargv[3] = __UNCONST(dtfs);
-		dtfsargv[4] = __UNCONST(fictional);
-		dtfsargv[5] = NULL;
-
-		theargv = dtfsargv;
-	}
-
 	/* Create sucketpair for communication with the real file server */
 	if (socketpair(PF_LOCAL, SOCK_STREAM, 0, sv) == -1)
 		return errno;
@@ -343,6 +322,59 @@
 }
 
 int
+puffs_fstest_newfs(const atf_tc_t *tc, void **argp,
+	const char *image, off_t size, void *fspriv)
+{
+	char dtfs_path[MAXPATHLEN];
+	char *dtfsargv[6];
+	char **theargv;
+
+	/* build dtfs exec path from atf test dir */
+	sprintf(dtfs_path, %s/../puffs/h_dtfs/h_dtfs,
+	atf_tc_get_config_var(tc, srcdir));
+
+	if (fspriv) {
+		theargv = fspriv;
+		theargv[0] = dtfs_path;
+	} else {
+		dtfsargv[0] = dtfs_path;
+		dtfsargv[1] = __UNCONST(-i);
+		dtfsargv[2] = __UNCONST(-s);
+		dtfsargv[3] = __UNCONST(dtfs);
+		dtfsargv[4] = __UNCONST(fictional);
+		dtfsargv[5] = NULL;
+
+		theargv = dtfsargv;
+	}
+
+	return donewfs(tc, argp, image, size, fspriv, theargv);
+}
+
+int
+p2k_ffs_fstest_newfs(const atf_tc_t *tc, void **argp,
+	const char *image, off_t size, void *fspriv)
+{
+	char *rumpffs_argv[5];
+	int rv;
+
+	rump_init();
+	if ((rv = ffs_fstest_newfs(tc, argp, image, size, fspriv)) != 0)
+		return rv;
+	if (mkdir(p2kffsfake, 0777) == -1)
+		return errno;
+
+	setenv(P2K_NODETACH, 1, 1);
+	rumpffs_argv[0] = __UNCONST(rump_ffs);
+	rumpffs_argv[1] = __UNCONST(image);
+	rumpffs_argv[2] = __UNCONST(p2kffsfake); /* NOTUSED */
+	rumpffs_argv[3] = NULL;
+
+	if ((rv = donewfs(tc, argp, image, size, fspriv, rumpffs_argv)) != 0)
+		ffs_fstest_delfs(tc, argp);
+	return rv;
+}
+
+int
 puffs_fstest_mount(const atf_tc_t *tc, void *arg, const char *path, int flags)
 {
 	struct puffstestargs *pargs = arg;
@@ -374,6 +406,7 @@
 
 	return 0;
 }
+__strong_alias(p2k_ffs_fstest_mount,puffs_fstest_mount);
 
 int
 puffs_fstest_delfs(const atf_tc_t *tc, void *arg)
@@ -384,6 +417,13 @@
 }
 
 int
+p2k_ffs_fstest_delfs(const atf_tc_t *tc, void *arg)
+{
+
+	return ffs_fstest_delfs(tc, arg);
+}
+
+int
 puffs_fstest_unmount(const atf_tc_t *tc, const char *path, int flags)
 {
 	struct puffstestargs *pargs = theargs;
@@ -410,5 +450,8 @@
 	usleep(500);
 	wait(status);
 
+	rmdir(p2kffsfake);
+
 	return 0;
 }
+__strong_alias(p2k_ffs_fstest_unmount,puffs_fstest_unmount);

Index: src/tests/fs/common/h_fsmacros.h
diff -u src/tests/fs/common/h_fsmacros.h:1.24 src/tests/fs/common/h_fsmacros.h:1.25
--- src/tests/fs/common/h_fsmacros.h:1.24	Fri Dec 31 18:16:41 2010
+++ src/tests/fs/common/h_fsmacros.h	Fri Jan  7 10:45:45 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: h_fsmacros.h,v 1.24 2010/12/31 18:16:41 pooka Exp $	*/
+/*	$NetBSD: h_fsmacros.h,v 1.25 2011/01/07 10:45:45 pooka Exp $	*/
 
 /*-
  * Copyright (c) 2010 The NetBSD Foundation, Inc.
@@ -55,6 +55,7 @@
 FSPROTOS(msdosfs);
 FSPROTOS(nfs);
 FSPROTOS(nfsro);
+FSPROTOS(p2k_ffs);
 FSPROTOS(puffs);
 FSPROTOS(rumpfs);
 FSPROTOS(sysvbfs);
@@ -171,6 +172,7 @@
   

CVS commit: src/lib/libp2k

2011-01-07 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Fri Jan  7 11:15:30 UTC 2011

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

Log Message:
Remove the componentname-saving code since it was addressing
SAVENAME/HASBUF/SAVESTART and they don't exist anymore (and the
removed code didn't compile on nb5).


To generate a diff of this commit:
cvs rdiff -u -r1.50 -r1.51 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.50 src/lib/libp2k/p2k.c:1.51
--- src/lib/libp2k/p2k.c:1.50	Fri Jan  7 10:18:06 2011
+++ src/lib/libp2k/p2k.c	Fri Jan  7 11:15:30 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: p2k.c,v 1.50 2011/01/07 10:18:06 pooka Exp $	*/
+/*	$NetBSD: p2k.c,v 1.51 2011/01/07 11:15:30 pooka Exp $	*/
 
 /*
  * Copyright (c) 2007, 2008, 2009  Antti Kantee.  All Rights Reserved.
@@ -85,16 +85,6 @@
 struct p2k_node {
 	struct vnode *p2n_vp;
 
-	/*
-	 * Ok, then, uhm, we need .. *drumroll*.. two componentname
-	 * storages for rename.  This is because the source dir is
-	 * unlocked after the first lookup, and someone else might
-	 * race in here.  However, we know it's not another rename
-	 * because of the kernel rename lock.  And we need two since
-	 * srcdir and targdir might be the same.  It's a wonderful world.
-	 */
-	struct componentname *p2n_cn_ren_src, *p2n_cn_ren_targ;
-
 	LIST_ENTRY(p2k_node) p2n_entries;
 };
 
@@ -304,7 +294,6 @@
 
 	PUFFSOP_SET(pops, p2k, node, inactive);
 	PUFFSOP_SET(pops, p2k, node, reclaim);
-	PUFFSOP_SET(pops, p2k, node, abortop);
 
 	PUFFSOP_SET(pops, p2k, node, getextattr);
 	PUFFSOP_SET(pops, p2k, node, setextattr);
@@ -677,37 +666,7 @@
 	RUMP_VOP_LOCK(dvp, LK_EXCLUSIVE);
 	rv = RUMP_VOP_LOOKUP(dvp, vp, cn);
 	RUMP_VOP_UNLOCK(dvp);
-
-	/*
-	 * XXX the rename lookup protocol is currently horribly
-	 * broken.  We get 1) DELETE 2) DELETE with INRELOOKUP
-	 * 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_INRELOOKUP) == 0) {
-if (p2n_dir-p2n_cn_ren_src)
-	freecn(p2n_dir-p2n_cn_ren_src);
-p2n_dir-p2n_cn_ren_src = cn;
-			} else {
-freecn(cn);
-cn = NULL;
-			}
-		} else {
-			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);
-	}
+	freecn(cn);
 
 	if (rv) {
 		if (rv == EJUSTRETURN) {
@@ -719,15 +678,6 @@
 
 	p2n = getp2n(p2m, vp, false, NULL);
 	if (p2n == NULL) {
-		if (pcn-pcn_flags  RUMP_NAMEI_INRENAME) {
-			if (pcn-pcn_nameiop == RUMP_NAMEI_DELETE) {
-p2n_dir-p2n_cn_ren_src = NULL;
-			} else {
-p2n_dir-p2n_cn_ren_targ = NULL;
-			}
-
-			RUMP_VOP_ABORTOP(dvp, cn);
-		}
 		return ENOMEM;
 	}
 
@@ -1003,26 +953,6 @@
 	return rv;
 }
 
-/*ARGSUSED*/
-int
-p2k_node_abortop(struct puffs_usermount *pu, puffs_cookie_t opc,
-	const struct puffs_cn *pcn)
-{
-	struct p2k_node *p2n_dir = opc;
-	struct componentname *cnp;
-
-	if ((cnp = p2n_dir-p2n_cn_ren_src) != NULL) {
-		freecn(cnp);
-		p2n_dir-p2n_cn_ren_src = NULL;
-	}
-	if ((cnp = p2n_dir-p2n_cn_ren_targ) != NULL) {
-		freecn(cnp);
-		p2n_dir-p2n_cn_ren_targ = NULL;
-	}
-
-	return 0;
-}
-
 static int
 do_nukenode(struct p2k_node *p2n_dir, struct p2k_node *p2n,
 	const struct puffs_cn *pcn,
@@ -1081,24 +1011,12 @@
 	puffs_cookie_t targ_dir, puffs_cookie_t targ,
 	const struct puffs_cn *pcn_targ)
 {
-	struct p2k_node *p2n_srcdir = src_dir, *p2n_targdir = targ_dir;
 	struct vnode *dvp, *vp, *tdvp, *tvp = NULL;
 	struct componentname *cn_src, *cn_targ;
 	int rv;
 
-	if (p2n_srcdir-p2n_cn_ren_src) {
-		cn_src = p2n_srcdir-p2n_cn_ren_src;
-		p2n_srcdir-p2n_cn_ren_src = NULL;
-	} else {
-		cn_src = makecn(pcn_src);
-	}
-
-	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);
-	}
+	cn_src = makecn(pcn_src);
+	cn_targ = makecn(pcn_targ);
 
 	dvp = OPC2VP(src_dir);
 	vp = OPC2VP(src);



CVS commit: src/sys

2011-01-07 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Fri Jan  7 11:17:22 UTC 2011

Modified Files:
src/sys/dev/pci: if_cas.c
Added Files:
src/sys/modules/if_cas: Makefile if_cas.ioconf

Log Message:
support building cas(4) as a module


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 src/sys/dev/pci/if_cas.c
cvs rdiff -u -r0 -r1.1 src/sys/modules/if_cas/Makefile \
src/sys/modules/if_cas/if_cas.ioconf

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

Modified files:

Index: src/sys/dev/pci/if_cas.c
diff -u src/sys/dev/pci/if_cas.c:1.12 src/sys/dev/pci/if_cas.c:1.13
--- src/sys/dev/pci/if_cas.c:1.12	Sat Nov 13 13:52:06 2010
+++ src/sys/dev/pci/if_cas.c	Fri Jan  7 11:17:22 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_cas.c,v 1.12 2010/11/13 13:52:06 uebayasi Exp $	*/
+/*	$NetBSD: if_cas.c,v 1.13 2011/01/07 11:17:22 jmcneill Exp $	*/
 /*	$OpenBSD: if_cas.c,v 1.29 2009/11/29 16:19:38 kettenis Exp $	*/
 
 /*
@@ -44,9 +44,11 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: if_cas.c,v 1.12 2010/11/13 13:52:06 uebayasi Exp $);
+__KERNEL_RCSID(0, $NetBSD: if_cas.c,v 1.13 2011/01/07 11:17:22 jmcneill Exp $);
 
+#ifndef _MODULE
 #include opt_inet.h
+#endif
 
 #include sys/param.h
 #include sys/systm.h
@@ -59,6 +61,7 @@
 #include sys/ioctl.h
 #include sys/errno.h
 #include sys/device.h
+#include sys/module.h
 
 #include machine/endian.h
 
@@ -2064,3 +2067,32 @@
 
 	sc-sc_tx_prod = bix;
 }
+
+MODULE(MODULE_CLASS_DRIVER, if_cas, NULL);
+
+#ifdef _MODULE
+#include ioconf.c
+#endif
+
+static int
+if_cas_modcmd(modcmd_t cmd, void *opaque)
+{
+	int error = 0;
+
+	switch (cmd) {
+	case MODULE_CMD_INIT:
+#ifdef _MODULE
+		error = config_init_component(cfdriver_ioconf_cas,
+		cfattach_ioconf_cas, cfdata_ioconf_cas);
+#endif
+		return error;
+	case MODULE_CMD_FINI:
+#ifdef _MODULE
+		error = config_fini_component(cfdriver_ioconf_cas,
+		cfattach_ioconf_cas, cfdata_ioconf_cas);
+#endif
+		return error;
+	default:
+		return ENOTTY;
+	}
+}

Added files:

Index: src/sys/modules/if_cas/Makefile
diff -u /dev/null src/sys/modules/if_cas/Makefile:1.1
--- /dev/null	Fri Jan  7 11:17:22 2011
+++ src/sys/modules/if_cas/Makefile	Fri Jan  7 11:17:22 2011
@@ -0,0 +1,14 @@
+#	$NetBSD: Makefile,v 1.1 2011/01/07 11:17:22 jmcneill Exp $
+
+.include ../Makefile.inc
+
+.PATH:	${S}/dev/pci
+
+KMOD=	if_cas
+IOCONF=	if_cas.ioconf
+SRCS=	if_cas.c
+CPPFLAGS+= -DINET
+
+WARNS=	3
+
+.include bsd.kmodule.mk
Index: src/sys/modules/if_cas/if_cas.ioconf
diff -u /dev/null src/sys/modules/if_cas/if_cas.ioconf:1.1
--- /dev/null	Fri Jan  7 11:17:22 2011
+++ src/sys/modules/if_cas/if_cas.ioconf	Fri Jan  7 11:17:22 2011
@@ -0,0 +1,10 @@
+#	$NetBSD: if_cas.ioconf,v 1.1 2011/01/07 11:17:22 jmcneill Exp $
+
+ioconf cas
+
+include conf/files
+include dev/pci/files.pci
+
+pseudo-root pci*
+
+cas* at pci? dev ? function ?



CVS commit: src/sys/sys

2011-01-07 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Fri Jan  7 11:25:10 UTC 2011

Modified Files:
src/sys/sys: namei.src

Log Message:
fix PARAMASK


To generate a diff of this commit:
cvs rdiff -u -r1.21 -r1.22 src/sys/sys/namei.src

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/namei.src
diff -u src/sys/sys/namei.src:1.21 src/sys/sys/namei.src:1.22
--- src/sys/sys/namei.src:1.21	Sun Jan  2 05:12:33 2011
+++ src/sys/sys/namei.src	Fri Jan  7 11:25:10 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: namei.src,v 1.21 2011/01/02 05:12:33 dholland Exp $	*/
+/*	$NetBSD: namei.src,v 1.22 2011/01/07 11:25:10 pooka Exp $	*/
 
 /*
  * Copyright (c) 1985, 1989, 1991, 1993
@@ -161,7 +161,7 @@
 NAMEIFL	CREATEDIR	0x020	/* trailing slashes are ok */
 NAMEIFL	INRENAME	0x040	/* operation is a part of ``rename'' */
 NAMEIFL	INRELOOKUP	0x080	/* set while inside relookup() */
-NAMEIFL	PARAMASK	0x0efef00	/* mask of parameter descriptors */
+NAMEIFL	PARAMASK	0x0efe300	/* mask of parameter descriptors */
 
 /*
  * Initialization of an nameidata structure.



CVS commit: src/sys

2011-01-07 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Fri Jan  7 11:25:43 UTC 2011

Modified Files:
src/sys/rump/include/rump: rump_namei.h
src/sys/sys: namei.h

Log Message:
regen: fix PARAMASK


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 src/sys/rump/include/rump/rump_namei.h
cvs rdiff -u -r1.74 -r1.75 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.13 src/sys/rump/include/rump/rump_namei.h:1.14
--- src/sys/rump/include/rump/rump_namei.h:1.13	Sun Jan  2 05:12:57 2011
+++ src/sys/rump/include/rump/rump_namei.h	Fri Jan  7 11:25:43 2011
@@ -1,11 +1,11 @@
-/*	$NetBSD: rump_namei.h,v 1.13 2011/01/02 05:12:57 dholland Exp $	*/
+/*	$NetBSD: rump_namei.h,v 1.14 2011/01/07 11:25:43 pooka 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.21 2011/01/02 05:12:33 dholland Exp 
+ *   from: NetBSD: namei.src,v 1.22 2011/01/07 11:25:10 pooka Exp 
  */
 
 #ifndef _RUMP_RUMP_NAMEI_H_
@@ -37,6 +37,6 @@
 #define RUMP_NAMEI_CREATEDIR	0x020
 #define RUMP_NAMEI_INRENAME	0x040
 #define RUMP_NAMEI_INRELOOKUP	0x080
-#define RUMP_NAMEI_PARAMASK	0x0efef00
+#define RUMP_NAMEI_PARAMASK	0x0efe300
 
 #endif /* _RUMP_RUMP_NAMEI_H_ */

Index: src/sys/sys/namei.h
diff -u src/sys/sys/namei.h:1.74 src/sys/sys/namei.h:1.75
--- src/sys/sys/namei.h:1.74	Sun Jan  2 05:12:56 2011
+++ src/sys/sys/namei.h	Fri Jan  7 11:25:43 2011
@@ -1,11 +1,11 @@
-/*	$NetBSD: namei.h,v 1.74 2011/01/02 05:12:56 dholland Exp $	*/
+/*	$NetBSD: namei.h,v 1.75 2011/01/07 11:25:43 pooka 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.21 2011/01/02 05:12:33 dholland Exp 
+ *   from: NetBSD: namei.src,v 1.22 2011/01/07 11:25:10 pooka Exp 
  */
 
 /*
@@ -169,7 +169,7 @@
 #define	CREATEDIR	0x020	/* trailing slashes are ok */
 #define	INRENAME	0x040	/* operation is a part of ``rename'' */
 #define	INRELOOKUP	0x080	/* set while inside relookup() */
-#define	PARAMASK	0x0efef00	/* mask of parameter descriptors */
+#define	PARAMASK	0x0efe300	/* mask of parameter descriptors */
 
 /*
  * Initialization of an nameidata structure.
@@ -326,6 +326,6 @@
 #define NAMEI_CREATEDIR	0x020
 #define NAMEI_INRENAME	0x040
 #define NAMEI_INRELOOKUP	0x080
-#define NAMEI_PARAMASK	0x0efef00
+#define NAMEI_PARAMASK	0x0efe300
 
 #endif /* !_SYS_NAMEI_H_ */



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

2011-01-07 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Fri Jan  7 11:27:53 UTC 2011

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

Log Message:
Censor no-longer-relevant flags which may be passed down from
somewhere (e.g. an older kernel).  We really can't do anything
about new flags or flags changing meaning, though.


To generate a diff of this commit:
cvs rdiff -u -r1.64 -r1.65 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.64 src/sys/rump/librump/rumpvfs/rump_vfs.c:1.65
--- src/sys/rump/librump/rumpvfs/rump_vfs.c:1.64	Thu Jan  6 10:20:57 2011
+++ src/sys/rump/librump/rumpvfs/rump_vfs.c	Fri Jan  7 11:27:53 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: rump_vfs.c,v 1.64 2011/01/06 10:20:57 pooka Exp $	*/
+/*	$NetBSD: rump_vfs.c,v 1.65 2011/01/07 11:27:53 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.64 2011/01/06 10:20:57 pooka Exp $);
+__KERNEL_RCSID(0, $NetBSD: rump_vfs.c,v 1.65 2011/01/07 11:27:53 pooka Exp $);
 
 #include sys/param.h
 #include sys/buf.h
@@ -194,7 +194,7 @@
 	cnp-cn_nameptr = rcn-rcn_path;
 
 	cnp-cn_nameiop = nameiop;
-	cnp-cn_flags = flags;
+	cnp-cn_flags = flags  (MODMASK | PARAMASK);
 
 	cnp-cn_namelen = namelen;
 	cnp-cn_hash = namei_hash(name, cp);



CVS commit: src/tests/fs/common

2011-01-07 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Fri Jan  7 11:36:27 UTC 2011

Modified Files:
src/tests/fs/common: h_fsmacros.h

Log Message:
Use our internal name instead of MOUNT_FOO to identify file system
since otherwise we now run into dupes (e.g. nfs and nfsro, puffs
and p2k_ffs).


To generate a diff of this commit:
cvs rdiff -u -r1.25 -r1.26 src/tests/fs/common/h_fsmacros.h

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/common/h_fsmacros.h
diff -u src/tests/fs/common/h_fsmacros.h:1.25 src/tests/fs/common/h_fsmacros.h:1.26
--- src/tests/fs/common/h_fsmacros.h:1.25	Fri Jan  7 10:45:45 2011
+++ src/tests/fs/common/h_fsmacros.h	Fri Jan  7 11:36:27 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: h_fsmacros.h,v 1.25 2011/01/07 10:45:45 pooka Exp $	*/
+/*	$NetBSD: h_fsmacros.h,v 1.26 2011/01/07 11:36:27 pooka Exp $	*/
 
 /*-
  * Copyright (c) 2010 The NetBSD Foundation, Inc.
@@ -133,7 +133,7 @@
 	ATF_TC_HEAD(_fs_##_##_func_,tc)	\
 	{\
 		atf_tc_set_md_var(tc, descr,_type_ test for _desc_);\
-		atf_tc_set_md_var(tc, X-fs.type, _type_);		\
+		atf_tc_set_md_var(tc, X-fs.type, #_fs_);		\
 	}\
 	void *_fs_##_func_##tmp;	\
 	\
@@ -240,23 +240,27 @@
 }
 
 #define FSTYPE_EXT2FS(tc)\
-(strcmp(atf_tc_get_md_var(tc, X-fs.type), MOUNT_EXT2FS) == 0)
+(strcmp(atf_tc_get_md_var(tc, X-fs.type), ext2fs) == 0)
 #define FSTYPE_FFS(tc)\
-(strcmp(atf_tc_get_md_var(tc, X-fs.type), MOUNT_FFS) == 0)
+(strcmp(atf_tc_get_md_var(tc, X-fs.type), ffs) == 0)
 #define FSTYPE_LFS(tc)\
-(strcmp(atf_tc_get_md_var(tc, X-fs.type), MOUNT_LFS) == 0)
+(strcmp(atf_tc_get_md_var(tc, X-fs.type), lfs) == 0)
 #define FSTYPE_MSDOS(tc)\
-(strcmp(atf_tc_get_md_var(tc, X-fs.type), MOUNT_MSDOS) == 0)
+(strcmp(atf_tc_get_md_var(tc, X-fs.type), msdosfs) == 0)
 #define FSTYPE_NFS(tc)\
-(strcmp(atf_tc_get_md_var(tc, X-fs.type), MOUNT_NFS) == 0)
+(strcmp(atf_tc_get_md_var(tc, X-fs.type), nfs) == 0)
+#define FSTYPE_NFSRO(tc)\
+(strcmp(atf_tc_get_md_var(tc, X-fs.type), nfsro) == 0)
+#define FSTYPE_P2K_FFS(tc)\
+(strcmp(atf_tc_get_md_var(tc, X-fs.type), p2k_ffs) == 0)
 #define FSTYPE_PUFFS(tc)\
-(strcmp(atf_tc_get_md_var(tc, X-fs.type), MOUNT_PUFFS) == 0)
+(strcmp(atf_tc_get_md_var(tc, X-fs.type), puffs) == 0)
 #define FSTYPE_RUMPFS(tc)\
-(strcmp(atf_tc_get_md_var(tc, X-fs.type), MOUNT_RUMPFS) == 0)
+(strcmp(atf_tc_get_md_var(tc, X-fs.type), rumpfs) == 0)
 #define FSTYPE_SYSVBFS(tc)\
-(strcmp(atf_tc_get_md_var(tc, X-fs.type), MOUNT_SYSVBFS) == 0)
+(strcmp(atf_tc_get_md_var(tc, X-fs.type), sysvbfs) == 0)
 #define FSTYPE_TMPFS(tc)\
-(strcmp(atf_tc_get_md_var(tc, X-fs.type), MOUNT_TMPFS) == 0)
+(strcmp(atf_tc_get_md_var(tc, X-fs.type), tmpfs) == 0)
 
 #define FSTEST_ENTER()			\
 	if (rump_sys_chdir(FSTEST_MNTNAME) == -1)			\



CVS commit: src/tests/fs/vfs

2011-01-07 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Fri Jan  7 11:39:28 UTC 2011

Modified Files:
src/tests/fs/vfs: t_ro.c

Log Message:
expect correct errno in nfsro case.  from yamt


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/tests/fs/vfs/t_ro.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/vfs/t_ro.c
diff -u src/tests/fs/vfs/t_ro.c:1.2 src/tests/fs/vfs/t_ro.c:1.3
--- src/tests/fs/vfs/t_ro.c:1.2	Fri Dec 31 18:26:25 2010
+++ src/tests/fs/vfs/t_ro.c	Fri Jan  7 11:39:27 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: t_ro.c,v 1.2 2010/12/31 18:26:25 pooka Exp $	*/
+/*	$NetBSD: t_ro.c,v 1.3 2011/01/07 11:39:27 pooka Exp $	*/
 
 /*-
  * Copyright (c) 2010 The NetBSD Foundation, Inc.
@@ -95,6 +95,12 @@
 {
 	int fd;
 	char buf[FUNSIZE+1];
+	int expected;
+
+	if (FSTYPE_NFSRO(tc))
+		expected = EACCES;
+	else
+		expected = EROFS;
 
 	FSTEST_ENTER();
 	RL(fd = rump_sys_open(AFILE, O_RDONLY));
@@ -103,8 +109,8 @@
 	ATF_REQUIRE_STREQ(buf, FUNTEXT);
 	RL(rump_sys_close(fd));
 
-	ATF_REQUIRE_ERRNO(EROFS, rump_sys_open(AFILE, O_WRONLY) == -1);
-	ATF_REQUIRE_ERRNO(EROFS, rump_sys_open(AFILE, O_RDWR) == -1);
+	ATF_REQUIRE_ERRNO(expected, rump_sys_open(AFILE, O_WRONLY) == -1);
+	ATF_REQUIRE_ERRNO(expected, rump_sys_open(AFILE, O_RDWR) == -1);
 	FSTEST_EXIT();
 }
 



CVS commit: src/tests/fs/common

2011-01-07 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Fri Jan  7 11:41:40 UTC 2011

Modified Files:
src/tests/fs/common: h_fsmacros.h

Log Message:
adjust another place where X-fs.type is set


To generate a diff of this commit:
cvs rdiff -u -r1.26 -r1.27 src/tests/fs/common/h_fsmacros.h

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/common/h_fsmacros.h
diff -u src/tests/fs/common/h_fsmacros.h:1.26 src/tests/fs/common/h_fsmacros.h:1.27
--- src/tests/fs/common/h_fsmacros.h:1.26	Fri Jan  7 11:36:27 2011
+++ src/tests/fs/common/h_fsmacros.h	Fri Jan  7 11:41:40 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: h_fsmacros.h,v 1.26 2011/01/07 11:36:27 pooka Exp $	*/
+/*	$NetBSD: h_fsmacros.h,v 1.27 2011/01/07 11:41:40 pooka Exp $	*/
 
 /*-
  * Copyright (c) 2010 The NetBSD Foundation, Inc.
@@ -104,7 +104,7 @@
 	ATF_TC_HEAD(fs##_##func,tc)	\
 	{\
 		atf_tc_set_md_var(tc, descr, type  test for  desc);	\
-		atf_tc_set_md_var(tc, X-fs.type, type);		\
+		atf_tc_set_md_var(tc, X-fs.type, #fs);		\
 	}\
 	void *fs##func##tmp;		\
 	\



CVS commit: src/tests/fs/vfs

2011-01-07 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Fri Jan  7 11:41:55 UTC 2011

Modified Files:
src/tests/fs/vfs: t_full.c

Log Message:
P2K_FFS uses puffs and therefore does not GOP_ALLOC either


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/tests/fs/vfs/t_full.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/vfs/t_full.c
diff -u src/tests/fs/vfs/t_full.c:1.4 src/tests/fs/vfs/t_full.c:1.5
--- src/tests/fs/vfs/t_full.c:1.4	Thu Nov 11 17:44:44 2010
+++ src/tests/fs/vfs/t_full.c	Fri Jan  7 11:41:54 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: t_full.c,v 1.4 2010/11/11 17:44:44 pooka Exp $	*/
+/*	$NetBSD: t_full.c,v 1.5 2011/01/07 11:41:54 pooka Exp $	*/
 
 /*-
  * Copyright (c) 2010 The NetBSD Foundation, Inc.
@@ -56,7 +56,7 @@
 	size_t bonus;
 	int fd, i = 0;
 
-	if (FSTYPE_PUFFS(tc) || FSTYPE_RUMPFS(tc)) {
+	if (FSTYPE_P2K_FFS(tc) || FSTYPE_PUFFS(tc) || FSTYPE_RUMPFS(tc)) {
 		atf_tc_skip(fs does not support explicit block allocation 
 		(GOP_ALLOC));
 	}



CVS commit: src/tests/fs/common

2011-01-07 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Fri Jan  7 11:50:37 UTC 2011

Modified Files:
src/tests/fs/common: fstest_puffs.c

Log Message:
Don't panic if unnecessary dir already exists.
(helpful when running the test without atf-run)


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/tests/fs/common/fstest_puffs.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/common/fstest_puffs.c
diff -u src/tests/fs/common/fstest_puffs.c:1.8 src/tests/fs/common/fstest_puffs.c:1.9
--- src/tests/fs/common/fstest_puffs.c:1.8	Fri Jan  7 10:45:45 2011
+++ src/tests/fs/common/fstest_puffs.c	Fri Jan  7 11:50:37 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: fstest_puffs.c,v 1.8 2011/01/07 10:45:45 pooka Exp $	*/
+/*	$NetBSD: fstest_puffs.c,v 1.9 2011/01/07 11:50:37 pooka Exp $	*/
 
 /*
  * Copyright (c) 2010, 2011 The NetBSD Foundation, Inc.
@@ -360,7 +360,7 @@
 	rump_init();
 	if ((rv = ffs_fstest_newfs(tc, argp, image, size, fspriv)) != 0)
 		return rv;
-	if (mkdir(p2kffsfake, 0777) == -1)
+	if (mkdir(p2kffsfake, 0777) == -1  errno != EEXIST)
 		return errno;
 
 	setenv(P2K_NODETACH, 1, 1);



CVS commit: src/tests/fs/common

2011-01-07 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Fri Jan  7 11:52:59 UTC 2011

Modified Files:
src/tests/fs/common: fstest_ffs.c h_fsmacros.h

Log Message:
add another fstype for ffs -o log


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/tests/fs/common/fstest_ffs.c
cvs rdiff -u -r1.27 -r1.28 src/tests/fs/common/h_fsmacros.h

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/common/fstest_ffs.c
diff -u src/tests/fs/common/fstest_ffs.c:1.2 src/tests/fs/common/fstest_ffs.c:1.3
--- src/tests/fs/common/fstest_ffs.c:1.2	Fri Jul 30 16:15:05 2010
+++ src/tests/fs/common/fstest_ffs.c	Fri Jan  7 11:52:59 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: fstest_ffs.c,v 1.2 2010/07/30 16:15:05 pooka Exp $	*/
+/*	$NetBSD: fstest_ffs.c,v 1.3 2011/01/07 11:52:59 pooka Exp $	*/
 
 /*-
  * Copyright (c) 2010 The NetBSD Foundation, Inc.
@@ -89,6 +89,7 @@
 
 	return 0;
 }
+__strong_alias(ffslog_fstest_newfs,ffs_fstest_newfs);
 
 int
 ffs_fstest_delfs(const atf_tc_t *tc, void *buf)
@@ -108,6 +109,7 @@
 
 	return 0;
 }
+__strong_alias(ffslog_fstest_delfs,ffs_fstest_delfs);
 
 int
 ffs_fstest_mount(const atf_tc_t *tc, void *buf, const char *path, int flags)
@@ -125,6 +127,13 @@
 }
 
 int
+ffslog_fstest_mount(const atf_tc_t *tc, void *buf, const char *path, int flags)
+{
+
+	return ffs_fstest_mount(tc, buf, path, flags | MNT_LOG);
+}
+
+int
 ffs_fstest_unmount(const atf_tc_t *tc, const char *path, int flags)
 {
 	int res;
@@ -136,3 +145,4 @@
 	res = rump_sys_rmdir(path);
 	return res;
 }
+__strong_alias(ffslog_fstest_unmount,ffs_fstest_unmount);

Index: src/tests/fs/common/h_fsmacros.h
diff -u src/tests/fs/common/h_fsmacros.h:1.27 src/tests/fs/common/h_fsmacros.h:1.28
--- src/tests/fs/common/h_fsmacros.h:1.27	Fri Jan  7 11:41:40 2011
+++ src/tests/fs/common/h_fsmacros.h	Fri Jan  7 11:52:59 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: h_fsmacros.h,v 1.27 2011/01/07 11:41:40 pooka Exp $	*/
+/*	$NetBSD: h_fsmacros.h,v 1.28 2011/01/07 11:52:59 pooka Exp $	*/
 
 /*-
  * Copyright (c) 2010 The NetBSD Foundation, Inc.
@@ -51,6 +51,7 @@
 
 FSPROTOS(ext2fs);
 FSPROTOS(ffs);
+FSPROTOS(ffslog);
 FSPROTOS(lfs);
 FSPROTOS(msdosfs);
 FSPROTOS(nfs);
@@ -169,6 +170,7 @@
 #define ATF_TC_FSAPPLY(func,desc)	\
   ATF_TC_FSADD(ext2fs,MOUNT_EXT2FS,func,desc)\
   ATF_TC_FSADD(ffs,MOUNT_FFS,func,desc)	\
+  ATF_TC_FSADD(ffslog,MOUNT_FFS,func,desc)\
   ATF_TC_FSADD(lfs,MOUNT_LFS,func,desc)	\
   ATF_TC_FSADD(msdosfs,MOUNT_MSDOS,func,desc)\
   ATF_TC_FSADD(nfs,MOUNT_NFS,func,desc)	\
@@ -181,6 +183,7 @@
 #define ATF_TP_FSAPPLY(func)		\
   ATF_TP_FSADD(ext2fs,func);		\
   ATF_TP_FSADD(ffs,func);		\
+  ATF_TP_FSADD(ffslog,func);		\
   ATF_TP_FSADD(lfs,func);		\
   ATF_TP_FSADD(msdosfs,func);		\
   ATF_TP_FSADD(nfs,func);		\
@@ -204,6 +207,7 @@
 #define ATF_TC_FSAPPLY_RO(func,desc,gen)\
   ATF_TC_FSADD_RO(ext2fs,MOUNT_EXT2FS,func,desc,gen)			\
   ATF_TC_FSADD_RO(ffs,MOUNT_FFS,func,desc,gen)\
+  ATF_TC_FSADD_RO(ffslog,MOUNT_FFS,func,desc,gen)			\
   ATF_TC_FSADD_RO(msdosfs,MOUNT_MSDOS,func,desc,gen)			\
   ATF_TC_FSADD_RO(nfs,MOUNT_NFS,func,desc,gen)\
   ATF_TC_FSADD_RO(nfsro,MOUNT_NFS,func,desc,gen)			\
@@ -212,6 +216,7 @@
 #define ATF_TP_FSAPPLY_RO(func)		\
   ATF_TP_FSADD(ext2fs,func);		\
   ATF_TP_FSADD(ffs,func);		\
+  ATF_TP_FSADD(ffslog,func);		\
   ATF_TP_FSADD(msdosfs,func);		\
   ATF_TP_FSADD(nfs,func);		\
   ATF_TP_FSADD(nfsro,func);		\
@@ -243,6 +248,8 @@
 (strcmp(atf_tc_get_md_var(tc, X-fs.type), ext2fs) == 0)
 #define FSTYPE_FFS(tc)\
 (strcmp(atf_tc_get_md_var(tc, X-fs.type), ffs) == 0)
+#define FSTYPE_FFSLOG(tc)\
+(strcmp(atf_tc_get_md_var(tc, X-fs.type), ffs) == 0)
 #define FSTYPE_LFS(tc)\
 (strcmp(atf_tc_get_md_var(tc, X-fs.type), lfs) == 0)
 #define FSTYPE_MSDOS(tc)\



CVS commit: src/tests/fs/vfs

2011-01-07 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Fri Jan  7 11:53:23 UTC 2011

Modified Files:
src/tests/fs/vfs: t_renamerace.c

Log Message:
ffs -o log dies in renamerace_dirs just like the rest.


To generate a diff of this commit:
cvs rdiff -u -r1.15 -r1.16 src/tests/fs/vfs/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/vfs/t_renamerace.c
diff -u src/tests/fs/vfs/t_renamerace.c:1.15 src/tests/fs/vfs/t_renamerace.c:1.16
--- src/tests/fs/vfs/t_renamerace.c:1.15	Sun Jan  2 12:58:17 2011
+++ src/tests/fs/vfs/t_renamerace.c	Fri Jan  7 11:53:23 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: t_renamerace.c,v 1.15 2011/01/02 12:58:17 pooka Exp $	*/
+/*	$NetBSD: t_renamerace.c,v 1.16 2011/01/07 11:53:23 pooka Exp $	*/
 
 /*
  * Modified for rump and atf from a program supplied
@@ -130,7 +130,7 @@
 
 	/* XXX: msdosfs also sometimes hangs */
 	if (FSTYPE_FFS(tc) || FSTYPE_EXT2FS(tc) || FSTYPE_LFS(tc) ||
-	FSTYPE_MSDOS(tc))
+	FSTYPE_MSDOS(tc) || FSTYPE_FFSLOG(tc))
 		atf_tc_expect_signal(-1, PR kern/43626);
 
 	RZ(rump_pub_lwproc_rfork(RUMP_RFCFDG));



CVS commit: src/tests/fs/common

2011-01-07 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Fri Jan  7 11:58:22 UTC 2011

Modified Files:
src/tests/fs/common: h_fsmacros.h

Log Message:
antipasto


To generate a diff of this commit:
cvs rdiff -u -r1.28 -r1.29 src/tests/fs/common/h_fsmacros.h

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/common/h_fsmacros.h
diff -u src/tests/fs/common/h_fsmacros.h:1.28 src/tests/fs/common/h_fsmacros.h:1.29
--- src/tests/fs/common/h_fsmacros.h:1.28	Fri Jan  7 11:52:59 2011
+++ src/tests/fs/common/h_fsmacros.h	Fri Jan  7 11:58:21 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: h_fsmacros.h,v 1.28 2011/01/07 11:52:59 pooka Exp $	*/
+/*	$NetBSD: h_fsmacros.h,v 1.29 2011/01/07 11:58:21 pooka Exp $	*/
 
 /*-
  * Copyright (c) 2010 The NetBSD Foundation, Inc.
@@ -249,7 +249,7 @@
 #define FSTYPE_FFS(tc)\
 (strcmp(atf_tc_get_md_var(tc, X-fs.type), ffs) == 0)
 #define FSTYPE_FFSLOG(tc)\
-(strcmp(atf_tc_get_md_var(tc, X-fs.type), ffs) == 0)
+(strcmp(atf_tc_get_md_var(tc, X-fs.type), ffslog) == 0)
 #define FSTYPE_LFS(tc)\
 (strcmp(atf_tc_get_md_var(tc, X-fs.type), lfs) == 0)
 #define FSTYPE_MSDOS(tc)\



CVS commit: src/tests/fs/common

2011-01-07 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Fri Jan  7 12:00:35 UTC 2011

Modified Files:
src/tests/fs/common: h_fsmacros.h

Log Message:
Set an extra xvar indicating MOUNT_FOO


To generate a diff of this commit:
cvs rdiff -u -r1.29 -r1.30 src/tests/fs/common/h_fsmacros.h

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/common/h_fsmacros.h
diff -u src/tests/fs/common/h_fsmacros.h:1.29 src/tests/fs/common/h_fsmacros.h:1.30
--- src/tests/fs/common/h_fsmacros.h:1.29	Fri Jan  7 11:58:21 2011
+++ src/tests/fs/common/h_fsmacros.h	Fri Jan  7 12:00:34 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: h_fsmacros.h,v 1.29 2011/01/07 11:58:21 pooka Exp $	*/
+/*	$NetBSD: h_fsmacros.h,v 1.30 2011/01/07 12:00:34 pooka Exp $	*/
 
 /*-
  * Copyright (c) 2010 The NetBSD Foundation, Inc.
@@ -106,6 +106,7 @@
 	{\
 		atf_tc_set_md_var(tc, descr, type  test for  desc);	\
 		atf_tc_set_md_var(tc, X-fs.type, #fs);		\
+		atf_tc_set_md_var(tc, X-fs.mntname, type);		\
 	}\
 	void *fs##func##tmp;		\
 	\
@@ -135,6 +136,7 @@
 	{\
 		atf_tc_set_md_var(tc, descr,_type_ test for _desc_);\
 		atf_tc_set_md_var(tc, X-fs.type, #_fs_);		\
+		atf_tc_set_md_var(tc, X-fs.mntname, _type_);		\
 	}\
 	void *_fs_##_func_##tmp;	\
 	\



CVS commit: src/tests/fs/vfs

2011-01-07 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Fri Jan  7 12:01:11 UTC 2011

Modified Files:
src/tests/fs/vfs: t_vfsops.c

Log Message:
use X-fs.mntname for f_fstypename.  ignore p2k_ffs there.


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/tests/fs/vfs/t_vfsops.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/vfs/t_vfsops.c
diff -u src/tests/fs/vfs/t_vfsops.c:1.8 src/tests/fs/vfs/t_vfsops.c:1.9
--- src/tests/fs/vfs/t_vfsops.c:1.8	Fri Nov 19 17:46:02 2010
+++ src/tests/fs/vfs/t_vfsops.c	Fri Jan  7 12:01:11 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: t_vfsops.c,v 1.8 2010/11/19 17:46:02 pooka Exp $	*/
+/*	$NetBSD: t_vfsops.c,v 1.9 2011/01/07 12:01:11 pooka Exp $	*/
 
 /*-
  * Copyright (c) 2010 The NetBSD Foundation, Inc.
@@ -51,14 +51,14 @@
 static void
 tstatvfs(const atf_tc_t *tc, const char *path)
 {
-	const char *fstype = atf_tc_get_md_var(tc, X-fs.type);
+	const char *fstype = atf_tc_get_md_var(tc, X-fs.mntname);
 	struct statvfs svb;
 
 	if (rump_sys_statvfs1(path, svb, ST_WAIT) == -1)
 		atf_tc_fail_errno(statvfs);
 
 	ATF_REQUIRE(svb.f_namemax  0  svb.f_namemax = MAXNAMLEN);
-	if (!FSTYPE_PUFFS(tc))
+	if (!(FSTYPE_PUFFS(tc) || FSTYPE_P2K_FFS(tc)))
 		ATF_REQUIRE_STREQ(svb.f_fstypename, fstype);
 	ATF_REQUIRE_STREQ(svb.f_mntonname, path);
 }



CVS commit: src/tests/fs/common

2011-01-07 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Fri Jan  7 12:16:17 UTC 2011

Modified Files:
src/tests/fs/common: h_fsmacros.h

Log Message:
Adjust atf_check_type() to make it work again.
Do we need tests for the tests? ;)


To generate a diff of this commit:
cvs rdiff -u -r1.30 -r1.31 src/tests/fs/common/h_fsmacros.h

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/common/h_fsmacros.h
diff -u src/tests/fs/common/h_fsmacros.h:1.30 src/tests/fs/common/h_fsmacros.h:1.31
--- src/tests/fs/common/h_fsmacros.h:1.30	Fri Jan  7 12:00:34 2011
+++ src/tests/fs/common/h_fsmacros.h	Fri Jan  7 12:16:17 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: h_fsmacros.h,v 1.30 2011/01/07 12:00:34 pooka Exp $	*/
+/*	$NetBSD: h_fsmacros.h,v 1.31 2011/01/07 12:16:17 pooka Exp $	*/
 
 /*-
  * Copyright (c) 2010 The NetBSD Foundation, Inc.
@@ -112,7 +112,7 @@
 	\
 	ATF_TC_BODY(fs##_##func,tc)	\
 	{\
-		if (!atf_check_fstype(tc, type))			\
+		if (!atf_check_fstype(tc, #fs))\
 			atf_tc_skip(filesystem not selected);		\
 		FSTEST_CONSTRUCTOR(tc,fs,fs##func##tmp);		\
 		func(tc,FSTEST_MNTNAME);\
@@ -124,7 +124,7 @@
 	\
 	ATF_TC_CLEANUP(fs##_##func,tc)	\
 	{\
-		if (!atf_check_fstype(tc, type))			\
+		if (!atf_check_fstype(tc, #fs))\
 			return;		\
 		if (fs##_fstest_delfs(tc, fs##func##tmp) != 0)		\
 			atf_tc_fail_errno(delfs failed);		\
@@ -142,7 +142,7 @@
 	\
 	ATF_TC_BODY(_fs_##_##_func_,tc)	\
 	{\
-		if (!atf_check_fstype(tc, _type_))			\
+		if (!atf_check_fstype(tc, #_fs_))			\
 			atf_tc_skip(filesystem not selected);		\
 		FSTEST_CONSTRUCTOR(tc,_fs_,_fs_##_func_##tmp);		\
 		_gen_(tc,FSTEST_MNTNAME);\
@@ -160,7 +160,7 @@
 	\
 	ATF_TC_CLEANUP(_fs_##_##_func_,tc)\
 	{\
-		if (!atf_check_fstype(tc, _type_))			\
+		if (!atf_check_fstype(tc, #_fs_))			\
 			return;		\
 		if (_fs_##_fstest_delfs(tc, _fs_##_func_##tmp) != 0)	\
 			atf_tc_fail_errno(delfs failed);		\



CVS commit: src/tests/fs/vfs

2011-01-07 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Fri Jan  7 12:18:25 UTC 2011

Modified Files:
src/tests/fs/vfs: t_renamerace.c

Log Message:
xfail PR kern/44336


To generate a diff of this commit:
cvs rdiff -u -r1.16 -r1.17 src/tests/fs/vfs/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/vfs/t_renamerace.c
diff -u src/tests/fs/vfs/t_renamerace.c:1.16 src/tests/fs/vfs/t_renamerace.c:1.17
--- src/tests/fs/vfs/t_renamerace.c:1.16	Fri Jan  7 11:53:23 2011
+++ src/tests/fs/vfs/t_renamerace.c	Fri Jan  7 12:18:25 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: t_renamerace.c,v 1.16 2011/01/07 11:53:23 pooka Exp $	*/
+/*	$NetBSD: t_renamerace.c,v 1.17 2011/01/07 12:18:25 pooka Exp $	*/
 
 /*
  * Modified for rump and atf from a program supplied
@@ -133,6 +133,9 @@
 	FSTYPE_MSDOS(tc) || FSTYPE_FFSLOG(tc))
 		atf_tc_expect_signal(-1, PR kern/43626);
 
+	if (FSTYPE_P2K_FFS(tc))
+		atf_tc_expect_fail(PR kern/44336); /* child dies */
+
 	RZ(rump_pub_lwproc_rfork(RUMP_RFCFDG));
 	RL(wrkpid = rump_sys_getpid());
 
@@ -152,7 +155,7 @@
 	 * (i.e. not on tmpfs/mfs).  So do the usual kludge.
 	 */
 	if (FSTYPE_FFS(tc) || FSTYPE_EXT2FS(tc) || FSTYPE_LFS(tc) ||
-	FSTYPE_MSDOS(tc))
+	FSTYPE_MSDOS(tc) || FSTYPE_P2K_FFS(tc))
 		abort();
 }
 



CVS commit: src/sys/dev/acpi

2011-01-07 Thread Christoph Egger
Module Name:src
Committed By:   cegger
Date:   Fri Jan  7 14:08:29 UTC 2011

Modified Files:
src/sys/dev/acpi: acpi_ec.c

Log Message:
use aprint_error_dev


To generate a diff of this commit:
cvs rdiff -u -r1.67 -r1.68 src/sys/dev/acpi/acpi_ec.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_ec.c
diff -u src/sys/dev/acpi/acpi_ec.c:1.67 src/sys/dev/acpi/acpi_ec.c:1.68
--- src/sys/dev/acpi/acpi_ec.c:1.67	Sun Jun  6 18:56:10 2010
+++ src/sys/dev/acpi/acpi_ec.c	Fri Jan  7 14:08:29 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: acpi_ec.c,v 1.67 2010/06/06 18:56:10 jruoho Exp $	*/
+/*	$NetBSD: acpi_ec.c,v 1.68 2011/01/07 14:08:29 cegger Exp $	*/
 
 /*-
  * Copyright (c) 2007 Joerg Sonnenberger jo...@netbsd.org.
@@ -59,7 +59,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: acpi_ec.c,v 1.67 2010/06/06 18:56:10 jruoho Exp $);
+__KERNEL_RCSID(0, $NetBSD: acpi_ec.c,v 1.68 2011/01/07 14:08:29 cegger Exp $);
 
 #include sys/param.h
 #include sys/callout.h
@@ -735,8 +735,8 @@
 	snprintf(qxx, sizeof(qxx), _Q%02X, (unsigned int)reg);
 	rv = AcpiEvaluateObject(sc-sc_ech, qxx, NULL, NULL);
 	if (rv != AE_OK  rv != AE_NOT_FOUND) {
-		aprint_error(%s: GPE query method %s failed: %s,
-		device_xname(dv), qxx, AcpiFormatException(rv));
+		aprint_error_dev(dv, GPE query method %s failed: %s,
+		qxx, AcpiFormatException(rv));
 	}
 
 	goto loop;



CVS commit: src/sys/arch/pmax/stand/common

2011-01-07 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Fri Jan  7 14:50:27 UTC 2011

Modified Files:
src/sys/arch/pmax/stand/common: startprog.S

Log Message:
Put .set noreorder so that BDslots are properly filled.


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/sys/arch/pmax/stand/common/startprog.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/pmax/stand/common/startprog.S
diff -u src/sys/arch/pmax/stand/common/startprog.S:1.6 src/sys/arch/pmax/stand/common/startprog.S:1.7
--- src/sys/arch/pmax/stand/common/startprog.S:1.6	Thu Nov 25 14:05:27 2010
+++ src/sys/arch/pmax/stand/common/startprog.S	Fri Jan  7 14:50:27 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: startprog.S,v 1.6 2010/11/25 14:05:27 tsutsui Exp $	*/
+/*	$NetBSD: startprog.S,v 1.7 2011/01/07 14:50:27 tsutsui Exp $	*/
 
 /*-
  * Copyright (c) 1999 The NetBSD Foundation, Inc.
@@ -38,6 +38,7 @@
 
 #include mips/asm.h
 
+	.set	noreorder
 LEAF(startprog)
 subusp,sp,CALLFRAME_SIZ
 	addu	t2,a1,-CALLFRAME_SIZ	# new stack value



CVS commit: src/tests/lib/libc

2011-01-07 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Fri Jan  7 15:05:58 UTC 2011

Modified Files:
src/tests/lib/libc: Makefile
Added Files:
src/tests/lib/libc/db: Makefile README h_db.c t_db.sh

Log Message:
Atf-ify the db tests.

XXX Note that the original regress version of this test did not run the
XXX btree_delete test; that test is broken, and is disabled for now.


To generate a diff of this commit:
cvs rdiff -u -r1.23 -r1.24 src/tests/lib/libc/Makefile
cvs rdiff -u -r0 -r1.1 src/tests/lib/libc/db/Makefile \
src/tests/lib/libc/db/README src/tests/lib/libc/db/h_db.c \
src/tests/lib/libc/db/t_db.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/lib/libc/Makefile
diff -u src/tests/lib/libc/Makefile:1.23 src/tests/lib/libc/Makefile:1.24
--- src/tests/lib/libc/Makefile:1.23	Fri Jan  7 02:47:40 2011
+++ src/tests/lib/libc/Makefile	Fri Jan  7 15:05:57 2011
@@ -1,9 +1,9 @@
-# $NetBSD: Makefile,v 1.23 2011/01/07 02:47:40 pgoyette Exp $
+# $NetBSD: Makefile,v 1.24 2011/01/07 15:05:57 pgoyette Exp $
 
 .include bsd.own.mk
 .include bsd.sys.mk
 
-TESTS_SUBDIRS+=	gen hash ieeefp setjmp stdlib stdio string ttyio
+TESTS_SUBDIRS+=	db gen hash ieeefp setjmp stdlib stdio string ttyio
 
 .if ${HAS_SSP} == yes
 TESTS_SUBDIRS+=	ssp

Added files:

Index: src/tests/lib/libc/db/Makefile
diff -u /dev/null src/tests/lib/libc/db/Makefile:1.1
--- /dev/null	Fri Jan  7 15:05:58 2011
+++ src/tests/lib/libc/db/Makefile	Fri Jan  7 15:05:58 2011
@@ -0,0 +1,18 @@
+# $NetBSD: Makefile,v 1.1 2011/01/07 15:05:58 pgoyette Exp $
+
+.include bsd.own.mk
+
+TESTSDIR=	${TESTSBASE}/lib/libc/db
+
+TESTS_SH+=	t_db
+
+BINDIR=		${TESTSDIR}
+MKMAN=		no
+
+PROGS+=		h_db
+
+FILESDIR=	${TESTSDIR}
+
+FILES+=		README
+
+.include bsd.test.mk
Index: src/tests/lib/libc/db/README
diff -u /dev/null src/tests/lib/libc/db/README:1.1
--- /dev/null	Fri Jan  7 15:05:58 2011
+++ src/tests/lib/libc/db/README	Fri Jan  7 15:05:58 2011
@@ -0,0 +1,66 @@
+#	$NetBSD: README,v 1.1 2011/01/07 15:05:58 pgoyette Exp $
+#	@(#)README	8.8 (Berkeley) 7/31/94
+
+Fairly large files (the command files) are built in this directory during
+the test runs, and even larger files (the database files) are created in
+/var/tmp.  If the latter directory doesn't exist, set the environmental
+variable TMPDIR to a directory where the files can be built.
+
+=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
+The script file consists of lines with an initial character which is
+the command for that line, or an initial character indicating a key
+or data entry for a previous command.
+
+Legal command characters are as follows:
+
+c: compare a record
+	+ must be followed by [kK][dD]; the data value in the database
+	  associated with the specified key is compared to the specified
+	  data value.
+e: echo a string
+	+ writes out the rest of the line into the output file; if the
+	  last character is not a carriage-return, a newline is appended.
+f: set the flags for the next command
+	+ no value zero's the flags
+g: do a get command
+	+ must be followed by [kK]
+	+ writes out the retrieved data DBT.
+o [r]: dump [reverse]
+	+ dump the database out, if 'r' is set, in reverse order.
+p: do a put command
+	+ must be followed by [kK][dD]
+r: do a del command
+	+ must be followed by [kK] unless R_CURSOR flag set.
+S: sync the database
+s: do a seq command
+	+ must be followed by [kK] if R_CURSOR flag set.
+	+ writes out the retrieved data DBT.
+
+Legal key/data characters are as follows:
+
+D [file]: data file
+	+ set the current data value to the contents of the file
+d [data]:
+	+ set the current key value to the contents of the line.
+K [file]: key file
+	+ set the current key value to the contents of the file
+k [data]:
+	+ set the current key value to the contents of the line.
+
+Blank lines, lines with leading white space, and lines with leading
+hash marks (#) are ignored.
+
+Options to dbtest are as follows:
+
+	-d: Set the DB_LOCK flag.
+	-f: Use the file argument as the database file.
+	-i: Use the rest of the argument to set elements in the info
+	structure.  If the type is btree, then -i cachesize=10240
+	will set BTREEINFO.cachesize to 10240.
+	-o: The rest of the argument is the output file instead of
+	using stdout.
+	-s: Don't delete the database file before opening it, i.e.
+	use the database file from a previous run.
+
+Dbtest requires two arguments, the type of access hash, recno
+or btree, and the script name or - to indicate stdin.
Index: src/tests/lib/libc/db/h_db.c
diff -u /dev/null src/tests/lib/libc/db/h_db.c:1.1
--- /dev/null	Fri Jan  7 15:05:58 2011
+++ src/tests/lib/libc/db/h_db.c	Fri Jan  7 15:05:58 2011
@@ -0,0 +1,731 @@
+/*	$NetBSD: h_db.c,v 1.1 2011/01/07 15:05:58 pgoyette Exp $	*/
+
+/*-
+ * Copyright (c) 1992, 1993, 1994
+ *	The Regents of the University of California.  All rights reserved.
+ *
+ * 

CVS commit: src

2011-01-07 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Fri Jan  7 15:06:37 UTC 2011

Modified Files:
src/distrib/sets/lists/tests: mi
src/etc/mtree: NetBSD.dist.tests

Log Message:
Hook the new atf db test


To generate a diff of this commit:
cvs rdiff -u -r1.216 -r1.217 src/distrib/sets/lists/tests/mi
cvs rdiff -u -r1.13 -r1.14 src/etc/mtree/NetBSD.dist.tests

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

Modified files:

Index: src/distrib/sets/lists/tests/mi
diff -u src/distrib/sets/lists/tests/mi:1.216 src/distrib/sets/lists/tests/mi:1.217
--- src/distrib/sets/lists/tests/mi:1.216	Fri Jan  7 03:04:12 2011
+++ src/distrib/sets/lists/tests/mi	Fri Jan  7 15:06:37 2011
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.216 2011/01/07 03:04:12 pgoyette Exp $
+# $NetBSD: mi,v 1.217 2011/01/07 15:06:37 pgoyette Exp $
 #
 # Note: don't delete entries from here - mark them as obsolete instead.
 #
@@ -319,6 +319,8 @@
 ./usr/libdata/debug/usr/tests/lib/csu/h_initfini2.debug			tests-lib-debug		debug,atf
 ./usr/libdata/debug/usr/tests/lib/csu/h_initfini3.debug			tests-lib-debug		debug,atf
 ./usr/libdata/debug/usr/tests/lib/libc	tests-lib-debug
+./usr/libdata/debug/usr/tests/lib/libc/dbtests-lib-debug
+./usr/libdata/debug/usr/tests/lib/libc/db/h_db.debug			tests-lib-debug		debug,atf
 ./usr/libdata/debug/usr/tests/lib/libc/gentests-lib-debug
 ./usr/libdata/debug/usr/tests/lib/libc/gen/t_basedirname.debug		tests-lib-debug		debug,atf
 ./usr/libdata/debug/usr/tests/lib/libc/gen/t_dir.debug			tests-lib-debug		debug,atf
@@ -1601,6 +1603,11 @@
 ./usr/tests/lib/csu/t_crt0			tests-lib-tests		atf
 ./usr/tests/lib/libctests-lib-tests
 ./usr/tests/lib/libc/Atffile			tests-lib-tests		atf
+./usr/tests/lib/libc/dbtests-lib-tests
+./usr/tests/lib/libc/db/Atffile			tests-lib-tests		atf
+./usr/tests/lib/libc/db/README			tests-lib-tests		atf
+./usr/tests/lib/libc/db/h_db			tests-lib-tests		atf
+./usr/tests/lib/libc/db/t_db			tests-lib-tests		atf
 ./usr/tests/lib/libc/gen			tests-lib-tests
 ./usr/tests/lib/libc/gen/Atffile		tests-lib-tests		atf
 ./usr/tests/lib/libc/gen/t_basedirname		tests-lib-tests		atf

Index: src/etc/mtree/NetBSD.dist.tests
diff -u src/etc/mtree/NetBSD.dist.tests:1.13 src/etc/mtree/NetBSD.dist.tests:1.14
--- src/etc/mtree/NetBSD.dist.tests:1.13	Fri Jan  7 02:49:09 2011
+++ src/etc/mtree/NetBSD.dist.tests	Fri Jan  7 15:06:37 2011
@@ -1,4 +1,4 @@
-#	$NetBSD: NetBSD.dist.tests,v 1.13 2011/01/07 02:49:09 pgoyette Exp $
+#	$NetBSD: NetBSD.dist.tests,v 1.14 2011/01/07 15:06:37 pgoyette Exp $
 
 ./usr/libdata/debug/usr/tests
 ./usr/libdata/debug/usr/tests/atf
@@ -45,6 +45,7 @@
 ./usr/libdata/debug/usr/tests/lib
 ./usr/libdata/debug/usr/tests/lib/csu
 ./usr/libdata/debug/usr/tests/lib/libc
+./usr/libdata/debug/usr/tests/lib/libc/db
 ./usr/libdata/debug/usr/tests/lib/libc/gen
 ./usr/libdata/debug/usr/tests/lib/libc/hash
 ./usr/libdata/debug/usr/tests/lib/libc/ieeefp
@@ -142,6 +143,7 @@
 ./usr/tests/lib
 ./usr/tests/lib/csu
 ./usr/tests/lib/libc
+./usr/tests/lib/libc/db
 ./usr/tests/lib/libc/gen
 ./usr/tests/lib/libc/hash
 ./usr/tests/lib/libc/hash/data



CVS commit: src/regress/lib/libc

2011-01-07 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Fri Jan  7 15:08:41 UTC 2011

Modified Files:
src/regress/lib/libc: Makefile
Removed Files:
src/regress/lib/libc/db: Makefile README dbtest.c run.test

Log Message:
The db test has been atf-ified


To generate a diff of this commit:
cvs rdiff -u -r1.75 -r1.76 src/regress/lib/libc/Makefile
cvs rdiff -u -r1.19 -r0 src/regress/lib/libc/db/Makefile
cvs rdiff -u -r1.5 -r0 src/regress/lib/libc/db/README
cvs rdiff -u -r1.18 -r0 src/regress/lib/libc/db/dbtest.c
cvs rdiff -u -r1.11 -r0 src/regress/lib/libc/db/run.test

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

Modified files:

Index: src/regress/lib/libc/Makefile
diff -u src/regress/lib/libc/Makefile:1.75 src/regress/lib/libc/Makefile:1.76
--- src/regress/lib/libc/Makefile:1.75	Fri Jan  7 02:51:38 2011
+++ src/regress/lib/libc/Makefile	Fri Jan  7 15:08:40 2011
@@ -1,6 +1,6 @@
-#	$NetBSD: Makefile,v 1.75 2011/01/07 02:51:38 pgoyette Exp $
+#	$NetBSD: Makefile,v 1.76 2011/01/07 15:08:40 pgoyette Exp $
 
-SUBDIR+= citrus db divrem getaddrinfo int_fmtio locale regex rpc
+SUBDIR+= citrus divrem getaddrinfo int_fmtio locale regex rpc
 
 .include bsd.own.mk
 .include bsd.sys.mk



CVS commit: src/sys/rump

2011-01-07 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Fri Jan  7 15:10:22 UTC 2011

Modified Files:
src/sys/rump/kern/lib/libtty: component.c
src/sys/rump/librump/rumpkern: rump.c rump_private.h

Log Message:
Avoid double init of tty_lock if rumpkern_tty is included.  LOCKDEBUG
does not tolerate double inits.

pointed out by njoly


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/sys/rump/kern/lib/libtty/component.c
cvs rdiff -u -r1.217 -r1.218 src/sys/rump/librump/rumpkern/rump.c
cvs rdiff -u -r1.65 -r1.66 src/sys/rump/librump/rumpkern/rump_private.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/kern/lib/libtty/component.c
diff -u src/sys/rump/kern/lib/libtty/component.c:1.1 src/sys/rump/kern/lib/libtty/component.c:1.2
--- src/sys/rump/kern/lib/libtty/component.c:1.1	Mon Jun 14 14:45:47 2010
+++ src/sys/rump/kern/lib/libtty/component.c	Fri Jan  7 15:10:22 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: component.c,v 1.1 2010/06/14 14:45:47 pooka Exp $	*/
+/*	$NetBSD: component.c,v 1.2 2011/01/07 15:10:22 pooka Exp $	*/
 
 /*
  * Copyright (c) 2010 Antti Kantee.  All Rights Reserved.
@@ -26,7 +26,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: component.c,v 1.1 2010/06/14 14:45:47 pooka Exp $);
+__KERNEL_RCSID(0, $NetBSD: component.c,v 1.2 2011/01/07 15:10:22 pooka Exp $);
 
 #include sys/param.h
 #include sys/conf.h
@@ -68,4 +68,6 @@
 	ttyldisc_init();
 
 	ptyattach(1);
+
+	rump_ttycomponent = true;
 }

Index: src/sys/rump/librump/rumpkern/rump.c
diff -u src/sys/rump/librump/rumpkern/rump.c:1.217 src/sys/rump/librump/rumpkern/rump.c:1.218
--- src/sys/rump/librump/rumpkern/rump.c:1.217	Thu Jan  6 13:09:17 2011
+++ src/sys/rump/librump/rumpkern/rump.c	Fri Jan  7 15:10:22 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: rump.c,v 1.217 2011/01/06 13:09:17 pooka Exp $	*/
+/*	$NetBSD: rump.c,v 1.218 2011/01/07 15:10:22 pooka Exp $	*/
 
 /*
  * Copyright (c) 2007 Antti Kantee.  All Rights Reserved.
@@ -28,7 +28,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: rump.c,v 1.217 2011/01/06 13:09:17 pooka Exp $);
+__KERNEL_RCSID(0, $NetBSD: rump.c,v 1.218 2011/01/07 15:10:22 pooka Exp $);
 
 #include sys/systm.h
 #define ELFSIZE ARCH_ELFSIZE
@@ -109,6 +109,7 @@
 #else
 const int rump_lockdebug = 0;
 #endif
+bool rump_ttycomponent = false;
 
 static void
 rump_aiodone_worker(struct work *wk, void *dummy)
@@ -307,7 +308,6 @@
 	l-l_fd = filedesc0;
 	rumpuser_set_curlwp(l);
 
-	mutex_init(tty_lock, MUTEX_DEFAULT, IPL_NONE);
 	rumpuser_mutex_init(rump_giantlock);
 	ksyms_init();
 	uvm_init();
@@ -411,6 +411,13 @@
 
 	rump_component_init(RUMP_COMPONENT_KERN_VFS);
 
+	/*
+	 * if we initialized the tty component above, the tyttymtx is
+	 * now initialized.  otherwise, we need to initialize it.
+	 */
+	if (!rump_ttycomponent)
+		mutex_init(tty_lock, MUTEX_DEFAULT, IPL_VM);
+
 	cold = 0;
 
 	/* aidondest */

Index: src/sys/rump/librump/rumpkern/rump_private.h
diff -u src/sys/rump/librump/rumpkern/rump_private.h:1.65 src/sys/rump/librump/rumpkern/rump_private.h:1.66
--- src/sys/rump/librump/rumpkern/rump_private.h:1.65	Wed Dec  1 14:59:38 2010
+++ src/sys/rump/librump/rumpkern/rump_private.h	Fri Jan  7 15:10:22 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: rump_private.h,v 1.65 2010/12/01 14:59:38 pooka Exp $	*/
+/*	$NetBSD: rump_private.h,v 1.66 2011/01/07 15:10:22 pooka Exp $	*/
 
 /*
  * Copyright (c) 2007 Antti Kantee.  All Rights Reserved.
@@ -94,6 +94,8 @@
 
 extern struct cpu_info *rump_cpu;
 
+extern bool rump_ttycomponent;
+
 struct lwp *	rump__lwproc_alloclwp(struct proc *);
 
 void	rump_cpus_bootstrap(int *);



CVS commit: [matt-nb5-pq3] src/sys/arch/powerpc

2011-01-07 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Fri Jan  7 15:11:31 UTC 2011

Modified Files:
src/sys/arch/powerpc/include [matt-nb5-pq3]: instr.h
src/sys/arch/powerpc/powerpc [matt-nb5-pq3]: trap.c

Log Message:
Move OPC_MFMSR definitions from trap.c
Add OPC_LWSYNC for booke.


To generate a diff of this commit:
cvs rdiff -u -r1.4.104.1 -r1.4.104.2 src/sys/arch/powerpc/include/instr.h
cvs rdiff -u -r1.128.4.1.4.1 -r1.128.4.1.4.2 \
src/sys/arch/powerpc/powerpc/trap.c

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

Modified files:

Index: src/sys/arch/powerpc/include/instr.h
diff -u src/sys/arch/powerpc/include/instr.h:1.4.104.1 src/sys/arch/powerpc/include/instr.h:1.4.104.2
--- src/sys/arch/powerpc/include/instr.h:1.4.104.1	Fri Jan  7 01:51:31 2011
+++ src/sys/arch/powerpc/include/instr.h	Fri Jan  7 15:11:30 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: instr.h,v 1.4.104.1 2011/01/07 01:51:31 matt Exp $ */
+/*	$NetBSD: instr.h,v 1.4.104.2 2011/01/07 15:11:30 matt Exp $ */
 
 /*
  * Copyright (c) 1992, 1993
@@ -390,6 +390,22 @@
 #define	B_AA		0x02	/* Absolute flag */
 
 /*
+ * Helpers for decoding mfspr
+ */
+#define	OPC_MFSPR_CODE		0x7c0002a6
+#define	OPC_MFSPR_MASK		(~(0x1f  21))
+#define	OPC_MFSPR(spr)		(OPC_MFSPR_CODE |\
+ (((spr)  0x1f)  16) |\
+ (((spr)  0x3e0)  6))
+#define	OPC_MFSPR_REG(o)	(((o)  21)  0x1f)
+#define	OPC_MFSPR_P(o, spr)	(((o)  OPC_MFSPR_MASK) == OPC_MFSPR(spr))
+
+/*
+ * booke doesn't have lwsync even though gcc emits it so we have to emulate it.
+ */
+#define	OPC_LWSYNC		0x7c2004ac
+
+/*
  * FPU data types.
  */
 #define FTYPE_LNG	-1	/* data = 64-bit signed long integer */		

Index: src/sys/arch/powerpc/powerpc/trap.c
diff -u src/sys/arch/powerpc/powerpc/trap.c:1.128.4.1.4.1 src/sys/arch/powerpc/powerpc/trap.c:1.128.4.1.4.2
--- src/sys/arch/powerpc/powerpc/trap.c:1.128.4.1.4.1	Fri Jan  7 02:05:58 2011
+++ src/sys/arch/powerpc/powerpc/trap.c	Fri Jan  7 15:11:30 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: trap.c,v 1.128.4.1.4.1 2011/01/07 02:05:58 matt Exp $	*/
+/*	$NetBSD: trap.c,v 1.128.4.1.4.2 2011/01/07 15:11:30 matt Exp $	*/
 
 /*
  * Copyright (C) 1995, 1996 Wolfgang Solfrank.
@@ -32,7 +32,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: trap.c,v 1.128.4.1.4.1 2011/01/07 02:05:58 matt Exp $);
+__KERNEL_RCSID(0, $NetBSD: trap.c,v 1.128.4.1.4.2 2011/01/07 15:11:30 matt Exp $);
 
 #include opt_altivec.h
 #include opt_ddb.h
@@ -62,6 +62,7 @@
 #include machine/psl.h
 #include machine/trap.h
 #include powerpc/altivec.h
+#include powerpc/instr.h
 #include powerpc/spr.h
 #include powerpc/oea/spr.h
 #include powerpc/userret.h
@@ -775,14 +776,6 @@
 	if (copyin((void *)tf-tf_srr0, opcode, sizeof(opcode)) != 0)
 		return 0;
 
-#define	OPC_MFSPR_CODE		0x7c0002a6
-#define	OPC_MFSPR_MASK		(0xfc0007ff|0x001ff800)
-#define	OPC_MFSPR(spr)		(OPC_MFSPR_CODE |\
- (((spr)  0x1f)  16) |\
- (((spr)  0x3e0)  6))
-#define	OPC_MFSPR_REG(o)	(((o)  21)  0x1f)
-#define	OPC_MFSPR_P(o, spr)	(((o)  OPC_MFSPR_MASK) == OPC_MFSPR(spr))
-
 	if (OPC_MFSPR_P(opcode, SPR_PVR)) {
 		__asm (mfpvr %0 : =r(tf-tf_fixreg[OPC_MFSPR_REG(opcode)]));
 		return 1;



CVS commit: [matt-nb5-pq3] src/sys/arch/powerpc/booke

2011-01-07 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Fri Jan  7 15:14:24 UTC 2011

Modified Files:
src/sys/arch/powerpc/booke [matt-nb5-pq3]: trap.c

Log Message:
Add support for emulating mfpvr and lwsync.  GCC will emit lwsync but booke
doesn't lwsync (sync 1) so we emulate it by treating it as a noop since
the exception will have synchronized things for us.


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.1 -r1.1.2.2 src/sys/arch/powerpc/booke/trap.c

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

Modified files:

Index: src/sys/arch/powerpc/booke/trap.c
diff -u src/sys/arch/powerpc/booke/trap.c:1.1.2.1 src/sys/arch/powerpc/booke/trap.c:1.1.2.2
--- src/sys/arch/powerpc/booke/trap.c:1.1.2.1	Fri Jan  7 01:26:19 2011
+++ src/sys/arch/powerpc/booke/trap.c	Fri Jan  7 15:14:23 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: trap.c,v 1.1.2.1 2011/01/07 01:26:19 matt Exp $	*/
+/*	$NetBSD: trap.c,v 1.1.2.2 2011/01/07 15:14:23 matt Exp $	*/
 /*-
  * Copyright (c) 2010, 2011 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -39,7 +39,7 @@
 
 #include sys/cdefs.h
 
-__KERNEL_RCSID(1, $NetBSD: trap.c,v 1.1.2.1 2011/01/07 01:26:19 matt Exp $);
+__KERNEL_RCSID(1, $NetBSD: trap.c,v 1.1.2.2 2011/01/07 15:14:23 matt Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -53,12 +53,14 @@
 #endif
 #include sys/kauth.h
 #include sys/kmem.h
+#include sys/ras.h
 
 #include uvm/uvm_extern.h
 
 #include powerpc/pcb.h
 #include powerpc/userret.h
 #include powerpc/psl.h
+#include powerpc/instr.h
 
 #include powerpc/spr.h
 #include powerpc/booke/spr.h
@@ -385,6 +387,26 @@
 	return rv;
 }
 
+static bool
+emulate_opcode(struct trapframe *tf, ksiginfo_t *ksi)
+{
+	uint32_t opcode;
+if (copyin((void *)tf-tf_srr0, opcode, sizeof(opcode)) != 0)
+		return false;
+
+	if (opcode == OPC_LWSYNC)
+		return true;
+
+	if (OPC_MFSPR_P(opcode, SPR_PVR)) {
+		__asm (mfpvr %0 : =r(tf-tf_fixreg[OPC_MFSPR_REG(opcode)]));
+		return true;
+	}
+
+	/*
+	 * If we bothered to emulate FP, we would try to do so here.
+	 */
+	return false;
+}
 
 static int
 pgm_exception(struct trapframe *tf, ksiginfo_t *ksi)
@@ -392,21 +414,37 @@
 	struct cpu_info * const ci = curcpu();
 	int rv = EPERM;
 
-	if (rv != 0  usertrap_p(tf)) {
-		ci-ci_ev_pgm.ev_count++;
-		KSI_INIT_TRAP(ksi);
-		ksi-ksi_signo = SIGILL;
-		ksi-ksi_trap = EXC_PGM;
-		if (tf-tf_esr  ESR_PIL)
-			ksi-ksi_code = ILL_ILLOPC;
-		else if (tf-tf_esr  ESR_PPR)
-			ksi-ksi_code = ILL_PRVOPC;
-		else if (tf-tf_esr  ESR_PTR)
-			ksi-ksi_code = ILL_ILLTRP;
-		else
-			ksi-ksi_code = 0;
-		ksi-ksi_addr = (void *)tf-tf_srr0;
+	if (!usertrap_p(tf))
+		return rv;
+
+	ci-ci_ev_pgm.ev_count++;
+
+	if (tf-tf_esr  ESR_PTR) {
+		struct proc *p = curlwp-l_proc;
+		if (p-p_raslist != NULL
+		 ras_lookup(p, (void *)tf-tf_srr0) != (void *) -1) {
+			tf-tf_srr0 += 4;
+			return 0;
+		}
+	} else if (tf-tf_esr  (ESR_PIL|ESR_PPR)) {
+		if (emulate_opcode(tf, ksi)) {
+			tf-tf_srr0 += 4;
+			return 0;
+		}
 	}
+
+	KSI_INIT_TRAP(ksi);
+	ksi-ksi_signo = SIGILL;
+	ksi-ksi_trap = EXC_PGM;
+	if (tf-tf_esr  ESR_PIL)
+		ksi-ksi_code = ILL_ILLOPC;
+	else if (tf-tf_esr  ESR_PPR)
+		ksi-ksi_code = ILL_PRVOPC;
+	else if (tf-tf_esr  ESR_PTR)
+		ksi-ksi_code = ILL_ILLTRP;
+	else
+		ksi-ksi_code = 0;
+	ksi-ksi_addr = (void *)tf-tf_srr0;
 	return rv;
 }
 



CVS commit: src/lib/libp2k

2011-01-07 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Fri Jan  7 15:30:10 UTC 2011

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

Log Message:
in case unmount fails (it never should), do a full mountpoint dump


To generate a diff of this commit:
cvs rdiff -u -r1.51 -r1.52 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.51 src/lib/libp2k/p2k.c:1.52
--- src/lib/libp2k/p2k.c:1.51	Fri Jan  7 11:15:30 2011
+++ src/lib/libp2k/p2k.c	Fri Jan  7 15:30:09 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: p2k.c,v 1.51 2011/01/07 11:15:30 pooka Exp $	*/
+/*	$NetBSD: p2k.c,v 1.52 2011/01/07 15:30:09 pooka Exp $	*/
 
 /*
  * Copyright (c) 2007, 2008, 2009  Antti Kantee.  All Rights Reserved.
@@ -554,6 +554,13 @@
 
 	if (fs) {
 		if (ukfs_release(fs, 0) != 0) {
+			struct statvfs svfsb;
+
+			if (p2m-p2m_hasdebug
+			 p2k_fs_statvfs(pu, svfsb) == 0) {
+printf(\nSOFT UNMOUNT FAILED, MP INFO DUMP\n);
+rump_pub_vfs_mount_print(svfsb.f_mntonname, 1);
+			}
 			ukfs_release(fs, UKFS_RELFLAG_FORCE);
 			error = 0;
 		}



CVS commit: src/sys/dev/pci/hdaudio

2011-01-07 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Fri Jan  7 15:30:30 UTC 2011

Modified Files:
src/sys/dev/pci/hdaudio: hdaudio.c hdaudio_afg.c hdaudio_pci.c
hdaudiovar.h

Log Message:
modularize hdaudio and hdafg drivers


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/sys/dev/pci/hdaudio/hdaudio.c
cvs rdiff -u -r1.27 -r1.28 src/sys/dev/pci/hdaudio/hdaudio_afg.c
cvs rdiff -u -r1.6 -r1.7 src/sys/dev/pci/hdaudio/hdaudio_pci.c \
src/sys/dev/pci/hdaudio/hdaudiovar.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/pci/hdaudio/hdaudio.c
diff -u src/sys/dev/pci/hdaudio/hdaudio.c:1.8 src/sys/dev/pci/hdaudio/hdaudio.c:1.9
--- src/sys/dev/pci/hdaudio/hdaudio.c:1.8	Thu Sep  2 01:55:31 2010
+++ src/sys/dev/pci/hdaudio/hdaudio.c	Fri Jan  7 15:30:29 2011
@@ -1,4 +1,4 @@
-/* $NetBSD: hdaudio.c,v 1.8 2010/09/02 01:55:31 jmcneill Exp $ */
+/* $NetBSD: hdaudio.c,v 1.9 2011/01/07 15:30:29 jmcneill Exp $ */
 
 /*
  * Copyright (c) 2009 Precedence Technologies Ltd supp...@precedence.co.uk
@@ -30,7 +30,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: hdaudio.c,v 1.8 2010/09/02 01:55:31 jmcneill Exp $);
+__KERNEL_RCSID(0, $NetBSD: hdaudio.c,v 1.9 2011/01/07 15:30:29 jmcneill Exp $);
 
 #include sys/types.h
 #include sys/param.h
@@ -39,6 +39,7 @@
 #include sys/conf.h
 #include sys/bus.h
 #include sys/kmem.h
+#include sys/module.h
 
 #include dev/pci/hdaudio/hdaudiovar.h
 #include dev/pci/hdaudio/hdaudioreg.h
@@ -865,6 +866,46 @@
 }
 
 int
+hdaudio_rescan(struct hdaudio_softc *sc, const char *ifattr, const int *locs)
+{
+	struct hdaudio_codec *co;
+	struct hdaudio_function_group *fg;
+	unsigned int codec;
+
+	if (!ifattr_match(ifattr, hdaudiobus))
+		return 0;
+
+	for (codec = 0; codec  HDAUDIO_MAX_CODECS; codec++) {
+		co = sc-sc_codec[codec];
+		fg = co-co_fg;
+		if (!co-co_valid || fg == NULL)
+			continue;
+		if (fg-fg_device)
+			continue;
+		hdaudio_attach_fg(fg, NULL);
+	}
+
+	return 0;
+}
+
+void
+hdaudio_childdet(struct hdaudio_softc *sc, device_t child)
+{
+	struct hdaudio_codec *co;
+	struct hdaudio_function_group *fg;
+	unsigned int codec;
+
+	for (codec = 0; codec  HDAUDIO_MAX_CODECS; codec++) {
+		co = sc-sc_codec[codec];
+		fg = co-co_fg;
+		if (!co-co_valid || fg == NULL)
+			continue;
+		if (fg-fg_device == child)
+			fg-fg_device = NULL;
+	}
+}
+
+int
 hdaudio_intr(struct hdaudio_softc *sc)
 {
 	struct hdaudio_stream *st;
@@ -1348,8 +1389,12 @@
 prop_dictionary_t request, prop_dictionary_t response)
 {
 	struct hdaudio_function_group *fg;
+	int (*infocb)(void *, prop_dictionary_t, prop_dictionary_t);
+	prop_dictionary_t fgrp_dict;
+	uint64_t info_fn;
 	int16_t codecid, nid;
 	void *fgrp_sc; 
+	bool rv;
 	int err;
 
 	if (!prop_dictionary_get_int16(request, codecid, codecid) ||
@@ -1360,17 +1405,26 @@
 	if (fg == NULL)
 		return ENODEV;
 	fgrp_sc = device_private(fg-fg_device);
+	fgrp_dict = device_properties(fg-fg_device);
 
 	switch (fg-fg_type) {
 	case HDAUDIO_GROUP_TYPE_AFG:
 		switch (cmd) {
 		case HDAUDIO_FGRP_CODEC_INFO:
-			err = hdaudio_afg_codec_info(fgrp_sc,
-			request, response);
+			rv = prop_dictionary_get_uint64(fgrp_dict,
+			codecinfo-callback, info_fn);
+			if (!rv)
+return ENXIO;
+			infocb = (void *)(uintptr_t)info_fn;
+			err = infocb(fgrp_sc, request, response);
 			break;
 		case HDAUDIO_FGRP_WIDGET_INFO:
-			err = hdaudio_afg_widget_info(fgrp_sc,
-			request, response);
+			rv = prop_dictionary_get_uint64(fgrp_dict,
+			widgetinfo-callback, info_fn);
+			if (!rv)
+return ENXIO;
+			infocb = (void *)(uintptr_t)info_fn;
+			err = infocb(fgrp_sc, request, response);
 			break;
 		default:
 			err = EINVAL;
@@ -1452,3 +1506,43 @@
 	prop_object_release(request);
 	return err;
 }
+
+MODULE(MODULE_CLASS_DRIVER, hdaudio, NULL);
+
+#ifdef _MODULE
+#include ioconf.c
+#endif
+
+static int
+hdaudio_modcmd(modcmd_t cmd, void *opaque)
+{
+	int error = 0;
+#ifdef _MODULE
+	int bmaj = -1, cmaj = -1;
+#endif
+
+	switch (cmd) {
+	case MODULE_CMD_INIT:
+#ifdef _MODULE
+		error = config_init_component(cfdriver_ioconf_hdaudio,
+		cfattach_ioconf_hdaudio, cfdata_ioconf_hdaudio);
+		if (error)
+			return error;
+		error = devsw_attach(hdaudio, NULL, bmaj,
+		hdaudio_cdevsw, cmaj);
+		if (error)
+			config_fini_component(cfdriver_ioconf_hdaudio,
+			cfattach_ioconf_hdaudio, cfdata_ioconf_hdaudio);
+#endif
+		return error;
+	case MODULE_CMD_FINI:
+#ifdef _MODULE
+		devsw_detach(NULL, hdaudio_cdevsw);
+		error = config_fini_component(cfdriver_ioconf_hdaudio,
+		cfattach_ioconf_hdaudio, cfdata_ioconf_hdaudio);
+#endif
+		return error;
+	default:
+		return ENOTTY;
+	}
+}

Index: src/sys/dev/pci/hdaudio/hdaudio_afg.c
diff -u src/sys/dev/pci/hdaudio/hdaudio_afg.c:1.27 src/sys/dev/pci/hdaudio/hdaudio_afg.c:1.28
--- src/sys/dev/pci/hdaudio/hdaudio_afg.c:1.27	Thu Sep  2 01:55:31 2010
+++ 

CVS commit: src/sys/modules

2011-01-07 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Fri Jan  7 15:32:12 UTC 2011

Added Files:
src/sys/modules/hdafg: Makefile hdafg.ioconf
src/sys/modules/hdaudio: Makefile hdaudio.ioconf

Log Message:
add hdaudio and hdafg modules


To generate a diff of this commit:
cvs rdiff -u -r0 -r1.1 src/sys/modules/hdafg/Makefile \
src/sys/modules/hdafg/hdafg.ioconf
cvs rdiff -u -r0 -r1.1 src/sys/modules/hdaudio/Makefile \
src/sys/modules/hdaudio/hdaudio.ioconf

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

Added files:

Index: src/sys/modules/hdafg/Makefile
diff -u /dev/null src/sys/modules/hdafg/Makefile:1.1
--- /dev/null	Fri Jan  7 15:32:12 2011
+++ src/sys/modules/hdafg/Makefile	Fri Jan  7 15:32:11 2011
@@ -0,0 +1,13 @@
+#	$NetBSD: Makefile,v 1.1 2011/01/07 15:32:11 jmcneill Exp $
+
+.include ../Makefile.inc
+
+.PATH:	${S}/dev/pci/hdaudio
+
+KMOD=	hdafg
+IOCONF=	hdafg.ioconf
+SRCS=	hdaudio_afg.c
+
+WARNS=	3
+
+.include bsd.kmodule.mk
Index: src/sys/modules/hdafg/hdafg.ioconf
diff -u /dev/null src/sys/modules/hdafg/hdafg.ioconf:1.1
--- /dev/null	Fri Jan  7 15:32:12 2011
+++ src/sys/modules/hdafg/hdafg.ioconf	Fri Jan  7 15:32:11 2011
@@ -0,0 +1,10 @@
+#	$NetBSD: hdafg.ioconf,v 1.1 2011/01/07 15:32:11 jmcneill Exp $
+
+ioconf hdafg
+
+include conf/files
+include dev/pci/files.pci
+
+pseudo-root hdaudio*
+
+hdafg* at hdaudiobus?

Index: src/sys/modules/hdaudio/Makefile
diff -u /dev/null src/sys/modules/hdaudio/Makefile:1.1
--- /dev/null	Fri Jan  7 15:32:12 2011
+++ src/sys/modules/hdaudio/Makefile	Fri Jan  7 15:32:11 2011
@@ -0,0 +1,15 @@
+#	$NetBSD: Makefile,v 1.1 2011/01/07 15:32:11 jmcneill Exp $
+
+.include ../Makefile.inc
+
+.PATH:	${S}/dev/pci/hdaudio
+
+KMOD=	hdaudio
+IOCONF=	hdaudio.ioconf
+SRCS=	hdaudio.c
+SRCS+=	hdaudio_ids.c
+SRCS+=	hdaudio_pci.c
+
+WARNS=	3
+
+.include bsd.kmodule.mk
Index: src/sys/modules/hdaudio/hdaudio.ioconf
diff -u /dev/null src/sys/modules/hdaudio/hdaudio.ioconf:1.1
--- /dev/null	Fri Jan  7 15:32:12 2011
+++ src/sys/modules/hdaudio/hdaudio.ioconf	Fri Jan  7 15:32:12 2011
@@ -0,0 +1,10 @@
+#	$NetBSD: hdaudio.ioconf,v 1.1 2011/01/07 15:32:12 jmcneill Exp $
+
+ioconf hdaudio
+
+include conf/files
+include dev/pci/files.pci
+
+pseudo-root pci*
+
+hdaudio* at pci? dev ? function ?



CVS commit: src/lib/libp2k

2011-01-07 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Fri Jan  7 15:47:14 UTC 2011

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

Log Message:
In case of a P2K_DEBUG mount, dump mount point contents when the
process receives SIGINFO.  Additionally, dump vnode status if the
process gets SIGUSR1 (can be quite quite verbose, therefore not
displayed with SIGINFO).


To generate a diff of this commit:
cvs rdiff -u -r1.52 -r1.53 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.52 src/lib/libp2k/p2k.c:1.53
--- src/lib/libp2k/p2k.c:1.52	Fri Jan  7 15:30:09 2011
+++ src/lib/libp2k/p2k.c	Fri Jan  7 15:47:14 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: p2k.c,v 1.52 2011/01/07 15:30:09 pooka Exp $	*/
+/*	$NetBSD: p2k.c,v 1.53 2011/01/07 15:47:14 pooka Exp $	*/
 
 /*
  * Copyright (c) 2007, 2008, 2009  Antti Kantee.  All Rights Reserved.
@@ -150,6 +150,29 @@
 	rump_pub_allbetsareoff_setid(pid, lid);
 }
 
+static volatile sig_atomic_t dodump;
+static void
+dumpmp(struct puffs_usermount *pu)
+{
+	struct statvfs svfsb;
+
+	if (dodump  p2k_fs_statvfs(pu, svfsb) == 0) {
+		rump_pub_vfs_mount_print(svfsb.f_mntonname, dodump-1);
+	}
+
+	dodump = 0;
+}
+
+static void
+sighand(int sig)
+{
+
+	if (sig == SIGINFO)
+		dodump = 1;
+	else if (sig == SIGUSR1)
+		dodump = 2;
+}
+
 static __inline struct p2k_vp_hash *
 gethash(struct p2k_mount *p2m, struct vnode *vp)
 {
@@ -444,6 +467,18 @@
 	puffs_setstacksize(pu, PUFFS_STACKSIZE_MIN);
 	puffs_fakecc = 1;
 	puffs_set_prepost(pu, makelwp, NULL);
+
+	if (p2m-p2m_hasdebug) {
+		struct timespec ts;
+
+		signal(SIGINFO, sighand);
+		signal(SIGUSR1, sighand);
+
+		ts.tv_sec = 0;
+		ts.tv_nsec = 1000*1000*10; /* 10ms */
+		puffs_ml_setloopfn(pu, dumpmp);
+		puffs_ml_settimeout(pu, ts);
+	}
 	puffs_set_errnotify(pu, p2k_errcatcher);
 
 	puffs_setspecific(pu, p2m);



CVS commit: src/lib/libp2k

2011-01-07 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Fri Jan  7 15:50:40 UTC 2011

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

Log Message:
Document how to get debug info for the mount.


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/lib/libp2k/p2k.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/libp2k/p2k.3
diff -u src/lib/libp2k/p2k.3:1.8 src/lib/libp2k/p2k.3:1.9
--- src/lib/libp2k/p2k.3:1.8	Thu May 20 05:43:54 2010
+++ src/lib/libp2k/p2k.3	Fri Jan  7 15:50:40 2011
@@ -1,4 +1,4 @@
-.\ $NetBSD: p2k.3,v 1.8 2010/05/20 05:43:54 jruoho Exp $
+.\ $NetBSD: p2k.3,v 1.9 2011/01/07 15:50:40 pooka Exp $
 .\
 .\ Copyright (c) 2008 Antti Kantee.  All rights reserved.
 .\
@@ -23,7 +23,7 @@
 .\ OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 .\ SUCH DAMAGE.
 .\
-.Dd May 20, 2010
+.Dd January 7, 2011
 .Dt P2K 3
 .Os
 .Sh NAME
@@ -100,6 +100,12 @@
 .Bl -tag -width XP2K_NOCACHE_PAGE -offset 2n
 .It Dv P2K_DEBUG
 Do not detach from tty and print information about each puffs operation.
+In case the daemon receives
+.Dv SIGINFO
+(typically from ctrl-T), it dumps out the status of the mount point.
+Sending
+.Dv SIGUSR1
+causes a dump of all the vnodes (verbose).
 .It Dv P2K_NODETACH
 Do not detach from tty.
 .It Dv P2K_NOCACHE_PAGE



CVS commit: src/lib/libp2k

2011-01-07 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Fri Jan  7 16:02:32 UTC 2011

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

Log Message:
Make P2K_WIZARDUID require a valid integer instead of defaulting to root.


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/lib/libp2k/p2k.3
cvs rdiff -u -r1.53 -r1.54 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.3
diff -u src/lib/libp2k/p2k.3:1.9 src/lib/libp2k/p2k.3:1.10
--- src/lib/libp2k/p2k.3:1.9	Fri Jan  7 15:50:40 2011
+++ src/lib/libp2k/p2k.3	Fri Jan  7 16:02:32 2011
@@ -1,4 +1,4 @@
-.\ $NetBSD: p2k.3,v 1.9 2011/01/07 15:50:40 pooka Exp $
+.\ $NetBSD: p2k.3,v 1.10 2011/01/07 16:02:32 pooka Exp $
 .\
 .\ Copyright (c) 2008 Antti Kantee.  All rights reserved.
 .\
@@ -118,10 +118,8 @@
 If set, use the value of the variable to determine the UID of the
 caller of each operation instead of the actual caller supplied by
 .Xr puffs 3 .
-This can be used for example to simplify modifying an OS installations
+This can be used for example to simplify modifying an OS installation's
 root image as a non-root user.
-If the variable is set but does not contain an integer value, 0
-(root) is used.
 .El
 .Sh SEE ALSO
 .Xr puffs 3 ,

Index: src/lib/libp2k/p2k.c
diff -u src/lib/libp2k/p2k.c:1.53 src/lib/libp2k/p2k.c:1.54
--- src/lib/libp2k/p2k.c:1.53	Fri Jan  7 15:47:14 2011
+++ src/lib/libp2k/p2k.c	Fri Jan  7 16:02:32 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: p2k.c,v 1.53 2011/01/07 15:47:14 pooka Exp $	*/
+/*	$NetBSD: p2k.c,v 1.54 2011/01/07 16:02:32 pooka Exp $	*/
 
 /*
  * Copyright (c) 2007, 2008, 2009  Antti Kantee.  All Rights Reserved.
@@ -344,10 +344,17 @@
 		puffs_flags |= PUFFS_KFLAG_NOCACHE;
 	}
 	if ((envbuf = getenv(P2K_WIZARDUID)) != NULL) {
-		/* default to 0 in error cases */
-		wizarduid = atoi(envbuf);
-		haswizard = 1;
-		printf(P2K WIZARD MODE: using uid %d\n, wizarduid);
+		char *ep;
+
+		wizarduid = strtoul(envbuf, ep, 10);
+		if (envbuf[0] == '\0' || *ep != '\0') {
+			printf(P2K_WIZARDUID: invalid uid %s\n, envbuf);
+		} else if (wizarduid  UID_MAX) {
+			printf(P2K_WIZARDUID: uid %s out-of-range\n, envbuf);
+		} else {
+			haswizard = 1;
+			printf(P2K WIZARD MODE: using uid %d\n, wizarduid);
+		}
 	}
 
 	p2m = allocp2m();



CVS commit: src/share/man/man4

2011-01-07 Thread Nicolas Joly
Module Name:src
Committed By:   njoly
Date:   Fri Jan  7 18:00:12 UTC 2011

Modified Files:
src/share/man/man4: smscmon.4

Log Message:
Small typo.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/share/man/man4/smscmon.4

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

Modified files:

Index: src/share/man/man4/smscmon.4
diff -u src/share/man/man4/smscmon.4:1.2 src/share/man/man4/smscmon.4:1.3
--- src/share/man/man4/smscmon.4:1.2	Mon Feb 22 20:12:23 2010
+++ src/share/man/man4/smscmon.4	Fri Jan  7 18:00:12 2011
@@ -1,4 +1,4 @@
-.\	$NetBSD: smscmon.4,v 1.2 2010/02/22 20:12:23 wiz Exp $
+.\	$NetBSD: smscmon.4,v 1.3 2011/01/07 18:00:12 njoly Exp $
 .\
 .\ Copyright (c) 2009 Takahiro Hayashi
 .\ All rights reserved.
@@ -48,7 +48,7 @@
 .It Li +2.5V Ta uV DC Ta 2.5V Supply
 .It Li Vccp Ta uV DC Ta CPU Vcore
 .It Li +3.3V Ta uV DC Ta 3.3V Supply
-.It Li +5V Ta uV DC Ta %5 Supply
+.It Li +5V Ta uV DC Ta 5V Supply
 .It Li +12V Ta uV DC Ta 12V Supply
 .It Li Vcc Ta uV DC Ta Chip's supply voltage
 .It Li +1.5V Ta uV DC Ta 1.5V Supply



CVS commit: [netbsd-5] src/usr.bin/ldd/elf64

2011-01-07 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Fri Jan  7 18:24:21 UTC 2011

Modified Files:
src/usr.bin/ldd/elf64 [netbsd-5]: Makefile

Log Message:
Pull up following revision(s) (requested by veego in ticket #1499):
usr.bin/ldd/elf64/Makefile: revision 1.4
another bsd.own.mk missing


To generate a diff of this commit:
cvs rdiff -u -r1.4.2.3 -r1.4.2.4 src/usr.bin/ldd/elf64/Makefile

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

Modified files:

Index: src/usr.bin/ldd/elf64/Makefile
diff -u src/usr.bin/ldd/elf64/Makefile:1.4.2.3 src/usr.bin/ldd/elf64/Makefile:1.4.2.4
--- src/usr.bin/ldd/elf64/Makefile:1.4.2.3	Thu Jan  6 05:20:26 2011
+++ src/usr.bin/ldd/elf64/Makefile	Fri Jan  7 18:24:21 2011
@@ -1,4 +1,6 @@
-#	$NetBSD: Makefile,v 1.4.2.3 2011/01/06 05:20:26 riz Exp $
+#	$NetBSD: Makefile,v 1.4.2.4 2011/01/07 18:24:21 riz Exp $
+
+.include bsd.own.mk
 
 CPPFLAGS+=	-DELFSIZE=64
 LIB=	ldd_elf64



CVS commit: src/sys/dev/pci/hdaudio

2011-01-07 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Fri Jan  7 18:24:53 UTC 2011

Modified Files:
src/sys/dev/pci/hdaudio: hdaudio_afg.c

Log Message:
fix compilation when _MODULE is not defined


To generate a diff of this commit:
cvs rdiff -u -r1.28 -r1.29 src/sys/dev/pci/hdaudio/hdaudio_afg.c

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

Modified files:

Index: src/sys/dev/pci/hdaudio/hdaudio_afg.c
diff -u src/sys/dev/pci/hdaudio/hdaudio_afg.c:1.28 src/sys/dev/pci/hdaudio/hdaudio_afg.c:1.29
--- src/sys/dev/pci/hdaudio/hdaudio_afg.c:1.28	Fri Jan  7 15:30:29 2011
+++ src/sys/dev/pci/hdaudio/hdaudio_afg.c	Fri Jan  7 18:24:53 2011
@@ -1,4 +1,4 @@
-/* $NetBSD: hdaudio_afg.c,v 1.28 2011/01/07 15:30:29 jmcneill Exp $ */
+/* $NetBSD: hdaudio_afg.c,v 1.29 2011/01/07 18:24:53 jmcneill Exp $ */
 
 /*
  * Copyright (c) 2009 Precedence Technologies Ltd supp...@precedence.co.uk
@@ -60,7 +60,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: hdaudio_afg.c,v 1.28 2011/01/07 15:30:29 jmcneill Exp $);
+__KERNEL_RCSID(0, $NetBSD: hdaudio_afg.c,v 1.29 2011/01/07 18:24:53 jmcneill Exp $);
 
 #include sys/types.h
 #include sys/param.h
@@ -3841,7 +3841,7 @@
 static int
 hdafg_modcmd(modcmd_t cmd, void *opaque)
 {
-	int error;
+	int error = 0;
 
 	switch (cmd) {
 	case MODULE_CMD_INIT:



CVS commit: [netbsd-5] src/compat

2011-01-07 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Fri Jan  7 18:25:21 UTC 2011

Modified Files:
src/compat [netbsd-5]: compatsubdir.mk

Log Message:
Clean up for ticket #1499 - doubled content, not sure how it happened.


To generate a diff of this commit:
cvs rdiff -u -r1.5.2.2 -r1.5.2.3 src/compat/compatsubdir.mk

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

Modified files:

Index: src/compat/compatsubdir.mk
diff -u src/compat/compatsubdir.mk:1.5.2.2 src/compat/compatsubdir.mk:1.5.2.3
--- src/compat/compatsubdir.mk:1.5.2.2	Thu Jan  6 05:19:55 2011
+++ src/compat/compatsubdir.mk	Fri Jan  7 18:25:21 2011
@@ -1,42 +1,4 @@
-#	$NetBSD: compatsubdir.mk,v 1.5.2.2 2011/01/06 05:19:55 riz Exp $
-
-# Build netbsd libraries.
-
-.include bsd.own.mk
-
-.if ${MKCOMPAT} != no
-.if !make(includes)
-
-# make sure we get an objdir built early enough
-.include bsd.prog.mk
-
-# XXX make this use MAKEOBJDIR
-MAKEDIRTARGETENV=	MAKEOBJDIRPREFIX=${.OBJDIR} MKOBJDIRS=yes MKSHARE=no BSD_MK_COMPAT_FILE=${BSD_MK_COMPAT_FILE}
-
-# XXX fix the library list to include all 'external' libs?
-.if defined(BOOTSTRAP_SUBDIRS)
-SUBDIR=	${BOOTSTRAP_SUBDIRS}
-.else
-SUBDIR= ../../../gnu/lib/crtstuff4 .WAIT \
-	../../../lib/csu .WAIT \
-	../../../gnu/lib/libgcc4 .WAIT \
-	../../../lib/libc .WAIT \
-	../../../lib/libutil .WAIT \
-	../../../lib .WAIT \
-	../../../gnu/lib \
-	../../../libexec/ld.elf_so
-
-.if (${MKLDAP} != no)
-SUBDIR+= ../../../external/bsd/openldap/lib
-.endif
-
-.endif
-
-.include bsd.subdir.mk
-
-.endif
-.endif
-#	$NetBSD: compatsubdir.mk,v 1.5.2.2 2011/01/06 05:19:55 riz Exp $
+#	$NetBSD: compatsubdir.mk,v 1.5.2.3 2011/01/07 18:25:21 riz Exp $
 
 # Build netbsd libraries.
 



CVS commit: [netbsd-5] src/doc

2011-01-07 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Fri Jan  7 19:12:21 UTC 2011

Modified Files:
src/doc [netbsd-5]: CHANGES-5.2

Log Message:
This file is changes between 5.1 and 5.2, so make the note at the top
of the file reflect that.  Noticed by Snader_LB on Freenode IRC.


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.46 -r1.1.2.47 src/doc/CHANGES-5.2

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

Modified files:

Index: src/doc/CHANGES-5.2
diff -u src/doc/CHANGES-5.2:1.1.2.46 src/doc/CHANGES-5.2:1.1.2.47
--- src/doc/CHANGES-5.2:1.1.2.46	Fri Jan  7 06:34:53 2011
+++ src/doc/CHANGES-5.2	Fri Jan  7 19:12:20 2011
@@ -1,6 +1,6 @@
-# $NetBSD: CHANGES-5.2,v 1.1.2.46 2011/01/07 06:34:53 riz Exp $
+# $NetBSD: CHANGES-5.2,v 1.1.2.47 2011/01/07 19:12:20 riz Exp $
 
-A complete list of changes from the NetBSD 5.0 release to the NetBSD 5.1
+A complete list of changes from the NetBSD 5.2 release to the NetBSD 5.2
 release:
 
 gnu/usr.bin/groff/tmac/mdoc.local		patched by hand



CVS commit: [netbsd-5-1] src/doc

2011-01-07 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Fri Jan  7 19:14:26 UTC 2011

Modified Files:
src/doc [netbsd-5-1]: CHANGES-5.1.1

Log Message:
This file contains changes between 5.1 and 5.1.1, so make the note
at the top reflect that.  Noted by Snader_LB on Freenode IRC.


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.4 -r1.1.2.5 src/doc/CHANGES-5.1.1

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

Modified files:

Index: src/doc/CHANGES-5.1.1
diff -u src/doc/CHANGES-5.1.1:1.1.2.4 src/doc/CHANGES-5.1.1:1.1.2.5
--- src/doc/CHANGES-5.1.1:1.1.2.4	Fri Dec 10 21:45:20 2010
+++ src/doc/CHANGES-5.1.1	Fri Jan  7 19:14:26 2011
@@ -1,6 +1,6 @@
-# $NetBSD: CHANGES-5.1.1,v 1.1.2.4 2010/12/10 21:45:20 bouyer Exp $
+# $NetBSD: CHANGES-5.1.1,v 1.1.2.5 2011/01/07 19:14:26 riz Exp $
 
-A complete list of changes from the NetBSD 5.0 release to the NetBSD 5.1
+A complete list of changes from the NetBSD 5.1 release to the NetBSD 5.1.1
 release:
 
 gnu/usr.bin/groff/tmac/mdoc.local		patched by hand



CVS commit: [netbsd-5] src/doc

2011-01-07 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Fri Jan  7 19:17:30 UTC 2011

Modified Files:
src/doc [netbsd-5]: CHANGES-5.2

Log Message:
tyop ifx


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.47 -r1.1.2.48 src/doc/CHANGES-5.2

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

Modified files:

Index: src/doc/CHANGES-5.2
diff -u src/doc/CHANGES-5.2:1.1.2.47 src/doc/CHANGES-5.2:1.1.2.48
--- src/doc/CHANGES-5.2:1.1.2.47	Fri Jan  7 19:12:20 2011
+++ src/doc/CHANGES-5.2	Fri Jan  7 19:17:29 2011
@@ -1,6 +1,6 @@
-# $NetBSD: CHANGES-5.2,v 1.1.2.47 2011/01/07 19:12:20 riz Exp $
+# $NetBSD: CHANGES-5.2,v 1.1.2.48 2011/01/07 19:17:29 riz Exp $
 
-A complete list of changes from the NetBSD 5.2 release to the NetBSD 5.2
+A complete list of changes from the NetBSD 5.1 release to the NetBSD 5.2
 release:
 
 gnu/usr.bin/groff/tmac/mdoc.local		patched by hand



CVS commit: src/lib

2011-01-07 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Fri Jan  7 19:37:52 UTC 2011

Modified Files:
src/lib/librumpclient: rumpclient.c
src/lib/librumpuser: sp_common.c

Log Message:
Make rumpclient impervious to LD_PRELOAD syscall hijacking by using
dlsym(RTLD_NEXT) to lookup a host_syscall() function pointer which
is used instead of syscall() to communicate with the kernel server.

WARNING: popular opinion classifies this as ugly code.  if you
have a weak heart/mind/soul/sole meuniere, read max. 1 line of the
diff per day, preferably with food.


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 src/lib/librumpclient/rumpclient.c
cvs rdiff -u -r1.19 -r1.20 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/librumpclient/rumpclient.c
diff -u src/lib/librumpclient/rumpclient.c:1.12 src/lib/librumpclient/rumpclient.c:1.13
--- src/lib/librumpclient/rumpclient.c:1.12	Thu Jan  6 06:57:14 2011
+++ src/lib/librumpclient/rumpclient.c	Fri Jan  7 19:37:51 2011
@@ -1,4 +1,4 @@
-/*  $NetBSD: rumpclient.c,v 1.12 2011/01/06 06:57:14 pooka Exp $	*/
+/*  $NetBSD: rumpclient.c,v 1.13 2011/01/07 19:37:51 pooka Exp $	*/
 
 /*
  * Copyright (c) 2010, 2011 Antti Kantee.  All Rights Reserved.
@@ -41,8 +41,10 @@
 #include netinet/tcp.h
 
 #include assert.h
+#include dlfcn.h
 #include errno.h
 #include fcntl.h
+#include link.h
 #include poll.h
 #include pthread.h
 #include signal.h
@@ -54,6 +56,18 @@
 
 #include rump/rumpclient.h
 
+#define HOSTOPS
+int	(*host_socket)(int, int, int);
+int	(*host_close)(int);
+int	(*host_connect)(int, const struct sockaddr *, socklen_t);
+int	(*host_poll)(struct pollfd *, nfds_t, int);
+int	(*host_pollts)(struct pollfd *, nfds_t, const struct timespec *,
+		  const sigset_t *);
+ssize_t	(*host_read)(int, void *, size_t);
+ssize_t (*host_sendto)(int, const void *, size_t, int,
+		   const struct sockaddr *, socklen_t);
+int	(*host_setsockopt)(int, int, int, const void *, socklen_t);
+
 #include sp_common.c
 
 static struct spclient clispc = {
@@ -99,7 +113,7 @@
 			case 0:
 releasercvlock(spc);
 pthread_mutex_unlock(spc-spc_mtx);
-pollts(pfd, 1, NULL, mask);
+host_pollts(pfd, 1, NULL, mask);
 pthread_mutex_lock(spc-spc_mtx);
 continue;
 			case -1:
@@ -375,11 +389,11 @@
 	int s, error;
 	ssize_t n;
 
-	s = socket(parsetab[ptab_idx].domain, SOCK_STREAM, 0);
+	s = host_socket(parsetab[ptab_idx].domain, SOCK_STREAM, 0);
 	if (s == -1)
 		return -1;
 
-	if (connect(s, serv_sa, (socklen_t)serv_sa-sa_len) == -1) {
+	if (host_connect(s, serv_sa, (socklen_t)serv_sa-sa_len) == -1) {
 		error = errno;
 		fprintf(stderr, rump_sp: client connect failed\n);
 		errno = error;
@@ -393,7 +407,7 @@
 		return -1;
 	}
 
-	if ((n = read(s, banner, sizeof(banner)-1))  0) {
+	if ((n = host_read(s, banner, sizeof(banner)-1))  0) {
 		error = errno;
 		fprintf(stderr, rump_sp: failed to read banner\n);
 		errno = error;
@@ -417,12 +431,38 @@
 	return 0;
 }
 
+void *(*rumpclient_dlsym)(void *, const char *);
+
 int
 rumpclient_init()
 {
 	char *p;
 	int error;
 
+	/* dlsym overrided by rumphijack? */
+	if (!rumpclient_dlsym)
+		rumpclient_dlsym = dlsym;
+
+	/*
+	 * sag mir, wo die symbol sind.  zogen fort, der krieg beginnt.
+	 * wann wird man je verstehen?  wann wird man je verstehen?
+	 */
+#define FINDSYM2(_name_,_syscall_)	\
+	if ((host_##_name_ = rumpclient_dlsym(RTLD_NEXT,		\
+	#_syscall_)) == NULL)	\
+		/* host_##_name_ = _syscall_ */;
+#define FINDSYM(_name_) FINDSYM2(_name_,_name_)
+	FINDSYM2(socket,__socket30);
+	FINDSYM(close);
+	FINDSYM(connect);
+	FINDSYM(poll);
+	FINDSYM(pollts);
+	FINDSYM(read);
+	FINDSYM(sendto);
+	FINDSYM(setsockopt);
+#undef	FINDSYM
+#undef	FINDSY2
+
 	if ((p = getenv(RUMP_SERVER)) == NULL) {
 		errno = ENOENT;
 		return -1;
@@ -440,7 +480,7 @@
 	if (error) {
 		pthread_mutex_destroy(clispc.spc_mtx);
 		pthread_cond_destroy(clispc.spc_cv);
-		close(clispc.spc_fd);
+		host_close(clispc.spc_fd);
 		errno = error;
 		return -1;
 	}
@@ -481,7 +521,7 @@
 {
 	int error;
 
-	close(clispc.spc_fd);
+	host_close(clispc.spc_fd);
 	memset(clispc, 0, sizeof(clispc));
 	clispc.spc_fd = -1;
 

Index: src/lib/librumpuser/sp_common.c
diff -u src/lib/librumpuser/sp_common.c:1.19 src/lib/librumpuser/sp_common.c:1.20
--- src/lib/librumpuser/sp_common.c:1.19	Thu Jan  6 06:57:14 2011
+++ src/lib/librumpuser/sp_common.c	Fri Jan  7 19:37:52 2011
@@ -1,4 +1,4 @@
-/*  $NetBSD: sp_common.c,v 1.19 2011/01/06 06:57:14 pooka Exp $	*/
+/*  $NetBSD: sp_common.c,v 1.20 2011/01/07 19:37:52 pooka Exp $	*/
 
 /*
  * Copyright (c) 2010, 2011 Antti Kantee.  All Rights Reserved.
@@ -71,6 +71,13 @@
 #define DPRINTF(x)
 #endif
 
+#ifndef HOSTOPS
+#define host_poll poll
+#define host_read read
+#define host_sendto sendto
+#define host_setsockopt setsockopt
+#endif
+
 /*
  * Bah, I hate writing on-off-wire 

CVS commit: src/sys/dev/raidframe

2011-01-07 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Jan  7 19:52:18 UTC 2011

Modified Files:
src/sys/dev/raidframe: rf_netbsdkintf.c

Log Message:
PR/44340: Brian Buhrow: Raid sets containing wedges cannot be unconfigured
and reconfigured without a reboot.


To generate a diff of this commit:
cvs rdiff -u -r1.279 -r1.280 src/sys/dev/raidframe/rf_netbsdkintf.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/raidframe/rf_netbsdkintf.c
diff -u src/sys/dev/raidframe/rf_netbsdkintf.c:1.279 src/sys/dev/raidframe/rf_netbsdkintf.c:1.280
--- src/sys/dev/raidframe/rf_netbsdkintf.c:1.279	Wed Dec 22 00:51:19 2010
+++ src/sys/dev/raidframe/rf_netbsdkintf.c	Fri Jan  7 14:52:18 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: rf_netbsdkintf.c,v 1.279 2010/12/22 05:51:19 christos Exp $	*/
+/*	$NetBSD: rf_netbsdkintf.c,v 1.280 2011/01/07 19:52:18 christos Exp $	*/
 /*-
  * Copyright (c) 1996, 1997, 1998, 2008 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -139,7 +139,7 @@
  ***/
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: rf_netbsdkintf.c,v 1.279 2010/12/22 05:51:19 christos Exp $);
+__KERNEL_RCSID(0, $NetBSD: rf_netbsdkintf.c,v 1.280 2011/01/07 19:52:18 christos Exp $);
 
 #ifdef _KERNEL_OPT
 #include opt_compat_netbsd.h
@@ -993,6 +993,7 @@
 		rs-sc_flags = ~(RAIDF_INITED|RAIDF_SHUTDOWN);
 
 	/* Detach the disk. */
+	dkwedge_delall(rs-sc_dkdev);
 	disk_detach(rs-sc_dkdev);
 	disk_destroy(rs-sc_dkdev);
 



CVS commit: src/lib/librumphijack

2011-01-07 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Fri Jan  7 19:52:43 UTC 2011

Added Files:
src/lib/librumphijack: Makefile hijack.c shlib_version

Log Message:
Begin work on a syscall hijacking library which can be LD_PRELOADed
to convince non-rumped applications to communicate with a rump
kernel instead of the host kernel.  The precision of what goes
where is not exactly surgical, but for example when wanting to
debug a web server's TCP/IP stack interaction, it might be enough.
When all you have is a hand grenade, all problems look like a 
hmm?

There's still plenty to figure out.  For example, I'm not sure what
the user interface will be like.  Now it just attempts to hijack
network communication.  It also needs to sync with symbol renaming
in libc, and maybe autogenerate the non-schizophrenic wrappers
where the communication is heading to exactly one destination, lest
I'll be a mummmy by the time I finish writing them all.  As a fun
example of a non-non-schizophrenic one, consider poll().

Work in progress, but I managed to get two non-rumped netcats
talking to each other or fetching the index from a non-rumped
thttpd.  telnet works in one direction (i can read the data from
netcat, but anything i send back is not printed).  bozohttpd uses
dup2() which i haven't bothered to address yet, etcetc.

(not hooking this up the build for now)


To generate a diff of this commit:
cvs rdiff -u -r0 -r1.1 src/lib/librumphijack/Makefile \
src/lib/librumphijack/hijack.c src/lib/librumphijack/shlib_version

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

Added files:

Index: src/lib/librumphijack/Makefile
diff -u /dev/null src/lib/librumphijack/Makefile:1.1
--- /dev/null	Fri Jan  7 19:52:43 2011
+++ src/lib/librumphijack/Makefile	Fri Jan  7 19:52:43 2011
@@ -0,0 +1,16 @@
+#	$NetBSD: Makefile,v 1.1 2011/01/07 19:52:43 pooka Exp $
+#
+
+LIB=		rumphijack
+NOSTATICLIB=	dlfun
+NOPROFILE=	dlfun
+LIBDPLIBS+=	pthread /usr/lib
+
+SRCS=		hijack.c
+
+CPPFLAGS+=	-D_DIAGNOSTIC
+
+DBG=-g
+NOGCCERROR=1
+
+.include bsd.lib.mk
Index: src/lib/librumphijack/hijack.c
diff -u /dev/null src/lib/librumphijack/hijack.c:1.1
--- /dev/null	Fri Jan  7 19:52:43 2011
+++ src/lib/librumphijack/hijack.c	Fri Jan  7 19:52:43 2011
@@ -0,0 +1,758 @@
+/*  $NetBSD: hijack.c,v 1.1 2011/01/07 19:52:43 pooka Exp $	*/
+
+/*-
+ * Copyright (c) 2011 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
+__RCSID($NetBSD: hijack.c,v 1.1 2011/01/07 19:52:43 pooka Exp $);
+
+#include sys/param.h
+#include sys/types.h
+#include sys/ioctl.h
+#include sys/socket.h
+#include sys/poll.h
+
+#include rump/rump.h
+#include rump/rumpclient.h
+#include rump/rump_syscalls.h
+
+#include assert.h
+#include dlfcn.h
+#include err.h
+#include errno.h
+#include fcntl.h
+#include poll.h
+#include pthread.h
+#include stdarg.h
+#include stdio.h
+#include stdlib.h
+#include unistd.h
+
+/* XXX: need runtime selection.  low for now due to FD_SETSIZE */
+#define HIJACK_FDOFF 128
+
+enum {	RUMPCALL_SOCKET, RUMPCALL_ACCEPT, RUMPCALL_BIND, RUMPCALL_CONNECT,
+	RUMPCALL_GETPEERNAME, RUMPCALL_GETSOCKNAME, RUMPCALL_LISTEN,
+	RUMPCALL_RECVFROM, RUMPCALL_RECVMSG,
+	RUMPCALL_SENDTO, RUMPCALL_SENDMSG,
+	RUMPCALL_GETSOCKOPT, RUMPCALL_SETSOCKOPT,
+	RUMPCALL_SHUTDOWN,
+	RUMPCALL_READ, RUMPCALL_READV,
+	RUMPCALL_WRITE, RUMPCALL_WRITEV,
+	RUMPCALL_IOCTL, RUMPCALL_FCNTL,
+	RUMPCALL_CLOSE,
+	RUMPCALL_SELECT, RUMPCALL_POLL, RUMPCALL_POLLTS,
+	RUMPCALL__NUM
+};
+
+const char *sysnames[] = {
+	__socket30,
+	accept,
+	bind,
+	connect,
+	getpeername,
+	getsockname,
+	listen,
+	recvfrom,
+	recvmsg,
+	sendto,
+	sendmsg,
+	getsockopt,
+	

CVS commit: src/tests/fs/common

2011-01-07 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Fri Jan  7 19:54:48 UTC 2011

Modified Files:
src/tests/fs/common: h_fsmacros.h

Log Message:
Apparently the atf in the qemu runs doesn't like p2k_ffs and hangs
completely.  Remove it for until I have a chance to debug what's
going on.


To generate a diff of this commit:
cvs rdiff -u -r1.31 -r1.32 src/tests/fs/common/h_fsmacros.h

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/common/h_fsmacros.h
diff -u src/tests/fs/common/h_fsmacros.h:1.31 src/tests/fs/common/h_fsmacros.h:1.32
--- src/tests/fs/common/h_fsmacros.h:1.31	Fri Jan  7 12:16:17 2011
+++ src/tests/fs/common/h_fsmacros.h	Fri Jan  7 19:54:48 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: h_fsmacros.h,v 1.31 2011/01/07 12:16:17 pooka Exp $	*/
+/*	$NetBSD: h_fsmacros.h,v 1.32 2011/01/07 19:54:48 pooka Exp $	*/
 
 /*-
  * Copyright (c) 2010 The NetBSD Foundation, Inc.
@@ -176,7 +176,6 @@
   ATF_TC_FSADD(lfs,MOUNT_LFS,func,desc)	\
   ATF_TC_FSADD(msdosfs,MOUNT_MSDOS,func,desc)\
   ATF_TC_FSADD(nfs,MOUNT_NFS,func,desc)	\
-  ATF_TC_FSADD(p2k_ffs,MOUNT_PUFFS,func,desc)\
   ATF_TC_FSADD(puffs,MOUNT_PUFFS,func,desc)\
   ATF_TC_FSADD(rumpfs,MOUNT_RUMPFS,func,desc)\
   ATF_TC_FSADD(sysvbfs,MOUNT_SYSVBFS,func,desc)\
@@ -189,7 +188,6 @@
   ATF_TP_FSADD(lfs,func);		\
   ATF_TP_FSADD(msdosfs,func);		\
   ATF_TP_FSADD(nfs,func);		\
-  ATF_TP_FSADD(p2k_ffs,func);		\
   ATF_TP_FSADD(puffs,func);		\
   ATF_TP_FSADD(rumpfs,func);		\
   ATF_TP_FSADD(sysvbfs,func);		\



CVS commit: src/bin/sh

2011-01-07 Thread Julio Merino
Module Name:src
Committed By:   jmmv
Date:   Fri Jan  7 22:21:56 UTC 2011

Modified Files:
src/bin/sh: histedit.c

Log Message:
Call el_source before initializing sh-specific editline properties (i.e.
the editor type and the tab completion binding).

This allows tab completion to work when a user has an ~/.editrc file.

Addresses PR bin/43404.


To generate a diff of this commit:
cvs rdiff -u -r1.41 -r1.42 src/bin/sh/histedit.c

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

Modified files:

Index: src/bin/sh/histedit.c
diff -u src/bin/sh/histedit.c:1.41 src/bin/sh/histedit.c:1.42
--- src/bin/sh/histedit.c:1.41	Wed Feb 13 12:57:16 2008
+++ src/bin/sh/histedit.c	Fri Jan  7 22:21:56 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: histedit.c,v 1.41 2008/02/13 12:57:16 joerg Exp $	*/
+/*	$NetBSD: histedit.c,v 1.42 2011/01/07 22:21:56 jmmv Exp $	*/
 
 /*-
  * Copyright (c) 1993
@@ -37,7 +37,7 @@
 #if 0
 static char sccsid[] = @(#)histedit.c	8.2 (Berkeley) 5/4/95;
 #else
-__RCSID($NetBSD: histedit.c,v 1.41 2008/02/13 12:57:16 joerg Exp $);
+__RCSID($NetBSD: histedit.c,v 1.42 2011/01/07 22:21:56 jmmv Exp $);
 #endif
 #endif /* not lint */
 
@@ -149,13 +149,13 @@
 			INTON;
 		}
 		if (el) {
+			el_source(el, NULL);
 			if (Vflag)
 el_set(el, EL_EDITOR, vi);
 			else if (Eflag)
 el_set(el, EL_EDITOR, emacs);
 			el_set(el, EL_BIND, ^I, 
 			tabcomplete ? rl-complete : ed-insert, NULL);
-			el_source(el, NULL);
 		}
 	} else {
 		INTOFF;



CVS commit: [netbsd-5] src/doc

2011-01-07 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Fri Jan  7 23:22:20 UTC 2011

Modified Files:
src/doc [netbsd-5]: 3RDPARTY

Log Message:
Apply patch (requested by tron in ticket #1521):

Update Postfix version info.


To generate a diff of this commit:
cvs rdiff -u -r1.647.2.13 -r1.647.2.14 src/doc/3RDPARTY

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

Modified files:

Index: src/doc/3RDPARTY
diff -u src/doc/3RDPARTY:1.647.2.13 src/doc/3RDPARTY:1.647.2.14
--- src/doc/3RDPARTY:1.647.2.13	Sun Nov 21 18:31:22 2010
+++ src/doc/3RDPARTY	Fri Jan  7 23:22:20 2011
@@ -1,4 +1,4 @@
-#  $NetBSD: 3RDPARTY,v 1.647.2.13 2010/11/21 18:31:22 riz Exp $
+#  $NetBSD: 3RDPARTY,v 1.647.2.14 2011/01/07 23:22:20 riz Exp $
 #
 # This file contains a list of the software that has been integrated into
 # NetBSD where we are not the primary maintainer.
@@ -753,8 +753,8 @@
 and more.
 
 Package:	postfix
-Version:	2.7.1
-Current Vers:	2.7.1
+Version:	2.7.2
+Current Vers:	2.7.2
 Maintainer:	Wietse Venema wie...@porcupine.org
 Archive Site:	ftp://postfix.cloud9.net/official/
 Home Page:	http://www.postfix.org/



CVS commit: [netbsd-5] src/sys/dev/raidframe

2011-01-07 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Fri Jan  7 23:25:59 UTC 2011

Modified Files:
src/sys/dev/raidframe [netbsd-5]: rf_disks.c rf_netbsdkintf.c

Log Message:
Pull up following revision(s) (requested by mrg in ticket #1522):
sys/dev/raidframe/rf_disks.c: revision 1.76
sys/dev/raidframe/rf_netbsdkintf.c: revision 1.276
apply my patch to support non-512K sector disks (at least, upto 16KB
sector disks..)  from my tech-kern post:
the following patch let's me access both 512 byte and 4K
sector disks at the same time, as long as they are in
separate raids.  the existing rf code assumes/enforces
this part, i just made it support other sets concurrently.
the main change is moving the parity bitmap to the sector
after the component label sector(s), instead of being
immediately after the label, which meant it was on the same
sector as the label for 1024 byte devices.
i'm a little annoyed at having to add a 2nd call to
getdisksize() to enable auto-configure to work, but i
don't see another way that wasn't much uglier.


To generate a diff of this commit:
cvs rdiff -u -r1.70.10.3 -r1.70.10.4 src/sys/dev/raidframe/rf_disks.c
cvs rdiff -u -r1.250.4.8 -r1.250.4.9 src/sys/dev/raidframe/rf_netbsdkintf.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/raidframe/rf_disks.c
diff -u src/sys/dev/raidframe/rf_disks.c:1.70.10.3 src/sys/dev/raidframe/rf_disks.c:1.70.10.4
--- src/sys/dev/raidframe/rf_disks.c:1.70.10.3	Sun Nov 21 22:06:53 2010
+++ src/sys/dev/raidframe/rf_disks.c	Fri Jan  7 23:25:59 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: rf_disks.c,v 1.70.10.3 2010/11/21 22:06:53 riz Exp $	*/
+/*	$NetBSD: rf_disks.c,v 1.70.10.4 2011/01/07 23:25:59 riz Exp $	*/
 /*-
  * Copyright (c) 1999 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -60,7 +60,7 @@
  ***/
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: rf_disks.c,v 1.70.10.3 2010/11/21 22:06:53 riz Exp $);
+__KERNEL_RCSID(0, $NetBSD: rf_disks.c,v 1.70.10.4 2011/01/07 23:25:59 riz Exp $);
 
 #include dev/raidframe/raidframevar.h
 
@@ -597,16 +597,26 @@
 		if (error == ENXIO) {
 			/* the component isn't there... must be dead :-( */
 			diskPtr-status = rf_ds_failed;
+			return 0;
 		} else {
 			return (error);
 		}
 	}
-	if (diskPtr-status == rf_ds_optimal) {
 
+	if ((error = rf_getdisksize(vp, curlwp, diskPtr)) != 0)
+		return (error);
+
+	/*
+	 * If this raidPtr's bytesPerSector is zero, fill it in with this
+	 * components blockSize.  This will give us something to work with
+	 * initially, and if it is wrong, we'll get errors later.
+	 */
+	if (raidPtr-bytesPerSector == 0)
+		raidPtr-bytesPerSector = diskPtr-blockSize;
+
+	if (diskPtr-status == rf_ds_optimal) {
 		if ((error = VOP_GETATTR(vp, va, curlwp-l_cred)) != 0) 
 			return (error);
-		if ((error = rf_getdisksize(vp, curlwp, diskPtr)) != 0)
-			return (error);
 
 		raidPtr-raid_cinfo[col].ci_vp = vp;
 		raidPtr-raid_cinfo[col].ci_dev = va.va_rdev;

Index: src/sys/dev/raidframe/rf_netbsdkintf.c
diff -u src/sys/dev/raidframe/rf_netbsdkintf.c:1.250.4.8 src/sys/dev/raidframe/rf_netbsdkintf.c:1.250.4.9
--- src/sys/dev/raidframe/rf_netbsdkintf.c:1.250.4.8	Sun Nov 21 22:06:53 2010
+++ src/sys/dev/raidframe/rf_netbsdkintf.c	Fri Jan  7 23:25:59 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: rf_netbsdkintf.c,v 1.250.4.8 2010/11/21 22:06:53 riz Exp $	*/
+/*	$NetBSD: rf_netbsdkintf.c,v 1.250.4.9 2011/01/07 23:25:59 riz Exp $	*/
 /*-
  * Copyright (c) 1996, 1997, 1998, 2008 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -139,7 +139,7 @@
  ***/
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: rf_netbsdkintf.c,v 1.250.4.8 2010/11/21 22:06:53 riz Exp $);
+__KERNEL_RCSID(0, $NetBSD: rf_netbsdkintf.c,v 1.250.4.9 2011/01/07 23:25:59 riz Exp $);
 
 #include sys/param.h
 #include sys/errno.h
@@ -219,10 +219,10 @@
 static int raidwrite_component_area(dev_t, struct vnode *, void *, size_t,
 daddr_t, daddr_t, int);
 
-static int raidwrite_component_label(dev_t, struct vnode *,
-RF_ComponentLabel_t *);
-static int raidread_component_label(dev_t, struct vnode *,
-RF_ComponentLabel_t *);
+static int raidwrite_component_label(unsigned,
+dev_t, struct vnode *, RF_ComponentLabel_t *);
+static int raidread_component_label(unsigned,
+dev_t, struct vnode *, RF_ComponentLabel_t *);
 
 
 dev_type_open(raidopen);
@@ -1001,8 +1001,8 @@
 	rs = raid_softc[unit];
 	raidPtr = raidPtrs[unit];
 
-	db1_printf((raidioctl: %d %d %d %d\n, (int) dev,
-		(int) DISKPART(dev), (int) unit, (int) cmd));
+	db1_printf((raidioctl: %d %d %d %lu\n, (int) dev,
+		(int) DISKPART(dev), (int) unit, cmd));
 
 	/* Must be open for writes for these commands... */
 	switch (cmd) {
@@ -2400,10 +2400,57 @@
 
 #define RF_COMPONENT_INFO_OFFSET  16384 /* bytes */
 #define RF_COMPONENT_INFO_SIZE 1024 /* 

CVS commit: [netbsd-5] src/sys/dev/raidframe

2011-01-07 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Fri Jan  7 23:27:52 UTC 2011

Modified Files:
src/sys/dev/raidframe [netbsd-5]: rf_netbsdkintf.c

Log Message:
Pull up following revision(s) (requested by mrg in ticket #1511):
sys/dev/raidframe/rf_netbsdkintf.c: revision 1.278
add a hack to fix up old labels that do not have zero's in numBlocksHi:
if the total sectors reported (via disklabel or otherwise) is smaller
than 2^32, but numBlocksHi is set, zero it out instead.
tested by myself and christos, should fix reports of weirdness seen.


To generate a diff of this commit:
cvs rdiff -u -r1.250.4.9 -r1.250.4.10 src/sys/dev/raidframe/rf_netbsdkintf.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/raidframe/rf_netbsdkintf.c
diff -u src/sys/dev/raidframe/rf_netbsdkintf.c:1.250.4.9 src/sys/dev/raidframe/rf_netbsdkintf.c:1.250.4.10
--- src/sys/dev/raidframe/rf_netbsdkintf.c:1.250.4.9	Fri Jan  7 23:25:59 2011
+++ src/sys/dev/raidframe/rf_netbsdkintf.c	Fri Jan  7 23:27:51 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: rf_netbsdkintf.c,v 1.250.4.9 2011/01/07 23:25:59 riz Exp $	*/
+/*	$NetBSD: rf_netbsdkintf.c,v 1.250.4.10 2011/01/07 23:27:51 riz Exp $	*/
 /*-
  * Copyright (c) 1996, 1997, 1998, 2008 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -139,7 +139,7 @@
  ***/
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: rf_netbsdkintf.c,v 1.250.4.9 2011/01/07 23:25:59 riz Exp $);
+__KERNEL_RCSID(0, $NetBSD: rf_netbsdkintf.c,v 1.250.4.10 2011/01/07 23:27:51 riz Exp $);
 
 #include sys/param.h
 #include sys/errno.h
@@ -329,6 +329,7 @@
 void rf_cleanup_config_set(RF_ConfigSet_t *);
 int rf_have_enough_components(RF_ConfigSet_t *);
 int rf_auto_config_set(RF_ConfigSet_t *, int *);
+static void rf_fix_old_label_size(RF_ComponentLabel_t *, uint64_t);
 
 static int raidautoconfig = 0; /* Debugging, mostly.  Set to 0 to not
   allow autoconfig to take place.
@@ -2947,6 +2948,7 @@
 		/* Got the label.  Does it look reasonable? */
 		if (rf_reasonable_label(clabel)  
 		(clabel-partitionSize = size)) {
+			rf_fix_old_label_size(clabel, numsecs);
 #ifdef DEBUG
 			printf(Component on: %s: %llu\n,
 cname, (unsigned long long)size);
@@ -3153,6 +3155,24 @@
 }
 
 
+/*
+ * For reasons yet unknown, some old component labels have garbage in
+ * the newer numBlocksHi region, and this causes lossage.  Since those
+ * disks will also have numsecs set to less than 32 bits of sectors,
+ * we can determine when this corruption has occured, and fix it.
+ */
+static void
+rf_fix_old_label_size(RF_ComponentLabel_t *clabel, uint64_t numsecs)
+{
+
+	if (clabel-numBlocksHi  numsecs  ((uint64_t)1  32)) {
+		printf(WARNING: total sectors  32 bits, yet numBlocksHi set\n
+		   WARNING: resetting numBlocksHi to zero.\n);
+		clabel-numBlocksHi = 0;
+	}
+}
+
+
 #ifdef DEBUG
 void
 rf_print_component_label(RF_ComponentLabel_t *clabel)



CVS commit: [netbsd-5] src/doc

2011-01-07 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Fri Jan  7 23:29:06 UTC 2011

Modified Files:
src/doc [netbsd-5]: CHANGES-5.2

Log Message:
Tickets 1511, 1521, 1522.


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.48 -r1.1.2.49 src/doc/CHANGES-5.2

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

Modified files:

Index: src/doc/CHANGES-5.2
diff -u src/doc/CHANGES-5.2:1.1.2.48 src/doc/CHANGES-5.2:1.1.2.49
--- src/doc/CHANGES-5.2:1.1.2.48	Fri Jan  7 19:17:29 2011
+++ src/doc/CHANGES-5.2	Fri Jan  7 23:29:05 2011
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-5.2,v 1.1.2.48 2011/01/07 19:17:29 riz Exp $
+# $NetBSD: CHANGES-5.2,v 1.1.2.49 2011/01/07 23:29:05 riz Exp $
 
 A complete list of changes from the NetBSD 5.1 release to the NetBSD 5.2
 release:
@@ -4268,3 +4268,19 @@
 	disk device.
 	[mrg, ticket #1520]
 
+doc/3RDPARTY	patch
+
+	Update Postfix version.
+	[tron, ticket #1521]
+
+sys/dev/raidframe/rf_disks.c			1.76
+sys/dev/raidframe/rf_netbsdkintf.c		1.276
+
+	support non-512K sector disks (up to 16KB) in raidframe.
+	[mrg, ticket #1522]
+
+sys/dev/raidframe/rf_netbsdkintf.c		1.278
+
+	Hack to fix up disks with old raidframe component labels.
+	[mrg, ticket #1511]
+



CVS commit: [netbsd-5] src/lib/libpam

2011-01-07 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Fri Jan  7 23:50:30 UTC 2011

Modified Files:
src/lib/libpam [netbsd-5]: Makefile
src/lib/libpam/modules [netbsd-5]: mod.mk
Added Files:
src/lib/libpam/staticmodules [netbsd-5]: Makefile

Log Message:
Pull up following revision(s) (requested by christos in ticket #1414):
lib/libpam/Makefile: revision 1.3
share/mk/bsd.own.mk: revision 1.612
lib/libpam/modules/mod.mk: revision 1.8
lib/libpam/modules/mod.mk: revision 1.9
lib/libpam/staticmodules/Makefile: revision 1.1
make the dependency to libpam, explicit. Fixes afpd in pkgsrc. From Mark Davies
XXX: Should be pulled up to 4.x and 5.x.
Build the modules in two phases:
1. build the static modules first, before libpam so that the static
   libpam can link against the module .a files.
2. build the modules after the dynamic libpam is build, so that the
   dynamic modules can link against the dynamic libpam.
enable MAKEDIRTARGET to be called with a separate environment,
called $MAKEDIRTARGETENV, defaulting to nothing.
make the dependency to libpam, explicit. Fixes afpd in pkgsrc. From Mark Davies
XXX: Should be pulled up to 4.x and 5.x.
Build the modules in two phases:
1. build the static modules first, before libpam so that the static
libpam can link against the module .a files.
2. build the modules after the dynamic libpam is build, so that the
dynamic modules can link against the dynamic libpam.


To generate a diff of this commit:
cvs rdiff -u -r1.2.32.2 -r1.2.32.3 src/lib/libpam/Makefile
cvs rdiff -u -r1.6.2.3 -r1.6.2.4 src/lib/libpam/modules/mod.mk
cvs rdiff -u -r0 -r1.1.2.4 src/lib/libpam/staticmodules/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/libpam/Makefile
diff -u src/lib/libpam/Makefile:1.2.32.2 src/lib/libpam/Makefile:1.2.32.3
--- src/lib/libpam/Makefile:1.2.32.2	Thu Nov 25 00:27:20 2010
+++ src/lib/libpam/Makefile	Fri Jan  7 23:50:30 2011
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.2.32.2 2010/11/25 00:27:20 riz Exp $
+# $NetBSD: Makefile,v 1.2.32.3 2011/01/07 23:50:30 riz Exp $
 # Copyright 1998 Juniper Networks, Inc.
 # All rights reserved.
 #
@@ -27,6 +27,6 @@
 
 # The modules must be built first, because they are built into the
 # static version of libpam.
-SUBDIR=	modules .WAIT libpam
+SUBDIR=	staticmodules .WAIT libpam .WAIT modules
 
 .include bsd.subdir.mk

Index: src/lib/libpam/modules/mod.mk
diff -u src/lib/libpam/modules/mod.mk:1.6.2.3 src/lib/libpam/modules/mod.mk:1.6.2.4
--- src/lib/libpam/modules/mod.mk:1.6.2.3	Thu Jan  6 05:20:24 2011
+++ src/lib/libpam/modules/mod.mk	Fri Jan  7 23:50:30 2011
@@ -1,4 +1,4 @@
-#	$NetBSD: mod.mk,v 1.6.2.3 2011/01/06 05:20:24 riz Exp $
+#	$NetBSD: mod.mk,v 1.6.2.4 2011/01/07 23:50:30 riz Exp $
 
 NOLINT=		# don't build a lint library
 NOPROFILE=	# don't build a profile library
@@ -16,6 +16,7 @@
 WARNS=3
 
 .if ${MKPIC} != no
+LIBDPLIBS+=   pam ${.CURDIR}/../../libpam
 .PRECIOUS: ${DESTDIR}${LIBDIR}/${LIB}.so.${SHLIB_MAJOR}
 libinstall:: ${DESTDIR}${LIBDIR}/${LIB}.so.${SHLIB_MAJOR}
 .else

Added files:

Index: src/lib/libpam/staticmodules/Makefile
diff -u /dev/null src/lib/libpam/staticmodules/Makefile:1.1.2.4
--- /dev/null	Fri Jan  7 23:50:30 2011
+++ src/lib/libpam/staticmodules/Makefile	Fri Jan  7 23:50:30 2011
@@ -0,0 +1,8 @@
+#	$NetBSD: Makefile,v 1.1.2.4 2011/01/07 23:50:30 riz Exp $
+
+MAKEDIRTARGETENV=MKPIC=no
+.include bsd.own.mk
+
+SUBDIR=${.CURDIR}/../modules
+
+.include bsd.subdir.mk



CVS commit: [netbsd-5] src/gnu/lib/libstdc++-v3_4

2011-01-07 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Fri Jan  7 23:52:42 UTC 2011

Modified Files:
src/gnu/lib/libstdc++-v3_4 [netbsd-5]: Makefile

Log Message:
Pull up following revision(s) (requested by joerg in ticket #1432):
gnu/lib/libstdc++-v3_4/Makefile: revision 1.5
Explicitly link libstdc++ against libm as found by Arnaud Lacombe.
Explicitly link libstdc++ against libm as found by Arnaud Lacombe.
Explicitly link libstdc++ against libm as found by Arnaud Lacombe.


To generate a diff of this commit:
cvs rdiff -u -r1.3.24.2 -r1.3.24.3 src/gnu/lib/libstdc++-v3_4/Makefile

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

Modified files:

Index: src/gnu/lib/libstdc++-v3_4/Makefile
diff -u src/gnu/lib/libstdc++-v3_4/Makefile:1.3.24.2 src/gnu/lib/libstdc++-v3_4/Makefile:1.3.24.3
--- src/gnu/lib/libstdc++-v3_4/Makefile:1.3.24.2	Sat Nov 27 21:12:23 2010
+++ src/gnu/lib/libstdc++-v3_4/Makefile	Fri Jan  7 23:52:42 2011
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.3.24.2 2010/11/27 21:12:23 riz Exp $
+#	$NetBSD: Makefile,v 1.3.24.3 2011/01/07 23:52:42 riz Exp $
 
 REQUIRETOOLS=	yes
 NOLINT=		# defined
@@ -6,6 +6,9 @@
 .include bsd.own.mk
 
 LIB=		stdc++
+LDADD=		-lgcc_s
+
+LIBDPLIBS+=	m ${.CURDIR}/../../../lib/libm
 
 .if exists(${.CURDIR}/arch/${MACHINE_ARCH}/defs.mk)  ${MKGCC} != no
 .include ${.CURDIR}/arch/${MACHINE_ARCH}/defs.mk



CVS commit: [netbsd-5] src/doc

2011-01-07 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Fri Jan  7 23:54:41 UTC 2011

Modified Files:
src/doc [netbsd-5]: CHANGES-5.2

Log Message:
Tickets 1414, 1432.


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.49 -r1.1.2.50 src/doc/CHANGES-5.2

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

Modified files:

Index: src/doc/CHANGES-5.2
diff -u src/doc/CHANGES-5.2:1.1.2.49 src/doc/CHANGES-5.2:1.1.2.50
--- src/doc/CHANGES-5.2:1.1.2.49	Fri Jan  7 23:29:05 2011
+++ src/doc/CHANGES-5.2	Fri Jan  7 23:54:41 2011
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-5.2,v 1.1.2.49 2011/01/07 23:29:05 riz Exp $
+# $NetBSD: CHANGES-5.2,v 1.1.2.50 2011/01/07 23:54:41 riz Exp $
 
 A complete list of changes from the NetBSD 5.1 release to the NetBSD 5.2
 release:
@@ -4284,3 +4284,15 @@
 	Hack to fix up disks with old raidframe component labels.
 	[mrg, ticket #1511]
 
+lib/libpam/Makefile1.3
+lib/libpam/modules/mod.mk			1.9 via patch
+lib/libpam/staticmodules/Makefile		1.1
+
+	Make the dependency on libpam explicit.  Fixes afpd in pkgsrc.
+	[christos, ticket #1414]
+
+gnu/lib/libstdc++-v3_4/Makefile			1.5
+
+	Explicitly link libstdc++ against libm.
+	[joerg, ticket #1432]
+



CVS commit: [netbsd-5] src/external/mit/xorg/tools/bdftopcf

2011-01-07 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Fri Jan  7 23:57:05 UTC 2011

Modified Files:
src/external/mit/xorg/tools/bdftopcf [netbsd-5]: Makefile

Log Message:
Pull up following revision(s) (requested by tsutsui in ticket #1512):
external/mit/xorg/tools/bdftopcf/Makefile: revision 1.5
Disable bzip2 support in tools bdftopcf(1).
We don't use bzip2 fonts on build and some OS doesn't have bzip2 headers.
Ok'ed by mrg@, martin@, fixes PR/44138.
Should be pulled up to netbsd-5 (and netbsd-5-1).


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.1.8.1 -r1.1.1.1.8.2 \
src/external/mit/xorg/tools/bdftopcf/Makefile

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

Modified files:

Index: src/external/mit/xorg/tools/bdftopcf/Makefile
diff -u src/external/mit/xorg/tools/bdftopcf/Makefile:1.1.1.1.8.1 src/external/mit/xorg/tools/bdftopcf/Makefile:1.1.1.1.8.2
--- src/external/mit/xorg/tools/bdftopcf/Makefile:1.1.1.1.8.1	Thu Sep 17 04:24:42 2009
+++ src/external/mit/xorg/tools/bdftopcf/Makefile	Fri Jan  7 23:57:04 2011
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.1.1.1.8.1 2009/09/17 04:24:42 snj Exp $
+#	$NetBSD: Makefile,v 1.1.1.1.8.2 2011/01/07 23:57:04 riz Exp $
 
 NOMAN=		1
 
@@ -16,7 +16,7 @@
 		-I${DESTDIR}${X11INCDIR}/X11/fonts \
 		-I${DESTDIR}${X11INCDIR}/freetype2 \
 		-I${X11SRCDIR.Xfont}/src/stubs \
-		-DBDFFORMAT -DPCFFORMAT -DSNFFORMAT -DX_GZIP_FONT_COMPRESSION -DX_BZIP2_FONT_COMPRESSION \
+		-DBDFFORMAT -DPCFFORMAT -DSNFFORMAT -DX_GZIP_FONT_COMPRESSION \
 		-DFONT_ENCODINGS_DIRECTORY=\${X11FONTDIR}/encodings/encodings.dir\
 
 .PATH:		${X11SRCDIR.Xfont}/src/bitmap
@@ -24,12 +24,12 @@
 		pcfread.c pcfwrite.c
 
 .PATH:		${X11SRCDIR.Xfont}/src/fontfile
-SRCS+=		bufio.c decompress.c defaults.c fileio.c filewr.c gunzip.c bunzip2.c
+SRCS+=		bufio.c decompress.c defaults.c fileio.c filewr.c gunzip.c
 
 .PATH:		${X11SRCDIR.Xfont}/src/util
 SRCS+=		atom.c fontaccel.c miscutil.c private.c utilbitmap.c
 
-LDADD+=		-lz -lbz2
+LDADD+=		-lz
 
 .include bsd.x11.mk
 .include bsd.hostprog.mk



CVS commit: [netbsd-5] src/doc

2011-01-07 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Fri Jan  7 23:57:44 UTC 2011

Modified Files:
src/doc [netbsd-5]: CHANGES-5.2

Log Message:
Ticket 1512.


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.50 -r1.1.2.51 src/doc/CHANGES-5.2

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

Modified files:

Index: src/doc/CHANGES-5.2
diff -u src/doc/CHANGES-5.2:1.1.2.50 src/doc/CHANGES-5.2:1.1.2.51
--- src/doc/CHANGES-5.2:1.1.2.50	Fri Jan  7 23:54:41 2011
+++ src/doc/CHANGES-5.2	Fri Jan  7 23:57:43 2011
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-5.2,v 1.1.2.50 2011/01/07 23:54:41 riz Exp $
+# $NetBSD: CHANGES-5.2,v 1.1.2.51 2011/01/07 23:57:43 riz Exp $
 
 A complete list of changes from the NetBSD 5.1 release to the NetBSD 5.2
 release:
@@ -4296,3 +4296,8 @@
 	Explicitly link libstdc++ against libm.
 	[joerg, ticket #1432]
 
+external/mit/xorg/tools/bdftopcf/Makefile	1.5
+
+	Disable bzip2 support in tools bdftopcf(1). PR#44138.
+	[tsutsui, ticket #1512]
+



CVS commit: [netbsd-5-1] src/external/mit/xorg/tools/bdftopcf

2011-01-07 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Sat Jan  8 00:52:28 UTC 2011

Modified Files:
src/external/mit/xorg/tools/bdftopcf [netbsd-5-1]: Makefile

Log Message:
Pull up following revision(s) (requested by tsutsui in ticket #1512):
external/mit/xorg/tools/bdftopcf/Makefile: revision 1.5
Disable bzip2 support in tools bdftopcf(1).
We don't use bzip2 fonts on build and some OS doesn't have bzip2 headers.
Ok'ed by mrg@, martin@, fixes PR/44138.
Should be pulled up to netbsd-5 (and netbsd-5-1).


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.1.8.1 -r1.1.1.1.8.1.2.1 \
src/external/mit/xorg/tools/bdftopcf/Makefile

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

Modified files:

Index: src/external/mit/xorg/tools/bdftopcf/Makefile
diff -u src/external/mit/xorg/tools/bdftopcf/Makefile:1.1.1.1.8.1 src/external/mit/xorg/tools/bdftopcf/Makefile:1.1.1.1.8.1.2.1
--- src/external/mit/xorg/tools/bdftopcf/Makefile:1.1.1.1.8.1	Thu Sep 17 04:24:42 2009
+++ src/external/mit/xorg/tools/bdftopcf/Makefile	Sat Jan  8 00:52:27 2011
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.1.1.1.8.1 2009/09/17 04:24:42 snj Exp $
+#	$NetBSD: Makefile,v 1.1.1.1.8.1.2.1 2011/01/08 00:52:27 riz Exp $
 
 NOMAN=		1
 
@@ -16,7 +16,7 @@
 		-I${DESTDIR}${X11INCDIR}/X11/fonts \
 		-I${DESTDIR}${X11INCDIR}/freetype2 \
 		-I${X11SRCDIR.Xfont}/src/stubs \
-		-DBDFFORMAT -DPCFFORMAT -DSNFFORMAT -DX_GZIP_FONT_COMPRESSION -DX_BZIP2_FONT_COMPRESSION \
+		-DBDFFORMAT -DPCFFORMAT -DSNFFORMAT -DX_GZIP_FONT_COMPRESSION \
 		-DFONT_ENCODINGS_DIRECTORY=\${X11FONTDIR}/encodings/encodings.dir\
 
 .PATH:		${X11SRCDIR.Xfont}/src/bitmap
@@ -24,12 +24,12 @@
 		pcfread.c pcfwrite.c
 
 .PATH:		${X11SRCDIR.Xfont}/src/fontfile
-SRCS+=		bufio.c decompress.c defaults.c fileio.c filewr.c gunzip.c bunzip2.c
+SRCS+=		bufio.c decompress.c defaults.c fileio.c filewr.c gunzip.c
 
 .PATH:		${X11SRCDIR.Xfont}/src/util
 SRCS+=		atom.c fontaccel.c miscutil.c private.c utilbitmap.c
 
-LDADD+=		-lz -lbz2
+LDADD+=		-lz
 
 .include bsd.x11.mk
 .include bsd.hostprog.mk



CVS commit: [netbsd-5-1] src/doc

2011-01-07 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Sat Jan  8 00:53:09 UTC 2011

Modified Files:
src/doc [netbsd-5-1]: CHANGES-5.1.1

Log Message:
Ticket 1512 (build fix)


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.5 -r1.1.2.6 src/doc/CHANGES-5.1.1

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

Modified files:

Index: src/doc/CHANGES-5.1.1
diff -u src/doc/CHANGES-5.1.1:1.1.2.5 src/doc/CHANGES-5.1.1:1.1.2.6
--- src/doc/CHANGES-5.1.1:1.1.2.5	Fri Jan  7 19:14:26 2011
+++ src/doc/CHANGES-5.1.1	Sat Jan  8 00:53:09 2011
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-5.1.1,v 1.1.2.5 2011/01/07 19:14:26 riz Exp $
+# $NetBSD: CHANGES-5.1.1,v 1.1.2.6 2011/01/08 00:53:09 riz Exp $
 
 A complete list of changes from the NetBSD 5.1 release to the NetBSD 5.1.1
 release:
@@ -39,3 +39,8 @@
 	not NULL: it can be legitimately set elsewhere.
 	[drochner, ticket #1510]
 
+external/mit/xorg/tools/bdftopcf/Makefile	1.5
+
+	Disable bzip2 support in tools bdftopcf(1). PR#44138.
+	[tsutsui, ticket #1512]
+



CVS commit: src/doc

2011-01-07 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Sat Jan  8 00:55:38 UTC 2011

Modified Files:
src/doc: 3RDPARTY

Log Message:
mdocml-1.10.9 out.


To generate a diff of this commit:
cvs rdiff -u -r1.802 -r1.803 src/doc/3RDPARTY

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

Modified files:

Index: src/doc/3RDPARTY
diff -u src/doc/3RDPARTY:1.802 src/doc/3RDPARTY:1.803
--- src/doc/3RDPARTY:1.802	Mon Jan  3 11:35:04 2011
+++ src/doc/3RDPARTY	Sat Jan  8 00:55:37 2011
@@ -1,4 +1,4 @@
-#	$NetBSD: 3RDPARTY,v 1.802 2011/01/03 11:35:04 roy Exp $
+#	$NetBSD: 3RDPARTY,v 1.803 2011/01/08 00:55:37 wiz Exp $
 #
 # This file contains a list of the software that has been integrated into
 # NetBSD where we are not the primary maintainer.
@@ -645,7 +645,7 @@
 
 Package:	mdocml
 Version:	1.10.5
-Current Vers:	1.10.8
+Current Vers:	1.10.9
 Maintainer:	Kristaps Džonsons
 Archive Site:	http://mdocml.bsd.lv/snapshots/
 Home Page:	http://mdocml.bsd.lv/



CVS commit: [netbsd-5] src/share/man/man4

2011-01-07 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Sat Jan  8 01:27:17 UTC 2011

Modified Files:
src/share/man/man4 [netbsd-5]: stf.4

Log Message:
Pull up following revision(s) (requested by is in ticket #1514):
share/man/man4/stf.4: revision 1.22
share/man/man4/stf.4: revision 1.23
Four and a half year after the end of 6bone, it should not surprise that the
web page dedicated to it is gone. Fortunately, 6bone itself is not referenced
in this manual page. Thanks to an...@ircnet for the heads-up.
Add references RFC3068 and RFC3964; mark draft-itojun-... as expired.


To generate a diff of this commit:
cvs rdiff -u -r1.21 -r1.21.26.1 src/share/man/man4/stf.4

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

Modified files:

Index: src/share/man/man4/stf.4
diff -u src/share/man/man4/stf.4:1.21 src/share/man/man4/stf.4:1.21.26.1
--- src/share/man/man4/stf.4:1.21	Sat Jun 17 04:58:14 2006
+++ src/share/man/man4/stf.4	Sat Jan  8 01:27:16 2011
@@ -1,4 +1,4 @@
-.\ $NetBSD: stf.4,v 1.21 2006/06/17 04:58:14 reed Exp $
+.\ $NetBSD: stf.4,v 1.21.26.1 2011/01/08 01:27:16 riz Exp $
 .\ $KAME: stf.4,v 1.39 2002/11/17 19:34:02 itojun Exp $
 .\
 .\ Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@@ -234,7 +234,6 @@
 .Xr inet 4 ,
 .Xr inet6 4
 .Pp
-.Pa http://www.6bone.net/6bone_6to4.html
 .Rs
 .%A Brian Carpenter
 .%A Keith Moore
@@ -244,6 +243,13 @@
 .%N 3056
 .Re
 .Rs
+.%A C. Huitema
+.%T An Anycast Prefix for 6to4 Relay Routers
+.%D June 2001
+.%R RFC
+.%N 3068
+.Re
+.Rs
 .%A F. Baker
 .%A P. Savola
 .%T Ingress Filtering for Multihomed Networks
@@ -252,11 +258,19 @@
 .%N 3704
 .Re
 .Rs
+.%A P. Savola
+.%A C. Patel
+.%T Security Considerations for 6to4
+.%D December 2004
+.%R RFC
+.%N 3964
+.Re
+.Rs
 .%A Jun-ichiro itojun Hagino
 .%T Possible abuse against IPv6 transition technologies
 .%D July 2000
 .%N draft-itojun-ipv6-transition-abuse-01.txt
-.%O work in progress
+.%O expired, work in progress
 .Re
 .\
 .Sh HISTORY



CVS commit: [netbsd-5] src/doc

2011-01-07 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Sat Jan  8 01:27:54 UTC 2011

Modified Files:
src/doc [netbsd-5]: CHANGES-5.2

Log Message:
Ticket 1514.


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.51 -r1.1.2.52 src/doc/CHANGES-5.2

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

Modified files:

Index: src/doc/CHANGES-5.2
diff -u src/doc/CHANGES-5.2:1.1.2.51 src/doc/CHANGES-5.2:1.1.2.52
--- src/doc/CHANGES-5.2:1.1.2.51	Fri Jan  7 23:57:43 2011
+++ src/doc/CHANGES-5.2	Sat Jan  8 01:27:54 2011
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-5.2,v 1.1.2.51 2011/01/07 23:57:43 riz Exp $
+# $NetBSD: CHANGES-5.2,v 1.1.2.52 2011/01/08 01:27:54 riz Exp $
 
 A complete list of changes from the NetBSD 5.1 release to the NetBSD 5.2
 release:
@@ -4301,3 +4301,9 @@
 	Disable bzip2 support in tools bdftopcf(1). PR#44138.
 	[tsutsui, ticket #1512]
 
+share/man/man4/stf.41.22-1.23
+
+	Remove reference to a webpage which no longer exists, and add
+	references to appropriate RFCs.
+	[is, ticket #1514]
+



CVS commit: src/usr.sbin/iostat

2011-01-07 Thread Jonathan A. Kollasch
Module Name:src
Committed By:   jakllsch
Date:   Sat Jan  8 02:36:52 UTC 2011

Modified Files:
src/usr.sbin/iostat: iostat.c

Log Message:
NetBSD/vax does not implement fmax(3), substitute with existing MAX() macro.


To generate a diff of this commit:
cvs rdiff -u -r1.54 -r1.55 src/usr.sbin/iostat/iostat.c

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

Modified files:

Index: src/usr.sbin/iostat/iostat.c
diff -u src/usr.sbin/iostat/iostat.c:1.54 src/usr.sbin/iostat/iostat.c:1.55
--- src/usr.sbin/iostat/iostat.c:1.54	Fri Jan  7 03:12:27 2011
+++ src/usr.sbin/iostat/iostat.c	Sat Jan  8 02:36:52 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: iostat.c,v 1.54 2011/01/07 03:12:27 jakllsch Exp $	*/
+/*	$NetBSD: iostat.c,v 1.55 2011/01/08 02:36:52 jakllsch Exp $	*/
 
 /*
  * Copyright (c) 1996 John M. Vinopal
@@ -71,7 +71,7 @@
 #if 0
 static char sccsid[] = @(#)iostat.c	8.3 (Berkeley) 4/28/95;
 #else
-__RCSID($NetBSD: iostat.c,v 1.54 2011/01/07 03:12:27 jakllsch Exp $);
+__RCSID($NetBSD: iostat.c,v 1.55 2011/01/08 02:36:52 jakllsch Exp $);
 #endif
 #endif /* not lint */
 
@@ -344,7 +344,7 @@
 			mbps = 0;
 		mbps /= etime;
 		(void)printf( %5.*f ,
-		MAX(0,3-(int)floor(log10(fabs(fmax(1.0,mbps), mbps);
+		MAX(0,3-(int)floor(log10(fabs(MAX(1.0,mbps), mbps);
 	}
 }
 



CVS commit: src/sys/arch/xen/xen

2011-01-07 Thread Jean-Yves Migeon
Module Name:src
Committed By:   jym
Date:   Sat Jan  8 05:23:20 UTC 2011

Modified Files:
src/sys/arch/xen/xen: xennetback_xenbus.c

Log Message:
Move if_xname setting earlier for xvif creation, so we can grab domid
and handle values sooner for error cases.


To generate a diff of this commit:
cvs rdiff -u -r1.34 -r1.35 src/sys/arch/xen/xen/xennetback_xenbus.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/xen/xen/xennetback_xenbus.c
diff -u src/sys/arch/xen/xen/xennetback_xenbus.c:1.34 src/sys/arch/xen/xen/xennetback_xenbus.c:1.35
--- src/sys/arch/xen/xen/xennetback_xenbus.c:1.34	Mon Apr  5 07:19:32 2010
+++ src/sys/arch/xen/xen/xennetback_xenbus.c	Sat Jan  8 05:23:19 2011
@@ -1,4 +1,4 @@
-/*  $NetBSD: xennetback_xenbus.c,v 1.34 2010/04/05 07:19:32 joerg Exp $  */
+/*  $NetBSD: xennetback_xenbus.c,v 1.35 2011/01/08 05:23:19 jym Exp $  */
 
 /*
  * Copyright (c) 2006 Manuel Bouyer.
@@ -271,18 +271,20 @@
 
 	ifp = xneti-xni_if;
 	ifp-if_softc = xneti;
+	snprintf(ifp-if_xname, IFNAMSIZ, xvif%d.%d,
+	(int)domid, (int)handle);
 
 	/* read mac address */
 	if ((err = xenbus_read(NULL, xbusd-xbusd_path, mac, NULL, val))) {
-		aprint_error(xvif: can' read %s/mac: %d\n,
+		aprint_error_ifnet(ifp, can't read %s/mac: %d\n,
 		xbusd-xbusd_path, err);
 		goto fail;
 	}
 	for (i = 0, p = val; i  6; i++) {
 		xneti-xni_enaddr[i] = strtoul(p, e, 16);
 		if ((e[0] == '\0'  i != 5)  e[0] != ':') {
-			aprint_error(xvif: %s is not a valid mac address\n,
-			val);
+			aprint_error_ifnet(ifp,
+			%s is not a valid mac address\n, val);
 			err = EINVAL;
 			goto fail;
 		}
@@ -293,8 +295,6 @@
 	/* we can't use the same MAC addr as our guest */
 	xneti-xni_enaddr[3]++;
 	/* create pseudo-interface */
-	snprintf(xneti-xni_if.if_xname, IFNAMSIZ, xvif%d.%d,
-	(int)domid, (int)handle);
 	aprint_verbose_ifnet(ifp, Ethernet address %s\n,
 	ether_sprintf(xneti-xni_enaddr));
 	ifp-if_flags =



CVS commit: src/tests/lib/libc/db

2011-01-07 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Sat Jan  8 05:33:34 UTC 2011

Modified Files:
src/tests/lib/libc/db: t_db.sh

Log Message:
Fix and re-enable the delete_btree test case


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/tests/lib/libc/db/t_db.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/lib/libc/db/t_db.sh
diff -u src/tests/lib/libc/db/t_db.sh:1.1 src/tests/lib/libc/db/t_db.sh:1.2
--- src/tests/lib/libc/db/t_db.sh:1.1	Fri Jan  7 15:05:58 2011
+++ src/tests/lib/libc/db/t_db.sh	Sat Jan  8 05:33:34 2011
@@ -1,4 +1,4 @@
-# $NetBSD: t_db.sh,v 1.1 2011/01/07 15:05:58 pgoyette Exp $
+# $NetBSD: t_db.sh,v 1.2 2011/01/08 05:33:34 pgoyette Exp $
 #
 # Copyright (c) 2008 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -459,24 +459,17 @@
 	awk '{
 		for (i = 1; i = 120; ++i)
 			printf(%05d: input key %d: %s\n, i, i, $0);
-		printf(%05d: input key %d: %s\n, 120, 120, $0);
-		printf(seq failed, no such key\n);
-		printf(%05d: input key %d: %s\n, 1, 1, $0);
-		printf(%05d: input key %d: %s\n, 2, 2, $0);
-		exit;
 	}' exp
 
 	cat exp |
 	awk '{
-		if (i == 120)
-			exit;
 		printf(p\nk%d\nd%s\n, ++i, $0);
 	}
 	END {
 		printf(fR_NEXT\n);
 		for (i = 1; i = 120; ++i)
 			printf(s\n);
-		printf(fR_CURSOR\ns\nk120\n);
+		printf(fR_CURSOR\ns\nkXX\n);
 		printf(r\n);
 		printf(fR_NEXT\ns\n);
 		printf(fR_CURSOR\ns\nk1\n);
@@ -484,12 +477,42 @@
 		printf(fR_FIRST\ns\n);
 	}' in
 
+	# For btree, the records are ordered by the string representation
+	# of the key value.  So sort the expected output file accordingly,
+	# and set the seek_last key to the last expected key value.
+
+	if [ $type = btree ] ; then
+		sed -e 's/kXX/k99/'  in  tmp
+		mv tmp in
+		sort -d -k4  exp  tmp
+		mv tmp exp
+		echo $SEVEN_SEVEN |
+		awk '{
+			printf(%05d: input key %d: %s\n, 99, 99, $0);
+			printf(seq failed, no such key\n);
+			printf(%05d: input key %d: %s\n, 1, 1, $0);
+			printf(%05d: input key %d: %s\n, 10, 10, $0);
+			exit;
+		}'  exp
+	else
+	# For recno, records are ordered by numerical key value.  No sort
+	# is needed, but still need to set proper seek_last key value.
+		sed -e 's/kXX/k120/'  in  tmp
+		mv tmp in
+		echo $SEVEN_SEVEN |
+		awk '{
+			printf(%05d: input key %d: %s\n, 120, 120, $0);
+			printf(seq failed, no such key\n);
+			printf(%05d: input key %d: %s\n, 1, 1, $0);
+			printf(%05d: input key %d: %s\n, 2, 2, $0);
+			exit;
+		}'  exp
+	fi
+
 	atf_check $(prog) -o out $type in
 	atf_check -o file:exp cat out
 }
 
-# FIXME: should it actually work? the original test apparently
-# was supposed to run such test, but didn't
 atf_test_case delete_btree
 delete_btree_head()
 {
@@ -497,13 +520,6 @@
 }
 delete_btree_body()
 {
-#
-# The delete_btree test was skipped in the original /regress test
-# structure, so noone ever noticed that it didn't work!  Disable it for
-# now, until we correct the generation of in/out files to reflect the
-# actual collating sequence of key values (19 comes before 2)
-#
-	atf_skip delete_btreee test case is broken
 	h_delete btree
 }
 



CVS commit: src/tests/lib/libc

2011-01-07 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Sat Jan  8 06:59:37 UTC 2011

Modified Files:
src/tests/lib/libc: Makefile
Added Files:
src/tests/lib/libc/rpc: Makefile h_testbits.x t_xdr.c

Log Message:
Atf-ify the rpc/t_xdr test


To generate a diff of this commit:
cvs rdiff -u -r1.24 -r1.25 src/tests/lib/libc/Makefile
cvs rdiff -u -r0 -r1.1 src/tests/lib/libc/rpc/Makefile \
src/tests/lib/libc/rpc/h_testbits.x src/tests/lib/libc/rpc/t_xdr.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/Makefile
diff -u src/tests/lib/libc/Makefile:1.24 src/tests/lib/libc/Makefile:1.25
--- src/tests/lib/libc/Makefile:1.24	Fri Jan  7 15:05:57 2011
+++ src/tests/lib/libc/Makefile	Sat Jan  8 06:59:37 2011
@@ -1,9 +1,9 @@
-# $NetBSD: Makefile,v 1.24 2011/01/07 15:05:57 pgoyette Exp $
+# $NetBSD: Makefile,v 1.25 2011/01/08 06:59:37 pgoyette Exp $
 
 .include bsd.own.mk
 .include bsd.sys.mk
 
-TESTS_SUBDIRS+=	db gen hash ieeefp setjmp stdlib stdio string ttyio
+TESTS_SUBDIRS+=	db gen hash ieeefp rpc setjmp stdlib stdio string ttyio
 
 .if ${HAS_SSP} == yes
 TESTS_SUBDIRS+=	ssp

Added files:

Index: src/tests/lib/libc/rpc/Makefile
diff -u /dev/null src/tests/lib/libc/rpc/Makefile:1.1
--- /dev/null	Sat Jan  8 06:59:37 2011
+++ src/tests/lib/libc/rpc/Makefile	Sat Jan  8 06:59:37 2011
@@ -0,0 +1,21 @@
+# $NetBSD: Makefile,v 1.1 2011/01/08 06:59:37 pgoyette Exp $
+
+MKMAN=	no
+
+.include bsd.own.mk
+
+TESTSDIR=		${TESTSBASE}/lib/libc/rpc
+
+TESTS_C=		t_xdr
+SRCS.t_xdr=		${RPCSRCS:.x=_xdr.c} t_xdr.c
+
+RPCSRCS=		h_testbits.x
+DPSRCS=			${RPCSRCS:.x=.h}
+CLEANFILES+=	${RPCSRCS:.x=.h} ${RPCSRCS:.x=_xdr.c}
+CPPFLAGS+=		-I.
+RPC_INCS=		${RPCSRCS:.x=.h}
+RPC_XDRFILES=	${RPCSRCS:.x=_xdr.c}
+
+.include bsd.rpc.mk
+.include bsd.test.mk
+
Index: src/tests/lib/libc/rpc/h_testbits.x
diff -u /dev/null src/tests/lib/libc/rpc/h_testbits.x:1.1
--- /dev/null	Sat Jan  8 06:59:37 2011
+++ src/tests/lib/libc/rpc/h_testbits.x	Sat Jan  8 06:59:37 2011
@@ -0,0 +1,21 @@
+/*	$NetBSD: h_testbits.x,v 1.1 2011/01/08 06:59:37 pgoyette Exp $ */
+
+enum smallenum {
+	SE_ONE = 1,
+	SE_TWO = 2
+};
+
+enum medenum {
+	ME_NEG = -1234,
+	ME_ONE = 1,
+	ME_TWO = 2,
+	ME_MANY = 1234
+};
+
+enum bigenum {
+	BE_ONE = 1,
+	BE_TWO = 2,
+	BE_MANY = 1234,
+	BE_LOTS = 1234567
+};
+
Index: src/tests/lib/libc/rpc/t_xdr.c
diff -u /dev/null src/tests/lib/libc/rpc/t_xdr.c:1.1
--- /dev/null	Sat Jan  8 06:59:37 2011
+++ src/tests/lib/libc/rpc/t_xdr.c	Sat Jan  8 06:59:37 2011
@@ -0,0 +1,129 @@
+/* $NetBSD: t_xdr.c,v 1.1 2011/01/08 06:59:37 pgoyette Exp $ */
+
+/*
+ * Copyright (c) 2008 The NetBSD Foundation, Inc.
+ * All rights reserved.
+ *
+ * This code is derived from software contributed to The NetBSD Foundation
+ * by Ben Harris.
+ *
+ * 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.
+ */
+
+/*-
+ * Copyright (c) 2001 Ben Harris
+ * 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.
+ * 3. The name of the author may not be used to endorse or promote products
+ *derived from this software without specific prior written permission.
+ * 
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS 

CVS commit: src

2011-01-07 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Sat Jan  8 07:00:18 UTC 2011

Modified Files:
src/distrib/sets/lists/tests: mi
src/etc/mtree: NetBSD.dist.tests

Log Message:
mtree and set-list games for xdr test


To generate a diff of this commit:
cvs rdiff -u -r1.217 -r1.218 src/distrib/sets/lists/tests/mi
cvs rdiff -u -r1.14 -r1.15 src/etc/mtree/NetBSD.dist.tests

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

Modified files:

Index: src/distrib/sets/lists/tests/mi
diff -u src/distrib/sets/lists/tests/mi:1.217 src/distrib/sets/lists/tests/mi:1.218
--- src/distrib/sets/lists/tests/mi:1.217	Fri Jan  7 15:06:37 2011
+++ src/distrib/sets/lists/tests/mi	Sat Jan  8 07:00:18 2011
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.217 2011/01/07 15:06:37 pgoyette Exp $
+# $NetBSD: mi,v 1.218 2011/01/08 07:00:18 pgoyette Exp $
 #
 # Note: don't delete entries from here - mark them as obsolete instead.
 #
@@ -344,6 +344,8 @@
 ./usr/libdata/debug/usr/tests/lib/libc/ieeefp/t_nan_inf.debug		tests-lib-debug		debug,atf
 ./usr/libdata/debug/usr/tests/lib/libc/ieeefp/t_round.debug		tests-lib-debug		debug,atf
 ./usr/libdata/debug/usr/tests/lib/libc/ieeefp/t_subnormal.debug		tests-lib-debug		debug,atf
+./usr/libdata/debug/usr/tests/lib/libc/rpctests-lib-debug
+./usr/libdata/debug/usr/tests/lib/libc/rpc/t_xdr.debug			tests-lib-debug		debug,atf
 ./usr/libdata/debug/usr/tests/lib/libc/setjmptests-lib-debug
 ./usr/libdata/debug/usr/tests/lib/libc/setjmp/t_setjmp.debug		tests-lib-debug		debug,atf
 ./usr/libdata/debug/usr/tests/lib/libc/ssptests-lib-debug
@@ -1641,6 +1643,9 @@
 ./usr/tests/lib/libc/ieeefp/t_nan_inf		tests-lib-tests		atf
 ./usr/tests/lib/libc/ieeefp/t_round		tests-lib-tests		atf
 ./usr/tests/lib/libc/ieeefp/t_subnormal		tests-lib-tests		atf
+./usr/tests/lib/libc/rpc			tests-lib-tests
+./usr/tests/lib/libc/rpc/Atffile		tests-lib-tests		atf
+./usr/tests/lib/libc/rpc/t_xdr			tests-lib-tests		atf
 ./usr/tests/lib/libc/stdlib			tests-lib-tests
 ./usr/tests/lib/libc/stdlib/Atffile		tests-lib-tests		atf
 ./usr/tests/lib/libc/stdlib/h_getopt		tests-lib-tests		atf

Index: src/etc/mtree/NetBSD.dist.tests
diff -u src/etc/mtree/NetBSD.dist.tests:1.14 src/etc/mtree/NetBSD.dist.tests:1.15
--- src/etc/mtree/NetBSD.dist.tests:1.14	Fri Jan  7 15:06:37 2011
+++ src/etc/mtree/NetBSD.dist.tests	Sat Jan  8 07:00:17 2011
@@ -1,4 +1,4 @@
-#	$NetBSD: NetBSD.dist.tests,v 1.14 2011/01/07 15:06:37 pgoyette Exp $
+#	$NetBSD: NetBSD.dist.tests,v 1.15 2011/01/08 07:00:17 pgoyette Exp $
 
 ./usr/libdata/debug/usr/tests
 ./usr/libdata/debug/usr/tests/atf
@@ -49,6 +49,7 @@
 ./usr/libdata/debug/usr/tests/lib/libc/gen
 ./usr/libdata/debug/usr/tests/lib/libc/hash
 ./usr/libdata/debug/usr/tests/lib/libc/ieeefp
+./usr/libdata/debug/usr/tests/lib/libc/rpc
 ./usr/libdata/debug/usr/tests/lib/libc/setjmp
 ./usr/libdata/debug/usr/tests/lib/libc/ssp
 ./usr/libdata/debug/usr/tests/lib/libc/stdio
@@ -148,6 +149,7 @@
 ./usr/tests/lib/libc/hash
 ./usr/tests/lib/libc/hash/data
 ./usr/tests/lib/libc/ieeefp
+./usr/tests/lib/libc/rpc
 ./usr/tests/lib/libc/setjmp
 ./usr/tests/lib/libc/ssp
 ./usr/tests/lib/libc/stdio



CVS commit: src/regress/lib/libc

2011-01-07 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Sat Jan  8 07:02:18 UTC 2011

Modified Files:
src/regress/lib/libc: Makefile
Removed Files:
src/regress/lib/libc/rpc: Makefile Makefile.inc
src/regress/lib/libc/rpc/xdr: Makefile testbits.x xdrtest.c

Log Message:
rpc/xdr test has been atf-ified


To generate a diff of this commit:
cvs rdiff -u -r1.76 -r1.77 src/regress/lib/libc/Makefile
cvs rdiff -u -r1.1 -r0 src/regress/lib/libc/rpc/Makefile \
src/regress/lib/libc/rpc/Makefile.inc
cvs rdiff -u -r1.10 -r0 src/regress/lib/libc/rpc/xdr/Makefile
cvs rdiff -u -r1.1 -r0 src/regress/lib/libc/rpc/xdr/testbits.x
cvs rdiff -u -r1.5 -r0 src/regress/lib/libc/rpc/xdr/xdrtest.c

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

Modified files:

Index: src/regress/lib/libc/Makefile
diff -u src/regress/lib/libc/Makefile:1.76 src/regress/lib/libc/Makefile:1.77
--- src/regress/lib/libc/Makefile:1.76	Fri Jan  7 15:08:40 2011
+++ src/regress/lib/libc/Makefile	Sat Jan  8 07:02:17 2011
@@ -1,6 +1,6 @@
-#	$NetBSD: Makefile,v 1.76 2011/01/07 15:08:40 pgoyette Exp $
+#	$NetBSD: Makefile,v 1.77 2011/01/08 07:02:17 pgoyette Exp $
 
-SUBDIR+= citrus divrem getaddrinfo int_fmtio locale regex rpc
+SUBDIR+= citrus divrem getaddrinfo int_fmtio locale regex
 
 .include bsd.own.mk
 .include bsd.sys.mk