diff options
author | ru <ru@FreeBSD.org> | 2005-11-03 14:01:22 +0000 |
---|---|---|
committer | ru <ru@FreeBSD.org> | 2005-11-03 14:01:22 +0000 |
commit | aaf1885b0a4d3b49864dfc2d31011601dd0d80bf (patch) | |
tree | 95173a23fcb661054d919e4d14b9d398d8af1852 /usr.sbin/config/config.y | |
parent | 445c73f2695593bf80daadad4aac48160c064ff8 (diff) | |
download | FreeBSD-src-aaf1885b0a4d3b49864dfc2d31011601dd0d80bf.zip FreeBSD-src-aaf1885b0a4d3b49864dfc2d31011601dd0d80bf.tar.gz |
Implement the "nocpu" directive.
Requested by: rwatson
Diffstat (limited to 'usr.sbin/config/config.y')
-rw-r--r-- | usr.sbin/config/config.y | 12 |
1 files changed, 12 insertions, 0 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 |