summaryrefslogtreecommitdiff
path: root/sys/arch/sgi
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/sgi
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/sgi')
-rw-r--r--sys/arch/sgi/sgi/disksubr.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/sys/arch/sgi/sgi/disksubr.c b/sys/arch/sgi/sgi/disksubr.c
index cba5c10d1a9..59e01b6b51b 100644
--- a/sys/arch/sgi/sgi/disksubr.c
+++ b/sys/arch/sgi/sgi/disksubr.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: disksubr.c,v 1.20 2011/02/26 13:07:48 krw Exp $ */
+/* $OpenBSD: disksubr.c,v 1.21 2011/04/06 13:46:50 miod Exp $ */
/*
* Copyright (c) 1999 Michael Shalayeff
@@ -50,8 +50,6 @@ int readsgilabel(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 *),
@@ -224,8 +222,8 @@ writedisklabel(dev_t dev, void (*strat)(struct buf *), struct disklabel *lp)
bp = geteblk((int)lp->d_secsize);
bp->b_dev = dev;
- if (readsgilabel(bp, strat, lp, &partoff, 1) != NULL &&
- readdoslabel(bp, strat, lp, &partoff, 1) != NULL)
+ if (readsgilabel(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 */