CVS commit: src/sys/fs/union

2010-07-16 Thread Juergen Hannken-Illjes
Module Name:src
Committed By:   hannken
Date:   Fri Jul 16 08:23:28 UTC 2010

Modified Files:
src/sys/fs/union: union_subr.c

Log Message:
Always take the hash list lock before removing a node from the hash chain.

Release the hash list lock before calling getnewvnode() and check the
hash list again like other file systems do.

Take v_interlock before calling vget().


To generate a diff of this commit:
cvs rdiff -u -r1.37 -r1.38 src/sys/fs/union/union_subr.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/fs/union/union_subr.c
diff -u src/sys/fs/union/union_subr.c:1.37 src/sys/fs/union/union_subr.c:1.38
--- src/sys/fs/union/union_subr.c:1.37	Thu Jun 24 13:03:11 2010
+++ src/sys/fs/union/union_subr.c	Fri Jul 16 08:23:28 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: union_subr.c,v 1.37 2010/06/24 13:03:11 hannken Exp $	*/
+/*	$NetBSD: union_subr.c,v 1.38 2010/07/16 08:23:28 hannken Exp $	*/
 
 /*
  * Copyright (c) 1994
@@ -72,7 +72,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: union_subr.c,v 1.37 2010/06/24 13:03:11 hannken Exp $);
+__KERNEL_RCSID(0, $NetBSD: union_subr.c,v 1.38 2010/07/16 08:23:28 hannken Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -330,8 +330,8 @@
 {
 	int error;
 	struct vattr va;
-	struct union_node *un = NULL;
-	struct vnode *xlowervp = NULLVP;
+	struct union_node *un = NULL, *un1;
+	struct vnode *vp, *xlowervp = NULLVP;
 	struct union_mount *um = MOUNTTOUNIONMOUNT(mp);
 	voff_t uppersz, lowersz;
 	int hash = 0;
@@ -394,7 +394,9 @@
 			(un-un_uppervp == uppervp ||
 			 un-un_uppervp == NULLVP) 
 			(UNIONTOV(un)-v_mount == mp)) {
-if (vget(UNIONTOV(un), 0)) {
+vp = UNIONTOV(un);
+mutex_enter(vp-v_interlock);
+if (vget(vp, LK_INTERLOCK)) {
 	union_list_unlock(hash);
 	goto loop;
 }
@@ -502,17 +504,7 @@
 	if (lowervp != NULLVP)
 		if (VOP_GETATTR(lowervp, va, FSCRED) == 0)
 			lowersz = va.va_size;
-
-	if (docache) {
-		/*
-		 * otherwise lock the vp list while we call getnewvnode
-		 * since that can block.
-		 */
-		hash = UNION_HASH(uppervp, lowervp);
-
-		if (union_list_lock(hash))
-			goto loop;
-	}
+	hash = UNION_HASH(uppervp, lowervp);
 
 	error = getnewvnode(VT_UNION, mp, union_vnodeop_p, vpp);
 	if (error) {
@@ -528,6 +520,24 @@
 		goto out;
 	}
 
+	if (docache) {
+		while (union_list_lock(hash))
+			continue;
+		LIST_FOREACH(un1, unhead[hash], un_cache) {
+			if (un1-un_lowervp == lowervp 
+			un1-un_uppervp == uppervp 
+			UNIONTOV(un1)-v_mount == mp) {
+/*
+ * Another thread beat us, push back freshly
+ * allocated vnode and retry.
+ */
+union_list_unlock(hash);
+ungetnewvnode(*vpp);
+goto loop;
+			}
+		}
+	}
+
 	(*vpp)-v_data = malloc(sizeof(struct union_node), M_TEMP, M_WAITOK);
 
 	(*vpp)-v_vflag |= vflag;
@@ -590,12 +600,18 @@
 int
 union_freevp(struct vnode *vp)
 {
+	int hash;
 	struct union_node *un = VTOUNION(vp);
 
+	hash = UNION_HASH(un-un_uppervp, un-un_lowervp);
+
+	while (union_list_lock(hash))
+		continue;
 	if (un-un_flags  UN_CACHED) {
 		un-un_flags = ~UN_CACHED;
 		LIST_REMOVE(un, un_cache);
 	}
+	union_list_unlock(hash);
 
 	if (un-un_pvp != NULLVP)
 		vrele(un-un_pvp);
@@ -998,6 +1014,8 @@
 void
 union_removed_upper(struct union_node *un)
 {
+	int hash;
+
 #if 1
 	/*
 	 * We do not set the uppervp to NULLVP here, because lowervp
@@ -1013,10 +1031,15 @@
 	union_newupper(un, NULLVP);
 #endif
 
+	hash = UNION_HASH(un-un_uppervp, un-un_lowervp);
+
+	while (union_list_lock(hash))
+		continue;
 	if (un-un_flags  UN_CACHED) {
 		un-un_flags = ~UN_CACHED;
 		LIST_REMOVE(un, un_cache);
 	}
+	union_list_unlock(hash);
 
 	if (un-un_flags  UN_ULOCK) {
 		un-un_flags = ~UN_ULOCK;



CVS commit: src/sys/miscfs/fdesc

2010-07-16 Thread Juergen Hannken-Illjes
Module Name:src
Committed By:   hannken
Date:   Fri Jul 16 10:41:12 UTC 2010

Modified Files:
src/sys/miscfs/fdesc: fdesc_vnops.c

Log Message:
Use a kmutex to protect the hash chains and always take this mutex
before removing a node from the hash chain.

Release the hash list lock before calling getnewvnode() and check the
hash list again like other file systems do.

Take v_interlock before calling vget().


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

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

Modified files:

Index: src/sys/miscfs/fdesc/fdesc_vnops.c
diff -u src/sys/miscfs/fdesc/fdesc_vnops.c:1.110 src/sys/miscfs/fdesc/fdesc_vnops.c:1.111
--- src/sys/miscfs/fdesc/fdesc_vnops.c:1.110	Thu Jun 24 13:03:12 2010
+++ src/sys/miscfs/fdesc/fdesc_vnops.c	Fri Jul 16 10:41:12 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: fdesc_vnops.c,v 1.110 2010/06/24 13:03:12 hannken Exp $	*/
+/*	$NetBSD: fdesc_vnops.c,v 1.111 2010/07/16 10:41:12 hannken Exp $	*/
 
 /*
  * Copyright (c) 1992, 1993
@@ -41,7 +41,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: fdesc_vnops.c,v 1.110 2010/06/24 13:03:12 hannken Exp $);
+__KERNEL_RCSID(0, $NetBSD: fdesc_vnops.c,v 1.111 2010/07/16 10:41:12 hannken Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -69,9 +69,7 @@
 
 #define cttyvp(p) ((p)-p_lflag  PL_CONTROLT ? (p)-p_session-s_ttyvp : NULL)
 
-#define FDL_WANT	0x01
-#define FDL_LOCKED	0x02
-static int fdcache_lock;
+static kmutex_t fdcache_lock;
 
 dev_t devctty;
 
@@ -187,6 +185,7 @@
 	/* locate the major number */
 	cttymajor = devsw_name2chr(ctty, NULL, 0);
 	devctty = makedev(cttymajor, 0);
+	mutex_init(fdcache_lock, MUTEX_DEFAULT, IPL_NONE);
 	fdhashtbl = hashinit(NFDCACHE, HASH_LIST, true, fdhash);
 }
 
@@ -197,6 +196,7 @@
 fdesc_done(void)
 {
 	hashdone(fdhashtbl, HASH_LIST, fdhash);
+	mutex_destroy(fdcache_lock);
 }
 
 /*
@@ -211,29 +211,36 @@
 
 	fc = FD_NHASH(ix);
 loop:
-	for (fd = fc-lh_first; fd != 0; fd = fd-fd_hash.le_next) {
+	mutex_enter(fdcache_lock);
+	LIST_FOREACH(fd, fc, fd_hash) {
 		if (fd-fd_ix == ix  fd-fd_vnode-v_mount == mp) {
-			if (vget(fd-fd_vnode, LK_EXCLUSIVE))
+			mutex_enter(fd-fd_vnode-v_interlock);
+			mutex_exit(fdcache_lock);
+			if (vget(fd-fd_vnode, LK_INTERLOCK | LK_EXCLUSIVE))
 goto loop;
 			*vpp = fd-fd_vnode;
-			return (error);
+			return 0;
 		}
 	}
-
-	/*
-	 * otherwise lock the array while we call getnewvnode
-	 * since that can block.
-	 */
-	if (fdcache_lock  FDL_LOCKED) {
-		fdcache_lock |= FDL_WANT;
-		(void) tsleep(fdcache_lock, PINOD, fdcache, 0);
-		goto loop;
-	}
-	fdcache_lock |= FDL_LOCKED;
+	mutex_exit(fdcache_lock);
 
 	error = getnewvnode(VT_FDESC, mp, fdesc_vnodeop_p, vpp);
 	if (error)
-		goto out;
+		return error;
+
+	mutex_enter(fdcache_lock);
+	LIST_FOREACH(fd, fc, fd_hash) {
+		if (fd-fd_ix == ix  fd-fd_vnode-v_mount == mp) {
+			/*
+			 * Another thread beat us, push back freshly
+			 * allocated vnode and retry.
+			 */
+			mutex_exit(fdcache_lock);
+			ungetnewvnode(*vpp);
+			goto loop;
+		}
+	}
+
 	fd = malloc(sizeof(struct fdescnode), M_TEMP, M_WAITOK);
 	(*vpp)-v_data = fd;
 	fd-fd_vnode = *vpp;
@@ -244,16 +251,9 @@
 	uvm_vnp_setsize(*vpp, 0);
 	VOP_LOCK(*vpp, LK_EXCLUSIVE);
 	LIST_INSERT_HEAD(fc, fd, fd_hash);
+	mutex_exit(fdcache_lock);
 
-out:;
-	fdcache_lock = ~FDL_LOCKED;
-
-	if (fdcache_lock  FDL_WANT) {
-		fdcache_lock = ~FDL_WANT;
-		wakeup(fdcache_lock);
-	}
-
-	return (error);
+	return 0;
 }
 
 /*
@@ -956,9 +956,11 @@
 	struct vnode *vp = ap-a_vp;
 	struct fdescnode *fd = VTOFDESC(vp);
 
+	mutex_enter(fdcache_lock);
 	LIST_REMOVE(fd, fd_hash);
 	free(vp-v_data, M_TEMP);
 	vp-v_data = 0;
+	mutex_exit(fdcache_lock);
 
 	return (0);
 }



CVS commit: src/tests/fs/vfs

2010-07-16 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Fri Jul 16 10:50:55 UTC 2010

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

Log Message:
This test does not always fail for LFS, so apply same kludge as
elsewhere while waiting for atf to grow support for these cases.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 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.2 src/tests/fs/vfs/t_renamerace.c:1.3
--- src/tests/fs/vfs/t_renamerace.c:1.2	Wed Jul 14 21:44:40 2010
+++ src/tests/fs/vfs/t_renamerace.c	Fri Jul 16 10:50:55 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: t_renamerace.c,v 1.2 2010/07/14 21:44:40 pooka Exp $	*/
+/*	$NetBSD: t_renamerace.c,v 1.3 2010/07/16 10:50:55 pooka Exp $	*/
 
 /*
  * Modified for rump and atf from a program supplied
@@ -80,6 +80,13 @@
 
 	pthread_join(pt1, NULL);
 	pthread_join(pt2, NULL);
+
+	/*
+	 * XXX: does not always fail on LFS, especially for unicpu
+	 * configurations.  see other ramlings about racy tests.
+	 */
+	if (FSTYPE_LFS(tc))
+		abort();
 }
 
 ATF_TC_FSAPPLY(renamerace, rename(2) race with file unlinked mid-operation);



CVS commit: src/tests/fs/vfs

2010-07-16 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Fri Jul 16 11:33:45 UTC 2010

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

Log Message:
Do the famous renamerace test using directories.  Uh oh, bad idea.
PR coming soon.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 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.3 src/tests/fs/vfs/t_renamerace.c:1.4
--- src/tests/fs/vfs/t_renamerace.c:1.3	Fri Jul 16 10:50:55 2010
+++ src/tests/fs/vfs/t_renamerace.c	Fri Jul 16 11:33:45 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: t_renamerace.c,v 1.3 2010/07/16 10:50:55 pooka Exp $	*/
+/*	$NetBSD: t_renamerace.c,v 1.4 2010/07/16 11:33:45 pooka Exp $	*/
 
 /*
  * Modified for rump and atf from a program supplied
@@ -49,6 +49,24 @@
 }
 
 static void *
+w1_dirs(void *arg)
+{
+
+	rump_pub_lwp_alloc_and_switch(0, 10);
+	rump_sys_chdir(arg);
+
+	while (!quittingtime) {
+		if (rump_sys_mkdir(rename.test1, 0777) == -1)
+			atf_tc_fail_errno(mkdir);
+		rump_sys_rmdir(rename.test1);
+	}
+
+	rump_sys_chdir(/);
+
+	return NULL;
+}
+
+static void *
 w2(void *arg)
 {
 
@@ -89,12 +107,42 @@
 		abort();
 }
 
+static void
+renamerace_dirs(const atf_tc_t *tc, const char *mp)
+{
+	pthread_t pt1, pt2;
+
+	/* XXX: msdosfs also sometimes hangs */
+	if (FSTYPE_FFS(tc) || FSTYPE_EXT2FS(tc) || FSTYPE_LFS(tc) ||
+	FSTYPE_MSDOS(tc))
+		atf_tc_expect_signal(-1, PR notyet);
+
+	pthread_create(pt1, NULL, w1_dirs, __UNCONST(mp));
+	pthread_create(pt2, NULL, w2, __UNCONST(mp));
+
+	sleep(5);
+	quittingtime = 1;
+
+	pthread_join(pt1, NULL);
+	pthread_join(pt2, NULL);
+
+	/*
+	 * Doesn't always trigger when run on a slow backend
+	 * (i.e. not on tmpfs/mfs).  So do the usual kludge.
+	 */
+	if (FSTYPE_FFS(tc) || FSTYPE_EXT2FS(tc) || FSTYPE_LFS(tc) ||
+	FSTYPE_MSDOS(tc))
+		abort();
+}
+
 ATF_TC_FSAPPLY(renamerace, rename(2) race with file unlinked mid-operation);
