diff options
author | bde <bde@FreeBSD.org> | 2000-01-09 12:52:01 +0000 |
---|---|---|
committer | bde <bde@FreeBSD.org> | 2000-01-09 12:52:01 +0000 |
commit | 6c5f3a0f802099c0cbc73a475128ecc848053746 (patch) | |
tree | 6c10e77caf9d0f4eabf61642099b92de244aafb5 /usr.sbin/config/mkoptions.c | |
parent | 04d9137ab519e19100c8b0a44782794316395ec8 (diff) | |
download | FreeBSD-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/config/mkoptions.c')
-rw-r--r-- | usr.sbin/config/mkoptions.c | 12 |
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)); |