Module Name:    src
Committed By:   martin
Date:           Sun Jul 24 09:40:11 UTC 2011

Modified Files:
        src/sys/kern: vfs_syscalls.c

Log Message:
Make sure to not overwrite error if it already is EEXISTS - hopefully
will fix > 100 failing fs tests in my last test run.


To generate a diff of this commit:
cvs rdiff -u -r1.431 -r1.432 src/sys/kern/vfs_syscalls.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/kern/vfs_syscalls.c
diff -u src/sys/kern/vfs_syscalls.c:1.431 src/sys/kern/vfs_syscalls.c:1.432
--- src/sys/kern/vfs_syscalls.c:1.431	Sun Jul  3 15:25:09 2011
+++ src/sys/kern/vfs_syscalls.c	Sun Jul 24 09:40:10 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: vfs_syscalls.c,v 1.431 2011/07/03 15:25:09 hannken Exp $	*/
+/*	$NetBSD: vfs_syscalls.c,v 1.432 2011/07/24 09:40:10 martin Exp $	*/
 
 /*-
  * Copyright (c) 2008, 2009 The NetBSD Foundation, Inc.
@@ -70,7 +70,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: vfs_syscalls.c,v 1.431 2011/07/03 15:25:09 hannken Exp $");
+__KERNEL_RCSID(0, "$NetBSD: vfs_syscalls.c,v 1.432 2011/07/24 09:40:10 martin Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_fileassoc.h"
@@ -1683,7 +1683,8 @@
 			break;
 		}
 	}
-	if (optype == VOP_MKNOD_DESCOFFSET && vattr.va_rdev == VNOVAL)
+	if (error == 0 && optype == VOP_MKNOD_DESCOFFSET
+	    && vattr.va_rdev == VNOVAL)
 		error = EINVAL;
 	if (!error) {
 		switch (optype) {

Reply via email to