move driver attach declarations to ioconf.h
This commit is contained in:
parent
c0a580b524
commit
92a97b467e
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: defs.h,v 1.64 2014/11/17 00:53:15 uebayasi Exp $ */
|
||||
/* $NetBSD: defs.h,v 1.65 2015/08/20 09:44:24 christos Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1992, 1993
|
||||
|
@ -107,7 +107,7 @@ extern const char *progname;
|
|||
* The next two lines define the current version of the config(1) binary,
|
||||
* and the minimum version of the configuration files it supports.
|
||||
*/
|
||||
#define CONFIG_VERSION 20141030
|
||||
#define CONFIG_VERSION 20150820
|
||||
#define CONFIG_MINVERSION 0
|
||||
|
||||
/*
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: mkheaders.c,v 1.26 2015/01/22 20:01:22 christos Exp $ */
|
||||
/* $NetBSD: mkheaders.c,v 1.27 2015/08/20 09:44:24 christos Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1992, 1993
|
||||
|
@ -45,7 +45,7 @@
|
|||
#endif
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__RCSID("$NetBSD: mkheaders.c,v 1.26 2015/01/22 20:01:22 christos Exp $");
|
||||
__RCSID("$NetBSD: mkheaders.c,v 1.27 2015/08/20 09:44:24 christos Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <ctype.h>
|
||||
|
@ -389,11 +389,19 @@ emitioconfh(void)
|
|||
const char *tfname;
|
||||
FILE *tfp;
|
||||
struct devbase *d;
|
||||
struct devi *i;
|
||||
|
||||
tfname = "tmp_ioconf.h";
|
||||
if ((tfp = fopen(tfname, "w")) == NULL)
|
||||
return (herr("open", tfname, NULL));
|
||||
|
||||
fputs("\n/* pseudo-devices */\n", tfp);
|
||||
TAILQ_FOREACH(i, &allpseudo, i_next) {
|
||||
fprintf(tfp, "void %sattach(int);\n",
|
||||
i->i_base->d_name);
|
||||
}
|
||||
|
||||
fputs("\n/* driver structs */\n", tfp);
|
||||
TAILQ_FOREACH(d, &allbases, d_next) {
|
||||
if (!devbase_has_instances(d, WILD))
|
||||
continue;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: mkioconf.c,v 1.28 2014/11/01 11:02:41 uebayasi Exp $ */
|
||||
/* $NetBSD: mkioconf.c,v 1.29 2015/08/20 09:44:24 christos Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1992, 1993
|
||||
|
@ -45,7 +45,7 @@
|
|||
#endif
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__RCSID("$NetBSD: mkioconf.c,v 1.28 2014/11/01 11:02:41 uebayasi Exp $");
|
||||
__RCSID("$NetBSD: mkioconf.c,v 1.29 2015/08/20 09:44:24 christos Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <err.h>
|
||||
|
@ -92,6 +92,8 @@ mkioconf(void)
|
|||
return (1);
|
||||
}
|
||||
|
||||
fprintf(fp, "#include \"ioconf.h\"\n");
|
||||
|
||||
emithdr(fp);
|
||||
emitcfdrivers(fp);
|
||||
emitexterns(fp);
|
||||
|
@ -476,10 +478,6 @@ emitpseudo(FILE *fp)
|
|||
struct devbase *d;
|
||||
|
||||
fputs("\n/* pseudo-devices */\n", fp);
|
||||
TAILQ_FOREACH(i, &allpseudo, i_next) {
|
||||
fprintf(fp, "void %sattach(int);\n",
|
||||
i->i_base->d_name);
|
||||
}
|
||||
fputs("\nconst struct pdevinit pdevinit[] = {\n", fp);
|
||||
TAILQ_FOREACH(i, &allpseudo, i_next) {
|
||||
d = i->i_base;
|
||||
|
|
Loading…
Reference in New Issue