qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 6/7] slirp: Add description of new "dhcpvendopt"


From: Fedor Lyakhov
Subject: Re: [Qemu-devel] [PATCH 6/7] slirp: Add description of new "dhcpvendopt" suboption to the help and man page
Date: Wed, 30 Apr 2014 14:13:40 +0400

On Tue, Apr 29, 2014 at 4:00 AM, Eric Blake <address@hidden> wrote:
> On 04/25/2014 04:11 PM, Fedor Lyakhov wrote:
>> Signed-off-by: Fedor Lyakhov <address@hidden>
>> ---
>>  qemu-options.hx | 16 +++++++++++++---
>>  1 file changed, 13 insertions(+), 3 deletions(-)
>
>> +    "         
>> [,hostname=host][,dhcpstart=addr][,dns=addr][,dhcpvendopt=optstring]\n"
>
>>
>> address@hidden address@hidden
>> +Specify list of vendor-specific DHCP options (option 43) reported by the
>> +built-in DHCP server (see RFC2132). The @var{optstring} should be specified 
>> in
>> +the following form: "tag1:value1;tag2:value2", i.e. each option is 
>> separated by
>> +';' semicolon (Note: on most terminals it must be escaped '\;'), option tag 
>> and
>
> It's not the terminal, but the shell, which requires escaping of ';'.
>
>> +value are separated by ':' colon. Accepted tag values are [1-254]. Single
>> +tag-less option "value" is also supported. Zero tag "0:" can be used to
>> +'escape' special single options beginning with tag-like value (e.g. single 
>> MAC
>> +address can be specified as "0:10:FE:20:AB:CD:78").
>
> Rather than inventing YET ANOTHER command line quoting idiom in order to
> cram multiple strings into one option, can you instead manage to rework
> things so that the user can pass multiple dhcpvendopt= options, one per
> string?  That is, dhcpvendopt=tag1:value1\;tag2:value2 is ad-hoc, while
> dhcpvendopt=tag1=value1,dhcpvendopt=tag2=value2 could reuse existing
> machinery.

Thanks for your suggestion, it is very reasonable. I'll do that and
re-send the series. BTW, double '=' seems a bit odd - is it really
used this way in some other option? If not, I think it would be more
convenient to use multiple options with "dhcpvendopt=tag1:value1"
format instead. Also I'm not very familiar with QEMU cmdline option
design, so I'd appreciate a hint on existing "multi-option".

As a small excuse for current bad design - this feature was initially
added to Android Emulator (I haven't sent it upstream yet) - and this
emulator uses old options handling code, so it won't be possible to
reuse it anyway.

>
> --
> Eric Blake   eblake redhat com    +1-919-301-3266
> Libvirt virtualization library http://libvirt.org
>


-- 
Best regards,
Fedor



reply via email to

[Prev in Thread] Current Thread [Next in Thread]