summaryrefslogtreecommitdiffstats
path: root/usr.sbin/config
diff options
context:
space:
mode:
authorats <ats@FreeBSD.org>1994-11-20 13:39:07 +0000
committerats <ats@FreeBSD.org>1994-11-20 13:39:07 +0000
commitc2cf3fbd3561a77510f4077b1375ccc96fc8f44e (patch)
tree42475ec9fbbfb203acf30029159dc2d35501a26f /usr.sbin/config
parentf15738db45b2aecfec50ad9d9d50dfd7ed67d4a4 (diff)
downloadFreeBSD-src-c2cf3fbd3561a77510f4077b1375ccc96fc8f44e.zip
FreeBSD-src-c2cf3fbd3561a77510f4077b1375ccc96fc8f44e.tar.gz
Put a simple algorithmus in there that checks the last generated prototype
for ioconf.c with the current and suppress the generation if they are equal. This now prevents all the warnings from the c-compiler about sio or snd or two adaptecs. This works only if the sio lines are grouped together in the config files, but it is better than nothing.
Diffstat (limited to 'usr.sbin/config')
-rw-r--r--usr.sbin/config/mkioconf.c17
1 files changed, 13 insertions, 4 deletions
diff --git a/usr.sbin/config/mkioconf.c b/usr.sbin/config/mkioconf.c
index 822f80c..2757443 100644
--- a/usr.sbin/config/mkioconf.c
+++ b/usr.sbin/config/mkioconf.c
@@ -605,6 +605,8 @@ i386_ioconf()
register int uba_n, slave;
int dev_id;
FILE *fp;
+ static struct device olddev;
+ struct device *old = &olddev;
fp = fopen(path("ioconf.c"), "w");
if (fp == 0) {
@@ -638,8 +640,9 @@ i386_ioconf()
if (mp == 0 || mp == TO_NEXUS ||
!eq(mp->d_name, "isa"))
continue;
- fprintf(fp, "extern struct isa_driver %3.3sdriver;",
- dp->d_name);
+ if(!old->d_name || strcmp(old->d_name, dp->d_name))
+ fprintf(fp, "extern struct isa_driver %3.3sdriver;",
+ dp->d_name);
if(eq(dp->d_name, "wdc")) seen_wdc++;
if(eq(dp->d_name, "fdc")) seen_fdc++;
if (dp->d_irq == 2)
@@ -647,9 +650,15 @@ i386_ioconf()
fprintf(stderr, "remapped irq 2 to irq 9, please update your config file\n");
dp->d_irq = 9;
}
- if (dp->d_vec != NULL && dp->d_vec->id != NULL)
- fprintf(fp, " inthand2_t %s;", shandler(dp));
+ if (dp->d_vec != NULL && dp->d_vec->id != NULL) {
+ char buf[32];
+
+ strcpy(buf, shandler(old));
+ if(!old->d_name || strcmp(buf, shandler(dp)))
+ fprintf(fp, " inthand2_t %s;", shandler(dp));
+ }
fprintf(fp, "\n");
+ old = dp;
}
#ifdef STATCLOCK
dev_id = 2;
OpenPOWER on IntegriCloud