diff options
author | Miod Vallat <miod@cvs.openbsd.org> | 2009-08-29 11:41:35 +0000 |
---|---|---|
committer | Miod Vallat <miod@cvs.openbsd.org> | 2009-08-29 11:41:35 +0000 |
commit | b8ab705e78f5072716305c1626884fa3d9024e25 (patch) | |
tree | 7a251d29b327139419b1b1a6e2a42fd04e2568c5 /sys/arch | |
parent | 99b231242a742d6cb0190b09777bf4f7660dd0ff (diff) |
Remove unused getdevunit(), only sparc and sparc64 have a need for it.
Diffstat (limited to 'sys/arch')
-rw-r--r-- | sys/arch/macppc/macppc/autoconf.c | 31 | ||||
-rw-r--r-- | sys/arch/mvmeppc/mvmeppc/autoconf.c | 33 |
2 files changed, 4 insertions, 60 deletions
diff --git a/sys/arch/macppc/macppc/autoconf.c b/sys/arch/macppc/macppc/autoconf.c index 1ba43268ae9..c5fff86d81a 100644 --- a/sys/arch/macppc/macppc/autoconf.c +++ b/sys/arch/macppc/macppc/autoconf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: autoconf.c,v 1.36 2008/07/21 04:35:54 todd Exp $ */ +/* $OpenBSD: autoconf.c,v 1.37 2009/08/29 11:41:32 miod 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.36 2008/07/21 04:35:54 todd Exp $ + * $Id: autoconf.c,v 1.37 2009/08/29 11:41:32 miod Exp $ */ /* @@ -67,7 +67,6 @@ #include <scsi/sdvar.h> void dumpconf(void); -struct device *getdevunit(char *, int); static struct devmap *findtype(char **); void makebootdev(char *cp); int getpno(char **); @@ -241,32 +240,6 @@ device_register(struct device *dev, void *aux) } /* - * find a device matching "name" and unit number - */ -struct device * -getdevunit(char *name, int unit) -{ - struct device *dev = TAILQ_FIRST(&alldevs); - 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 = TAILQ_NEXT(dev, dv_list)) == NULL) - return NULL; - - return dev; -} - -/* * Now that we are fully operational, we can checksum the * disks, and using some heuristics, hopefully are able to * always determine the correct root disk. diff --git a/sys/arch/mvmeppc/mvmeppc/autoconf.c b/sys/arch/mvmeppc/mvmeppc/autoconf.c index 495579de7a6..14d7a616239 100644 --- a/sys/arch/mvmeppc/mvmeppc/autoconf.c +++ b/sys/arch/mvmeppc/mvmeppc/autoconf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: autoconf.c,v 1.22 2008/07/21 04:35:54 todd Exp $ */ +/* $OpenBSD: autoconf.c,v 1.23 2009/08/29 11:41:34 miod 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.22 2008/07/21 04:35:54 todd Exp $ + * $Id: autoconf.c,v 1.23 2009/08/29 11:41:34 miod Exp $ */ /* @@ -60,7 +60,6 @@ #include <machine/bugio.h> extern void dumpconf(void); -struct device *getdevunit(char *, int); void calc_delayconst(void); /* clock.c */ /* @@ -147,34 +146,6 @@ dumpconf(void) } #endif -/* - * find a device matching "name" and unit number - */ -struct device * -getdevunit(name, unit) - char *name; - int unit; -{ - struct device *dev = TAILQ_FIRST(&alldevs); - 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 = TAILQ_NEXT(dev, dv_list)) == NULL) - return NULL; - } - return dev; -} - struct nam2blk nam2blk[] = { { "wd", 0 }, { "sd", 2 }, |