Move initializations of config earlier.
Inizialize global variables earlier in the process. It doesn't matter today, but may in the future if we want to access these lists earlier in config's run.
This commit is contained in:
parent
f49c99fb8f
commit
609e98fe7e
@ -120,6 +120,16 @@ main(int argc, char **argv)
|
|||||||
printmachine = 0;
|
printmachine = 0;
|
||||||
kernfile = NULL;
|
kernfile = NULL;
|
||||||
SLIST_INIT(&includepath);
|
SLIST_INIT(&includepath);
|
||||||
|
SLIST_INIT(&cputype);
|
||||||
|
SLIST_INIT(&mkopt);
|
||||||
|
SLIST_INIT(&opt);
|
||||||
|
SLIST_INIT(&rmopts);
|
||||||
|
STAILQ_INIT(&cfgfiles);
|
||||||
|
STAILQ_INIT(&dtab);
|
||||||
|
STAILQ_INIT(&fntab);
|
||||||
|
STAILQ_INIT(&ftab);
|
||||||
|
STAILQ_INIT(&hints);
|
||||||
|
STAILQ_INIT(&envvars);
|
||||||
while ((ch = getopt(argc, argv, "Cd:gI:mps:Vx:")) != -1)
|
while ((ch = getopt(argc, argv, "Cd:gI:mps:Vx:")) != -1)
|
||||||
switch (ch) {
|
switch (ch) {
|
||||||
case 'C':
|
case 'C':
|
||||||
@ -197,16 +207,6 @@ main(int argc, char **argv)
|
|||||||
strlcat(destdir, PREFIX, sizeof(destdir));
|
strlcat(destdir, PREFIX, sizeof(destdir));
|
||||||
}
|
}
|
||||||
|
|
||||||
SLIST_INIT(&cputype);
|
|
||||||
SLIST_INIT(&mkopt);
|
|
||||||
SLIST_INIT(&opt);
|
|
||||||
SLIST_INIT(&rmopts);
|
|
||||||
STAILQ_INIT(&cfgfiles);
|
|
||||||
STAILQ_INIT(&dtab);
|
|
||||||
STAILQ_INIT(&fntab);
|
|
||||||
STAILQ_INIT(&ftab);
|
|
||||||
STAILQ_INIT(&hints);
|
|
||||||
STAILQ_INIT(&envvars);
|
|
||||||
if (yyparse())
|
if (yyparse())
|
||||||
exit(3);
|
exit(3);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user