summaryrefslogtreecommitdiffstats
path: root/usr.sbin/config/mkoptions.c
diff options
context:
space:
mode:
authorpeter <peter@FreeBSD.org>2001-02-04 13:17:38 +0000
committerpeter <peter@FreeBSD.org>2001-02-04 13:17:38 +0000
commitc417101ae55dd9941fb03ce6fce4955a6a2a2e8f (patch)
treee28a112e1254fefe9d7243b6c77f8470b3757ba5 /usr.sbin/config/mkoptions.c
parente87f7a15ad62e1dd25061ddb301662e809692c2c (diff)
downloadFreeBSD-src-c417101ae55dd9941fb03ce6fce4955a6a2a2e8f.zip
FreeBSD-src-c417101ae55dd9941fb03ce6fce4955a6a2a2e8f.tar.gz
Remove the need to list each and every cpu platform. Config will now
take your word for the 'machine' switch.
Diffstat (limited to 'usr.sbin/config/mkoptions.c')
-rw-r--r--usr.sbin/config/mkoptions.c30
1 files changed, 8 insertions, 22 deletions
diff --git a/usr.sbin/config/mkoptions.c b/usr.sbin/config/mkoptions.c
index 2bc64a6..5ff8c54 100644
--- a/usr.sbin/config/mkoptions.c
+++ b/usr.sbin/config/mkoptions.c
@@ -56,14 +56,7 @@ static struct users {
int u_default;
int u_min;
int u_max;
-} users[] = {
- { 8, 2, 512 }, /* MACHINE_I386 */
- { 8, 2, 512 }, /* MACHINE_PC98 */
- { 8, 2, 512 }, /* MACHINE_ALPHA */
- { 8, 2, 512 }, /* MACHINE_IA64 */
- { 8, 2, 512 }, /* MACHINE_POWERPC */
-};
-#define NUSERS (sizeof (users) / sizeof (users[0]))
+} users= { 8, 2, 512 };
static char *lower(char *);
static void read_options(void);
@@ -77,7 +70,6 @@ options(void)
struct cputype *cp;
struct opt_list *ol;
struct opt *op;
- struct users *up;
/* Fake the cpu types as options. */
for (cp = cputype; cp != NULL; cp = cp->cpu_next) {
@@ -88,20 +80,14 @@ options(void)
opt = op;
}
- /* Initialize `maxusers'. */
- if ((unsigned)machine > NUSERS) {
- printf("maxusers config info isn't present, using i386\n");
- up = &users[MACHINE_I386 - 1];
- } else
- up = &users[machine - 1];
if (maxusers == 0) {
- printf("maxusers not specified; %d assumed\n", up->u_default);
- maxusers = up->u_default;
- } else if (maxusers < up->u_min) {
- printf("minimum of %d maxusers assumed\n", up->u_min);
- maxusers = up->u_min;
- } else if (maxusers > up->u_max)
- printf("warning: maxusers > %d (%d)\n", up->u_max, maxusers);
+ printf("maxusers not specified; %d assumed\n", users.u_default);
+ maxusers = users.u_default;
+ } else if (maxusers < users.u_min) {
+ printf("minimum of %d maxusers assumed\n", users.u_min);
+ maxusers = users.u_min;
+ } else if (maxusers > users.u_max)
+ printf("warning: maxusers > %d (%d)\n", users.u_max, maxusers);
/* Fake MAXUSERS as an option. */
op = (struct opt *)malloc(sizeof(*op));
OpenPOWER on IntegriCloud