+ATF_TC_FSAPPLY(renamerace_dirs, rename(2) race with directories);
 
 ATF_TP_ADD_TCS(tp)
 {
 
 	ATF_TP_FSAPPLY(renamerace); /* PR kern/41128 */
+	ATF_TP_FSAPPLY(renamerace_dirs);
 
 	return atf_no_error();
 }



CVS commit: src/tests/fs/vfs

2010-07-16 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Fri Jul 16 11:46:31 UTC 2010

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

Log Message:
Fill in PR kern/43626 now that it exists.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 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.4 src/tests/fs/vfs/t_renamerace.c:1.5
--- src/tests/fs/vfs/t_renamerace.c:1.4	Fri Jul 16 11:33:45 2010
+++ src/tests/fs/vfs/t_renamerace.c	Fri Jul 16 11:46:31 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: t_renamerace.c,v 1.4 2010/07/16 11:33:45 pooka Exp $	*/
+/*	$NetBSD: t_renamerace.c,v 1.5 2010/07/16 11:46:31 pooka Exp $	*/
 
 /*
  * Modified for rump and atf from a program supplied
@@ -115,7 +115,7 @@
 	/* XXX: msdosfs also sometimes hangs */
 	if (FSTYPE_FFS(tc) || FSTYPE_EXT2FS(tc) || FSTYPE_LFS(tc) ||
 	FSTYPE_MSDOS(tc))
-		atf_tc_expect_signal(-1, PR notyet);
+		atf_tc_expect_signal(-1, PR kern/43626);
 
 	pthread_create(pt1, NULL, w1_dirs, __UNCONST(mp));
 	pthread_create(pt2, NULL, w2, __UNCONST(mp));



CVS commit: src/tests/fs/vfs

2010-07-16 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Fri Jul 16 13:07:23 UTC 2010

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

Log Message:
Fix typo in comment.  comment tested by wizd.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 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.5 src/tests/fs/vfs/t_renamerace.c:1.6
--- src/tests/fs/vfs/t_renamerace.c:1.5	Fri Jul 16 11:46:31 2010
+++ src/tests/fs/vfs/t_renamerace.c	Fri Jul 16 13:07:23 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: t_renamerace.c,v 1.5 2010/07/16 11:46:31 pooka Exp $	*/
+/*	$NetBSD: t_renamerace.c,v 1.6 2010/07/16 13:07:23 pooka Exp $	*/
 
 /*
  * Modified for rump and atf from a program supplied
@@ -101,7 +101,7 @@
 
 	/*
 	 * XXX: does not always fail on LFS, especially for unicpu
-	 * configurations.  see other ramlings about racy tests.
+	 * configurations.  see other ramblings about racy tests.
 	 */
 	if (FSTYPE_LFS(tc))
 		abort();



CVS commit: src/tests/lib

2010-07-16 Thread Julio Merino
Module Name:src
Committed By:   jmmv
Date:   Fri Jul 16 13:56:32 UTC 2010

Modified Files:
src/tests/lib: Makefile
Added Files:
src/tests/lib/libposix: Makefile t_rename.c
src/tests/lib/libposix/bsd: Makefile
src/tests/lib/libposix/posix1: Makefile
src/tests/lib/libposix/posix2: Makefile
src/tests/lib/libprop: Makefile t_basic.c
src/tests/lib/librt: Makefile t_sem.c
src/tests/lib/libskey: Makefile t_algorithms.c
src/tests/lib/libutil: Makefile t_snprintb.c t_sockaddr_snprintf.c

Log Message:
Convert the libposix, libprop, librt, libskey and libutil tests to ATF.
Initial work from the GSoC 2008 project by Lukasz Strzygowski.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/tests/lib/Makefile
cvs rdiff -u -r0 -r1.1 src/tests/lib/libposix/Makefile \
src/tests/lib/libposix/t_rename.c
cvs rdiff -u -r0 -r1.1 src/tests/lib/libposix/bsd/Makefile
cvs rdiff -u -r0 -r1.1 src/tests/lib/libposix/posix1/Makefile
cvs rdiff -u -r0 -r1.1 src/tests/lib/libposix/posix2/Makefile
cvs rdiff -u -r0 -r1.1 src/tests/lib/libprop/Makefile \
src/tests/lib/libprop/t_basic.c
cvs rdiff -u -r0 -r1.1 src/tests/lib/librt/Makefile \
src/tests/lib/librt/t_sem.c
cvs rdiff -u -r0 -r1.1 src/tests/lib/libskey/Makefile \
src/tests/lib/libskey/t_algorithms.c
cvs rdiff -u -r0 -r1.1 src/tests/lib/libutil/Makefile \
src/tests/lib/libutil/t_snprintb.c \
src/tests/lib/libutil/t_sockaddr_snprintf.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/Makefile
diff -u src/tests/lib/Makefile:1.4 src/tests/lib/Makefile:1.5
--- src/tests/lib/Makefile:1.4	Tue Jul 13 21:13:26 2010
+++ src/tests/lib/Makefile	Fri Jul 16 13:56:31 2010
@@ -1,8 +1,12 @@
-# $NetBSD: Makefile,v 1.4 2010/07/13 21:13:26 jmmv Exp $
+# $NetBSD: Makefile,v 1.5 2010/07/16 13:56:31 jmmv Exp $
 
 .include bsd.own.mk
 
-TESTS_SUBDIRS=		libc libevent semaphore
+TESTS_SUBDIRS=	libc libevent libposix libprop librt libutil semaphore
+
+.if (${MKSKEY} != no)
+TESTS_SUBDIRS+= libskey
+.endif
 
 TESTSDIR=	${TESTSBASE}/lib
 

Added files:

Index: src/tests/lib/libposix/Makefile
diff -u /dev/null src/tests/lib/libposix/Makefile:1.1
--- /dev/null	Fri Jul 16 13:56:32 2010
+++ src/tests/lib/libposix/Makefile	Fri Jul 16 13:56:31 2010
@@ -0,0 +1,13 @@
+# $NetBSD: Makefile,v 1.1 2010/07/16 13:56:31 jmmv Exp $
+
+NOMAN=		# defined
+
+.include bsd.own.mk
+
+TESTSDIR=	${TESTSBASE}/lib/libposix
+
+SUBDIR=		bsd
+SUBDIR+=	posix1
+SUBDIR+=	posix2
+
+.include bsd.test.mk
Index: src/tests/lib/libposix/t_rename.c
diff -u /dev/null src/tests/lib/libposix/t_rename.c:1.1
--- /dev/null	Fri Jul 16 13:56:32 2010
+++ src/tests/lib/libposix/t_rename.c	Fri Jul 16 13:56:31 2010
@@ -0,0 +1,89 @@
+/* $NetBSD: t_rename.c,v 1.1 2010/07/16 13:56:31 jmmv Exp $ */
+
+/*
+ * Copyright (c) 2001, 2008, 2010 The NetBSD Foundation, Inc.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *notice, this list of conditions and the following disclaimer in the
+ *documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
+ * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+ * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include sys/cdefs.h
+__COPYRIGHT(@(#) Copyright (c) 2008, 2010\
+ The NetBSD Foundation, inc. All rights reserved.);
+__RCSID($NetBSD: t_rename.c,v 1.1 2010/07/16 13:56:31 jmmv Exp $);
+
+#include sys/types.h
+#include sys/stat.h
+
+#include errno.h
+#include fcntl.h
+#include stdio.h
+#include stdlib.h
+#include string.h
+#include unistd.h
+
+#include atf-c.h
+
+#include ../../h_macros.h
+
+ATF_TC(rename);
+ATF_TC_HEAD(rename, tc)
+{
+	atf_tc_set_md_var(tc, descr, Checks rename(2));
+}
+ATF_TC_BODY(rename, tc)
+{
+	struct stat sb;
+
+	REQUIRE_LIBC(open(t1, O_CREAT | O_TRUNC | O_WRONLY, 0600), -1);
+	REQUIRE_LIBC(link(t1, t2), -1);
+
+	/* Check if 

CVS commit: src/etc/mtree

2010-07-16 Thread Julio Merino
Module Name:src
Committed By:   jmmv
Date:   Fri Jul 16 13:56:52 UTC 2010

Modified Files:
src/etc/mtree: NetBSD.dist.base

Log Message:
Add new tests dirs.


To generate a diff of this commit:
cvs rdiff -u -r1.35 -r1.36 src/etc/mtree/NetBSD.dist.base

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

Modified files:

Index: src/etc/mtree/NetBSD.dist.base
diff -u src/etc/mtree/NetBSD.dist.base:1.35 src/etc/mtree/NetBSD.dist.base:1.36
--- src/etc/mtree/NetBSD.dist.base:1.35	Thu Jul  8 20:13:19 2010
+++ src/etc/mtree/NetBSD.dist.base	Fri Jul 16 13:56:52 2010
@@ -1,4 +1,4 @@
-#	$NetBSD: NetBSD.dist.base,v 1.35 2010/07/08 20:13:19 christos Exp $
+#	$NetBSD: NetBSD.dist.base,v 1.36 2010/07/16 13:56:52 jmmv Exp $
 #	@(#)4.4BSD.dist	8.1 (Berkeley) 6/13/93
 
 # Do not customize this file as it may be overwritten on upgrades.
@@ -227,6 +227,14 @@
 ./usr/libdata/debug/usr/tests/lib/libevent
 ./usr/libdata/debug/usr/tests/lib/semaphore
 ./usr/libdata/debug/usr/tests/lib/semaphore/pthread
+./usr/libdata/debug/usr/tests/lib/libposix
+./usr/libdata/debug/usr/tests/lib/libposix/bsd
+./usr/libdata/debug/usr/tests/lib/libposix/posix1
+./usr/libdata/debug/usr/tests/lib/libposix/posix2
+./usr/libdata/debug/usr/tests/lib/libprop
+./usr/libdata/debug/usr/tests/lib/librt
+./usr/libdata/debug/usr/tests/lib/libskey
+./usr/libdata/debug/usr/tests/lib/libutil
 ./usr/libdata/debug/usr/tests/libexec
 ./usr/libdata/debug/usr/tests/libexec/ld.elf_so
 ./usr/libdata/debug/usr/tests/modules
@@ -1138,6 +1146,14 @@
 ./usr/tests/lib/semaphore
 ./usr/tests/lib/semaphore/pthread
 ./usr/tests/lib/libevent
+./usr/tests/lib/libposix
+./usr/tests/lib/libposix/bsd
+./usr/tests/lib/libposix/posix1
+./usr/tests/lib/libposix/posix2
+./usr/tests/lib/libprop
+./usr/tests/lib/librt
+./usr/tests/lib/libskey
+./usr/tests/lib/libutil
 ./usr/tests/libexec
 ./usr/tests/libexec/ld.elf_so
 ./usr/tests/modules



CVS commit: src/regress/lib

2010-07-16 Thread Julio Merino
Module Name:src
Committed By:   jmmv
Date:   Fri Jul 16 13:59:09 UTC 2010

Modified Files:
src/regress/lib: Makefile
Removed Files:
src/regress/lib/libposix: Makefile Makefile.inc prename.c
src/regress/lib/libposix/nrn: Makefile
src/regress/lib/libposix/prn1: Makefile
src/regress/lib/libposix/prn2: Makefile
src/regress/lib/libprop: proptest.c
src/regress/lib/librt: Makefile
src/regress/lib/librt/sem: Makefile sem.c
src/regress/lib/libskey: Makefile skeytest.c
src/regress/lib/libutil: Makefile Makefile.inc
src/regress/lib/libutil/snprintb: Makefile snprintbtest.c
src/regress/lib/libutil/sockaddr_snprintf: Makefile sockaddr_snprintf.c

Log Message:
Remove tests converted to ATF.


To generate a diff of this commit:
cvs rdiff -u -r1.22 -r1.23 src/regress/lib/Makefile
cvs rdiff -u -r1.1 -r0 src/regress/lib/libposix/Makefile \
src/regress/lib/libposix/Makefile.inc
cvs rdiff -u -r1.3 -r0 src/regress/lib/libposix/prename.c
cvs rdiff -u -r1.4 -r0 src/regress/lib/libposix/nrn/Makefile
cvs rdiff -u -r1.4 -r0 src/regress/lib/libposix/prn1/Makefile
cvs rdiff -u -r1.4 -r0 src/regress/lib/libposix/prn2/Makefile
cvs rdiff -u -r1.3 -r0 src/regress/lib/libprop/proptest.c
cvs rdiff -u -r1.1 -r0 src/regress/lib/librt/Makefile
cvs rdiff -u -r1.1 -r0 src/regress/lib/librt/sem/Makefile
cvs rdiff -u -r1.3 -r0 src/regress/lib/librt/sem/sem.c
cvs rdiff -u -r1.5 -r0 src/regress/lib/libskey/Makefile
cvs rdiff -u -r1.4 -r0 src/regress/lib/libskey/skeytest.c
cvs rdiff -u -r1.2 -r0 src/regress/lib/libutil/Makefile
cvs rdiff -u -r1.1 -r0 src/regress/lib/libutil/Makefile.inc
cvs rdiff -u -r1.1 -r0 src/regress/lib/libutil/snprintb/Makefile
cvs rdiff -u -r1.3 -r0 src/regress/lib/libutil/snprintb/snprintbtest.c
cvs rdiff -u -r1.2 -r0 src/regress/lib/libutil/sockaddr_snprintf/Makefile
cvs rdiff -u -r1.4 -r0 \
src/regress/lib/libutil/sockaddr_snprintf/sockaddr_snprintf.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/Makefile
diff -u src/regress/lib/Makefile:1.22 src/regress/lib/Makefile:1.23
--- src/regress/lib/Makefile:1.22	Mon Nov  2 15:44:12 2009
+++ src/regress/lib/Makefile	Fri Jul 16 13:59:07 2010
@@ -1,8 +1,8 @@
-#	$NetBSD: Makefile,v 1.22 2009/11/02 15:44:12 plunky Exp $
+#	$NetBSD: Makefile,v 1.23 2010/07/16 13:59:07 jmmv Exp $
 
 .include bsd.own.mk
 
-SUBDIR+= csu libc libm libposix libpthread librt libutil
+SUBDIR+= csu libc libm libpthread
 
 .if (${MACHINE_CPU} != alpha  \
  ${MACHINE_CPU} != mips  \
@@ -10,10 +10,6 @@
 #SUBDIR+= libssp
 .endif
 
-.if (${MKSKEY} != no)
-SUBDIR+= libskey
-.endif
-
 .if ${MKCRYPTO} != no
 SUBDIR+= libdes
 .endif



CVS commit: src/doc

2010-07-16 Thread Julio Merino
Module Name:src
Committed By:   jmmv
Date:   Fri Jul 16 13:59:22 UTC 2010

Modified Files:
src/doc: CHANGES

Log Message:
Note conversion of some extra tests to atf.


To generate a diff of this commit:
cvs rdiff -u -r1.1414 -r1.1415 src/doc/CHANGES

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
diff -u src/doc/CHANGES:1.1414 src/doc/CHANGES:1.1415
--- src/doc/CHANGES:1.1414	Thu Jul 15 16:29:42 2010
+++ src/doc/CHANGES	Fri Jul 16 13:59:22 2010
@@ -1,4 +1,4 @@
-# LIST OF CHANGES FROM LAST RELEASE:			$Revision: 1.1414 $
+# LIST OF CHANGES FROM LAST RELEASE:			$Revision: 1.1415 $
 #
 #
 # [Note: This file does not mention every change made to the NetBSD source tree.
@@ -688,3 +688,5 @@
 		We now claim to be linux kernel version 2.6.18.  [chs 20100706]
 	prep: Support xserver.  It tested only on-board s3(864).
 		[kiyohara 20100712]
+	tests: Convert the libposix, libprop, librt, libskey and libutil tests
+		to ATF.  [jmmv 20010716]



CVS commit: src/tests/fs/vfs

2010-07-16 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Fri Jul 16 14:14:27 UTC 2010

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

Log Message:
skip directory test on sysvbfs


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 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.6 src/tests/fs/vfs/t_renamerace.c:1.7
--- src/tests/fs/vfs/t_renamerace.c:1.6	Fri Jul 16 13:07:23 2010
+++ src/tests/fs/vfs/t_renamerace.c	Fri Jul 16 14:14:27 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: t_renamerace.c,v 1.6 2010/07/16 13:07:23 pooka Exp $	*/
+/*	$NetBSD: t_renamerace.c,v 1.7 2010/07/16 14:14:27 pooka Exp $	*/
 
 /*
  * Modified for rump and atf from a program supplied
@@ -112,6 +112,9 @@
 {
 	pthread_t pt1, pt2;
 
+	if (FSTYPE_SYSVBFS(tc))
+		atf_tc_skip(directories not supported);
+
 	/* XXX: msdosfs also sometimes hangs */
 	if (FSTYPE_FFS(tc) || FSTYPE_EXT2FS(tc) || FSTYPE_LFS(tc) ||
 	FSTYPE_MSDOS(tc))



