I have used the mac-addr feature (for netboot reasons). I think this
probably caused me grief
but I assumed I was at fault and did not bother reporting it.

I prefer same line, no curly braces, and accurate documentation. And also
error messages
that are more explicit:
Vnet.conf:4 Syntax error - Unexpected  "{" found.


On Sun, 2 Feb 2020 at 11:20, Klemens Nanni <[email protected]> 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
>
> Since it has been like this for years apparently, the question is which
> part should be fixed:  documentation or code?  I opt for the latter
> since that is what other parsers such as vm.conf(5) do, plus it reads
> much better structurally, imho.
>
> I came across this when implementing specific options for `vdisk', hence
> I copied the `vnet' block and ran into above thing.
>
> Given that noone complained so far about this:  Does anyone use
> `mac-addr' or `mtu'?  If so, do you prefer appending it without curly
> braces on the same line?  I'm curious.
>
>

Reply via email to