summaryrefslogtreecommitdiff
path: root/sys/arch/macppc
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/macppc
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/macppc')
-rw-r--r--sys/arch/macppc/macppc/disksubr.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/sys/arch/macppc/macppc/disksubr.c b/sys/arch/macppc/macppc/disksubr.c
index 9f831e8cea9..b5468a7ffb9 100644
--- a/sys/arch/macppc/macppc/disksubr.c
+++ b/sys/arch/macppc/macppc/disksubr.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: disksubr.c,v 1.69 2011/02/26 13:07:48 krw Exp $ */
+/* $OpenBSD: disksubr.c,v 1.70 2011/04/06 13:46:50 miod Exp $ */
/* $NetBSD: disksubr.c,v 1.21 1996/05/03 19:42:03 christos Exp $ */
/*
@@ -49,14 +49,11 @@ int readdpmelabel(struct buf *, void (*)(struct buf *),
* must be filled in before calling us.
*
* If dos partition table requested, attempt to load it and
- * find disklabel inside a DOS partition. Return buffer
- * for use in signalling errors if requested.
+ * find disklabel inside a DOS partition.
*
* We would like to check if each MBR has a valid DOSMBR_SIGNATURE, but
* we cannot because it doesn't always exist. So.. we assume the
* MBR is valid.
- *
- * Returns null on success and an error string on failure.
*/
int
readdisklabel(dev_t dev, void (*strat)(struct buf *),
@@ -201,8 +198,8 @@ writedisklabel(dev_t dev, void (*strat)(struct buf *), struct disklabel *lp)
bp = geteblk((int)lp->d_secsize);
bp->b_dev = dev;
- if (readdpmelabel(bp, strat, lp, &partoff, 1) != NULL &&
- readdoslabel(bp, strat, lp, &partoff, 1) != NULL)
+ if (readdpmelabel(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 */