CVS commit: src/distrib/sets/lists/tests

2010-07-16 Thread Nicolas Joly
Module Name:src
Committed By:   njoly
Date:   Fri Jul 16 15:26:05 UTC 2010

Modified Files:
src/distrib/sets/lists/tests: mi

Log Message:
Add some missing .debug suffix.


To generate a diff of this commit:
cvs rdiff -u -r1.109 -r1.110 src/distrib/sets/lists/tests/mi

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

Modified files:

Index: src/distrib/sets/lists/tests/mi
diff -u src/distrib/sets/lists/tests/mi:1.109 src/distrib/sets/lists/tests/mi:1.110
--- src/distrib/sets/lists/tests/mi:1.109	Fri Jul 16 13:57:16 2010
+++ src/distrib/sets/lists/tests/mi	Fri Jul 16 15:26:04 2010
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.109 2010/07/16 13:57:16 jmmv Exp $
+# $NetBSD: mi,v 1.110 2010/07/16 15:26:04 njoly Exp $
 #
 # Note: don't delete entries from here - mark them as obsolete instead.
 #
@@ -268,20 +268,20 @@
 ./usr/libdata/debug/usr/tests/lib/libevent/h_event.debug		tests-lib-debug		debug,atf
 ./usr/libdata/debug/usr/tests/lib/libposixtests-lib-debug
 ./usr/libdata/debug/usr/tests/lib/libposix/bsdtests-lib-debug
-./usr/libdata/debug/usr/tests/lib/libposix/bsd/t_rename			tests-lib-debug		debug,atf
+./usr/libdata/debug/usr/tests/lib/libposix/bsd/t_rename.debug		tests-lib-debug		debug,atf
 ./usr/libdata/debug/usr/tests/lib/libposix/posix1			tests-lib-debug
-./usr/libdata/debug/usr/tests/lib/libposix/posix1/t_rename		tests-lib-debug		debug,atf
+./usr/libdata/debug/usr/tests/lib/libposix/posix1/t_rename.debug	tests-lib-debug		debug,atf
 ./usr/libdata/debug/usr/tests/lib/libposix/posix2			tests-lib-debug
-./usr/libdata/debug/usr/tests/lib/libposix/posix2/t_rename		tests-lib-debug		debug,atf
+./usr/libdata/debug/usr/tests/lib/libposix/posix2/t_rename.debug	tests-lib-debug		debug,atf
 ./usr/libdata/debug/usr/tests/lib/libproptests-lib-debug
-./usr/libdata/debug/usr/tests/lib/libprop/t_basic			tests-lib-debug		debug,atf
+./usr/libdata/debug/usr/tests/lib/libprop/t_basic.debug			tests-lib-debug		debug,atf
 ./usr/libdata/debug/usr/tests/lib/librt	tests-lib-debug
-./usr/libdata/debug/usr/tests/lib/librt/t_semtests-lib-debug		debug,atf
+./usr/libdata/debug/usr/tests/lib/librt/t_sem.debug			tests-lib-debug		debug,atf
 ./usr/libdata/debug/usr/tests/lib/libskeytests-lib-debug
-./usr/libdata/debug/usr/tests/lib/libskey/t_algorithms			tests-lib-debug		debug,atf
+./usr/libdata/debug/usr/tests/lib/libskey/t_algorithms.debug		tests-lib-debug		debug,atf
 ./usr/libdata/debug/usr/tests/lib/libutiltests-lib-debug
-./usr/libdata/debug/usr/tests/lib/libutil/t_snprintb			tests-lib-debug		debug,atf
-./usr/libdata/debug/usr/tests/lib/libutil/t_sockaddr_snprintf		tests-lib-debug		debug,atf
+./usr/libdata/debug/usr/tests/lib/libutil/t_snprintb.debug		tests-lib-debug		debug,atf
+./usr/libdata/debug/usr/tests/lib/libutil/t_sockaddr_snprintf.debug	tests-lib-debug		debug,atf
 ./usr/libdata/debug/usr/tests/libexec	tests-lib-debug
 ./usr/libdata/debug/usr/tests/libexec/ld.elf_sotests-libexec-debug
 ./usr/libdata/debug/usr/tests/libexec/ld.elf_so/t_dlinfo.debug		tests-libexec-debug	debug,atf



CVS commit: src/sys/arch/hpcmips/tx

2010-07-16 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Fri Jul 16 15:28:38 UTC 2010

Modified Files:
src/sys/arch/hpcmips/tx: txcom.c

Log Message:
Add missing callout_init(9) calls. PR port-hpcmips/43472


To generate a diff of this commit:
cvs rdiff -u -r1.41 -r1.42 src/sys/arch/hpcmips/tx/txcom.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/hpcmips/tx/txcom.c
diff -u src/sys/arch/hpcmips/tx/txcom.c:1.41 src/sys/arch/hpcmips/tx/txcom.c:1.42
--- src/sys/arch/hpcmips/tx/txcom.c:1.41	Sat Mar 14 15:36:07 2009
+++ src/sys/arch/hpcmips/tx/txcom.c	Fri Jul 16 15:28:38 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: txcom.c,v 1.41 2009/03/14 15:36:07 dsl Exp $ */
+/*	$NetBSD: txcom.c,v 1.42 2010/07/16 15:28:38 tsutsui Exp $ */
 
 /*-
  * Copyright (c) 1999, 2000, 2004 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: txcom.c,v 1.41 2009/03/14 15:36:07 dsl Exp $);
+__KERNEL_RCSID(0, $NetBSD: txcom.c,v 1.42 2010/07/16 15:28:38 tsutsui Exp $);
 
 #include opt_tx39uart_debug.h
 
@@ -249,6 +249,10 @@
 
 	printf(\n);
 
+	/* initialize callouts */
+	callout_init(sc-sc_txsoft_ch, 0);
+	callout_init(sc-sc_rxsoft_ch, 0);
+
 	/* 
 	 * Enable interrupt
 	 */



CVS commit: src/sys/arch/hpcmips/tx

2010-07-16 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Fri Jul 16 15:30:10 UTC 2010

Modified Files:
src/sys/arch/hpcmips/tx: txcom.c

Log Message:
Fix a wrong arg for callout_reset(9) in txcom_txintr(). PR port-hpcmips/43474


