qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] 答复: Re: [PATCH] chardev: Add 'help' option to print al


From: Paolo Bonzini
Subject: Re: [Qemu-devel] 答复: Re: [PATCH] chardev: Add 'help' option to print all available chardev backend types
Date: Fri, 2 Sep 2016 12:50:32 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0


On 25/08/2016 08:08, Lin Ma wrote:
> 
> 
>>>> Markus Armbruster <address@hidden> 2016/8/17 星期三 下午 2:52 >>>
>>"Lin Ma" <address@hidden> writes:
>>
>>>>>> Marc-André Lureau <address@hidden> 8/17/2016 1:25 上午 >>>
>>[...]
>>>>How different is it from the list in qemu -help ? Why duplicate that list
>>>>with less informations (arguments and details) ? Do you expect it to be
>>>>easily machine readable?
>>>>
>>> No special reason, Just add 'help' option to make it more friendly,
> like the
>>> output of '-watchdog help' or '-tpmdev help', Sometimes I forget the
> chardev
>>> backend names which I want to try, I'd like to have a very easy&fast
> way to
>>> get the backend list :-).
>>> 
>>> Various backends have various arguments, Printing all of them causes the
>>> complex output, that was my thought before I send the patch.
>>> Now...yes, it makes sense that including the arguments in output, I
> can add
>>> them if the patch's idea is acceptable.
>>
>>You could do it like -device / device_add: argument help lists types,
>>and argument T,help shows additional help for type T.
> Because chardev doesn't have qdev properties, most of chardev options
> are defined
> in qemu_chardev_opts in qemu-char.c, I'd like to hard code the argument
> output
> like these format:
> ......
> vc,id=id[[,width=width][,height=height]][[,cols=cols][,rows=rows]]
> socket,id=id[,host=host],port=host[,to=to][,ipv4][,ipv6][,nodelay]
> stdio,id=id[,mux=on|off][,signal=on|off]

I don't think this is a good idea if you want the output to be
machine-readable.  I think a simple "-chardev help" is good because it's
a simple addition and something obvious for users to try.

Paolo



reply via email to

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