Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/usr.bin/config Treat an undefined option as a warning instea...



details:   https://anonhg.NetBSD.org/src/rev/9ac8597e1bba
branches:  trunk
changeset: 331361:9ac8597e1bba
user:      bad <bad%NetBSD.org@localhost>
date:      Sat Aug 09 12:40:14 2014 +0000

description:
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@.

diffstat:

 usr.bin/config/main.c |  7 +++----
 1 files changed, 3 insertions(+), 4 deletions(-)

diffs (21 lines):

diff -r 734bcf947e66 -r 9ac8597e1bba usr.bin/config/main.c
--- a/usr.bin/config/main.c     Sat Aug 09 12:34:05 2014 +0000
+++ b/usr.bin/config/main.c     Sat Aug 09 12:40:14 2014 +0000
@@ -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 @@
                /*
                 * -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)



Home | Main Index | Thread Index | Old Index