To generate a diff of this commit:
cvs rdiff -u -r1.42 -r1.43 src/sys/arch/hpcmips/tx/txcom.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/hpcmips/tx/txcom.c
diff -u src/sys/arch/hpcmips/tx/txcom.c:1.42 src/sys/arch/hpcmips/tx/txcom.c:1.43
--- src/sys/arch/hpcmips/tx/txcom.c:1.42	Fri Jul 16 15:28:38 2010
+++ src/sys/arch/hpcmips/tx/txcom.c	Fri Jul 16 15:30:10 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: txcom.c,v 1.42 2010/07/16 15:28:38 tsutsui Exp $ */
+/*	$NetBSD: txcom.c,v 1.43 2010/07/16 15:30:10 tsutsui Exp $ */
 
 /*-
  * Copyright (c) 1999, 2000, 2004 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: txcom.c,v 1.42 2010/07/16 15:28:38 tsutsui Exp $);
+__KERNEL_RCSID(0, $NetBSD: txcom.c,v 1.43 2010/07/16 15:30:10 tsutsui Exp $);
 
 #include opt_tx39uart_debug.h
 
@@ -749,7 +749,7 @@
 		sc-sc_tbc--;
 		sc-sc_tba++;
 	} else {
-		callout_reset(sc-sc_rxsoft_ch, 1, txcom_txsoft, sc);
+		callout_reset(sc-sc_txsoft_ch, 1, txcom_txsoft, sc);
 	}
 
 	return 0;



CVS commit: src/etc/mtree

2010-07-16 Thread Julio Merino
Module Name:src
Committed By:   jmmv
Date:   Fri Jul 16 15:43:24 UTC 2010

Modified Files:
src/etc/mtree: NetBSD.dist.base

Log Message:
Add dirs for libpthread tests.


To generate a diff of this commit:
cvs rdiff -u -r1.36 -r1.37 src/etc/mtree/NetBSD.dist.base

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

Modified files:

Index: src/etc/mtree/NetBSD.dist.base
diff -u src/etc/mtree/NetBSD.dist.base:1.36 src/etc/mtree/NetBSD.dist.base:1.37
--- src/etc/mtree/NetBSD.dist.base:1.36	Fri Jul 16 13:56:52 2010
+++ src/etc/mtree/NetBSD.dist.base	Fri Jul 16 15:43:23 2010
@@ -1,4 +1,4 @@
-#	$NetBSD: NetBSD.dist.base,v 1.36 2010/07/16 13:56:52 jmmv Exp $
+#	$NetBSD: NetBSD.dist.base,v 1.37 2010/07/16 15:43:23 jmmv Exp $
 #	@(#)4.4BSD.dist	8.1 (Berkeley) 6/13/93
 
 # Do not customize this file as it may be overwritten on upgrades.
@@ -232,6 +232,7 @@
 ./usr/libdata/debug/usr/tests/lib/libposix/posix1
 ./usr/libdata/debug/usr/tests/lib/libposix/posix2
 ./usr/libdata/debug/usr/tests/lib/libprop
+./usr/libdata/debug/usr/tests/lib/libpthread
 ./usr/libdata/debug/usr/tests/lib/librt
 ./usr/libdata/debug/usr/tests/lib/libskey
 ./usr/libdata/debug/usr/tests/lib/libutil
@@ -1151,6 +1152,7 @@
 ./usr/tests/lib/libposix/posix1
 ./usr/tests/lib/libposix/posix2
 ./usr/tests/lib/libprop
+./usr/tests/lib/libpthread
 ./usr/tests/lib/librt
 ./usr/tests/lib/libskey
 ./usr/tests/lib/libutil



CVS commit: src/distrib/sets/lists/tests

2010-07-16 Thread Julio Merino
Module Name:src
Committed By:   jmmv
Date:   Fri Jul 16 15:45:05 UTC 2010

Modified Files:
src/distrib/sets/lists/tests: mi

Log Message:
Add libpthread tests.


To generate a diff of this commit:
cvs rdiff -u -r1.110 -r1.111 src/distrib/sets/lists/tests/mi

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

Modified files:

Index: src/distrib/sets/lists/tests/mi
diff -u src/distrib/sets/lists/tests/mi:1.110 src/distrib/sets/lists/tests/mi:1.111
--- src/distrib/sets/lists/tests/mi:1.110	Fri Jul 16 15:26:04 2010
+++ src/distrib/sets/lists/tests/mi	Fri Jul 16 15:45:05 2010
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.110 2010/07/16 15:26:04 njoly Exp $
+# $NetBSD: mi,v 1.111 2010/07/16 15:45:05 jmmv Exp $
 #
 # Note: don't delete entries from here - mark them as obsolete instead.
 #
@@ -275,6 +275,27 @@
 ./usr/libdata/debug/usr/tests/lib/libposix/posix2/t_rename.debug	tests-lib-debug		debug,atf
 ./usr/libdata/debug/usr/tests/lib/libproptests-lib-debug
 ./usr/libdata/debug/usr/tests/lib/libprop/t_basic.debug			tests-lib-debug		debug,atf
+./usr/libdata/debug/usr/tests/lib/libpthreadtests-lib-debug
+./usr/libdata/debug/usr/tests/lib/libpthread/h_atexit.debug		tests-lib-tests		debug,atf
+./usr/libdata/debug/usr/tests/lib/libpthread/h_cancel.debug		tests-lib-tests		debug,atf
+./usr/libdata/debug/usr/tests/lib/libpthread/h_exit.debug		tests-lib-tests		debug,atf
+./usr/libdata/debug/usr/tests/lib/libpthread/h_resolv.debug		tests-lib-tests		debug,atf
+./usr/libdata/debug/usr/tests/lib/libpthread/t_barrier.debug		tests-lib-tests		debug,atf
+./usr/libdata/debug/usr/tests/lib/libpthread/t_cond.debug		tests-lib-tests		debug,atf
+./usr/libdata/debug/usr/tests/lib/libpthread/t_fork.debug		tests-lib-tests		debug,atf
+./usr/libdata/debug/usr/tests/lib/libpthread/t_fpu.debug		tests-lib-tests		debug,atf
+./usr/libdata/debug/usr/tests/lib/libpthread/t_kill.debug		tests-lib-tests		debug,atf
+./usr/libdata/debug/usr/tests/lib/libpthread/t_mutex.debug		tests-lib-tests		debug,atf
+./usr/libdata/debug/usr/tests/lib/libpthread/t_name.debug		tests-lib-tests		debug,atf
+./usr/libdata/debug/usr/tests/lib/libpthread/t_once.debug		tests-lib-tests		debug,atf
+./usr/libdata/debug/usr/tests/lib/libpthread/t_preempt.debug		tests-lib-tests		debug,atf
+./usr/libdata/debug/usr/tests/lib/libpthread/t_rwlock.debug		tests-lib-tests		debug,atf
+./usr/libdata/debug/usr/tests/lib/libpthread/t_sem.debug		tests-lib-tests		debug,atf
+./usr/libdata/debug/usr/tests/lib/libpthread/t_sigmask.debug		tests-lib-tests		debug,atf
+./usr/libdata/debug/usr/tests/lib/libpthread/t_sigsuspend.debug		tests-lib-tests		debug,atf
+./usr/libdata/debug/usr/tests/lib/libpthread/t_siglongjmp.debug		tests-lib-tests		debug,atf
+./usr/libdata/debug/usr/tests/lib/libpthread/t_sleep.debug		tests-lib-tests		debug,atf
+./usr/libdata/debug/usr/tests/lib/libpthread/t_status.debug		tests-lib-tests		debug,atf
 ./usr/libdata/debug/usr/tests/lib/librt	tests-lib-debug
 ./usr/libdata/debug/usr/tests/lib/librt/t_sem.debug			tests-lib-debug		debug,atf
 ./usr/libdata/debug/usr/tests/lib/libskeytests-lib-debug
@@ -1347,6 +1368,33 @@
 ./usr/tests/lib/libproptests-lib-tests		atf
 ./usr/tests/lib/libprop/Atffile			tests-lib-tests		atf
 ./usr/tests/lib/libprop/t_basic			tests-lib-tests		atf
+./usr/tests/lib/libpthread			tests-lib-tests
+./usr/tests/lib/libpthread/Atffile		tests-lib-tests		atf
+./usr/tests/lib/libpthread/d_mach		tests-lib-tests		atf
+./usr/tests/lib/libpthread/h_atexit		tests-lib-tests		atf
+./usr/tests/lib/libpthread/h_cancel		tests-lib-tests		atf
+./usr/tests/lib/libpthread/h_exit		tests-lib-tests		atf
+./usr/tests/lib/libpthread/h_resolv		tests-lib-tests		atf
+./usr/tests/lib/libpthread/t_atexit		tests-lib-tests		atf
+./usr/tests/lib/libpthread/t_barrier		tests-lib-tests		atf
+./usr/tests/lib/libpthread/t_cancel		tests-lib-tests		atf
+./usr/tests/lib/libpthread/t_cond		tests-lib-tests		atf
+./usr/tests/lib/libpthread/t_exit		tests-lib-tests		atf
+./usr/tests/lib/libpthread/t_fork		tests-lib-tests		atf
+./usr/tests/lib/libpthread/t_fpu		tests-lib-tests		atf
+./usr/tests/lib/libpthread/t_kill		tests-lib-tests		atf
+./usr/tests/lib/libpthread/t_mutex		tests-lib-tests		atf
+./usr/tests/lib/libpthread/t_name		tests-lib-tests		atf
+./usr/tests/lib/libpthread/t_once		tests-lib-tests		atf
+./usr/tests/lib/libpthread/t_preempt		tests-lib-tests		atf
+./usr/tests/lib/libpthread/t_resolv		tests-lib-tests		atf
+./usr/tests/lib/libpthread/t_rwlock		tests-lib-tests		atf
+./usr/tests/lib/libpthread/t_sem		tests-lib-tests		atf
+./usr/tests/lib/libpthread/t_sigmask		tests-lib-tests		atf
+./usr/tests/lib/libpthread/t_sigsuspend		tests-lib-tests		atf
+./usr/tests/lib/libpthread/t_siglongjmp		tests-lib-tests		atf
+./usr/tests/lib/libpthread/t_sleep		tests-lib-tests		atf
+./usr/tests/lib/libpthread/t_status		tests-lib-tests		atf
 ./usr/tests/lib/librttests-lib-tests		atf
 ./usr/tests/lib/librt/Atffile			

CVS commit: src/regress/lib

2010-07-16 Thread Julio Merino
Module Name:src
Committed By:   jmmv
Date:   Fri Jul 16 15:46:09 UTC 2010

Modified Files:
src/regress/lib: Makefile
Removed Files:
src/regress/lib/libpthread: Makefile
src/regress/lib/libpthread/atexit: Makefile
src/regress/lib/libpthread/barrier1: Makefile barrier1.c
src/regress/lib/libpthread/cancel2: Makefile cancel2.c
src/regress/lib/libpthread/cond1: Makefile cond1.c
src/regress/lib/libpthread/cond2: Makefile cond2.c
src/regress/lib/libpthread/cond3: Makefile cond3.c
src/regress/lib/libpthread/cond4: Makefile cond4.c
src/regress/lib/libpthread/cond5: Makefile cond5.c
src/regress/lib/libpthread/cond6: Makefile cond6.c
src/regress/lib/libpthread/condcancel1: Makefile condcancel1.c
src/regress/lib/libpthread/conddestroy1: Makefile conddestroy1.c
src/regress/lib/libpthread/detach1: Makefile detach1.c
src/regress/lib/libpthread/exit1: Makefile exit1.c
src/regress/lib/libpthread/find: Makefile findthreads.c findthreads.sh
src/regress/lib/libpthread/fork: Makefile fork.c
src/regress/lib/libpthread/fpu: Makefile fpu.c
src/regress/lib/libpthread/kill1: Makefile kill1.c
src/regress/lib/libpthread/mutex1: Makefile mutex1.c
src/regress/lib/libpthread/mutex2: Makefile mutex2.c
src/regress/lib/libpthread/mutex3: Makefile mutex3.c
src/regress/lib/libpthread/mutex4: Makefile mutex4.c
src/regress/lib/libpthread/name: Makefile name.c
src/regress/lib/libpthread/once1: Makefile once1.c
src/regress/lib/libpthread/once2: Makefile once2.c
src/regress/lib/libpthread/once3: Makefile once3.c
src/regress/lib/libpthread/preempt1: Makefile preempt1.c
src/regress/lib/libpthread/resolv: Makefile mach resolv.c
src/regress/lib/libpthread/rwlock1: Makefile rwlock1.c
src/regress/lib/libpthread/sem: Makefile sem.c
src/regress/lib/libpthread/sem2: Makefile sem2.c
src/regress/lib/libpthread/sigalarm: Makefile sigalarm.c
src/regress/lib/libpthread/siglongjmp1: Makefile siglongjmp1.c
src/regress/lib/libpthread/sigmask1: Makefile sigmask1.c
src/regress/lib/libpthread/sigmask2: Makefile sigmask2.c
src/regress/lib/libpthread/sigmask3: Makefile sigmask3.c
src/regress/lib/libpthread/sigmask4: Makefile sigmask4.c
src/regress/lib/libpthread/sigsuspend: Makefile sigsuspend.c
src/regress/lib/libpthread/sleep1: Makefile sleep1.c

Log Message:
The libpthread tests have been converted to atf; remove the old versions.


To generate a diff of this commit:
cvs rdiff -u -r1.23 -r1.24 src/regress/lib/Makefile
cvs rdiff -u -r1.32 -r0 src/regress/lib/libpthread/Makefile
cvs rdiff -u -r1.1 -r0 src/regress/lib/libpthread/atexit/Makefile
cvs rdiff -u -r1.1 -r0 src/regress/lib/libpthread/barrier1/Makefile
cvs rdiff -u -r1.3 -r0 src/regress/lib/libpthread/barrier1/barrier1.c
cvs rdiff -u -r1.1 -r0 src/regress/lib/libpthread/cancel2/Makefile
cvs rdiff -u -r1.3 -r0 src/regress/lib/libpthread/cancel2/cancel2.c
cvs rdiff -u -r1.1 -r0 src/regress/lib/libpthread/cond1/Makefile \
src/regress/lib/libpthread/cond1/cond1.c
cvs rdiff -u -r1.1 -r0 src/regress/lib/libpthread/cond2/Makefile \
src/regress/lib/libpthread/cond2/cond2.c
cvs rdiff -u -r1.1 -r0 src/regress/lib/libpthread/cond3/Makefile \
src/regress/lib/libpthread/cond3/cond3.c
cvs rdiff -u -r1.1 -r0 src/regress/lib/libpthread/cond4/Makefile
cvs rdiff -u -r1.2 -r0 src/regress/lib/libpthread/cond4/cond4.c
cvs rdiff -u -r1.1 -r0 src/regress/lib/libpthread/cond5/Makefile
cvs rdiff -u -r1.2 -r0 src/regress/lib/libpthread/cond5/cond5.c
cvs rdiff -u -r1.1 -r0 src/regress/lib/libpthread/cond6/Makefile
cvs rdiff -u -r1.2 -r0 src/regress/lib/libpthread/cond6/cond6.c
cvs rdiff -u -r1.2 -r0 src/regress/lib/libpthread/condcancel1/Makefile \
src/regress/lib/libpthread/condcancel1/condcancel1.c
cvs rdiff -u -r1.1 -r0 src/regress/lib/libpthread/conddestroy1/Makefile
cvs rdiff -u -r1.2 -r0 src/regress/lib/libpthread/conddestroy1/conddestroy1.c
cvs rdiff -u -r1.1 -r0 src/regress/lib/libpthread/detach1/Makefile \
src/regress/lib/libpthread/detach1/detach1.c
cvs rdiff -u -r1.1 -r0 src/regress/lib/libpthread/exit1/Makefile
cvs rdiff -u -r1.2 -r0 src/regress/lib/libpthread/exit1/exit1.c
cvs rdiff -u -r1.1 -r0 src/regress/lib/libpthread/find/Makefile \
src/regress/lib/libpthread/find/findthreads.sh
cvs rdiff -u -r1.2 -r0 src/regress/lib/libpthread/find/findthreads.c
cvs rdiff -u -r1.1 -r0 src/regress/lib/libpthread/fork/Makefile
cvs rdiff -u -r1.3 -r0 src/regress/lib/libpthread/fork/fork.c
cvs rdiff -u -r1.4 -r0 src/regress/lib/libpthread/fpu/Makefile
cvs rdiff -u -r1.2 -r0 src/regress/lib/libpthread/fpu/fpu.c
cvs rdiff -u -r1.1 -r0 src/regress/lib/libpthread/kill1/Makefile
cvs rdiff -u -r1.2 -r0 src/regress/lib/libpthread/kill1/kill1.c
cvs rdiff -u -r1.1 -r0 

CVS commit: src/doc

2010-07-16 Thread Julio Merino
Module Name:src
Committed By:   jmmv
Date:   Fri Jul 16 15:47:06 UTC 2010

Modified Files:
src/doc: CHANGES

Log Message:
Note that the libpthread tests have been converted to atf.


To generate a diff of this commit:
cvs rdiff -u -r1.1415 -r1.1416 src/doc/CHANGES

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
diff -u src/doc/CHANGES:1.1415 src/doc/CHANGES:1.1416
--- src/doc/CHANGES:1.1415	Fri Jul 16 13:59:22 2010
+++ src/doc/CHANGES	Fri Jul 16 15:47:06 2010
@@ -1,4 +1,4 @@
-# LIST OF CHANGES FROM LAST RELEASE:			$Revision: 1.1415 $
+# LIST OF CHANGES FROM LAST RELEASE:			$Revision: 1.1416 $
 #
 #
 # [Note: This file does not mention every change made to the NetBSD source tree.
@@ -688,5 +688,5 @@
 		We now claim to be linux kernel version 2.6.18.  [chs 20100706]
 	prep: Support xserver.  It tested only on-board s3(864).
 		[kiyohara 20100712]
-	tests: Convert the libposix, libprop, librt, libskey and libutil tests
-		to ATF.  [jmmv 20010716]
+	tests: Convert the libposix, libprop, libpthread, librt, libskey and
+		libutil tests to ATF.  [jmmv 20010716]



CVS commit: src/tests/fs/vfs

2010-07-16 Thread Nicolas Joly
Module Name:src
Committed By:   njoly
Date:   Fri Jul 16 17:49:38 UTC 2010

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

Log Message:
Add some sanity checks for statvfs values.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 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.2 src/tests/fs/vfs/t_vfsops.c:1.3
--- src/tests/fs/vfs/t_vfsops.c:1.2	Tue Jul 13 11:53:47 2010
+++ src/tests/fs/vfs/t_vfsops.c	Fri Jul 16 17:49:38 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: t_vfsops.c,v 1.2 2010/07/13 11:53:47 pooka Exp $	*/
+/*	$NetBSD: t_vfsops.c,v 1.3 2010/07/16 17:49:38 njoly Exp $	*/
 
 /*-
  * Copyright (c) 2010 The NetBSD Foundation, Inc.
@@ -49,10 +49,16 @@
 static void
 tstatvfs(const atf_tc_t *tc, const char *path)
 {
+	const char *fstype = atf_tc_get_md_var(tc, X-fs.type);
 	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))
+		ATF_REQUIRE_STREQ(svb.f_fstypename, fstype);
+	ATF_REQUIRE_STREQ(svb.f_mntonname, path);
 }
 
 static void



CVS commit: src/tests/lib/libpthread

2010-07-16 Thread Nicolas Joly
Module Name:src
Committed By:   njoly
Date:   Fri Jul 16 18:16:43 UTC 2010

Modified Files:
src/tests/lib/libpthread: t_mutex.c

Log Message:
Add missing pthread_mutex_init call in mutex3 testcase.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/tests/lib/libpthread/t_mutex.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/libpthread/t_mutex.c
diff -u src/tests/lib/libpthread/t_mutex.c:1.1 src/tests/lib/libpthread/t_mutex.c:1.2
--- src/tests/lib/libpthread/t_mutex.c:1.1	Fri Jul 16 15:42:53 2010
+++ src/tests/lib/libpthread/t_mutex.c	Fri Jul 16 18:16:43 2010
@@ -1,4 +1,4 @@
-/* $NetBSD: t_mutex.c,v 1.1 2010/07/16 15:42:53 jmmv Exp $ */
+/* $NetBSD: t_mutex.c,v 1.2 2010/07/16 18:16:43 njoly Exp $ */
 
 /*
  * Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -29,7 +29,7 @@
 #include sys/cdefs.h
 __COPYRIGHT(@(#) Copyright (c) 2008\
  The NetBSD Foundation, inc. All rights reserved.);
-__RCSID($NetBSD: t_mutex.c,v 1.1 2010/07/16 15:42:53 jmmv Exp $);
+__RCSID($NetBSD: t_mutex.c,v 1.2 2010/07/16 18:16:43 njoly Exp $);
 
 #include pthread.h
 #include stdio.h
@@ -179,6 +179,8 @@
 
 	printf(1: Mutex-test 3\n);
 
+	PTHREAD_REQUIRE(pthread_mutex_init(mutex, NULL));
+
 	global_x = 0;
 	count = count2 = 1000;
 



CVS commit: [netbsd-5] src/sys/arch/amiga

2010-07-16 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Fri Jul 16 18:26:13 UTC 2010

Modified Files:
src/sys/arch/amiga/amiga [netbsd-5]: amiga_init.c locore.s
src/sys/arch/amiga/dev [netbsd-5]: clock.c kbd.c

Log Message:
Pull up following revision(s) (requested by phx in ticket #1412):
sys/arch/amiga/dev/clock.c: revision 1.51
sys/arch/amiga/amiga/locore.s: revision 1.149 via patch
sys/arch/amiga/dev/kbd.c: revision 1.53
sys/arch/amiga/amiga/amiga_init.c: revision 1.118
Reverted the CIA-timer based delay() to the pre-5.0 method of a calibrated
delay loop.
This fixes keyboard handshaking problems with some A1200 models since 5.0
and restores the precision for short delays on DraCo systems (the QuickLogic
timer has only a seventh of the CIA precision).
Changed the keyboard handshaking delay from 2000 back to 200ms, although
even the recommended 85ms were successfully tested on the most problematic
A1200 keyboards.
All those changes were tested on an A3000 and A1200 with 68060/50 CPU, and
previously discussed on the port-amiga ML.


To generate a diff of this commit:
cvs rdiff -u -r1.99 -r1.99.20.1 src/sys/arch/amiga/amiga/amiga_init.c
cvs rdiff -u -r1.145 -r1.145.20.1 src/sys/arch/amiga/amiga/locore.s
cvs rdiff -u -r1.47.20.3 -r1.47.20.4 src/sys/arch/amiga/dev/clock.c
cvs rdiff -u -r1.50 -r1.50.20.1 src/sys/arch/amiga/dev/kbd.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/amiga/amiga/amiga_init.c
diff -u src/sys/arch/amiga/amiga/amiga_init.c:1.99 src/sys/arch/amiga/amiga/amiga_init.c:1.99.20.1
--- src/sys/arch/amiga/amiga/amiga_init.c:1.99	Sun Jan  6 18:50:29 2008
+++ src/sys/arch/amiga/amiga/amiga_init.c	Fri Jul 16 18:26:13 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: amiga_init.c,v 1.99 2008/01/06 18:50:29 mhitch Exp $	*/
+/*	$NetBSD: amiga_init.c,v 1.99.20.1 2010/07/16 18:26:13 riz Exp $	*/
 
 /*
  * Copyright (c) 1994 Michael L. Hitch
@@ -36,7 +36,7 @@
 #include opt_devreload.h
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: amiga_init.c,v 1.99 2008/01/06 18:50:29 mhitch Exp $);
+__KERNEL_RCSID(0, $NetBSD: amiga_init.c,v 1.99.20.1 2010/07/16 18:26:13 riz Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -765,6 +765,7 @@
 void
 start_c_finish()
 {
+	extern u_int32_t delaydivisor;
 #ifdef	P5PPC68KBOARD
 struct cfdev *cdp, *ecdp;
 #endif
@@ -900,6 +901,21 @@
 			}
 }
 #endif
+	/*
+	 * preliminary delay divisor value
+	 */
+
+	if (machineid  AMIGA_68060)
+		delaydivisor = (1024 * 1) / 80;	/* 80 MHz 68060 w. BTC */
+
+	else if (machineid  AMIGA_68040)
+		delaydivisor = (1024 * 3) / 40;	/* 40 MHz 68040 */
+
+	else if (machineid  AMIGA_68030)
+		delaydivisor = (1024 * 8) / 50;	/* 50 MHz 68030 */
+
+	else
+		delaydivisor = (1024 * 8) / 33; /* 33 MHz 68020 */
 }
 
 void

