summaryrefslogtreecommitdiff
path: root/sys/arch/hppa64
diff options
context:
space:
mode:
authorMiod Vallat <miod@cvs.openbsd.org>2011-04-06 13:46:52 +0000
committerMiod Vallat <miod@cvs.openbsd.org>2011-04-06 13:46:52 +0000
commit722c45c21727f1ca6a8c03a926aa8fdc10ce362c (patch)
tree3deaf4b1aee34aa5bd901076c7b17c92fb6340cb /sys/arch/hppa64
parentccea6e4531d438d7b474430a02331525b934163e (diff)
The various read*label() have stopped returning error strings for quite
some time, and return errnos instead. Fix or remove out-of-date comments mentioning the error strings, and make their callers check the return value against zero, not NULL.
Diffstat (limited to 'sys/arch/hppa64')
-rw-r--r--sys/arch/hppa64/hppa64/disksubr.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/sys/arch/hppa64/hppa64/disksubr.c b/sys/arch/hppa64/hppa64/disksubr.c
index a2d204565d1..fb9348507e9 100644
--- a/sys/arch/hppa64/hppa64/disksubr.c
+++ b/sys/arch/hppa64/hppa64/disksubr.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: disksubr.c,v 1.61 2011/02/26 13:07:48 krw Exp $ */
+/* $OpenBSD: disksubr.c,v 1.62 2011/04/06 13:46:50 miod Exp $ */
/*
* Copyright (c) 1999 Michael Shalayeff
@@ -48,8 +48,6 @@ int readliflabel(struct buf *, void (*)(struct buf *),
* secpercyl, secsize and anything required for a block i/o read
* operation in the driver's strategy/start routines
* must be filled in before calling us.
- *
- * Returns null on success and an error string on failure.
*/
int
readdisklabel(dev_t dev, void (*strat)(struct buf *),
@@ -257,8 +255,8 @@ writedisklabel(dev_t dev, void (*strat)(struct buf *), struct disklabel *lp)
bp = geteblk((int)lp->d_secsize);
bp->b_dev = dev;
- if (readliflabel(bp, strat, lp, &partoff, 1) != NULL &&
- readdoslabel(bp, strat, lp, &partoff, 1) != NULL)
+ if (readliflabel(bp, strat, lp, &partoff, 1) != 0 &&
+ readdoslabel(bp, strat, lp, &partoff, 1) != 0)
goto done;
/* Read it in, slap the new label in, and write it back out */