diff options
author | Todd C. Miller <millert@cvs.openbsd.org> | 1999-08-15 09:47:19 +0000 |
---|---|---|
committer | Todd C. Miller <millert@cvs.openbsd.org> | 1999-08-15 09:47:19 +0000 |
commit | 51e5d677b6009ba8351a3b0b9207a498f51cdc04 (patch) | |
tree | 3b5821a189c051c1b8a9ca9252e09a38f8030721 /sys/dev/ata/wd.c | |
parent | 67f8113db8707e043125247b5f38b7a0f735bfe0 (diff) |
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)
Diffstat (limited to 'sys/dev/ata/wd.c')
-rw-r--r-- | sys/dev/ata/wd.c | 15 |
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; |