Current-Users archive

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

Re: 'config' changes: overriding "maxusers" when including another kernel configuration

One of the entries on config(1)'s TODO list is to permit options to be added or removed without worrying about the current state of the option.

It's fairly simple to make this change for options, filesystems, and makeoptions (as they all use the same code). But it's a lot more difficult to handle device attachments.

Here's a (untested) patch that changes the errors into warnings. It might help (although I see that Masao has already reverted the maxusers changes)...

Index: main.c
RCS file: /cvsroot/src/usr.bin/config/main.c,v
retrieving revision 1.76
diff -u -p -r1.76 main.c
--- main.c      8 Aug 2015 15:52:41 -0000       1.76
+++ main.c      25 Aug 2015 04:13:23 -0000
@@ -1123,9 +1123,9 @@ do_option(struct hashtab *ht, struct nvl
        if ((nv = ht_lookup(ht, name)) == NULL)
        if (nv->nv_str != NULL && !OPT_FSOPT(name))
-               cfgerror("already have %s `%s=%s'", type, name, nv->nv_str);
+               cfgwarn("already have %s `%s=%s'", type, name, nv->nv_str);
-               cfgerror("already have %s `%s'", type, name);
+               cfgwarn("already have %s `%s'", type, name);
        return (1);

(We don't need any changes to undo_option(), as it is already only a warning to remove an option that isn't already defined!)

On Sun, 30 Aug 2015, John D. Baker wrote:

In the past, when one created a kernel configuration that includes another
kernel configuration, one could override the value of "maxusers" simply
by using the "maxusers" keyword with the desired value.

With the recent changes to 'config' and/or various Makefile*s, this
no longer works.  The config step fails stating that MAXUSERS=N
(the value of "maxusers" from the included configuration) already

I've found the following to work, e.g.:

 include 	"arch/sparc/conf/GENERIC"
 no options 	MAXUSERS
 options 	MAXUSERS=8

Will this be the new way of things, or will the old behavior of simply
giving a new "maxusers" statement be restored?

|/"\ John D. Baker, KN5UKS               NetBSD     Darwin/MacOS X
|\ / jdbaker[snail]mylinuxisp[flyspeck]com    OpenBSD            FreeBSD
| X  No HTML/proprietary data in email.   BSD just sits there and works!
|/ \ GPGkeyID:  D703 4A7E 479F 63F8 D3F4  BD99 9572 8F23 E4AD 1645

| Paul Goyette     | PGP Key fingerprint:     | E-mail addresses:       |
| (Retired)        | FA29 0E3B 35AF E8AE 6651 | paul at    |
| Kernel Developer | 0786 F758 55DE 53BA 7731 | pgoyette at  |

Home | Main Index | Thread Index | Old Index