summaryrefslogtreecommitdiff
path: root/sys/arch/mvmeppc
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2007-05-04 19:30:56 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2007-05-04 19:30:56 +0000
commite3d438608f212120e42a6447bf89f354816ac4ff (patch)
tree0ef9e295d96f14d2180ea27daa273afdb5b093d1 /sys/arch/mvmeppc
parenta258f20b10975f2a073d3fbeb33358967ff5298c (diff)
make findblkmajor() and findblkname() MI; ok miod
Diffstat (limited to 'sys/arch/mvmeppc')
-rw-r--r--sys/arch/mvmeppc/mvmeppc/autoconf.c33
1 files changed, 4 insertions, 29 deletions
diff --git a/sys/arch/mvmeppc/mvmeppc/autoconf.c b/sys/arch/mvmeppc/mvmeppc/autoconf.c
index 67d655b3c48..f894373b15c 100644
--- a/sys/arch/mvmeppc/mvmeppc/autoconf.c
+++ b/sys/arch/mvmeppc/mvmeppc/autoconf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: autoconf.c,v 1.15 2007/05/04 03:44:44 deraadt Exp $ */
+/* $OpenBSD: autoconf.c,v 1.16 2007/05/04 19:30:55 deraadt Exp $ */
/*
* Copyright (c) 1996, 1997 Per Fogelstrom
* Copyright (c) 1995 Theo de Raadt
@@ -37,7 +37,7 @@
* from: Utah Hdr: autoconf.c 1.31 91/01/21
*
* from: @(#)autoconf.c 8.1 (Berkeley) 6/10/93
- * $Id: autoconf.c,v 1.15 2007/05/04 03:44:44 deraadt Exp $
+ * $Id: autoconf.c,v 1.16 2007/05/04 19:30:55 deraadt Exp $
*/
/*
@@ -184,35 +184,10 @@ getdevunit(name, unit)
return dev;
}
-const struct {
- char *name;
- int maj;
-} nam2blk[] = {
+struct nam2blk nam2blk[] = {
{ "wd", 0 },
{ "sd", 2 },
{ "ofdisk", 4 },
{ "raid", 19 },
+ { NULL, -1 }
};
-
-int
-findblkmajor(struct device *dv)
-{
- char *name = dv->dv_xname;
- int i;
-
- for (i = 0; i < sizeof(nam2blk)/sizeof(nam2blk[0]); i++)
- if (!strncmp(name, nam2blk[i].name, strlen(nam2blk[i].name)))
- return (nam2blk[i].maj);
- return (-1);
-}
-
-char *
-findblkname(int maj)
-{
- int i;
-
- for (i = 0; i < sizeof(nam2blk)/sizeof(nam2blk[0]); i++)
- if (nam2blk[i].maj == maj)
- return (nam2blk[i].name);
- return (NULL);
-}