Module Name:    src
Committed By:   bad
Date:           Sat Aug  9 12:40:14 UTC 2014

Modified Files:
        src/usr.bin/config: main.c

Log Message:
Treat an undefined option as a warning instead of an error when undoing an
option.

Allows one to win with declarations like:
no options      MSGBUFSIZE
options         MSGBUFSIZE="128*1024"

Briefly discussed with cube@, lukem@ and martin@.


To generate a diff of this commit:
cvs rdiff -u -r1.53 -r1.54 src/usr.bin/config/main.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/usr.bin/config/main.c
diff -u src/usr.bin/config/main.c:1.53 src/usr.bin/config/main.c:1.54
--- src/usr.bin/config/main.c:1.53	Mon May  5 21:04:09 2014
+++ src/usr.bin/config/main.c	Sat Aug  9 12:40:14 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: main.c,v 1.53 2014/05/05 21:04:09 wiz Exp $	*/
+/*	$NetBSD: main.c,v 1.54 2014/08/09 12:40:14 bad Exp $	*/
 
 /*
  * Copyright (c) 1992, 1993
@@ -1093,9 +1093,8 @@ undo_option(struct hashtab *ht, struct n
 		/*
 		 * -U command line option removals are always silent
 		 */
-		if (handling_cmdlineopts)
-			return 0;
-		cfgerror("%s `%s' is not defined", type, name);
+		if (!handling_cmdlineopts)
+			cfgwarn("%s `%s' is not defined", type, name);
 		return (1);
 	}
 	if (npp == NULL)

Reply via email to