diff options
author | Miod Vallat <miod@cvs.openbsd.org> | 2004-04-14 20:18:19 +0000 |
---|---|---|
committer | Miod Vallat <miod@cvs.openbsd.org> | 2004-04-14 20:18:19 +0000 |
commit | fe4328a186b83ec951ca7665dd3447927cb8a587 (patch) | |
tree | 40c18062998e0cbdc3ed02e5cb4f3e2f21f44956 | |
parent | a6658e05062067a280e36e854718586e06f65f02 (diff) |
Nuke getdevunit(), nothing uses it.
-rw-r--r-- | sys/arch/mvme88k/include/autoconf.h | 4 | ||||
-rw-r--r-- | sys/arch/mvme88k/mvme88k/autoconf.c | 36 |
2 files changed, 2 insertions, 38 deletions
diff --git a/sys/arch/mvme88k/include/autoconf.h b/sys/arch/mvme88k/include/autoconf.h index 443b7098dae..eabfd015e33 100644 --- a/sys/arch/mvme88k/include/autoconf.h +++ b/sys/arch/mvme88k/include/autoconf.h @@ -1,4 +1,4 @@ -/* $OpenBSD: autoconf.h,v 1.11 2003/09/16 20:52:19 miod Exp $ */ +/* $OpenBSD: autoconf.h,v 1.12 2004/04/14 20:18:17 miod Exp $ */ /* * Copyright (c) 1999, Steve Murphree, Jr. * Copyright (c) 1996 Nivas Madhur @@ -67,6 +67,4 @@ extern struct device *bootdv; /* boot device */ void *mapiodev(void *pa, int size); void unmapiodev(void *kva, int size); -struct device *getdevunit(char *name, int unit); - #endif diff --git a/sys/arch/mvme88k/mvme88k/autoconf.c b/sys/arch/mvme88k/mvme88k/autoconf.c index 4de7791ba13..5a678f06759 100644 --- a/sys/arch/mvme88k/mvme88k/autoconf.c +++ b/sys/arch/mvme88k/mvme88k/autoconf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: autoconf.c,v 1.25 2004/02/11 20:41:08 miod Exp $ */ +/* $OpenBSD: autoconf.c,v 1.26 2004/04/14 20:18:18 miod Exp $ */ /* * Copyright (c) 1998 Steve Murphree, Jr. * Copyright (c) 1996 Nivas Madhur @@ -62,7 +62,6 @@ char buginchr(void); void dumpconf(void); int findblkmajor(struct device *); struct device *getdisk(char *, int, int, dev_t *); -struct device *getdevunit(char *name, int unit); int cold = 1; /* 1 if still booting */ @@ -122,11 +121,6 @@ swapconf() dumpconf(); } -/* - * the rest of this file was adapted from Theo de Raadt's code in the - * sparc port to nuke the "options GENERIC" stuff. - */ - struct nam2blk { char *name; int maj; @@ -392,31 +386,3 @@ gotswap: if (temp == dumpdev) dumpdev = swdevt[0].sw_dev; } - -/* - * find a device matching "name" and unit number - */ -struct device * -getdevunit(name, unit) - char *name; - int unit; -{ - struct device *dev = alldevs.tqh_first; - char num[10], fullname[16]; - int lunit; - - /* compute length of name and decimal expansion of unit number */ - snprintf(num, sizeof num, "%d", unit); - lunit = strlen(num); - if (strlen(name) + lunit >= sizeof(fullname) - 1) - panic("config_attach: device name too long"); - - strlcpy(fullname, name, sizeof fullname); - strlcat(fullname, num, sizeof fullname); - - while (strcmp(dev->dv_xname, fullname) != 0) { - if ((dev = dev->dv_list.tqe_next) == NULL) - return NULL; - } - return dev; -} |