From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Kuv3I-00037m-SJ for qemu-devel@nongnu.org; Tue, 28 Oct 2008 16:20:32 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Kuv3A-00034s-Gl for qemu-devel@nongnu.org; Tue, 28 Oct 2008 16:20:32 -0400 Received: from [199.232.76.173] (port=59064 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Kuv39-00034c-Qv for qemu-devel@nongnu.org; Tue, 28 Oct 2008 16:20:24 -0400 Received: from mx1.redhat.com ([66.187.233.31]:33829) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Kuv32-0003nI-2N for qemu-devel@nongnu.org; Tue, 28 Oct 2008 16:20:24 -0400 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id m9SKJsEn016703 for ; Tue, 28 Oct 2008 16:19:54 -0400 Date: Tue, 28 Oct 2008 20:19:52 +0000 From: "Daniel P. Berrange" Subject: Re: [Qemu-devel] [PATCH 1/4] Implement "info chardev" command. Message-ID: <20081028201952.GA30966@redhat.com> References: <1225198518-16529-1-git-send-email-kraxel@redhat.com> <1225198518-16529-2-git-send-email-kraxel@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1225198518-16529-2-git-send-email-kraxel@redhat.com> Reply-To: "Daniel P. Berrange" , 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 Cc: Gerd Hoffmann On Tue, Oct 28, 2008 at 01:55:15PM +0100, Gerd Hoffmann wrote: > This patch makes qemu keep track of the character devices in use and > implements a "info chardev" monitor command to print a list. > > qemu_chr_open() sticks the devices into a linked list now. It got a new > argument (label), so there is a name for each device. It also assigns a > filename to each character device. By default it just copyes the > filename passed in. Individual drivers can fill in something else > though. qemu_chr_open_pty() sets the filename to name of the pseudo tty > allocated. > > Output looks like this: > > (qemu) info chardev > monitor: filename=unix:/tmp/run.sh-26827/monitor,server,nowait > serial0: filename=unix:/tmp/run.sh-26827/console,server > serial1: filename=pty:/dev/pts/5 > parallel0: filename=vc:640x480 Good to have this 'info chardev' support, to avoid need to parse stderr to try & find PTY device paths :-) I don't know if the info is easily available, but for the 'vc' use case, it might be worth exposing the VC number, so a intelligent client app can read it, and be able to send 'ctl-alt-NN' in the VNC/SDL console to switch directly to the char device's VC. Regards, Daniel -- |: Red Hat, Engineering, London -o- http://people.redhat.com/berrange/ :| |: http://libvirt.org -o- http://virt-manager.org -o- http://ovirt.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: GnuPG: 7D3B9505 -o- F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :|