From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MTHZP-0004U1-BZ for qemu-devel@nongnu.org; Tue, 21 Jul 2009 11:47:59 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MTHZK-0004P0-H0 for qemu-devel@nongnu.org; Tue, 21 Jul 2009 11:47:58 -0400 Received: from [199.232.76.173] (port=52039 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MTHZK-0004Ob-A5 for qemu-devel@nongnu.org; Tue, 21 Jul 2009 11:47:54 -0400 Received: from e36.co.us.ibm.com ([32.97.110.154]:34694) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1MTHZJ-0000xQ-Oj for qemu-devel@nongnu.org; Tue, 21 Jul 2009 11:47:54 -0400 Received: from d03relay04.boulder.ibm.com (d03relay04.boulder.ibm.com [9.17.195.106]) by e36.co.us.ibm.com (8.13.1/8.13.1) with ESMTP id n6LFkGq3011499 for ; Tue, 21 Jul 2009 09:46:16 -0600 Received: from d03av03.boulder.ibm.com (d03av03.boulder.ibm.com [9.17.195.169]) by d03relay04.boulder.ibm.com (8.13.8/8.13.8/NCO v9.2) with ESMTP id n6LFlcUY196094 for ; Tue, 21 Jul 2009 09:47:39 -0600 Received: from d03av03.boulder.ibm.com (loopback [127.0.0.1]) by d03av03.boulder.ibm.com (8.12.11.20060308/8.13.3) with ESMTP id n6LFlTtV012398 for ; Tue, 21 Jul 2009 09:47:29 -0600 Message-ID: <4A65E30F.1090608@us.ibm.com> Date: Tue, 21 Jul 2009 10:47:27 -0500 From: Anthony Liguori MIME-Version: 1.0 References: <1247841685-18495-1-git-send-email-aliguori@us.ibm.com> <1247841685-18495-2-git-send-email-aliguori@us.ibm.com> <4A65D4DD.1040603@redhat.com> <4A65D676.9050406@us.ibm.com> <4A65D8CA.20004@redhat.com> <4A65DD7C.3090902@us.ibm.com> <4A65E01E.8010505@redhat.com> In-Reply-To: <4A65E01E.8010505@redhat.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: [Qemu-devel] Re: [PATCH 1/2] Introduce CharDriverState qdev property type List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Gerd Hoffmann Cc: qemu-devel@nongnu.org, Paul Brook Gerd Hoffmann wrote: > On 07/21/09 17:23, Anthony Liguori wrote: >> Gerd Hoffmann wrote: >>>> Would you have a property type that was basically a char driver state >>>> name? >>> >>> Yes. Same for drives and others. A generic string property should do I >>> think. >> >> Couldn't a struct pointer be used for that though? It can still be >> exposed as a string to the user. > > Hmm, didn't think about that possibility. Somehow makes sense as it > would move the lookup-by-name into generic code (i.e. > qemu_prop_chardev->parse). > > Not sure what qdev_prop_set_chrdev() should accept then. struct > pointer? string? Good question. I think it depends on how we connect things. We could introduce another structure for front-ends and then have a separate connect mechanism. The association of names would be transparent to qdev/devices. We could also hand the chrdev structure directly to the device but then you have to deal with setting/unsetting. I think the front-end/back-end structure split is the most appealing. > cheers, > Gerd > -- Regards, Anthony Liguori