summaryrefslogtreecommitdiffstats
path: root/usr.sbin/config
diff options
context:
space:
mode:
authorru <ru@FreeBSD.org>2005-11-03 14:01:22 +0000
committerru <ru@FreeBSD.org>2005-11-03 14:01:22 +0000
commitaaf1885b0a4d3b49864dfc2d31011601dd0d80bf (patch)
tree95173a23fcb661054d919e4d14b9d398d8af1852 /usr.sbin/config
parent445c73f2695593bf80daadad4aac48160c064ff8 (diff)
downloadFreeBSD-src-aaf1885b0a4d3b49864dfc2d31011601dd0d80bf.zip
FreeBSD-src-aaf1885b0a4d3b49864dfc2d31011601dd0d80bf.tar.gz
Implement the "nocpu" directive.
Requested by: rwatson
Diffstat (limited to 'usr.sbin/config')
-rw-r--r--usr.sbin/config/config.y12
-rw-r--r--usr.sbin/config/configvers.h2
-rw-r--r--usr.sbin/config/lang.l1
3 files changed, 14 insertions, 1 deletions
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 },
OpenPOWER on IntegriCloud