Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/usr.bin/config Generate cfdriver and cfattach lists for ioco...
details: https://anonhg.NetBSD.org/src/rev/12986c8aaf31
branches: trunk
changeset: 753390:12986c8aaf31
user: pooka <pooka%NetBSD.org@localhost>
date: Thu Mar 25 19:39:05 2010 +0000
description:
Generate cfdriver and cfattach lists for ioconf configs.
diffstat:
usr.bin/config/mkioconf.c | 21 +++++++++++++--------
1 files changed, 13 insertions(+), 8 deletions(-)
diffs (61 lines):
diff -r c88a042bfc02 -r 12986c8aaf31 usr.bin/config/mkioconf.c
--- a/usr.bin/config/mkioconf.c Thu Mar 25 19:23:18 2010 +0000
+++ b/usr.bin/config/mkioconf.c Thu Mar 25 19:39:05 2010 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: mkioconf.c,v 1.16 2010/02/03 21:32:27 pooka Exp $ */
+/* $NetBSD: mkioconf.c,v 1.17 2010/03/25 19:39:05 pooka Exp $ */
/*
* Copyright (c) 1992, 1993
@@ -95,9 +95,9 @@
emitloc(fp);
emitparents(fp);
emitcfdata(fp);
+ emitcfattachinit(fp);
if (ioconfname == NULL) {
- emitcfattachinit(fp);
emitroots(fp);
emitpseudo(fp);
if (!do_devsw)
@@ -237,11 +237,12 @@
NEWLINE;
- /* the initial list is not added to ioconf-only configs */
- if (ioconfname)
- return;
+ fprintf(fp,
+ "%sstruct cfdriver * const cfdriver_%s_%s[] = {\n",
+ ioconfname ? "static " : "",
+ ioconfname ? "comp" : "list",
+ ioconfname ? ioconfname : "initial");
- fprintf(fp, "struct cfdriver * const cfdriver_list_initial[] = {\n");
TAILQ_FOREACH(d, &allbases, d_next) {
if (!devbase_has_instances(d, WILD))
continue;
@@ -289,7 +290,10 @@
}
NEWLINE;
- fprintf(fp, "const struct cfattachinit cfattachinit[] = {\n");
+ fprintf(fp, "%sconst struct cfattachinit cfattach%s%s[] = {\n",
+ ioconfname ? "static " : "",
+ ioconfname ? "_comp_" : "init",
+ ioconfname ? ioconfname : "");
TAILQ_FOREACH(d, &allbases, d_next) {
if (!devbase_has_instances(d, WILD))
@@ -369,9 +373,10 @@
"#define NORM FSTATE_NOTFOUND\n"
"#define STAR FSTATE_STAR\n"
"\n"
- "struct cfdata cfdata%s%s[] = {\n"
+ "%sstruct cfdata cfdata%s%s[] = {\n"
" /* driver attachment unit state "
"loc flags pspec */\n",
+ ioconfname ? "static " : "",
ioconfname ? "_" : "",
ioconfname ? ioconfname : "");
for (p = packed; (i = *p) != NULL; p++) {
Home |
Main Index |
Thread Index |
Old Index