summaryrefslogtreecommitdiffstats
path: root/usr.sbin/config
diff options
context:
space:
mode:
authorwollman <wollman@FreeBSD.org>1994-11-23 20:36:08 +0000
committerwollman <wollman@FreeBSD.org>1994-11-23 20:36:08 +0000
commit95e1d8c3a653d3f8d42c7c3c52e90f0122147a00 (patch)
tree2906fb9b3f624de8927fccd4a5f6cebd6d6b156d /usr.sbin/config
parent493c81926137c9acec55cbf68e0416672f7921a4 (diff)
downloadFreeBSD-src-95e1d8c3a653d3f8d42c7c3c52e90f0122147a00.zip
FreeBSD-src-95e1d8c3a653d3f8d42c7c3c52e90f0122147a00.tar.gz
Don't core on ``root on qq0 and fx0 and yy0'' specifications; just
take the first one and ignore all the rest, giving a warning message. Fixes PR #3.
Diffstat (limited to 'usr.sbin/config')
-rw-r--r--usr.sbin/config/config.y14
1 files changed, 12 insertions, 2 deletions
diff --git a/usr.sbin/config/config.y b/usr.sbin/config/config.y
index 9a041d0..6773073 100644
--- a/usr.sbin/config/config.y
+++ b/usr.sbin/config/config.y
@@ -67,7 +67,7 @@
%type <str> device_name
%type <val> major_minor
%type <val> arg_device_spec
-%type <val> root_device_spec
+%type <val> root_device_spec root_device_specs
%type <val> dump_device_spec
%type <file> swap_device_spec
%type <file> comp_device_spec
@@ -112,6 +112,7 @@
#include "config.h"
#include <ctype.h>
#include <stdio.h>
+#include <err.h>
struct device cur;
struct device *curp = 0;
@@ -285,7 +286,7 @@ swap_device_spec:
;
root_spec:
- ROOT optional_on root_device_spec
+ ROOT optional_on root_device_specs
= {
struct file_list *fl = *confp;
@@ -296,6 +297,15 @@ root_spec:
}
;
+root_device_specs:
+ root_device_spec AND root_device_specs
+ = {
+ warnx("extraneous root devices ignored");
+ $$ = $1;
+ }
+ | root_device_spec
+ ;
+
root_device_spec:
device_name
= { $$ = nametodev($1, 0, 'a'); }
OpenPOWER on IntegriCloud