From: miod Date: Fri, 16 Jan 2015 20:21:40 +0000 (+0000) Subject: Constify the driver name to disk type table, and remove rz and ccd from that X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=b228e8762e99cc01e4c0851b28187ebf8c526933;p=openbsd Constify the driver name to disk type table, and remove rz and ccd from that list. ok krw@ millert@ --- 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 @@ -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 }