diff options
author | Miod Vallat <miod@cvs.openbsd.org> | 2004-07-02 17:34:24 +0000 |
---|---|---|
committer | Miod Vallat <miod@cvs.openbsd.org> | 2004-07-02 17:34:24 +0000 |
commit | 071e1c6d4df6dc38866cf4a4a39c1a7465992592 (patch) | |
tree | 35f8b94583597feafd05441308ac1cbf748453ed /sys | |
parent | 0586bcdc54dda6d2fcd7e791ae94ff0e3c003f61 (diff) |
Remove unused getdevunit().
Diffstat (limited to 'sys')
-rw-r--r-- | sys/arch/mvme68k/mvme68k/autoconf.c | 31 |
1 files changed, 1 insertions, 30 deletions
diff --git a/sys/arch/mvme68k/mvme68k/autoconf.c b/sys/arch/mvme68k/mvme68k/autoconf.c index 3558d1bdcee..ab7605e7cb2 100644 --- a/sys/arch/mvme68k/mvme68k/autoconf.c +++ b/sys/arch/mvme68k/mvme68k/autoconf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: autoconf.c,v 1.25 2004/05/04 15:27:19 miod Exp $ */ +/* $OpenBSD: autoconf.c,v 1.26 2004/07/02 17:34:23 miod Exp $ */ /* * Copyright (c) 1995 Theo de Raadt @@ -91,7 +91,6 @@ void swapconf(void); int mainbus_print(void *, const char *); int mainbus_scan(struct device *, void *, void *); int findblkmajor(struct device *); -struct device *getdevunit(char *, int); struct device *getdisk(char *, int, int, dev_t *); struct device *parsedisk(char *, int, int, dev_t *); @@ -545,31 +544,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; -} |