Index: src/sys/arch/amiga/amiga/locore.s
diff -u src/sys/arch/amiga/amiga/locore.s:1.145 src/sys/arch/amiga/amiga/locore.s:1.145.20.1
--- src/sys/arch/amiga/amiga/locore.s:1.145	Sun Jan  6 18:50:30 2008
+++ src/sys/arch/amiga/amiga/locore.s	Fri Jul 16 18:26:12 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: locore.s,v 1.145 2008/01/06 18:50:30 mhitch Exp $	*/
+/*	$NetBSD: locore.s,v 1.145.20.1 2010/07/16 18:26:12 riz Exp $	*/
 
 /*
  * Copyright (c) 1980, 1990 The Regents of the University of California.
@@ -1577,6 +1577,16 @@
 	.align 2
 #endif
 	nop
+ENTRY_NOPROFILE(delay)
+ENTRY_NOPROFILE(DELAY)
+	movql #10,%d1		| 2 +2
+	movl %sp@(4),%d0	| 4 +4
+	lsll %d1,%d0		| 8 +2
+	movl _C_LABEL(delaydivisor),%d1	| A +6
+Ldelay:| longword aligned again.
+	subl %d1,%d0
+	jcc Ldelay
+	rts
 
 #ifdef M68060
 ENTRY_NOPROFILE(intemu60)
@@ -1607,6 +1617,11 @@
 	.long	FPU_NONE
 GLOBAL(protorp)
 	.long	0x8002,0	| prototype root pointer
+GLOBAL(delaydivisor)
+	.long	12		| should be enough for 80 MHz 68060
+| will be adapted to other CPUs in
+| start_c_cleanup and calibrated
+| at clock attach time.
 
 GLOBAL(proc0paddr)
 	.long	0		| KVA of proc0 u-area

Index: src/sys/arch/amiga/dev/clock.c
diff -u src/sys/arch/amiga/dev/clock.c:1.47.20.3 src/sys/arch/amiga/dev/clock.c:1.47.20.4
--- src/sys/arch/amiga/dev/clock.c:1.47.20.3	Sat Oct  3 23:37:31 2009
+++ src/sys/arch/amiga/dev/clock.c	Fri Jul 16 18:26:12 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: clock.c,v 1.47.20.3 2009/10/03 23:37:31 snj Exp $ */
+/*	$NetBSD: clock.c,v 1.47.20.4 2010/07/16 18:26:12 riz Exp $ */
 
 /*
  * Copyright (c) 1982, 1990 The Regents of the University of California.
@@ -77,7 +77,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: clock.c,v 1.47.20.3 2009/10/03 23:37:31 snj Exp $);
+__KERNEL_RCSID(0, $NetBSD: clock.c,v 1.47.20.4 2010/07/16 18:26:12 riz Exp $);
 
 #include sys/param.h
 #include sys/kernel.h
@@ -100,26 +100,6 @@
 #include sys/PROF.h
 #endif
 
-/* the clocks run at NTSC: 715.909kHz or PAL: 709.379kHz.
-   We're using a 100 Hz clock. */
-int amiga_clk_interval;
-int eclockfreq;
-unsigned int 

CVS commit: [netbsd-5] src/sys/nfs

2010-07-16 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Fri Jul 16 18:31:59 UTC 2010

Modified Files:
src/sys/nfs [netbsd-5]: nfs_bio.c

