From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KsYxi-0001fj-1W for qemu-devel@nongnu.org; Wed, 22 Oct 2008 04:21:02 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KsYxg-0001fA-Ca for qemu-devel@nongnu.org; Wed, 22 Oct 2008 04:21:01 -0400 Received: from [199.232.76.173] (port=50637 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KsYxg-0001f3-7m for qemu-devel@nongnu.org; Wed, 22 Oct 2008 04:21:00 -0400 Received: from mx2.redhat.com ([66.187.237.31]:43687) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1KsYxg-0003BV-5Q for qemu-devel@nongnu.org; Wed, 22 Oct 2008 04:21:00 -0400 Received: from int-mx2.corp.redhat.com (int-mx2.corp.redhat.com [172.16.27.26]) by mx2.redhat.com (8.13.8/8.13.8) with ESMTP id m9M8KtFP007570 for ; Wed, 22 Oct 2008 04:20:57 -0400 Received: from ns3.rdu.redhat.com (ns3.rdu.redhat.com [10.11.255.199]) by int-mx2.corp.redhat.com (8.13.1/8.13.1) with ESMTP id m9M8Kt9P002072 for ; Wed, 22 Oct 2008 04:20:55 -0400 Received: from zweiblum.travel.kraxel.org (vpn-4-32.str.redhat.com [10.32.4.32]) by ns3.rdu.redhat.com (8.13.8/8.13.8) with ESMTP id m9M8KrU7016294 for ; Wed, 22 Oct 2008 04:20:54 -0400 Message-ID: <48FEE265.1010203@redhat.com> Date: Wed, 22 Oct 2008 10:20:53 +0200 From: Gerd Hoffmann MIME-Version: 1.0 Subject: Re: [Qemu-devel] [PATCH] Implement "info chardev" command. References: <48F75657.7020901@redhat.com> <48FDEF3F.70807@codemonkey.ws> In-Reply-To: <48FDEF3F.70807@codemonkey.ws> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Anthony Liguori wrote: > Gerd Hoffmann wrote: >> Hi, >> >> This patch makes qemu keep track of the character devices in use and >> implements a "info chardev" monitor command to print a list. >> > > Is it better to enumerate all chardevs or to provide info functions for > each type of chardev (i.e. 'info serial', 'info parallel'). I don't > have a strong feeling either way. I did it this way because (a) It is easier to implement (b) Covers everything, not just serial and parallel. There are also usb serial dongles, and it also lists gdb & monitor. And in case we get more in the future, it is already covered ;) (c) I prefer to keep the number of info commands low. > The only thing I'd suggest about this patch is that if you're going to > print pty:/dev/pty/3, then you should also support that syntax for > specifying a pty. Otherwise, there's a lack of symmetry. It's not a bug, it's a feature. First, when allocating a pts, the kernel hands out the first free one. There simply is no way to specify one, thus I simply can't support a pty:/dev/pts/$nr syntax on the command line. Second, I think even for other types it would be useful to support this asymmetric syntax. Allow "unix:" without specifying a path, then have qemu allocate a random one in $TMPDIR and report the path via monitor. Likewise for tcp ports. That allows moving the ressource allocation from the management application into qemu, closing race windows along the way. No patches yet though. Oh, the same thing for vnc ports is still on the todo list too. Remember the "-vnc :1,to=10" feature discussed a few weeks (months?) ago on the list? cheers, Gerd