diff options
author | 2006-03-18 21:27:21 +0000 | |
---|---|---|
committer | 2006-03-18 21:27:21 +0000 | |
commit | 57e30715d976e3dec0cf4e3ffe52e5b76c015eb0 (patch) | |
tree | afdeccbfbb7882fe73519b1704496928cd5af397 | |
parent | Forgotten part in previous commit; having multiple source trees is a (diff) | |
download | wireguard-openbsd-57e30715d976e3dec0cf4e3ffe52e5b76c015eb0.tar.xz wireguard-openbsd-57e30715d976e3dec0cf4e3ffe52e5b76c015eb0.zip |
No need to keep pointers to cfdriver structs in potential boot devices struct
array, also make it const; tested drahn@
-rw-r--r-- | sys/arch/cats/cats/autoconf.c | 47 |
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 |