diff options
author | 2016-10-29 14:58:54 +0000 | |
---|---|---|
committer | 2016-10-29 14:58:54 +0000 | |
commit | 3e9d8149186502643d2e171b1b497b8cf6f93e82 (patch) | |
tree | 65f4f77e3b79f3470bad39b86d3b0b53e0bb8c6f | |
parent | Separate parsing vms and switches from starting them in vmd(8). (diff) | |
download | wireguard-openbsd-3e9d8149186502643d2e171b1b497b8cf6f93e82.tar.xz wireguard-openbsd-3e9d8149186502643d2e171b1b497b8cf6f93e82.zip |
Simple grammar tweak: allow to specify interface options in a single line.
-rw-r--r-- | usr.sbin/vmd/parse.y | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/usr.sbin/vmd/parse.y b/usr.sbin/vmd/parse.y index fe2d3b83c61..91ac49a0717 100644 --- a/usr.sbin/vmd/parse.y +++ b/usr.sbin/vmd/parse.y @@ -1,4 +1,4 @@ -/* $OpenBSD: parse.y,v 1.12 2016/10/29 14:56:05 edd Exp $ */ +/* $OpenBSD: parse.y,v 1.13 2016/10/29 14:58:54 reyk Exp $ */ /* * Copyright (c) 2007-2016 Reyk Floeter <reyk@openbsd.org> @@ -394,6 +394,7 @@ vm_opts : disable { ; iface_opts_o : '{' optnl iface_opts_l '}' + | iface_opts_c | /* empty */ ; @@ -401,6 +402,10 @@ iface_opts_l : iface_opts_l iface_opts optnl | iface_opts optnl ; +iface_opts_c : iface_opts_c iface_opts optcomma + | iface_opts + ; + iface_opts : SWITCH string { unsigned int i = vcp_nnics; @@ -474,6 +479,10 @@ disable : ENABLE { $$ = 0; } | DISABLE { $$ = 1; } ; +optcomma : ',' + | + ; + optnl : '\n' optnl | ; |