From 62a4bb5509e93c0845729fb647ca4ca50f551110 Mon Sep 17 00:00:00 2001 From: Peter Wemm Date: Wed, 31 Jan 2001 10:06:06 +0000 Subject: [PATCH] Oops. An old version of a local change leaked in with the last commit. Since it is here, clean it up a bit. --- usr.sbin/config/mkheaders.c | 31 +++++++++---------------------- 1 file changed, 9 insertions(+), 22 deletions(-) diff --git a/usr.sbin/config/mkheaders.c b/usr.sbin/config/mkheaders.c index 91fccf2ecd49..3c8e879c0a23 100644 --- a/usr.sbin/config/mkheaders.c +++ b/usr.sbin/config/mkheaders.c @@ -52,7 +52,6 @@ static const char rcsid[] = #include "y.tab.h" static void do_header(char *, int); -static void do_count(char *); static char *toheader(char *); static char *tomacro(char *); @@ -73,11 +72,8 @@ headers(void) dp->d_type |= DEVDONE; } } - if (fl->f_flags & NEED_COUNT) { - if (match) -printf("warning: static limits for %s are set\n", fl->f_needs); - do_count(fl->f_needs); - } + if (fl->f_flags & NEED_COUNT) + do_header(fl->f_needs, match); } } for (dp = dtab; dp != 0; dp = dp->d_next) { @@ -89,14 +85,14 @@ printf("warning: static limits for %s are set\n", fl->f_needs); } } -/* - * count all the devices of a certain type and recurse to count - * whatever the device is connected to - */ static void -do_count(char *dev) +do_header(char *dev, int match) { + char *file, *name, *inw; + struct file_list *fl, *fl_head, *tflp; struct device *dp; + FILE *inf, *outf; + int inc, oldcount; int count, hicount; /* @@ -111,19 +107,10 @@ do_count(char *dev) break; } } - do_header(dev, count); -} - -static void -do_header(char *dev, int count) -{ - char *file, *name, *inw; - struct file_list *fl, *fl_head, *tflp; - FILE *inf, *outf; - int inc, oldcount; - file = toheader(dev); name = tomacro(dev); + if (match) + printf("Note: static unit limits for %s are set (%s = %d)\n", dev, name, count); remember(file); inf = fopen(file, "r"); oldcount = -1;