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.
This commit is contained in:
Garrett Wollman 1994-11-23 20:36:08 +00:00
parent 1573231708
commit 8a7c811a5b
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=4791

View file

@ -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'); }