diff options
Diffstat (limited to 'sys/arch/mvmeppc')
-rw-r--r-- | sys/arch/mvmeppc/mvmeppc/autoconf.c | 33 |
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); -} |