On Sun, Feb 02, 2020 at 12:08:56PM +0100, Klemens Nanni wrote:
> ldom.conf(5) says
> 
>       vnet [{keyword=value ...}]
>               Assign a vnet(4) network interface to the guest domain.  This
>               keyword can be used multiple times.  The curly braces are
>               optional and can contain the following keywords:
> 
> But curly braces must not exist:
> 
>       $ cat -n vnet.conf
>       1  domain guest {
>       2       vcpu 1
>       3       memory 1G
>       4       vnet { mtu=1500 }
>       5  }
>       $ ldomctl init-system -n vnet.conf
>       vnet.conf:4 syntax error
>       $ sed -i /vnet/s,[{}],,g vnet.conf
>       $ ldomctl init-system -n vnet.conf ; echo $?
>       0
I've tried converting parse.y to mandatory curly braces with space
separated (incl. optional newlines) keyword=value pairs, but I got lost
in yacc errors, consistency flaws, etc.

Unless I find more motiviation for this or some other parse.y hacker
wants to help, here's a diff to update ldom.conf(5) to reflect working
syntax.

I'd like to commit this soon in order to continue with my actual diff
for introducing vdisk options.

OK?


Index: ldom.conf.5
===================================================================
RCS file: /cvs/src/usr.sbin/ldomctl/ldom.conf.5,v
retrieving revision 1.10
diff -u -p -r1.10 ldom.conf.5
--- ldom.conf.5 13 Jan 2020 09:29:41 -0000      1.10
+++ ldom.conf.5 5 Feb 2020 20:06:21 -0000
@@ -64,12 +64,12 @@ can be a block device node or a disk ima
 .Cm create-vdisk
 command.
 This keyword can be used multiple times.
-.It Ic vnet Op Brq Ar keyword Ns = Ns Ar value ...
+.It Ic vnet Op Ar keyword Ns = Ns Ar value ...
 Assign a
 .Xr vnet 4
 network interface to the guest domain.
 This keyword can be used multiple times.
-The curly braces are optional and can contain the following keywords:
+Valid options are:
 .Bl -tag -width Ds
 .It Ic mac-addr Ns = Ns Ar address
 Configure the MAC address of the interface.

Reply via email to