summaryrefslogtreecommitdiff
path: root/sbin
diff options
context:
space:
mode:
authorTodd C. Miller <millert@cvs.openbsd.org>1998-01-11 18:21:18 +0000
committerTodd C. Miller <millert@cvs.openbsd.org>1998-01-11 18:21:18 +0000
commit048f9e5245551dcd59db3e5d9941fb31f6d07971 (patch)
tree92c57a9063fd2998e8424eddb1978b180d846ec6 /sbin
parent8fc1929be3b0011fe19a48feb2aebf96a105bec0 (diff)
Tell the user to enter ESDI for IDE, not ST506. Also treat IDE as ESDI
if the user enters that anyway.
Diffstat (limited to 'sbin')
-rw-r--r--sbin/disklabel/editor.c17
1 files changed, 10 insertions, 7 deletions
diff --git a/sbin/disklabel/editor.c b/sbin/disklabel/editor.c
index 0d7f8cea34f..88b6afb4d9a 100644
--- a/sbin/disklabel/editor.c
+++ b/sbin/disklabel/editor.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: editor.c,v 1.28 1998/01/05 06:45:50 art Exp $ */
+/* $OpenBSD: editor.c,v 1.29 1998/01/11 18:21:17 millert Exp $ */
/*
* Copyright (c) 1997 Todd C. Miller <Todd.Miller@courtesan.com>
@@ -31,7 +31,7 @@
*/
#ifndef lint
-static char rcsid[] = "$OpenBSD: editor.c,v 1.28 1998/01/05 06:45:50 art Exp $";
+static char rcsid[] = "$OpenBSD: editor.c,v 1.29 1998/01/11 18:21:17 millert Exp $";
#endif /* not lint */
#include <sys/types.h>
@@ -1362,15 +1362,18 @@ edit_parms(lp, freep)
/* disk type */
for (;;) {
p = getstring(lp, "disk type",
- "What kind of disk is this? Usually SCSI, ST506, or "
- "floppy (use ST506 for IDE).", dktypenames[lp->d_type]);
+ "What kind of disk is this? Usually SCSI, ESDI, ST506, or "
+ "floppy (use ESDI for IDE).", dktypenames[lp->d_type]);
if (p == NULL) {
fputs("Command aborted\n", stderr);
return;
}
- for (ui = 1; ui < DKMAXTYPES && strcasecmp(p, dktypenames[ui]);
- ui++)
- ;
+ if (strcasecmp(p, "IDE") == 0)
+ ui = DTYPE_ESDI;
+ else
+ for (ui = 1; ui < DKMAXTYPES &&
+ strcasecmp(p, dktypenames[ui]); ui++)
+ ;
if (ui < DKMAXTYPES) {
break;
} else {