From be88b45a9957a7f13566f5b6d3dd66c5c0e894b8 Mon Sep 17 00:00:00 2001 From: Kenneth R Westerback Date: Sun, 27 Sep 2015 22:34:28 +0000 Subject: Use readdisksector() instead of manual buf initialization. sparc64 compiles and boots, so the identical sparc code must too! ok deraadt@ --- sys/arch/sparc64/sparc64/disksubr.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) (limited to 'sys/arch/sparc64') diff --git a/sys/arch/sparc64/sparc64/disksubr.c b/sys/arch/sparc64/sparc64/disksubr.c index 23398a022db..7a06c516386 100644 --- a/sys/arch/sparc64/sparc64/disksubr.c +++ b/sys/arch/sparc64/sparc64/disksubr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: disksubr.c,v 1.69 2015/01/16 20:17:06 miod Exp $ */ +/* $OpenBSD: disksubr.c,v 1.70 2015/09/27 22:34:27 krw Exp $ */ /* $NetBSD: disksubr.c,v 1.13 2000/12/17 22:39:18 pk Exp $ */ /* @@ -93,15 +93,9 @@ readdisklabel(dev_t dev, void (*strat)(struct buf *), if (spoofonly) goto doslabel; - bp->b_blkno = LABELSECTOR; - bp->b_bcount = lp->d_secsize; - CLR(bp->b_flags, B_READ | B_WRITE | B_DONE); - SET(bp->b_flags, B_BUSY | B_READ | B_RAW); - (*strat)(bp); - if (biowait(bp)) { - error = bp->b_error; + error = readdisksector(bp, strat, lp, DL_BLKTOSEC(lp, LABELSECTOR)); + if (error) goto done; - } slp = (struct sun_disklabel *)bp->b_data; if (slp->sl_magic == SUN_DKMAGIC) { -- cgit v1.2.3