Source-Changes-HG archive

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

[src/trunk]: src Define MAXUXERS in opt_param.h. Bump config(1) version.



details:   https://anonhg.NetBSD.org/src/rev/160a9ea79758
branches:  trunk
changeset: 340252:160a9ea79758
user:      uebayasi <uebayasi%NetBSD.org@localhost>
date:      Sat Aug 29 07:08:38 2015 +0000

description:
Define MAXUXERS in opt_param.h.  Bump config(1) version.

diffstat:

 sys/conf/Makefile.kern.inc  |  4 ++--
 sys/conf/files              |  5 +++--
 sys/sys/param.h             |  6 +++++-
 usr.bin/config/defs.h       |  4 ++--
 usr.bin/config/mkmakefile.c |  5 ++---
 usr.bin/config/sem.c        |  7 +++++--
 6 files changed, 19 insertions(+), 12 deletions(-)

diffs (138 lines):

diff -r e7ce09a090da -r 160a9ea79758 sys/conf/Makefile.kern.inc
--- a/sys/conf/Makefile.kern.inc        Sat Aug 29 05:33:20 2015 +0000
+++ b/sys/conf/Makefile.kern.inc        Sat Aug 29 07:08:38 2015 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: Makefile.kern.inc,v 1.200 2015/08/29 05:03:36 uebayasi Exp $
+#      $NetBSD: Makefile.kern.inc,v 1.201 2015/08/29 07:08:38 uebayasi Exp $
 #
 # This file contains common `MI' targets and definitions and it is included
 # at the bottom of each `MD' ${MACHINE}/conf/Makefile.${MACHINE}.
@@ -62,7 +62,7 @@
 ##
 INCLUDES?=     -I. ${EXTRA_INCLUDES} -I${S}/../common/include -I$S/arch \
                -I$S -nostdinc
-CPPFLAGS+=     ${INCLUDES} ${IDENT} ${PARAM} -D_KERNEL -D_KERNEL_OPT
+CPPFLAGS+=     ${INCLUDES} ${IDENT} -D_KERNEL -D_KERNEL_OPT
 CPPFLAGS+=     -std=gnu99
 DEFCOPTS?=     -O2
 COPTS?=                ${DEFCOPTS}
diff -r e7ce09a090da -r 160a9ea79758 sys/conf/files
--- a/sys/conf/files    Sat Aug 29 05:33:20 2015 +0000
+++ b/sys/conf/files    Sat Aug 29 07:08:38 2015 +0000
@@ -1,7 +1,7 @@
-#      $NetBSD: files,v 1.1136 2015/08/21 07:19:39 uebayasi Exp $
+#      $NetBSD: files,v 1.1137 2015/08/29 07:08:38 uebayasi Exp $
 #      @(#)files.newconf       7.5 (Berkeley) 5/10/93
 
-version        20150820
+version        20150829
 
 #
 # device classes
@@ -17,6 +17,7 @@
 # options understood by the machine-independent part of the kernel
 # (note, these are case-sensitive)
 #
+defparam opt_param.h           MAXUSERS
 defflag                                INSECURE
 defflag                                KMEMSTATS
 defflag                                KTRACE
diff -r e7ce09a090da -r 160a9ea79758 sys/sys/param.h
--- a/sys/sys/param.h   Sat Aug 29 05:33:20 2015 +0000
+++ b/sys/sys/param.h   Sat Aug 29 07:08:38 2015 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: param.h,v 1.483 2015/08/16 18:00:03 mlelstv Exp $      */
+/*     $NetBSD: param.h,v 1.484 2015/08/29 07:08:38 uebayasi Exp $     */
 
 /*-
  * Copyright (c) 1982, 1986, 1989, 1993
@@ -39,6 +39,10 @@
 #ifndef _SYS_PARAM_H_
 #define        _SYS_PARAM_H_
 
+#ifdef _KERNEL_OPT
+#include "opt_param.h"
+#endif
+
 /*
  * Historic BSD #defines -- probably will remain untouched for all time.
  */
diff -r e7ce09a090da -r 160a9ea79758 usr.bin/config/defs.h
--- a/usr.bin/config/defs.h     Sat Aug 29 05:33:20 2015 +0000
+++ b/usr.bin/config/defs.h     Sat Aug 29 07:08:38 2015 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: defs.h,v 1.67 2015/08/29 02:54:07 uebayasi Exp $       */
+/*     $NetBSD: defs.h,v 1.68 2015/08/29 07:08:38 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         20150820
+#define CONFIG_VERSION         20150829
 #define CONFIG_MINVERSION      0
 
 /*
diff -r e7ce09a090da -r 160a9ea79758 usr.bin/config/mkmakefile.c
--- a/usr.bin/config/mkmakefile.c       Sat Aug 29 05:33:20 2015 +0000
+++ b/usr.bin/config/mkmakefile.c       Sat Aug 29 07:08:38 2015 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: mkmakefile.c,v 1.42 2015/08/29 02:54:07 uebayasi Exp $ */
+/*     $NetBSD: mkmakefile.c,v 1.43 2015/08/29 07:08:38 uebayasi Exp $ */
 
 /*
  * Copyright (c) 1992, 1993
@@ -45,7 +45,7 @@
 #endif
 
 #include <sys/cdefs.h>
-__RCSID("$NetBSD: mkmakefile.c,v 1.42 2015/08/29 02:54:07 uebayasi Exp $");
+__RCSID("$NetBSD: mkmakefile.c,v 1.43 2015/08/29 07:08:38 uebayasi Exp $");
 
 #include <sys/param.h>
 #include <ctype.h>
@@ -276,7 +276,6 @@
                    s ? "\"" : "");
        }
        putc('\n', fp);
-       fprintf(fp, "PARAM=-DMAXUSERS=%d\n", maxusers);
        fprintf(fp, "MACHINE=%s\n", machine);
 
        const char *subdir = "";
diff -r e7ce09a090da -r 160a9ea79758 usr.bin/config/sem.c
--- a/usr.bin/config/sem.c      Sat Aug 29 05:33:20 2015 +0000
+++ b/usr.bin/config/sem.c      Sat Aug 29 07:08:38 2015 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: sem.c,v 1.71 2014/11/21 20:46:56 christos Exp $        */
+/*     $NetBSD: sem.c,v 1.72 2015/08/29 07:08:38 uebayasi Exp $        */
 
 /*
  * Copyright (c) 1992, 1993
@@ -45,7 +45,7 @@
 #endif
 
 #include <sys/cdefs.h>
-__RCSID("$NetBSD: sem.c,v 1.71 2014/11/21 20:46:56 christos Exp $");
+__RCSID("$NetBSD: sem.c,v 1.72 2015/08/29 07:08:38 uebayasi Exp $");
 
 #include <sys/param.h>
 #include <ctype.h>
@@ -239,6 +239,7 @@
 void
 setmaxusers(int n)
 {
+       char buf[32];
 
        if (maxusers == n) {
                cfgerror("duplicate maxusers parameter");
@@ -256,6 +257,8 @@
                cfgerror("warning: maxusers (%d) > %d", n, maxmaxusers);
                errors--;
        }
+       snprintf(buf, sizeof(buf), "%d", maxusers);
+       addoption("MAXUSERS", buf);
 }
 
 void



Home | Main Index | Thread Index | Old Index