diff options
author | 2009-08-25 18:46:19 +0000 | |
---|---|---|
committer | 2009-08-25 18:46:19 +0000 | |
commit | 34235b5fcd2946fbe7bb412097248a10bf561cef (patch) | |
tree | 2d599820eae8e578829ece0b03a2a1f8c297853e | |
parent | If option DIAGNOSTIC, do not bother doing sanity checks, including an (diff) | |
download | wireguard-openbsd-34235b5fcd2946fbe7bb412097248a10bf561cef.tar.xz wireguard-openbsd-34235b5fcd2946fbe7bb412097248a10bf561cef.zip |
catch up to readdisklabel API change; tested by matthieu
-rw-r--r-- | sys/dev/raidframe/rf_openbsdkintf.c | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/sys/dev/raidframe/rf_openbsdkintf.c b/sys/dev/raidframe/rf_openbsdkintf.c index b0483948317..2e70a11bd45 100644 --- a/sys/dev/raidframe/rf_openbsdkintf.c +++ b/sys/dev/raidframe/rf_openbsdkintf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rf_openbsdkintf.c,v 1.51 2009/05/21 23:45:48 krw Exp $ */ +/* $OpenBSD: rf_openbsdkintf.c,v 1.52 2009/08/25 18:46:19 deraadt Exp $ */ /* $NetBSD: rf_netbsdkintf.c,v 1.109 2001/07/27 03:30:07 oster Exp $ */ /*- @@ -263,7 +263,7 @@ struct raid_softc **raid_scPtrs; void rf_shutdown_hook(RF_ThreadArg_t); void raidgetdefaultlabel(RF_Raid_t *, struct raid_softc *, struct disklabel *); -void raidgetdisklabel(dev_t, struct raid_softc *, struct disklabel *, int); +int raidgetdisklabel(dev_t, struct raid_softc *, struct disklabel *, int); int raidlock(struct raid_softc *); void raidunlock(struct raid_softc *); @@ -2101,14 +2101,13 @@ raidgetdefaultlabel(RF_Raid_t *raidPtr, struct raid_softc *rs, * Read the disklabel from the raid device. * If one is not present, fake one up. */ -void +int raidgetdisklabel(dev_t dev, struct raid_softc *rs, struct disklabel *lp, int spoofonly) { int unit = DISKUNIT(dev); - char *errstring; RF_Raid_t *raidPtr; - int i; + int error, i; struct partition *pp; db1_printf(("Getting the disklabel...\n")); @@ -2122,12 +2121,10 @@ raidgetdisklabel(dev_t dev, struct raid_softc *rs, struct disklabel *lp, /* * Call the generic disklabel extraction routine. */ - errstring = readdisklabel(DISKLABELDEV(dev), raidstrategy, lp, + error = readdisklabel(DISKLABELDEV(dev), raidstrategy, lp, spoofonly); - if (errstring) { - /*printf("%s: %s\n", rs->sc_xname, errstring);*/ - return; - } + if (error) + return (error); /* * Sanity check whether the found disklabel is valid. @@ -2151,6 +2148,7 @@ raidgetdisklabel(dev_t dev, struct raid_softc *rs, struct disklabel *lp, "exceeds the size of raid (%ld)\n", rs->sc_xname, 'a' + i, (long) rs->sc_size); } + return (0); } /* |