summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormillert <millert@openbsd.org>1999-08-15 09:47:18 +0000
committermillert <millert@openbsd.org>1999-08-15 09:47:18 +0000
commita2c80ea8cb7ebb32b7921c2049ced7027ec259a7 (patch)
tree0d994f8bef7b74bebfcfb939d5f101f263134a23
parentAdd missing HP385 defines... (diff)
downloadwireguard-openbsd-a2c80ea8cb7ebb32b7921c2049ced7027ec259a7.tar.xz
wireguard-openbsd-a2c80ea8cb7ebb32b7921c2049ced7027ec259a7.zip
o Correctly set type and typename in driver-generated label
Should really use viscopy() when copying atap_model -> d_packname. When wd's become sd's this will be trivial (viscopy() lives in sd.c)
-rw-r--r--sys/dev/ata/wd.c15
1 files changed, 6 insertions, 9 deletions
diff --git a/sys/dev/ata/wd.c b/sys/dev/ata/wd.c
index 6200d445cde..f246b369dbf 100644
--- a/sys/dev/ata/wd.c
+++ b/sys/dev/ata/wd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: wd.c,v 1.6 1999/08/10 23:09:49 deraadt Exp $ */
+/* $OpenBSD: wd.c,v 1.7 1999/08/15 09:47:18 millert Exp $ */
/* $NetBSD: wd.c,v 1.193 1999/02/28 17:15:27 explorer Exp $ */
/*
@@ -785,18 +785,15 @@ wdgetdefaultlabel(wd, lp)
lp->d_nsectors = wd->sc_params.atap_sectors;
lp->d_ncylinders = wd->sc_params.atap_cylinders;
lp->d_secpercyl = lp->d_ntracks * lp->d_nsectors;
-#if 0
- if (strcmp(wd->sc_params.atap_model, "ST506") == 0) {
+ if (wd->drvp->ata_vers == -1) {
lp->d_type = DTYPE_ST506;
- strncpy(lp->d_typename, "ST506 disk", 16);
+ strncpy(lp->d_typename, "ST506/MFM/RLL", 16);
} else {
lp->d_type = DTYPE_ESDI;
- strncpy(lp->d_typename, "ESDI/IDE",
- sizeof lp->d_typename);
+ strncpy(lp->d_typename, "ESDI/IDE disk", 16);
}
-#endif
- strncpy(lp->d_typename, wd->sc_params.atap_model, 16);
- strncpy(lp->d_packname, "fictitious", 16);
+ /* XXX - user viscopy() like sd.c */
+ strncpy(lp->d_packname, wd->sc_params.atap_model, 16);
lp->d_secperunit = wd->sc_capacity;
lp->d_rpm = 3600;
lp->d_interleave = 1;