Module Name:    src
Committed By:   pooka
Date:           Tue Apr 13 10:11:08 UTC 2010

Modified Files:
        src/sys/fs/msdosfs: msdosfs_vfsops.c

Log Message:
If getdisksize() fails (happens e.g. on fss block devices), don't
give up if we don't really need the information provided by it.


To generate a diff of this commit:
cvs rdiff -u -r1.83 -r1.84 src/sys/fs/msdosfs/msdosfs_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/sys/fs/msdosfs/msdosfs_vfsops.c
diff -u src/sys/fs/msdosfs/msdosfs_vfsops.c:1.83 src/sys/fs/msdosfs/msdosfs_vfsops.c:1.84
--- src/sys/fs/msdosfs/msdosfs_vfsops.c:1.83	Sun Apr 11 10:26:25 2010
+++ src/sys/fs/msdosfs/msdosfs_vfsops.c	Tue Apr 13 10:11:08 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: msdosfs_vfsops.c,v 1.83 2010/04/11 10:26:25 mlelstv Exp $	*/
+/*	$NetBSD: msdosfs_vfsops.c,v 1.84 2010/04/13 10:11:08 pooka Exp $	*/
 
 /*-
  * Copyright (C) 1994, 1995, 1997 Wolfgang Solfrank.
@@ -48,7 +48,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: msdosfs_vfsops.c,v 1.83 2010/04/11 10:26:25 mlelstv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: msdosfs_vfsops.c,v 1.84 2010/04/13 10:11:08 pooka Exp $");
 
 #if defined(_KERNEL_OPT)
 #include "opt_compat_netbsd.h"
@@ -489,8 +489,12 @@
 		goto error_exit;
 
 	error = getdisksize(devvp, &psize, &secsize);
-	if (error)
-		goto error_exit;
+	if (error) {
+		if (argp->flags & MSDOSFSMNT_GEMDOSFS)
+			goto error_exit;
+		secsize = DEV_BSIZE;
+		psize = 0;
+	}
 
 	if (argp->flags & MSDOSFSMNT_GEMDOSFS) {
 		bsize = secsize;

Reply via email to