summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiod Vallat <miod@cvs.openbsd.org>2004-07-23 15:31:36 +0000
committerMiod Vallat <miod@cvs.openbsd.org>2004-07-23 15:31:36 +0000
commit52a58400f8348762766960d22bc3690d913ef70c (patch)
tree5ca70854f45bb42920e638451190d25e8052b7a0
parent4aef25ada8cd1ba7eb544053013416816326cdb1 (diff)
Nuke getdevunit().
-rw-r--r--sys/arch/luna88k/include/autoconf.h4
-rw-r--r--sys/arch/luna88k/luna88k/autoconf.c36
2 files changed, 2 insertions, 38 deletions
diff --git a/sys/arch/luna88k/include/autoconf.h b/sys/arch/luna88k/include/autoconf.h
index c5844f078ac..ee8fde1fd50 100644
--- a/sys/arch/luna88k/include/autoconf.h
+++ b/sys/arch/luna88k/include/autoconf.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: autoconf.h,v 1.1 2004/04/21 15:23:56 aoyama Exp $ */
+/* $OpenBSD: autoconf.h,v 1.2 2004/07/23 15:31:34 miod Exp $ */
/*
* Copyright (c) 1999, Steve Murphree, Jr.
* Copyright (c) 1996 Nivas Madhur
@@ -67,8 +67,6 @@ 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);
-
/* taken from NetBSD/luna68k */
struct mainbus_attach_args {
diff --git a/sys/arch/luna88k/luna88k/autoconf.c b/sys/arch/luna88k/luna88k/autoconf.c
index dbfad82d0eb..2b283b38eef 100644
--- a/sys/arch/luna88k/luna88k/autoconf.c
+++ b/sys/arch/luna88k/luna88k/autoconf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: autoconf.c,v 1.2 2004/05/04 15:27:15 miod Exp $ */
+/* $OpenBSD: autoconf.c,v 1.3 2004/07/23 15:31:35 miod Exp $ */
/*
* Copyright (c) 1998 Steve Murphree, Jr.
* Copyright (c) 1996 Nivas Madhur
@@ -61,7 +61,6 @@ void swapconf(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 */
@@ -115,11 +114,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;
-}