Received: from eggs.gnu.org ([2001:4830:134:3::10]:53721) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bfm3Y-0001oB-DR for qemu-devel@nongnu.org; Fri, 02 Sep 2016 06:50:45 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bfm3S-0007PR-H6 for qemu-devel@nongnu.org; Fri, 02 Sep 2016 06:50:43 -0400 Received: from mx1.redhat.com ([209.132.183.28]:48398) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bfm3S-0007PM-7G for qemu-devel@nongnu.org; Fri, 02 Sep 2016 06:50:38 -0400 References: <20160816171352.17021-1-lma@suse.com> <57B446440200006200090019@prv-mh.provo.novell.com> <57B446440200006200090019@prv-mh.provo.novell.com> <878tvvvqek.fsf@dusky.pond.sub.org> <57BEFBCE02000062000919CC@prv-mh.provo.novell.com> From: Paolo Bonzini Message-ID: <0d2117b1-c0a1-c6c4-3845-877462521985@redhat.com> Date: Fri, 2 Sep 2016 12:50:32 +0200 MIME-Version: 1.0 In-Reply-To: <57BEFBCE02000062000919CC@prv-mh.provo.novell.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] =?utf-8?b?562U5aSN77yaIFJlOiBbUEFUQ0hdIGNoYXJkZXY6?= =?utf-8?q?_Add_=27help=27_option_to_print_all_available_chardev_backend_t?= =?utf-8?q?ypes?= List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Lin Ma , Markus Armbruster Cc: marcandre.lureau@gmail.com, qemu-devel@nongnu.org On 25/08/2016 08:08, Lin Ma wrote: >=20 >=20 >>>> Markus Armbruster 2016/8/17 =E6=98=9F=E6=9C=9F=E4= =B8=89 =E4=B8=8B=E5=8D=88 2:52 >>> >>"Lin Ma" writes: >> >>>>>> Marc-Andr=C3=A9 Lureau 8/17/2016 1:25= =E4=B8=8A=E5=8D=88 >>> >>[...] >>>>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 :-). >>>=20 >>> 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=3Did[[,width=3Dwidth][,height=3Dheight]][[,cols=3Dcols][,rows=3Dr= ows]] > socket,id=3Did[,host=3Dhost],port=3Dhost[,to=3Dto][,ipv4][,ipv6][,nodel= ay] > stdio,id=3Did[,mux=3Don|off][,signal=3Don|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