From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1N0S8t-0001vL-Jc for qemu-devel@nongnu.org; Tue, 20 Oct 2009 23:45:43 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1N0S8p-0001tP-3t for qemu-devel@nongnu.org; Tue, 20 Oct 2009 23:45:43 -0400 Received: from [199.232.76.173] (port=50122 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1N0S8o-0001tC-Q7 for qemu-devel@nongnu.org; Tue, 20 Oct 2009 23:45:38 -0400 Received: from mx1.redhat.com ([209.132.183.28]:47936) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1N0S8o-0001ln-BY for qemu-devel@nongnu.org; Tue, 20 Oct 2009 23:45:38 -0400 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id n9L3jbwa013837 for ; Tue, 20 Oct 2009 23:45:37 -0400 Date: Wed, 21 Oct 2009 09:14:56 +0530 From: Amit Shah Subject: Re: [Qemu-devel] [PATCH v9 3/3] virtio-console: Add a new virtserialport device for generic serial port support Message-ID: <20091021034456.GB9193@amit-x200.redhat.com> References: <1256022825-16180-1-git-send-email-amit.shah@redhat.com> <1256022825-16180-2-git-send-email-amit.shah@redhat.com> <1256022825-16180-3-git-send-email-amit.shah@redhat.com> <1256022825-16180-4-git-send-email-amit.shah@redhat.com> <4ADD7A12.1040305@redhat.com> <20091020094806.GA4405@amit-x200.redhat.com> <4ADDC2E8.5040601@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4ADDC2E8.5040601@redhat.com> List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Gerd Hoffmann Cc: qemu-devel@nongnu.org On (Tue) Oct 20 2009 [16:02:16], Gerd Hoffmann wrote: > On 10/20/09 11:48, Amit Shah wrote: >> On (Tue) Oct 20 2009 [10:51:30], Gerd Hoffmann wrote: >>>> @@ -107,3 +107,41 @@ static void virtcon_register(void) >>>> virtio_serial_port_qdev_register(&virtcon_info); >>>> } >>>> device_init(virtcon_register) >>> >>>> +static VirtIOSerialPortInfo virtserial_port_info = { >>>> + .qdev.name = "virtserialport", >>>> + .qdev.size = sizeof(VirtConsole), >>>> + .init = virtserial_port_initfn, >>>> + .have_data = flush_buf, >>>> + .qdev.props = (Property[]) { >>>> + DEFINE_PROP_CHR("chardev", VirtConsole, chr), >>>> + DEFINE_PROP_STRING("name", VirtIOSerialPort, name), >>> >>> likewise: DEFINE_PROP_STRING("name", VirtConsole, port.name), >> >> The 'name' field is common to all ports, so it makes sense to put it in >> the VirtIOSerialPort struct. (Internal users can pre-define it to their >> liking, eg, org.qemu.vnc) > > Sure. I don't want to move it out there. But the driver state struct > is 'VirtConsole' so all properties should use that. Note that the field > changed too: from "name" to "port.name", so everything keeps working ;) Ah; I understand it now. Sorry for the confusion. Thanks Gerd for the reviews. Amit