Log Message:
Pull up following revision(s) (requested by jakllsch in ticket #1417):
sys/nfs/nfs_bio.c: revision 1.185
Fix memory leak during some NFS writes.


To generate a diff of this commit:
cvs rdiff -u -r1.179.4.1 -r1.179.4.2 src/sys/nfs/nfs_bio.c

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

Modified files:

Index: src/sys/nfs/nfs_bio.c
diff -u src/sys/nfs/nfs_bio.c:1.179.4.1 src/sys/nfs/nfs_bio.c:1.179.4.2
--- src/sys/nfs/nfs_bio.c:1.179.4.1	Sun Nov  2 23:08:56 2008
+++ src/sys/nfs/nfs_bio.c	Fri Jul 16 18:31:59 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: nfs_bio.c,v 1.179.4.1 2008/11/02 23:08:56 snj Exp $	*/
+/*	$NetBSD: nfs_bio.c,v 1.179.4.2 2010/07/16 18:31:59 riz Exp $	*/
 
 /*
  * Copyright (c) 1989, 1993
@@ -35,7 +35,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: nfs_bio.c,v 1.179.4.1 2008/11/02 23:08:56 snj Exp $);
+__KERNEL_RCSID(0, $NetBSD: nfs_bio.c,v 1.179.4.2 2010/07/16 18:31:59 riz Exp $);
 
 #include opt_nfs.h
 #include opt_ddb.h
@@ -1045,7 +1045,7 @@
 pgs[i]-flags = ~(PG_NEEDCOMMIT | PG_RDONLY);
 			}
 			mutex_exit(uobj-vmobjlock);
-			return 0;
+			goto out;
 		} else if (error == NFSERR_STALEWRITEVERF) {
 			nfs_clearcommit(vp-v_mount);
 			goto again;



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

2010-07-16 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Fri Jul 16 18:34:08 UTC 2010

Modified Files:
src/lib/libc/misc [netbsd-5]: initfini.c
src/lib/libc/stdlib [netbsd-5]: exit.c

Log Message:
Pull up following revision(s) (requested by joerg in ticket #1423):
lib/libc/stdlib/exit.c: revision 1.12
lib/libc/misc/initfini.c: revision 1.6
Ensure that initfini.c is referenced by exit.c. The start up code has to
reference the latter as a return of main() results in a call to exit(3),
so this ensures that the libc constructors are run for statically linked
programs. Fixes PR 37454.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.5.6.1 src/lib/libc/misc/initfini.c
cvs rdiff -u -r1.11 -r1.11.12.1 src/lib/libc/stdlib/exit.c

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

Modified files:

Index: src/lib/libc/misc/initfini.c
diff -u src/lib/libc/misc/initfini.c:1.5 src/lib/libc/misc/initfini.c:1.5.6.1
--- src/lib/libc/misc/initfini.c:1.5	Mon Apr 28 20:23:00 2008
+++ src/lib/libc/misc/initfini.c	Fri Jul 16 18:34:08 2010
@@ -1,4 +1,4 @@
-/* 	$NetBSD: initfini.c,v 1.5 2008/04/28 20:23:00 martin Exp $	 */
+/* 	$NetBSD: initfini.c,v 1.5.6.1 2010/07/16 18:34:08 riz Exp $	 */
 
 /*-
  * Copyright (c) 2007 The NetBSD Foundation, Inc.
@@ -30,13 +30,13 @@
  */
 
 #include sys/cdefs.h
-__RCSID($NetBSD: initfini.c,v 1.5 2008/04/28 20:23:00 martin Exp $);
+__RCSID($NetBSD: initfini.c,v 1.5.6.1 2010/07/16 18:34:08 riz Exp $);
 
 #ifdef _LIBC
 #include namespace.h
 #endif
 
-static void	__libc_init(void) __attribute__((__constructor__, __used__));
+void	__libc_init(void) __attribute__((__constructor__, __used__));
 
 void	__guard_setup(void);
 void	__libc_thr_init(void);
@@ -44,7 +44,7 @@
 void	__libc_atexit_init(void);
 
 /* LINTED used */
-static void
+void
 __libc_init(void)
 {
 

Index: src/lib/libc/stdlib/exit.c
diff -u src/lib/libc/stdlib/exit.c:1.11 src/lib/libc/stdlib/exit.c:1.11.12.1
--- src/lib/libc/stdlib/exit.c:1.11	Tue Oct 30 17:19:59 2007
+++ src/lib/libc/stdlib/exit.c	Fri Jul 16 18:34:08 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: exit.c,v 1.11 2007/10/30 17:19:59 skrll Exp $	*/
+/*	$NetBSD: exit.c,v 1.11.12.1 2010/07/16 18:34:08 riz Exp $	*/
 
 /*-
  * Copyright (c) 1990, 1993
@@ -34,7 +34,7 @@
 #if 0
 static char sccsid[] = @(#)exit.c	8.1 (Berkeley) 6/4/93;
 #else
-__RCSID($NetBSD: exit.c,v 1.11 2007/10/30 17:19:59 skrll Exp $);
+__RCSID($NetBSD: exit.c,v 1.11.12.1 2010/07/16 18:34:08 riz Exp $);
 #endif
 #endif /* LIBC_SCCS and not lint */
 
@@ -45,14 +45,18 @@
 #include atexit.h
 #endif
 
+extern void __libc_init(void);
+#ifndef __lint
+static void (*force_ref)(void) __used = __libc_init;
+#endif
+
 void (*__cleanup) __P((void));
 
 /*
  * Exit, flushing stdio buffers if necessary.
  */
 void
-exit(status)
-	int status;
+exit(int status)
 {
 
 #ifdef _LIBC



CVS commit: [netbsd-5] src/sys/arch

2010-07-16 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Fri Jul 16 18:40:39 UTC 2010

Modified Files:
src/sys/arch/amd64/amd64 [netbsd-5]: netbsd32_machdep.c
src/sys/arch/i386/i386 [netbsd-5]: trap.c

Log Message:
Apply patches (requested by chs in ticket #1424):
sys/arch/amd64/amd64/netbsd32_machdep.c: patch
sys/arch/i386/i386/trap.c:   patch
Fix several panics that can be caused by applications using
bad segment register values with setcontext() or sigreturn().


To generate a diff of this commit:
cvs rdiff -u -r1.55.4.1 -r1.55.4.2 \
src/sys/arch/amd64/amd64/netbsd32_machdep.c
cvs rdiff -u -r1.241.4.2 -r1.241.4.3 src/sys/arch/i386/i386/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/amd64/amd64/netbsd32_machdep.c
diff -u src/sys/arch/amd64/amd64/netbsd32_machdep.c:1.55.4.1 src/sys/arch/amd64/amd64/netbsd32_machdep.c:1.55.4.2
--- src/sys/arch/amd64/amd64/netbsd32_machdep.c:1.55.4.1	Sat Oct  3 23:34:48 2009
+++ src/sys/arch/amd64/amd64/netbsd32_machdep.c	Fri Jul 16 18:40:39 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: netbsd32_machdep.c,v 1.55.4.1 2009/10/03 23:34:48 snj Exp $	*/
+/*	$NetBSD: netbsd32_machdep.c,v 1.55.4.2 2010/07/16 18:40:39 riz Exp $	*/
 
 /*
  * Copyright (c) 2001 Wasabi Systems, Inc.
@@ -36,7 +36,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: netbsd32_machdep.c,v 1.55.4.1 2009/10/03 23:34:48 snj Exp $);
+__KERNEL_RCSID(0, $NetBSD: netbsd32_machdep.c,v 1.55.4.2 2010/07/16 18:40:39 riz Exp $);
 
 #include opt_compat_netbsd.h
 #include opt_coredump.h
@@ -942,7 +942,9 @@
 static int
 check_sigcontext32(const struct netbsd32_sigcontext *scp, struct trapframe *tf)
 {
-	if (((scp-sc_eflags ^ tf-tf_rflags)  PSL_USERSTATIC) != 0)
+
+	if (((scp-sc_eflags ^ tf-tf_rflags)  PSL_USERSTATIC) != 0 ||
+	scp-sc_cs != GSEL(GUCODE32_SEL, SEL_UPL))
 		return EINVAL;
 	if (scp-sc_fs != 0  !VALID_USER_DSEL32(scp-sc_fs))
 		return EINVAL;
@@ -964,7 +966,8 @@
 
 	gr = mcp-__gregs;
 
-	if (((gr[_REG32_EFL] ^ tf-tf_rflags)  PSL_USERSTATIC) != 0)
+	if (((gr[_REG32_EFL] ^ tf-tf_rflags)  PSL_USERSTATIC) != 0 ||
+	gr[_REG32_CS] != GSEL(GUCODE32_SEL, SEL_UPL))
 		return EINVAL;
 	if (gr[_REG32_FS] != 0  !VALID_USER_DSEL32(gr[_REG32_FS]))
 		return EINVAL;

Index: src/sys/arch/i386/i386/trap.c
diff -u src/sys/arch/i386/i386/trap.c:1.241.4.2 src/sys/arch/i386/i386/trap.c:1.241.4.3
--- src/sys/arch/i386/i386/trap.c:1.241.4.2	Thu May 20 05:51:59 2010
+++ src/sys/arch/i386/i386/trap.c	Fri Jul 16 18:40:39 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: trap.c,v 1.241.4.2 2010/05/20 05:51:59 snj Exp $	*/
+/*	$NetBSD: trap.c,v 1.241.4.3 2010/07/16 18:40:39 riz Exp $	*/
 
 /*-
  * Copyright (c) 1998, 2000, 2005, 2006, 2007, 2008 The NetBSD Foundation, Inc.
@@ -68,7 +68,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: trap.c,v 1.241.4.2 2010/05/20 05:51:59 snj Exp $);
+__KERNEL_RCSID(0, $NetBSD: trap.c,v 1.241.4.3 2010/07/16 18:40:39 riz Exp $);
 
 #include opt_ddb.h
 #include opt_kgdb.h
@@ -401,6 +401,7 @@
 		 * returning from a trap, syscall, or interrupt.
 		 */
 
+kern_pagefault:
 		KSI_INIT_TRAP(ksi);
 		ksi.ksi_signo = SIGSEGV;
 		ksi.ksi_code = SEGV_ACCERR;
@@ -427,7 +428,8 @@
 			break;
 		case 0x8e:
 			switch (*(uint32_t *)frame-tf_eip) {
-			case 0x8e242c8e:	/* mov (%esp,%gs), then */
+			case 0x8e242c8e:	/* mov (%esp),%gs */
+			case 0x00246c8e:	/* mov 0x0(%esp),%gs */
 			case 0x0424648e:	/* mov 0x4(%esp),%fs */
 			case 0x0824448e:	/* mov 0x8(%esp),%es */
 			case 0x0c245c8e:	/* mov 0xc(%esp),%ds */
@@ -734,7 +736,7 @@
 goto copyfault;
 			printf(uvm_fault(%p, %#lx, %d) - %#x\n,
 			map, va, ftype, error);
-			goto we_re_toast;
+			goto kern_pagefault;
 		}
 		if (error == ENOMEM) {
 			ksi.ksi_signo = SIGKILL;



CVS commit: [netbsd-5-0] src/sys/netsmb

2010-07-16 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Fri Jul 16 18:48:41 UTC 2010

Modified Files:
src/sys/netsmb [netbsd-5-0]: mchain.h smb_dev.h smb_subr.c smb_subr.h
subr_mchain.c

Log Message:
Pull up following revision(s) (requested by christos in ticket #1426):
sys/netsmb/subr_mchain.c: revision 1.19
sys/netsmb/smb_subr.c: revision 1.35
sys/netsmb/smb_subr.h: revision 1.19
sys/netsmb/mchain.h: revision 1.9
sys/netsmb/smb_dev.h: revision 1.7
Convert sizes/lengths to unsigned (size_t) or uint32_t
(for binary compatibility).


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.7.58.1 src/sys/netsmb/mchain.h
cvs rdiff -u -r1.6 -r1.6.80.1 src/sys/netsmb/smb_dev.h
cvs rdiff -u -r1.32 -r1.32.12.1 src/sys/netsmb/smb_subr.c
cvs rdiff -u -r1.18 -r1.18.12.1 src/sys/netsmb/smb_subr.h
cvs rdiff -u -r1.15 -r1.15.12.1 src/sys/netsmb/subr_mchain.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/netsmb/mchain.h
diff -u src/sys/netsmb/mchain.h:1.7 src/sys/netsmb/mchain.h:1.7.58.1
--- src/sys/netsmb/mchain.h:1.7	Sun Mar  4 06:03:35 2007
+++ src/sys/netsmb/mchain.h	Fri Jul 16 18:48:41 2010
@@ -59,8 +59,8 @@
 struct mbchain {
 	struct mbuf *	mb_top;		/* head of mbufs chain */
 	struct mbuf * 	mb_cur;		/* current mbuf */
-	int		mb_mleft;	/* free space in the current mbuf */
-	int		mb_count;	/* total number of bytes */
+	size_t		mb_mleft;	/* free space in the current mbuf */
+	size_t		mb_count;	/* total number of bytes */
 	mb_copy_t *	mb_copy;	/* user defined copy function */
 	void *		mb_udata;	/* user data */
 };
@@ -78,7 +78,7 @@
 void mb_done(struct mbchain *mbp);
 struct mbuf *mb_detach(struct mbchain *mbp);
 int  mb_fixhdr(struct mbchain *mbp);
-void *mb_reserve(struct mbchain *mbp, int size);
+void *mb_reserve(struct mbchain *mbp, size_t size);
 
 int  mb_put_uint8(struct mbchain *mbp, u_int8_t x);
 int  mb_put_uint16be(struct mbchain *mbp, u_int16_t x);
@@ -87,9 +87,9 @@
 int  mb_put_uint32le(struct mbchain *mbp, u_int32_t x);
 int  mb_put_int64be(struct mbchain *mbp, int64_t x);
 int  mb_put_int64le(struct mbchain *mbp, int64_t x);
-int  mb_put_mem(struct mbchain *mbp, const char * source, int size, int type);
+int  mb_put_mem(struct mbchain *mbp, const char * source, size_t size, int type);
 int  mb_put_mbuf(struct mbchain *mbp, struct mbuf *m);
-int  mb_put_uio(struct mbchain *mbp, struct uio *uiop, int size);
+int  mb_put_uio(struct mbchain *mbp, struct uio *uiop, size_t size);
 
 int  md_init(struct mdchain *mdp);
 void md_initm(struct mdchain *mbp, struct mbuf *m);
@@ -106,9 +106,9 @@
 int  md_get_int64(struct mdchain *mdp, int64_t *x);
 int  md_get_int64be(struct mdchain *mdp, int64_t *x);
 int  md_get_int64le(struct mdchain *mdp, int64_t *x);
-int  md_get_mem(struct mdchain *mdp, void *target, int size, int type);
+int  md_get_mem(struct mdchain *mdp, void *target, size_t size, int type);
 int  md_get_mbuf(struct mdchain *mdp, int size, struct mbuf **m);
-int  md_get_uio(struct mdchain *mdp, struct uio *uiop, int size);
+int  md_get_uio(struct mdchain *mdp, struct uio *uiop, size_t size);
 
 #endif	/* ifdef _KERNEL */
 

Index: src/sys/netsmb/smb_dev.h
diff -u src/sys/netsmb/smb_dev.h:1.6 src/sys/netsmb/smb_dev.h:1.6.80.1
--- src/sys/netsmb/smb_dev.h:1.6	Sun May 14 21:20:13 2006
+++ src/sys/netsmb/smb_dev.h	Fri Jul 16 18:48:41 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: smb_dev.h,v 1.6 2006/05/14 21:20:13 elad Exp $	*/
+/*	$NetBSD: smb_dev.h,v 1.6.80.1 2010/07/16 18:48:41 riz Exp $	*/
 
 /*
  * Copyright (c) 2000-2001 Boris Popov
@@ -67,9 +67,9 @@
 
 struct smbioc_ossn {
 	int		ioc_opt;
-	int		ioc_svlen;	/* size of ioc_server address */
+	uint32_t	ioc_svlen;	/* size of ioc_server address */
 	struct sockaddr*ioc_server;
-	int		ioc_lolen;	/* size of ioc_local address */
+	uint32_t	ioc_lolen;	/* size of ioc_local address */
 	struct sockaddr*ioc_local;
 	char		ioc_srvname[SMB_MAXSRVNAMELEN + 1];
 	int		ioc_timeout;

Index: src/sys/netsmb/smb_subr.c
diff -u src/sys/netsmb/smb_subr.c:1.32 src/sys/netsmb/smb_subr.c:1.32.12.1
--- src/sys/netsmb/smb_subr.c:1.32	Tue Jun 24 10:37:19 2008
+++ src/sys/netsmb/smb_subr.c	Fri Jul 16 18:48:41 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: smb_subr.c,v 1.32 2008/06/24 10:37:19 gmcgarry Exp $	*/
+/*	$NetBSD: smb_subr.c,v 1.32.12.1 2010/07/16 18:48:41 riz Exp $	*/
 
 /*
  * Copyright (c) 2000-2001 Boris Popov
@@ -35,7 +35,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: smb_subr.c,v 1.32 2008/06/24 10:37:19 gmcgarry Exp $);
+__KERNEL_RCSID(0, $NetBSD: smb_subr.c,v 1.32.12.1 2010/07/16 18:48:41 riz Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -96,7 +96,7 @@
 smb_strdup(const char *s)
 {
 	char *p;
-	int len;
+	size_t len;
 
 	len = s ? strlen(s) + 1 : 1;
 	p = malloc(len, M_SMBSTR, M_WAITOK);
@@ -111,10 +111,10 @@
  * duplicate string from a user space.
  */
 char *
-smb_strdupin(char *s, int maxlen)

CVS commit: [netbsd-5] src/gnu/dist/binutils/gas

2010-07-16 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Fri Jul 16 19:03:21 UTC 2010

Modified Files:
src/gnu/dist/binutils/gas [netbsd-5]: atof-generic.c
src/gnu/dist/binutils/gas/config [netbsd-5]: atof-vax.c

Log Message:
Pull up following revision(s) (requested by jklos in ticket #1427):
gnu/dist/binutils/gas/config/atof-vax.c
gnu/dist/binutils/gas/atof-generic.c
From Matt Thomas, suggested upstream:
* atof-generic.c (atof_generic): recognize snan and qnan in
addition to nan and inf.
* atof-vax.c (flonum_gen2vax): deal properly with nan, snan, qnan,
and +Inf and -Inf codes.
This fixes PR toolchain/43303.


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.3 -r1.1.1.3.26.1 \
src/gnu/dist/binutils/gas/atof-generic.c
cvs rdiff -u -r1.1.1.1 -r1.1.1.1.38.1 \
src/gnu/dist/binutils/gas/config/atof-vax.c

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

Modified files:

Index: src/gnu/dist/binutils/gas/atof-generic.c
diff -u src/gnu/dist/binutils/gas/atof-generic.c:1.1.1.3 src/gnu/dist/binutils/gas/atof-generic.c:1.1.1.3.26.1
--- src/gnu/dist/binutils/gas/atof-generic.c:1.1.1.3	Thu Feb  2 20:55:07 2006
+++ src/gnu/dist/binutils/gas/atof-generic.c	Fri Jul 16 19:03:21 2010
@@ -123,6 +123,32 @@
 
   switch (first_digit[0])
 {
+case 's':
+case 'S':
+	if (!strncasecmp (snan, first_digit, 4))
+	{
+	  address_of_generic_floating_point_number-sign = 0;
+	  address_of_generic_floating_point_number-exponent = 0;
+	  address_of_generic_floating_point_number-leader =
+	address_of_generic_floating_point_number-low;
+	  *address_of_string_pointer = first_digit + 4;
+	  return 0;
+	}
+  break;
+
+case 'q':
+case 'Q':
+  if (!strncasecmp (qnan, first_digit, 4))
+	{
+	  address_of_generic_floating_point_number-sign = 0;
+	  address_of_generic_floating_point_number-exponent = 0;
+	  address_of_generic_floating_point_number-leader =
+	address_of_generic_floating_point_number-low;
+	  *address_of_string_pointer = first_digit + 4;
+	  return 0;
+	}
+  break;
+
 case 'n':
 case 'N':
   if (!strncasecmp (nan, first_digit, 3))

Index: src/gnu/dist/binutils/gas/config/atof-vax.c
diff -u src/gnu/dist/binutils/gas/config/atof-vax.c:1.1.1.1 src/gnu/dist/binutils/gas/config/atof-vax.c:1.1.1.1.38.1
--- src/gnu/dist/binutils/gas/config/atof-vax.c:1.1.1.1	Wed Nov 26 11:34:23 2003
+++ src/gnu/dist/binutils/gas/config/atof-vax.c	Fri Jul 16 19:03:21 2010
@@ -292,10 +292,27 @@
 	  int exponent_skippage;
 	  LITTLENUM_TYPE word1;
 
-	  /* JF: Deal with new Nan, +Inf and -Inf codes */
 	  if (f-sign != '-'  f-sign != '+')
 	{
-	  make_invalid_floating_point_number (words);
+	  if (f-sign == 0)
+		{
+		  /* All NaNs are 0.  */
+		  memset (words, 0x00, sizeof (LITTLENUM_TYPE) * precision);
+		}
+	  else if (f-sign == 'P')
+		{
+		  /* Positive Infinity.  */
+		  memset (words, 0xff, sizeof (LITTLENUM_TYPE) * precision);
+		  words[0] = 0x7fff;
+		}
+	  else if (f-sign == 'N')
+		{
+		  /* Negative Infinity.  */
+		  memset (words, 0x00, sizeof (LITTLENUM_TYPE) * precision);
+		  words[0] = 0x0080;
+		}
+	  else
+		make_invalid_floating_point_number (words);
 	  return return_value;
 	}
 	  /*



CVS commit: [netbsd-5-0] src/sys/netinet6

2010-07-16 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Fri Jul 16 19:10:59 UTC 2010

Modified Files:
src/sys/netinet6 [netbsd-5-0]: udp6_output.c

Log Message:
Pull up following revision(s) (requested by dyoung in ticket #1428):
sys/netinet6/udp6_output.c: revision 1.41
Under some circumstances, udp6_output() would call ip6_clearpktopts()
with an uninitialized struct ip6_pktopts on the stack, opt.
ip6_clearpktopts(opt, ...) could dereference dangling pointers,
leading to memory corruption or a crash.  Now, udp6_output() calls
ip6_clearpktopts(opt, ...) only if opt was initialized. Thanks to
Clement LECIGNE for reporting this bug.
Fix a potential memory leak: it is udp6_output()'s responsibility
to free its mbuf arguments on error.  In the unlikely event that
sa6_embedscope() failed, udp6_output() would not free its mbuf
arguments.
I will ask for this to be pulled up to -4, -5, and -5-0.


To generate a diff of this commit:
cvs rdiff -u -r1.37 -r1.37.10.1 src/sys/netinet6/udp6_output.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/netinet6/udp6_output.c
diff -u src/sys/netinet6/udp6_output.c:1.37 src/sys/netinet6/udp6_output.c:1.37.10.1
--- src/sys/netinet6/udp6_output.c:1.37	Fri Oct 24 22:30:32 2008
+++ src/sys/netinet6/udp6_output.c	Fri Jul 16 19:10:59 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: udp6_output.c,v 1.37 2008/10/24 22:30:32 dyoung Exp $	*/
+/*	$NetBSD: udp6_output.c,v 1.37.10.1 2010/07/16 19:10:59 riz Exp $	*/
 /*	$KAME: udp6_output.c,v 1.43 2001/10/15 09:19:52 itojun Exp $	*/
 
 /*
@@ -62,7 +62,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: udp6_output.c,v 1.37 2008/10/24 22:30:32 dyoung Exp $);
+__KERNEL_RCSID(0, $NetBSD: udp6_output.c,v 1.37.10.1 2010/07/16 19:10:59 riz Exp $);
 
 #include opt_inet.h
 
@@ -126,7 +126,8 @@
 	int scope_ambiguous = 0;
 	u_int16_t fport;
 	int error = 0;
-	struct ip6_pktopts *optp, opt;
+	struct ip6_pktopts *optp = NULL;
+	struct ip6_pktopts opt;
 	int priv;
 	int af = AF_INET6, hlen = sizeof(struct ip6_hdr);
 #ifdef INET
@@ -167,7 +168,7 @@
 		if (sin6-sin6_scope_id == 0  !ip6_use_defzone)
 			scope_ambiguous = 1;
 		if ((error = sa6_embedscope(sin6, ip6_use_defzone)) != 0)
-			return (error);
+			goto release;
 	}
 
 	if (control) {
@@ -408,7 +409,8 @@
 
 releaseopt:
 	if (control) {
-		ip6_clearpktopts(opt, -1);
+		if (optp == opt)
+			ip6_clearpktopts(opt, -1);
 		m_freem(control);
 	}
 	return (error);



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

2010-07-16 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Fri Jul 16 19:12:26 UTC 2010

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

Log Message:
Tickets 1424, 1426, 1428.


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.13 -r1.1.2.14 src/doc/CHANGES-5.0.3

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.0.3
diff -u src/doc/CHANGES-5.0.3:1.1.2.13 src/doc/CHANGES-5.0.3:1.1.2.14
--- src/doc/CHANGES-5.0.3:1.1.2.13	Thu May 20 05:57:43 2010
+++ src/doc/CHANGES-5.0.3	Fri Jul 16 19:12:26 2010
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-5.0.3,v 1.1.2.13 2010/05/20 05:57:43 snj Exp $
+# $NetBSD: CHANGES-5.0.3,v 1.1.2.14 2010/07/16 19:12:26 riz Exp $
 
 A complete list of changes from the NetBSD 5.0.2 release to the NetBSD 5.0.3
 release:
@@ -257,3 +257,26 @@
 	entered with what look like valid registers.
 	[riz, ticket #1401]
 
+sys/arch/amd64/amd64/netbsd32_machdep.c		patch
+sys/arch/i386/i386/trap.c			patch
+
+	Fix several panics that can be caused by applications using
+	bad segment register values with setcontext() or sigreturn().
+	[chs, ticket #1424]
+
+sys/netsmb/mchain.h1.9
+sys/netsmb/smb_dev.h1.7
+sys/netsmb/smb_subr.c1.35
+sys/netsmb/smb_subr.h1.19
+sys/netsmb/subr_mchain.c			1.19
+
+	Convert sizes/lengths to unsigned (size_t) or uint32_t
+	(for binary compatibility).
+	[christos, ticket #1426]
+
+sys/netinet6/udp6_output.c			1.41 via patch
+
+	udp6_output(): call ip6_clearpktopts(opt, ...) only if opt
+	was initialized.
+	[dyoung, ticket #1428]
+



CVS commit: [netbsd-5] src/sys/netinet6

2010-07-16 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Fri Jul 16 19:12:53 UTC 2010

Modified Files:
src/sys/netinet6 [netbsd-5]: udp6_output.c

Log Message:
Pull up following revision(s) (requested by dyoung in ticket #1428):
sys/netinet6/udp6_output.c: revision 1.41
Under some circumstances, udp6_output() would call ip6_clearpktopts()
with an uninitialized struct ip6_pktopts on the stack, opt.
ip6_clearpktopts(opt, ...) could dereference dangling pointers,
leading to memory corruption or a crash.  Now, udp6_output() calls
ip6_clearpktopts(opt, ...) only if opt was initialized. Thanks to
Clement LECIGNE for reporting this bug.
Fix a potential memory leak: it is udp6_output()'s responsibility
to free its mbuf arguments on error.  In the unlikely event that
sa6_embedscope() failed, udp6_output() would not free its mbuf
arguments.
I will ask for this to be pulled up to -4, -5, and -5-0.


To generate a diff of this commit:
cvs rdiff -u -r1.37 -r1.37.4.1 src/sys/netinet6/udp6_output.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/netinet6/udp6_output.c
diff -u src/sys/netinet6/udp6_output.c:1.37 src/sys/netinet6/udp6_output.c:1.37.4.1
--- src/sys/netinet6/udp6_output.c:1.37	Fri Oct 24 22:30:32 2008
+++ src/sys/netinet6/udp6_output.c	Fri Jul 16 19:12:53 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: udp6_output.c,v 1.37 2008/10/24 22:30:32 dyoung Exp $	*/
+/*	$NetBSD: udp6_output.c,v 1.37.4.1 2010/07/16 19:12:53 riz Exp $	*/
 /*	$KAME: udp6_output.c,v 1.43 2001/10/15 09:19:52 itojun Exp $	*/
 
 /*
@@ -62,7 +62,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: udp6_output.c,v 1.37 2008/10/24 22:30:32 dyoung Exp $);
+__KERNEL_RCSID(0, $NetBSD: udp6_output.c,v 1.37.4.1 2010/07/16 19:12:53 riz Exp $);
 
 #include opt_inet.h
 
@@ -126,7 +126,8 @@
 	int scope_ambiguous = 0;
 	u_int16_t fport;
 	int error = 0;
-	struct ip6_pktopts *optp, opt;
+	struct ip6_pktopts *optp = NULL;
+	struct ip6_pktopts opt;
 	int priv;
 	int af = AF_INET6, hlen = sizeof(struct ip6_hdr);
 #ifdef INET
@@ -167,7 +168,7 @@
 		if (sin6-sin6_scope_id == 0  !ip6_use_defzone)
 			scope_ambiguous = 1;
 		if ((error = sa6_embedscope(sin6, ip6_use_defzone)) != 0)
-			return (error);
+			goto release;
 	}
 
 	if (control) {
@@ -408,7 +409,8 @@
 
 releaseopt:
 	if (control) {
-		ip6_clearpktopts(opt, -1);
+		if (optp == opt)
+			ip6_clearpktopts(opt, -1);
 		m_freem(control);
 	}
 	return (error);



CVS commit: [netbsd-5] src/doc

2010-07-16 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Fri Jul 16 19:14:13 UTC 2010

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

Log Message:
Tickets 1412, 1417, 1423, 1424, 1426-1428.


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.235 -r1.1.2.236 src/doc/CHANGES-5.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
diff -u src/doc/CHANGES-5.1:1.1.2.235 src/doc/CHANGES-5.1:1.1.2.236
--- src/doc/CHANGES-5.1:1.1.2.235	Tue Jun 29 18:02:19 2010
+++ src/doc/CHANGES-5.1	Fri Jul 16 19:14:13 2010
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-5.1,v 1.1.2.235 2010/06/29 18:02:19 riz Exp $
+# $NetBSD: CHANGES-5.1,v 1.1.2.236 2010/07/16 19:14:13 riz Exp $
 
 A complete list of changes from the NetBSD 5.0 release to the NetBSD 5.1
 release:
@@ -17361,3 +17361,52 @@
 	Fix a segfault on large input files.
 	[dholland, ticket #1420]
 
+sys/arch/amiga/amiga/amiga_init.c		1.118
+sys/arch/amiga/amiga/locore.s			1.149 via patch
+sys/arch/amiga/dev/clock.c			1.51
+sys/arch/amiga/dev/kbd.c			1.53
+
+	Fix keyboard handshake problems with some A1200 models and
+	restore precision for short delays on DraCo systems.
+	[phx, ticket #1412]
+
+sys/nfs/nfs_bio.c1.185
+
+	Fix memory leak during some NFS writes.
+	[jakllsch, ticket #1417]
+
+lib/libc/misc/initfini.c			1.6
+lib/libc/stdlib/exit.c1.12
+
+	Ensure that initfini.c is referenced by exit.c. Fixes PR 37454.
+	[joerg, ticket #1423]
+
+sys/arch/amd64/amd64/netbsd32_machdep.c		patch
+sys/arch/i386/i386/trap.c			patch
+
+	Fix several panics that can be caused by applications using
+	bad segment register values with setcontext() or sigreturn().
+	[chs, ticket #1424]
+
+sys/netsmb/mchain.h1.9
+sys/netsmb/smb_dev.h1.7
+sys/netsmb/smb_subr.c1.35
+sys/netsmb/smb_subr.h1.19
+sys/netsmb/subr_mchain.c			1.19
+
+	Convert sizes/lengths to unsigned (size_t) or uint32_t
+	(for binary compatibility).
+	[christos, ticket #1426]
+
+gnu/dist/binutils/gas/config/atof-vax.c		patch
+gnu/dist/binutils/gas/atof-generic.c		patch
+
+	Fix vax FP handling, from Matt Thomas. PR#43303.
+	[jklos, ticket #1427]
+
+sys/netinet6/udp6_output.c			1.41 via patch
+
+	udp6_output(): call ip6_clearpktopts(opt, ...) only if opt
+	was initialized.
+	[dyoung, ticket #1428]
+



CVS commit: src/tests/fs/vfs

2010-07-16 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Fri Jul 16 19:16:42 UTC 2010

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

Log Message:
Some of the msdosfs tests are killed by SSP due to stack limit
being exceeded.  I cannot figure out what is going on by code
reading, nor repeat this either on my desktop or in qemu, so skip
those tests for msdosfs until I can get to the bottom of it.


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/tests/fs/vfs/t_renamerace.c
cvs rdiff -u -r1.2 -r1.3 src/tests/fs/vfs/t_vnops.c

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

Modified files:

Index: src/tests/fs/vfs/t_renamerace.c
diff -u src/tests/fs/vfs/t_renamerace.c:1.7 src/tests/fs/vfs/t_renamerace.c:1.8
--- src/tests/fs/vfs/t_renamerace.c:1.7	Fri Jul 16 14:14:27 2010
+++ src/tests/fs/vfs/t_renamerace.c	Fri Jul 16 19:16:41 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: t_renamerace.c,v 1.7 2010/07/16 14:14:27 pooka Exp $	*/
+/*	$NetBSD: t_renamerace.c,v 1.8 2010/07/16 19:16:41 pooka Exp $	*/
 
 /*
  * Modified for rump and atf from a program supplied
@@ -90,6 +90,9 @@
 	if (FSTYPE_LFS(tc))
 		atf_tc_expect_signal(-1, PR kern/43582);
 
+	if (FSTYPE_MSDOS(tc))
+		atf_tc_skip(test fails in some setups, reason unknown);
+
 	pthread_create(pt1, NULL, w1, __UNCONST(mp));
 	pthread_create(pt2, NULL, w2, __UNCONST(mp));
 

Index: src/tests/fs/vfs/t_vnops.c
diff -u src/tests/fs/vfs/t_vnops.c:1.2 src/tests/fs/vfs/t_vnops.c:1.3
--- src/tests/fs/vfs/t_vnops.c:1.2	Wed Jul 14 20:45:48 2010
+++ src/tests/fs/vfs/t_vnops.c	Fri Jul 16 19:16:41 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: t_vnops.c,v 1.2 2010/07/14 20:45:48 pooka Exp $	*/
+/*	$NetBSD: t_vnops.c,v 1.3 2010/07/16 19:16:41 pooka Exp $	*/
 
 /*-
  * Copyright (c) 2010 The NetBSD Foundation, Inc.
@@ -168,6 +168,9 @@
 	char pb1[MAXPATHLEN], pb2[MAXPATHLEN], pb3[MAXPATHLEN];
 	struct stat ref;
 
+	if (FSTYPE_MSDOS(tc))
+		atf_tc_skip(test fails in some setups, reason unknown);
+
 	USES_DIRS;
 
 	md(pb1, mp, dir1);
@@ -285,6 +288,9 @@
 	struct stat sb;
 	ino_t f1ino, f2ino;
 
+	if (FSTYPE_MSDOS(tc))
+		atf_tc_skip(test fails in some setups, reason unknown);
+
 	if (rump_sys_chdir(mp) == -1)
 		atf_tc_fail_errno(chdir mountpoint);
 



CVS commit: [netbsd-4] src/sys/netinet6

2010-07-16 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Fri Jul 16 19:38:11 UTC 2010

Modified Files:
src/sys/netinet6 [netbsd-4]: udp6_output.c

Log Message:
Pull up following revision(s) (requested by dyoung in ticket #1397):
sys/netinet6/udp6_output.c: revision 1.41
Under some circumstances, udp6_output() would call ip6_clearpktopts()
with an uninitialized struct ip6_pktopts on the stack, opt.
ip6_clearpktopts(opt, ...) could dereference dangling pointers,
leading to memory corruption or a crash.  Now, udp6_output() calls
ip6_clearpktopts(opt, ...) only if opt was initialized. Thanks to
Clement LECIGNE for reporting this bug.
Fix a potential memory leak: it is udp6_output()'s responsibility
to free its mbuf arguments on error.  In the unlikely event that
sa6_embedscope() failed, udp6_output() would not free its mbuf
arguments.
I will ask for this to be pulled up to -4, -5, and -5-0.


To generate a diff of this commit:
cvs rdiff -u -r1.26 -r1.26.8.1 src/sys/netinet6/udp6_output.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/netinet6/udp6_output.c
diff -u src/sys/netinet6/udp6_output.c:1.26 src/sys/netinet6/udp6_output.c:1.26.8.1
--- src/sys/netinet6/udp6_output.c:1.26	Sun Jul 23 22:06:13 2006
+++ src/sys/netinet6/udp6_output.c	Fri Jul 16 19:38:11 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: udp6_output.c,v 1.26 2006/07/23 22:06:13 ad Exp $	*/
+/*	$NetBSD: udp6_output.c,v 1.26.8.1 2010/07/16 19:38:11 riz Exp $	*/
 /*	$KAME: udp6_output.c,v 1.43 2001/10/15 09:19:52 itojun Exp $	*/
 
 /*
@@ -62,7 +62,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: udp6_output.c,v 1.26 2006/07/23 22:06:13 ad Exp $);
+__KERNEL_RCSID(0, $NetBSD: udp6_output.c,v 1.26.8.1 2010/07/16 19:38:11 riz Exp $);
 
 #include opt_inet.h
 
@@ -126,7 +126,8 @@
 	int scope_ambiguous = 0;
 	u_int16_t fport;
 	int error = 0;
-	struct ip6_pktopts *optp, opt;
+	struct ip6_pktopts *optp = NULL;
+	struct ip6_pktopts opt;
 	int priv;
 	int af = AF_INET6, hlen = sizeof(struct ip6_hdr);
 #ifdef INET
@@ -167,7 +168,7 @@
 		if (sin6-sin6_scope_id == 0  !ip6_use_defzone)
 			scope_ambiguous = 1;
 		if ((error = sa6_embedscope(sin6, ip6_use_defzone)) != 0)
-			return (error);
+			goto release;
 	}
 
 	if (control) {
@@ -410,7 +411,8 @@
 
 releaseopt:
 	if (control) {
-		ip6_clearpktopts(opt, -1);
+		if (optp == opt)
+			ip6_clearpktopts(opt, -1);
 		m_freem(control);
 	}
 	return (error);



CVS commit: [netbsd-4] src/doc

2010-07-16 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Fri Jul 16 19:39:54 UTC 2010

Modified Files:
src/doc [netbsd-4]: CHANGES-4.1

Log Message:
Ticket 1397


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.202 -r1.1.2.203 src/doc/CHANGES-4.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-4.1
diff -u src/doc/CHANGES-4.1:1.1.2.202 src/doc/CHANGES-4.1:1.1.2.203
--- src/doc/CHANGES-4.1:1.1.2.202	Sun Jun 13 18:16:30 2010
+++ src/doc/CHANGES-4.1	Fri Jul 16 19:39:53 2010
@@ -1,4 +1,4 @@
-#	$NetBSD: CHANGES-4.1,v 1.1.2.202 2010/06/13 18:16:30 riz Exp $
+#	$NetBSD: CHANGES-4.1,v 1.1.2.203 2010/07/16 19:39:53 riz Exp $
 
 A complete list of changes from the NetBSD 4.0 release to the NetBSD 4.1
 release:
@@ -4177,3 +4177,9 @@
 	Don't blow up on date +''. PR#39392.
 	[dholland, ticket #1396]
 
+sys/netinet6/udp6_output.c			1.41 via patch
+
+	udp6_output(): call ip6_clearpktopts(opt, ...) only if opt
+	was initialized.
+	[dyoung, ticket #1397]
+



CVS commit: [netbsd-4-0] src/sys/netinet6

2010-07-16 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Fri Jul 16 19:40:11 UTC 2010

Modified Files:
src/sys/netinet6 [netbsd-4-0]: udp6_output.c

Log Message:
Pull up following revision(s) (requested by dyoung in ticket #1397):
sys/netinet6/udp6_output.c: revision 1.41
Under some circumstances, udp6_output() would call ip6_clearpktopts()
with an uninitialized struct ip6_pktopts on the stack, opt.
ip6_clearpktopts(opt, ...) could dereference dangling pointers,
leading to memory corruption or a crash.  Now, udp6_output() calls
ip6_clearpktopts(opt, ...) only if opt was initialized. Thanks to
Clement LECIGNE for reporting this bug.
Fix a potential memory leak: it is udp6_output()'s responsibility
to free its mbuf arguments on error.  In the unlikely event that
sa6_embedscope() failed, udp6_output() would not free its mbuf
arguments.
I will ask for this to be pulled up to -4, -5, and -5-0.


To generate a diff of this commit:
cvs rdiff -u -r1.26 -r1.26.14.1 src/sys/netinet6/udp6_output.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/netinet6/udp6_output.c
diff -u src/sys/netinet6/udp6_output.c:1.26 src/sys/netinet6/udp6_output.c:1.26.14.1
--- src/sys/netinet6/udp6_output.c:1.26	Sun Jul 23 22:06:13 2006
+++ src/sys/netinet6/udp6_output.c	Fri Jul 16 19:40:10 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: udp6_output.c,v 1.26 2006/07/23 22:06:13 ad Exp $	*/
+/*	$NetBSD: udp6_output.c,v 1.26.14.1 2010/07/16 19:40:10 riz Exp $	*/
 /*	$KAME: udp6_output.c,v 1.43 2001/10/15 09:19:52 itojun Exp $	*/
 
 /*
@@ -62,7 +62,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: udp6_output.c,v 1.26 2006/07/23 22:06:13 ad Exp $);
+__KERNEL_RCSID(0, $NetBSD: udp6_output.c,v 1.26.14.1 2010/07/16 19:40:10 riz Exp $);
 
 #include opt_inet.h
 
@@ -126,7 +126,8 @@
 	int scope_ambiguous = 0;
 	u_int16_t fport;
 	int error = 0;
-	struct ip6_pktopts *optp, opt;
+	struct ip6_pktopts *optp = NULL;
+	struct ip6_pktopts opt;
 	int priv;
 	int af = AF_INET6, hlen = sizeof(struct ip6_hdr);
 #ifdef INET
@@ -167,7 +168,7 @@
 		if (sin6-sin6_scope_id == 0  !ip6_use_defzone)
 			scope_ambiguous = 1;
 		if ((error = sa6_embedscope(sin6, ip6_use_defzone)) != 0)
-			return (error);
+			goto release;
 	}
 
 	if (control) {
@@ -410,7 +411,8 @@
 
 releaseopt:
 	if (control) {
-		ip6_clearpktopts(opt, -1);
+		if (optp == opt)
+			ip6_clearpktopts(opt, -1);
 		m_freem(control);
 	}
 	return (error);



CVS commit: [netbsd-4-0] src/doc

2010-07-16 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Fri Jul 16 19:42:00 UTC 2010

Modified Files:
src/doc [netbsd-4-0]: CHANGES-4.0.2

Log Message:
Ticket 1397.


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.71 -r1.1.2.72 src/doc/CHANGES-4.0.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-4.0.2
diff -u src/doc/CHANGES-4.0.2:1.1.2.71 src/doc/CHANGES-4.0.2:1.1.2.72
--- src/doc/CHANGES-4.0.2:1.1.2.71	Sun Mar 28 18:49:06 2010
+++ src/doc/CHANGES-4.0.2	Fri Jul 16 19:42:00 2010
@@ -1,4 +1,4 @@
-#	$NetBSD: CHANGES-4.0.2,v 1.1.2.71 2010/03/28 18:49:06 snj Exp $
+#	$NetBSD: CHANGES-4.0.2,v 1.1.2.72 2010/07/16 19:42:00 riz Exp $
 
 A complete list of changes from the NetBSD 4.0.1 release to the NetBSD 4.0.2
 release:
@@ -1039,3 +1039,9 @@
 	an OpenSSL client or server to crash due to a read attempt at NULL.
 	[bouyer, ticket #1392]
 
+sys/netinet6/udp6_output.c			1.41 via patch
+
+	udp6_output(): call ip6_clearpktopts(opt, ...) only if opt
+	was initialized.
+	[dyoung, ticket #1397]
+



CVS commit: src/sys/fs/sysvbfs

2010-07-16 Thread Nicolas Joly
Module Name:src
Committed By:   njoly
Date:   Fri Jul 16 23:41:01 UTC 2010

Modified Files:
src/sys/fs/sysvbfs: sysvbfs_vnops.c

Log Message:
Small typo in comment.


To generate a diff of this commit:
cvs rdiff -u -r1.31 -r1.32 src/sys/fs/sysvbfs/sysvbfs_vnops.c

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

Modified files:

Index: src/sys/fs/sysvbfs/sysvbfs_vnops.c
diff -u src/sys/fs/sysvbfs/sysvbfs_vnops.c:1.31 src/sys/fs/sysvbfs/sysvbfs_vnops.c:1.32
--- src/sys/fs/sysvbfs/sysvbfs_vnops.c:1.31	Thu Jun 24 13:03:10 2010
+++ src/sys/fs/sysvbfs/sysvbfs_vnops.c	Fri Jul 16 23:41:01 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: sysvbfs_vnops.c,v 1.31 2010/06/24 13:03:10 hannken Exp $	*/
+/*	$NetBSD: sysvbfs_vnops.c,v 1.32 2010/07/16 23:41:01 njoly Exp $	*/
 
 /*-
  * Copyright (c) 2004 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: sysvbfs_vnops.c,v 1.31 2010/06/24 13:03:10 hannken Exp $);
+__KERNEL_RCSID(0, $NetBSD: sysvbfs_vnops.c,v 1.32 2010/07/16 23:41:01 njoly Exp $);
 
 #include sys/param.h
 #include sys/kernel.h
@@ -87,7 +87,7 @@
 
 	KASSERT((cnp-cn_flags  ISDOTDOT) == 0);
 	if ((error = VOP_ACCESS(a-a_dvp, VEXEC, cnp-cn_cred)) != 0) {
-		return error;	/* directory permittion. */
+		return error;	/* directory permission. */
 	}
 
 	if (namelen == 1  name[0] == '.') {	/* . */



CVS commit: src/sys/fs/sysvbfs

2010-07-16 Thread Nicolas Joly
Module Name:src
Committed By:   njoly
Date:   Sat Jul 17 00:13:42 UTC 2010

Modified Files:
src/sys/fs/sysvbfs: sysvbfs_vnops.c

Log Message:
Fix build with SYSVBFS_VNOPS_DEBUG.


To generate a diff of this commit:
cvs rdiff -u -r1.32 -r1.33 src/sys/fs/sysvbfs/sysvbfs_vnops.c

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

Modified files:

Index: src/sys/fs/sysvbfs/sysvbfs_vnops.c
diff -u src/sys/fs/sysvbfs/sysvbfs_vnops.c:1.32 src/sys/fs/sysvbfs/sysvbfs_vnops.c:1.33
--- src/sys/fs/sysvbfs/sysvbfs_vnops.c:1.32	Fri Jul 16 23:41:01 2010
+++ src/sys/fs/sysvbfs/sysvbfs_vnops.c	Sat Jul 17 00:13:42 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: sysvbfs_vnops.c,v 1.32 2010/07/16 23:41:01 njoly Exp $	*/
+/*	$NetBSD: sysvbfs_vnops.c,v 1.33 2010/07/17 00:13:42 njoly Exp $	*/
 
 /*-
  * Copyright (c) 2004 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: sysvbfs_vnops.c,v 1.32 2010/07/16 23:41:01 njoly Exp $);
+__KERNEL_RCSID(0, $NetBSD: sysvbfs_vnops.c,v 1.33 2010/07/17 00:13:42 njoly Exp $);
 
 #include sys/param.h
 #include sys/kernel.h
@@ -574,7 +574,7 @@
 	struct bfs_dirent *file;
 	int i, n, error;
 
-	DPRINTF(%s: offset=%lld residue=%d\n, __func__,
+	DPRINTF(%s: offset=% PRId64  residue=%zu\n, __func__,
 	uio-uio_offset, uio-uio_resid);
 
 	KDASSERT(vp-v_type == VDIR);
@@ -682,7 +682,8 @@
 
 	*a-a_vpp = bmp-devvp;
 	*a-a_runp = 0;
-	DPRINTF(%s: %d + %lld\n, __func__, inode-start_sector, a-a_bn);
+	DPRINTF(%s: %d + % PRId64 \n, __func__, inode-start_sector,
+	a-a_bn);
 
 	*a-a_bnp = blk;