From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:51702) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TtFb5-0006Eu-Mg for qemu-devel@nongnu.org; Thu, 10 Jan 2013 05:42:57 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TtFb4-0005t9-Ib for qemu-devel@nongnu.org; Thu, 10 Jan 2013 05:42:55 -0500 Received: from mail-qc0-f181.google.com ([209.85.216.181]:53640) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TtFb4-0005sy-EV for qemu-devel@nongnu.org; Thu, 10 Jan 2013 05:42:54 -0500 Received: by mail-qc0-f181.google.com with SMTP id x40so247757qcp.12 for ; Thu, 10 Jan 2013 02:42:53 -0800 (PST) Sender: Paolo Bonzini Message-ID: <50EE9B28.4020004@redhat.com> Date: Thu, 10 Jan 2013 11:42:48 +0100 From: Paolo Bonzini MIME-Version: 1.0 References: <1357566928-25361-1-git-send-email-kraxel@redhat.com> <1357566928-25361-12-git-send-email-kraxel@redhat.com> <50EDAAE9.9060103@redhat.com> In-Reply-To: <50EDAAE9.9060103@redhat.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 11/11] chardev: add pty chardev support to chardev-add (qmp) List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Eric Blake Cc: Gerd Hoffmann , qemu-devel@nongnu.org Il 09/01/2013 18:37, Eric Blake ha scritto: > It also raises the question of whether unions even work with raw types, > or whether you have to always go through a struct, in which case you > should have used the 'String' wrapper instead of 'str', looking like: > > { 'union': 'ChardevReturn', 'data': { 'pty' : 'String', > 'nodata' : 'ChardevDummy' } } > ... > <- { "return": { "type" : "pty", "data" : { "str" : "/dev/pty0" } } } They do work with raw types. If it is conceivable to add more data in the future, however, it's better to use the wrapped types. Paolo