From 6c5f3a0f802099c0cbc73a475128ecc848053746 Mon Sep 17 00:00:00 2001 From: bde Date: Sun, 9 Jan 2000 12:52:01 +0000 Subject: Remove even known options if they are in the wrong options header. This fixes movement of options. Stale copies were left behind. --- usr.sbin/config/mkoptions.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'usr.sbin/config/mkoptions.c') 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)); -- cgit v1.1