Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/usr.bin/config Restore the old behavior of "maxusers" to all...
details: https://anonhg.NetBSD.org/src/rev/db8348c53313
branches: trunk
changeset: 340306:db8348c53313
user: uebayasi <uebayasi%NetBSD.org@localhost>
date: Mon Aug 31 02:58:25 2015 +0000
description:
Restore the old behavior of "maxusers" to allow the value to be overriden.
Problem reported by John D. Baker.
diffstat:
usr.bin/config/defs.h | 5 +++--
usr.bin/config/gram.y | 12 +++---------
usr.bin/config/main.c | 22 ++++++++++++++++++++--
3 files changed, 26 insertions(+), 13 deletions(-)
diffs (110 lines):
diff -r f7eb4bf959fa -r db8348c53313 usr.bin/config/defs.h
--- a/usr.bin/config/defs.h Sun Aug 30 21:58:19 2015 +0000
+++ b/usr.bin/config/defs.h Mon Aug 31 02:58:25 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: defs.h,v 1.73 2015/08/30 21:58:19 uebayasi Exp $ */
+/* $NetBSD: defs.h,v 1.74 2015/08/31 02:58:25 uebayasi Exp $ */
/*
* Copyright (c) 1992, 1993
@@ -107,7 +107,7 @@
* The next two lines define the current version of the config(1) binary,
* and the minimum version of the configuration files it supports.
*/
-#define CONFIG_VERSION 20150833
+#define CONFIG_VERSION 20150834
#define CONFIG_MINVERSION 0
/*
@@ -610,6 +610,7 @@
int is_declared_option(const char *);
int deva_has_instances(struct deva *, int);
void setupdirs(void);
+void fixmaxusers(void);
void fixmkoption(void);
const char *strtolower(const char *);
diff -r f7eb4bf959fa -r db8348c53313 usr.bin/config/gram.y
--- a/usr.bin/config/gram.y Sun Aug 30 21:58:19 2015 +0000
+++ b/usr.bin/config/gram.y Mon Aug 31 02:58:25 2015 +0000
@@ -1,5 +1,5 @@
%{
-/* $NetBSD: gram.y,v 1.49 2015/08/29 14:07:45 uebayasi Exp $ */
+/* $NetBSD: gram.y,v 1.50 2015/08/31 02:58:25 uebayasi Exp $ */
/*
* Copyright (c) 1992, 1993
@@ -42,7 +42,7 @@
*/
#include <sys/cdefs.h>
-__RCSID("$NetBSD: gram.y,v 1.49 2015/08/29 14:07:45 uebayasi Exp $");
+__RCSID("$NetBSD: gram.y,v 1.50 2015/08/31 02:58:25 uebayasi Exp $");
#include <sys/types.h>
#include <sys/param.h>
@@ -760,13 +760,7 @@
;
select_maxusers:
- MAXUSERS int32 {
- char str[32];
-
- setmaxusers($2);
- snprintf(str, sizeof(str), "%d", $2);
- addoption(intern("MAXUSERS"), intern(str));
- }
+ MAXUSERS int32 { setmaxusers($2); }
;
select_ident:
diff -r f7eb4bf959fa -r db8348c53313 usr.bin/config/main.c
--- a/usr.bin/config/main.c Sun Aug 30 21:58:19 2015 +0000
+++ b/usr.bin/config/main.c Mon Aug 31 02:58:25 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: main.c,v 1.80 2015/08/30 01:33:20 uebayasi Exp $ */
+/* $NetBSD: main.c,v 1.81 2015/08/31 02:58:25 uebayasi Exp $ */
/*
* Copyright (c) 1992, 1993
@@ -45,7 +45,7 @@
#endif
#include <sys/cdefs.h>
-__RCSID("$NetBSD: main.c,v 1.80 2015/08/30 01:33:20 uebayasi Exp $");
+__RCSID("$NetBSD: main.c,v 1.81 2015/08/31 02:58:25 uebayasi Exp $");
#ifndef MAKE_BOOTSTRAP
#include <sys/cdefs.h>
@@ -429,6 +429,12 @@
stop();
/*
+ * Copy maxusers to param.
+ */
+ yyfile = "fixmaxusers";
+ fixmaxusers();
+
+ /*
* Copy makeoptions to params
*/
yyfile = "fixmkoption";
@@ -1104,6 +1110,18 @@
}
/*
+ * Copy maxusers to param "MAXUSERS".
+ */
+void
+fixmaxusers(void)
+{
+ char str[32];
+
+ snprintf(str, sizeof(str), "%d", maxusers);
+ addoption(intern("MAXUSERS"), intern(str));
+}
+
+/*
* Copy makeoptions to params with "makeoptions_" prefix.
*/
void
Home |
Main Index |
Thread Index |
Old Index