summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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 9a041d066d4b..6773073e1042 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'); }