summaryrefslogtreecommitdiff
path: root/sbin/disklabel
diff options
context:
space:
mode:
authorMiod Vallat <miod@cvs.openbsd.org>2015-01-16 20:21:41 +0000
committerMiod Vallat <miod@cvs.openbsd.org>2015-01-16 20:21:41 +0000
commitc479b67606660075f9959e21d6aa121f841dab16 (patch)
treecf6e215fc5a74bedbb9a7462231be1721b88f604 /sbin/disklabel
parent20f1ae25249de3c1b54b0a9c93c8ab5af81392f4 (diff)
Constify the driver name to disk type table, and remove rz and ccd from that
list. ok krw@ millert@
Diffstat (limited to 'sbin/disklabel')
-rw-r--r--sbin/disklabel/editor.c17
1 files changed, 8 insertions, 9 deletions
diff --git a/sbin/disklabel/editor.c b/sbin/disklabel/editor.c
index ef8c3475e65..ea34c2ea6ef 100644
--- a/sbin/disklabel/editor.c
+++ b/sbin/disklabel/editor.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: editor.c,v 1.289 2015/01/16 06:39:57 deraadt Exp $ */
+/* $OpenBSD: editor.c,v 1.290 2015/01/16 20:21:40 miod Exp $ */
/*
* Copyright (c) 1997-2000 Todd C. Miller <Todd.Miller@courtesan.com>
@@ -130,7 +130,7 @@ void editor_delete(struct disklabel *, char *);
void editor_help(void);
void editor_modify(struct disklabel *, char *);
void editor_name(struct disklabel *, char *);
-char *getstring(char *, char *, char *);
+char *getstring(const char *, const char *, const char *);
u_int64_t getuint64(struct disklabel *, char *, char *, u_int64_t, u_int64_t,
u_int64_t, int);
int has_overlap(struct disklabel *);
@@ -1116,7 +1116,7 @@ partition_cmp(const void *e1, const void *e2)
}
char *
-getstring(char *prompt, char *helpstring, char *oval)
+getstring(const char *prompt, const char *helpstring, const char *oval)
{
static char buf[BUFSIZ];
int n;
@@ -1541,19 +1541,18 @@ void
getdisktype(struct disklabel *lp, char *banner, char *dev)
{
int i;
- char *s, *def = "SCSI";
- struct dtypes {
- char *dev;
- char *type;
+ char *s;
+ const char *def = "SCSI";
+ const struct dtypes {
+ const char *dev;
+ const char *type;
} dtypes[] = {
{ "sd", "SCSI" },
- { "rz", "SCSI" },
{ "wd", "IDE" },
{ "fd", "FLOPPY" },
{ "xd", "SMD" },
{ "xy", "SMD" },
{ "hd", "HP-IB" },
- { "ccd", "CCD" }, /* deprecated */
{ "vnd", "VND" },
{ "svnd", "VND" },
{ NULL, NULL }