From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Kus3j-0001qJ-Ko for qemu-devel@nongnu.org; Tue, 28 Oct 2008 13:08:47 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Kus3h-0001pR-Qy for qemu-devel@nongnu.org; Tue, 28 Oct 2008 13:08:47 -0400 Received: from [199.232.76.173] (port=34628 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Kus3h-0001pA-Jo for qemu-devel@nongnu.org; Tue, 28 Oct 2008 13:08:45 -0400 Received: from mail-gx0-f17.google.com ([209.85.217.17]:41644) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Kus3h-0004NJ-4R for qemu-devel@nongnu.org; Tue, 28 Oct 2008 13:08:45 -0400 Received: by gxk10 with SMTP id 10so4224665gxk.10 for ; Tue, 28 Oct 2008 10:08:43 -0700 (PDT) Message-ID: Date: Tue, 28 Oct 2008 19:08:42 +0200 From: "Blue Swirl" Subject: Re: [Qemu-devel] [PATCH 1/4] Implement "info chardev" command. In-Reply-To: <1225198518-16529-2-git-send-email-kraxel@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <1225198518-16529-1-git-send-email-kraxel@redhat.com> <1225198518-16529-2-git-send-email-kraxel@redhat.com> 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 Cc: Gerd Hoffmann On 10/28/08, 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 Nice! > @@ -55,9 +56,12 @@ struct CharDriverState { > void *opaque; > int focus; > QEMUBH *bh; > + char *label; > + char *filename; I think you should add 'const' to both above.