From aaf1885b0a4d3b49864dfc2d31011601dd0d80bf Mon Sep 17 00:00:00 2001 From: ru Date: Thu, 3 Nov 2005 14:01:22 +0000 Subject: Implement the "nocpu" directive. Requested by: rwatson --- usr.sbin/config/config.y | 12 ++++++++++++ usr.sbin/config/configvers.h | 2 +- usr.sbin/config/lang.l | 1 + 3 files changed, 14 insertions(+), 1 deletion(-) (limited to 'usr.sbin') diff --git a/usr.sbin/config/config.y b/usr.sbin/config/config.y index 58d6b0c..6ec0e70 100644 --- a/usr.sbin/config/config.y +++ b/usr.sbin/config/config.y @@ -8,6 +8,7 @@ %token COMMA %token CONFIG %token CPU +%token NOCPU %token DEVICE %token NODEVICE %token ENV @@ -157,6 +158,17 @@ Config_spec: cp->cpu_name = $2; SLIST_INSERT_HEAD(&cputype, cp, cpu_next); } | + NOCPU Save_id + = { + struct cputype *cp, *cp2; + SLIST_FOREACH_SAFE(cp, &cputype, cpu_next, cp2) { + if (strcmp(cp->cpu_name, $2) != 0) + continue; + SLIST_REMOVE(&cputype, cp, cputype, cpu_next); + free(cp); + break; + } + } | OPTIONS Opt_list | NOOPTION Save_id diff --git a/usr.sbin/config/configvers.h b/usr.sbin/config/configvers.h index b4906e3..9dbae58 100644 --- a/usr.sbin/config/configvers.h +++ b/usr.sbin/config/configvers.h @@ -8,4 +8,4 @@ * * $FreeBSD$ */ -#define CONFIGVERS 600003 +#define CONFIGVERS 600004 diff --git a/usr.sbin/config/lang.l b/usr.sbin/config/lang.l index 39f3bd6..75064b5 100644 --- a/usr.sbin/config/lang.l +++ b/usr.sbin/config/lang.l @@ -62,6 +62,7 @@ struct kt { } key_words[] = { { "config", CONFIG }, { "cpu", CPU }, + { "nocpu", NOCPU }, { "device", DEVICE }, { "devices", DEVICE }, { "nodevice", NODEVICE }, -- cgit v1.1