summaryrefslogtreecommitdiff
path: root/sys/arch/sparc64
diff options
context:
space:
mode:
authorKenneth R Westerback <krw@cvs.openbsd.org>2015-09-27 22:34:28 +0000
committerKenneth R Westerback <krw@cvs.openbsd.org>2015-09-27 22:34:28 +0000
commitbe88b45a9957a7f13566f5b6d3dd66c5c0e894b8 (patch)
tree379f5f8eef3d1c89cc4150777cafcda4f2a1c77d /sys/arch/sparc64
parent03ca7d0554a804d6a4d79dbfa5512d13fed04f1c (diff)
Use readdisksector() instead of manual buf initialization. sparc64
compiles and boots, so the identical sparc code must too! ok deraadt@
Diffstat (limited to 'sys/arch/sparc64')
-rw-r--r--sys/arch/sparc64/sparc64/disksubr.c12
1 files changed, 3 insertions, 9 deletions
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) {