Module Name:    src
Committed By:   christos
Date:           Mon Dec 29 16:35:38 UTC 2014

Modified Files:
        src/sbin/fsck: partutil.c

Log Message:
abort earlier.


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 src/sbin/fsck/partutil.c

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

Modified files:

Index: src/sbin/fsck/partutil.c
diff -u src/sbin/fsck/partutil.c:1.13 src/sbin/fsck/partutil.c:1.14
--- src/sbin/fsck/partutil.c:1.13	Mon Dec 29 11:27:43 2014
+++ src/sbin/fsck/partutil.c	Mon Dec 29 11:35:38 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: partutil.c,v 1.13 2014/12/29 16:27:43 christos Exp $	*/
+/*	$NetBSD: partutil.c,v 1.14 2014/12/29 16:35:38 christos Exp $	*/
 
 /*-
  * Copyright (c) 2006 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__RCSID("$NetBSD: partutil.c,v 1.13 2014/12/29 16:27:43 christos Exp $");
+__RCSID("$NetBSD: partutil.c,v 1.14 2014/12/29 16:35:38 christos Exp $");
 
 #include <sys/types.h>
 #include <sys/param.h>
@@ -125,6 +125,9 @@ getdiskinfo(const char *s, int fd, const
 		dict2geom(geo, geom_dict);
 	}
 
+	if (dkw == NULL)
+		return 0;
+
 	/* Get info about partition/wedge */
 	if (ioctl(fd, DIOCGWEDGEINFO, dkw) != -1) {
 		/* DIOCGWEDGEINFO didn't fail, we're done */
@@ -136,9 +139,6 @@ getdiskinfo(const char *s, int fd, const
 		    "DIOCGDINFO for disk device %s", s);
 	}
 
-	if (dkw == NULL)
-		return 0;
-
 	/* DIOCGDINFO didn't fail */
 	(void)memset(dkw, 0, sizeof(*dkw));
 

Reply via email to