summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKenneth R Westerback <krw@cvs.openbsd.org>2007-05-31 05:24:07 +0000
committerKenneth R Westerback <krw@cvs.openbsd.org>2007-05-31 05:24:07 +0000
commit4cbf69662ffa424deea4a4c1666fc15ae564694f (patch)
tree493aa4a99f29ff608bd90ae76c3e8a7a5e3141b6
parent86c7400523ae72abf1b81bb6ef63db57ae343603 (diff)
Kill old, no longer necessary kludge to try fooling readdisklabel()
into using DOS geometry by calling it twice. And don't ignore the drive state if readdisklabel() returns a non-NULL value. ok weingart@ grange@
-rw-r--r--sys/dev/ata/wd.c24
1 files changed, 5 insertions, 19 deletions
diff --git a/sys/dev/ata/wd.c b/sys/dev/ata/wd.c
index 7ad8b0923c8..2353c8527df 100644
--- a/sys/dev/ata/wd.c
+++ b/sys/dev/ata/wd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: wd.c,v 1.58 2007/04/28 02:24:21 krw Exp $ */
+/* $OpenBSD: wd.c,v 1.59 2007/05/31 05:24:06 krw Exp $ */
/* $NetBSD: wd.c,v 1.193 1999/02/28 17:15:27 explorer Exp $ */
/*
@@ -822,27 +822,13 @@ wdgetdisklabel(dev_t dev, struct wd_softc *wd, struct disklabel *lp,
if (wd->drvp->state > RECAL)
wd->drvp->drive_flags |= DRIVE_RESET;
- errstring = readdisklabel(DISKLABELDEV(dev),
- wdstrategy, lp, clp, spoofonly);
- if (errstring) {
- /*
- * This probably happened because the drive's default
- * geometry doesn't match the DOS geometry. We
- * assume the DOS geometry is now in the label and try
- * again. XXX This is a kluge.
- */
- if (wd->drvp->state > RECAL)
- wd->drvp->drive_flags |= DRIVE_RESET;
- errstring = readdisklabel(DISKLABELDEV(dev),
- wdstrategy, lp, clp, spoofonly);
- }
+ errstring = readdisklabel(DISKLABELDEV(dev), wdstrategy, lp, clp,
+ spoofonly);
+ if (wd->drvp->state > RECAL)
+ wd->drvp->drive_flags |= DRIVE_RESET;
if (errstring) {
/*printf("%s: %s\n", wd->sc_dev.dv_xname, errstring);*/
- return;
}
-
- if (wd->drvp->state > RECAL)
- wd->drvp->drive_flags |= DRIVE_RESET;
}
int