Fix previous.

This commit is contained in:
uebayasi 2015-08-29 07:24:49 +00:00
parent 4401376950
commit 8b68b0de02
2 changed files with 11 additions and 7 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: main.c,v 1.77 2015/08/28 03:55:15 uebayasi Exp $ */
/* $NetBSD: main.c,v 1.78 2015/08/29 07:24:49 uebayasi Exp $ */
/*
* Copyright (c) 1992, 1993
@ -45,7 +45,7 @@
#endif
#include <sys/cdefs.h>
__RCSID("$NetBSD: main.c,v 1.77 2015/08/28 03:55:15 uebayasi Exp $");
__RCSID("$NetBSD: main.c,v 1.78 2015/08/29 07:24:49 uebayasi Exp $");
#ifndef MAKE_BOOTSTRAP
#include <sys/cdefs.h>
@ -428,6 +428,13 @@ main(int argc, char **argv)
if (fixdevis())
stop();
/*
* Fix maxusers.
*/
char buf[32];
snprintf(buf, sizeof(buf), "%d", maxusers);
addoption(intern("MAXUSERS"), intern(buf));
/*
* If working on an ioconf-only config, process here and exit
*/

View File

@ -1,4 +1,4 @@
/* $NetBSD: sem.c,v 1.72 2015/08/29 07:08:38 uebayasi Exp $ */
/* $NetBSD: sem.c,v 1.73 2015/08/29 07:24:49 uebayasi Exp $ */
/*
* Copyright (c) 1992, 1993
@ -45,7 +45,7 @@
#endif
#include <sys/cdefs.h>
__RCSID("$NetBSD: sem.c,v 1.72 2015/08/29 07:08:38 uebayasi Exp $");
__RCSID("$NetBSD: sem.c,v 1.73 2015/08/29 07:24:49 uebayasi Exp $");
#include <sys/param.h>
#include <ctype.h>
@ -239,7 +239,6 @@ setdefmaxusers(int min, int def, int max)
void
setmaxusers(int n)
{
char buf[32];
if (maxusers == n) {
cfgerror("duplicate maxusers parameter");
@ -257,8 +256,6 @@ setmaxusers(int n)
cfgerror("warning: maxusers (%d) > %d", n, maxmaxusers);
errors--;
}
snprintf(buf, sizeof(buf), "%d", maxusers);
addoption("MAXUSERS", buf);
}
void