Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 23 Jan 2015 16:03:03 +0000 (UTC)
From:      Will Andrews <will@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r277567 - head/usr.sbin/config
Message-ID:  <201501231603.t0NG33Y3051362@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: will
Date: Fri Jan 23 16:03:02 2015
New Revision: 277567
URL: https://svnweb.freebsd.org/changeset/base/277567

Log:
  Allow lists for "nooption" and "nooptions" keywords.
  
  usr.sbin/config/config.y
  	According to config(5), the "device", "devices",
  	"nodevice", "nodevices", "option", "options",
  	"nooption", and "nooptions" keywords can all take a
  	comma-separated list of values.  However, the yacc code
  	did not allow lists for "nooption" and "nooptions", only
  	single values.  This commit fixes the yacc code to allow
  	comma separated values for all the above keywords.
  
  Submitted by:	asomers
  MFC after:	1 week
  Sponsored by:	Spectra Logic
  MFSpectraBSD:	1095296 on 2014/10/07

Modified:
  head/usr.sbin/config/config.y

Modified: head/usr.sbin/config/config.y
==============================================================================
--- head/usr.sbin/config/config.y	Fri Jan 23 15:55:03 2015	(r277566)
+++ head/usr.sbin/config/config.y	Fri Jan 23 16:03:02 2015	(r277567)
@@ -178,7 +178,7 @@ Config_spec:
 	      } |
 	OPTIONS Opt_list
 		|
-	NOOPTION Save_id { rmopt_schedule(&opt, $2); } |
+	NOOPTION NoOpt_list |
 	MAKEOPTIONS Mkopt_list
 		|
 	NOMAKEOPTION Save_id { rmopt_schedule(&mkopt, $2); } |
@@ -225,6 +225,11 @@ Opt_list:
 	Option
 		;
 
+NoOpt_list:
+	NoOpt_list COMMA NoOption
+	  	|
+	NoOption
+		;
 Option:
 	Save_id {
 		newopt(&opt, $1, NULL, 0);
@@ -236,6 +241,11 @@ Option:
 		newopt(&opt, $1, $3, 0);
 	      } ;
 
+NoOption:
+	Save_id {
+		rmopt_schedule(&opt, $1);
+		};
+
 Opt_value:
 	ID { $$ = $1; } |
 	NUMBER {



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201501231603.t0NG33Y3051362>