summaryrefslogtreecommitdiff
path: root/sys/arch/cats
diff options
context:
space:
mode:
authorMiod Vallat <miod@cvs.openbsd.org>2006-03-18 21:27:22 +0000
committerMiod Vallat <miod@cvs.openbsd.org>2006-03-18 21:27:22 +0000
commit220a929fdf15ea905a05ea445bf5bca75ae7cb8c (patch)
treef4c13bebeff3b86bb6ce97d0b2e5e0618f025d56 /sys/arch/cats
parentb9ee804aab8e9465bcf1a1c3be61fc5c90963c63 (diff)
No need to keep pointers to cfdriver structs in potential boot devices struct
array, also make it const; tested drahn@
Diffstat (limited to 'sys/arch/cats')
-rw-r--r--sys/arch/cats/cats/autoconf.c47
1 files changed, 8 insertions, 39 deletions
diff --git a/sys/arch/cats/cats/autoconf.c b/sys/arch/cats/cats/autoconf.c
index c57f7d3b3f0..5fdeee95905 100644
--- a/sys/arch/cats/cats/autoconf.c
+++ b/sys/arch/cats/cats/autoconf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: autoconf.c,v 1.7 2005/12/27 18:31:08 miod Exp $ */
+/* $OpenBSD: autoconf.c,v 1.8 2006/03/18 21:27:21 miod Exp $ */
/* $NetBSD: autoconf.c,v 1.2 2001/09/05 16:17:36 matt Exp $ */
/*
@@ -73,47 +73,16 @@ static struct device * getdisk(char *str, int len, int defpart, dev_t *devp);
struct device *parsedisk(char *, int, int, dev_t *);
extern char *boot_file;
-#include "wd.h"
-#if NWD > 0
-extern struct cfdriver wd_cd;
-#endif
-#include "sd.h"
-#if NSD > 0
-extern struct cfdriver sd_cd;
-#endif
-#include "cd.h"
-#if NCD > 0
-extern struct cfdriver cd_cd;
-#endif
-#if NRD > 0
-extern struct cfdriver rd_cd;
-#endif
-#include "raid.h"
-#if NRAID > 0
-extern struct cfdriver raid_cd;
-#endif
-
-struct genericconf {
- struct cfdriver *gc_driver;
+const struct genericconf {
char *gc_name;
dev_t gc_major;
} genericconf[] = {
-#if NWD > 0
- { &wd_cd, "wd", 16 },
-#endif
-#if NSD > 0
- { &sd_cd, "sd", 24 },
-#endif
-#if NCD > 0
- { &cd_cd, "cd", 26 },
-#endif
-#if NRD > 0
- { &rd_cd, "rd", 18 },
-#endif
-#if NRAID > 0
- { &raid_cd, "raid", 71 },
-#endif
- { 0 }
+ { "wd", 16 },
+ { "sd", 24 },
+ { "cd", 26 },
+ { "rd", 18 },
+ { "raid", 71 },
+ { NULL, 0 }
};
int