aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Wemm <peter@FreeBSD.org>2001-01-31 10:06:06 +0000
committerPeter Wemm <peter@FreeBSD.org>2001-01-31 10:06:06 +0000
commit62a4bb5509e93c0845729fb647ca4ca50f551110 (patch)
tree093aff9b66af7f61131e1a13a47c99bf2d8dc3c4
parent520334620fa500a2f66e57326f14181096fb07a6 (diff)
downloadsrc-62a4bb5509e93c0845729fb647ca4ca50f551110.tar.gz
src-62a4bb5509e93c0845729fb647ca4ca50f551110.zip
Oops. An old version of a local change leaked in with the last commit.
Since it is here, clean it up a bit.
Notes
Notes: svn path=/head/; revision=71878
-rw-r--r--usr.sbin/config/mkheaders.c31
1 files 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;