Module Name:    src
Committed By:   pooka
Date:           Mon Aug  3 15:08:37 UTC 2009

Modified Files:
        src/lib/libukfs: ukfs.c

Log Message:
fix errno reporting


To generate a diff of this commit:
cvs rdiff -u -r1.33 -r1.34 src/lib/libukfs/ukfs.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/libukfs/ukfs.c
diff -u src/lib/libukfs/ukfs.c:1.33 src/lib/libukfs/ukfs.c:1.34
--- src/lib/libukfs/ukfs.c:1.33	Mon Aug  3 14:24:58 2009
+++ src/lib/libukfs/ukfs.c	Mon Aug  3 15:08:37 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: ukfs.c,v 1.33 2009/08/03 14:24:58 pooka Exp $	*/
+/*	$NetBSD: ukfs.c,v 1.34 2009/08/03 15:08:37 pooka Exp $	*/
 
 /*
  * Copyright (c) 2007, 2008  Antti Kantee.  All Rights Reserved.
@@ -251,6 +251,7 @@
 	}
 	rv = rump_sys_mount(vfsname, mountpath, mntflags, arg, alen);
 	if (rv) {
+		rv = errno;
 		goto out;
 	}
 	mounted = 1;
@@ -274,7 +275,6 @@
 
  out:
 	if (rv) {
-		int sverrno = errno;
 		if (fs) {
 			if (fs->ukfs_rvp)
 				rump_vp_rele(fs->ukfs_rvp);
@@ -289,7 +289,7 @@
 			flock(devfd, LOCK_UN);
 			close(devfd);
 		}
-		errno = sverrno;
+		errno = rv;
 	}
 
 	return fs;

Reply via email to