summaryrefslogtreecommitdiff
path: root/sys/arch/aviion
diff options
context:
space:
mode:
authorKenneth R Westerback <krw@cvs.openbsd.org>2007-05-29 05:08:21 +0000
committerKenneth R Westerback <krw@cvs.openbsd.org>2007-05-29 05:08:21 +0000
commit718c8f1c45893b892977d08b340dcf99697074d3 (patch)
tree208a343033771c2864117f6ba44d29018fef79d8 /sys/arch/aviion
parent2adfdb5db46336bf3180da10112743e21c8c8d45 (diff)
Refactor readdisklabel() to ensure there is a single point of return, in
preparation for translating all disk labels visible to the kernel to the soon to arrive V1 format. ok otto@ deraadt@
Diffstat (limited to 'sys/arch/aviion')
-rw-r--r--sys/arch/aviion/aviion/disksubr.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/sys/arch/aviion/aviion/disksubr.c b/sys/arch/aviion/aviion/disksubr.c
index d2359312979..000ff6aa2c1 100644
--- a/sys/arch/aviion/aviion/disksubr.c
+++ b/sys/arch/aviion/aviion/disksubr.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: disksubr.c,v 1.17 2007/02/18 13:49:22 krw Exp $ */
+/* $OpenBSD: disksubr.c,v 1.18 2007/05/29 05:08:19 krw Exp $ */
/* $NetBSD: disksubr.c,v 1.21 1996/05/03 19:42:03 christos Exp $ */
/*
@@ -83,8 +83,10 @@ readdisklabel(dev, strat, lp, osdep, spoofonly)
lp->d_secsize = DEV_BSIZE;
if (lp->d_secperunit == 0)
lp->d_secperunit = 0x1fffffff;
- if (lp->d_secpercyl == 0)
- return ("invalid geometry");
+ if (lp->d_secpercyl == 0) {
+ msg = "invalid geometry";
+ goto done;
+ }
lp->d_npartitions = RAW_PART + 1;
for (i = 0; i < RAW_PART; i++) {
lp->d_partitions[i].p_size = 0;