summaryrefslogtreecommitdiffstats
path: root/usr.sbin
diff options
context:
space:
mode:
authorbde <bde@FreeBSD.org>2000-01-09 12:52:01 +0000
committerbde <bde@FreeBSD.org>2000-01-09 12:52:01 +0000
commit6c5f3a0f802099c0cbc73a475128ecc848053746 (patch)
tree6c10e77caf9d0f4eabf61642099b92de244aafb5 /usr.sbin
parent04d9137ab519e19100c8b0a44782794316395ec8 (diff)
downloadFreeBSD-src-6c5f3a0f802099c0cbc73a475128ecc848053746.zip
FreeBSD-src-6c5f3a0f802099c0cbc73a475128ecc848053746.tar.gz
Remove even known options if they are in the wrong options header. This
fixes movement of options. Stale copies were left behind.
Diffstat (limited to 'usr.sbin')
-rw-r--r--usr.sbin/config/mkoptions.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/usr.sbin/config/mkoptions.c b/usr.sbin/config/mkoptions.c
index d8e4dbb..d53affd 100644
--- a/usr.sbin/config/mkoptions.c
+++ b/usr.sbin/config/mkoptions.c
@@ -122,7 +122,7 @@ static void
do_option(name)
char *name;
{
- char *file, *inw;
+ char *basefile, *file, *inw;
struct opt_list *ol;
struct opt *op, *op_head, *topp;
FILE *inf, *outf;
@@ -166,6 +166,12 @@ do_option(name)
(void) fclose(outf);
return;
}
+ basefile = "";
+ for (ol = otab; ol != 0; ol = ol->o_next)
+ if (eq(name, ol->o_name)) {
+ basefile = ol->o_file;
+ break;
+ }
oldvalue = NULL;
op_head = NULL;
seen = 0;
@@ -198,6 +204,10 @@ do_option(name)
printf("WARNING: unknown option `%s' removed from %s\n",
inw, file);
tidy++;
+ } else if (ol != NULL && !eq(basefile, ol->o_file)) {
+ printf("WARNING: option `%s' moved from %s to %s\n",
+ inw, basefile, ol->o_file);
+ tidy++;
} else {
op = (struct opt *) malloc(sizeof *op);
bzero(op, sizeof(*op));
OpenPOWER on IntegriCloud