On 25/08/2016 08:08, Lin Ma wrote: > > >>>> Markus Armbruster <arm...@redhat.com> 2016/8/17 星期三 下午 2:52 >>> >>"Lin Ma" <l...@suse.com> writes: >> >>>>>> Marc-André Lureau <marcandre.lur...@gmail.com> 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