From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:54010) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RhmBA-0007HY-H1 for qemu-devel@nongnu.org; Mon, 02 Jan 2012 13:00:13 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RhmB2-00010R-SE for qemu-devel@nongnu.org; Mon, 02 Jan 2012 13:00:07 -0500 Received: from mail-yw0-f45.google.com ([209.85.213.45]:51180) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RhmB2-0000l6-Dw for qemu-devel@nongnu.org; Mon, 02 Jan 2012 13:00:04 -0500 Received: by mail-yw0-f45.google.com with SMTP id g71so10818606yhg.4 for ; Mon, 02 Jan 2012 10:00:04 -0800 (PST) Sender: Paolo Bonzini From: Paolo Bonzini Date: Mon, 2 Jan 2012 18:59:21 +0100 Message-Id: <1325527166-23898-11-git-send-email-pbonzini@redhat.com> In-Reply-To: <1325527166-23898-1-git-send-email-pbonzini@redhat.com> References: <1325527166-23898-1-git-send-email-pbonzini@redhat.com> Subject: [Qemu-devel] [PATCH v2 10/15] virtio: move conf fields into an anonymous union List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: mst@redhat.com Signed-off-by: Paolo Bonzini --- hw/s390-virtio-bus.h | 8 +++++--- hw/virtio-pci.h | 10 ++++++---- 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/hw/s390-virtio-bus.h b/hw/s390-virtio-bus.h index 414fd22..b9f711d 100644 --- a/hw/s390-virtio-bus.h +++ b/hw/s390-virtio-bus.h @@ -42,10 +42,12 @@ typedef struct VirtIOS390Device { ram_addr_t feat_offs; uint8_t feat_len; VirtIODevice *vdev; - VirtIOBlkConf blk; uint32_t host_features; - virtio_serial_conf serial; - virtio_net_conf net; + union { + VirtIOBlkConf blk; + virtio_serial_conf serial; + virtio_net_conf net; + }; } VirtIOS390Device; typedef struct VirtIOS390Bus { diff --git a/hw/virtio-pci.h b/hw/virtio-pci.h index a10df5a..0a9034a 100644 --- a/hw/virtio-pci.h +++ b/hw/virtio-pci.h @@ -33,13 +33,15 @@ typedef struct { uint32_t flags; uint32_t class_code; uint32_t nvectors; - VirtIOBlkConf blk; uint32_t host_features; + union { + VirtIOBlkConf blk; #ifdef CONFIG_VIRTFS - V9fsConf fsconf; + V9fsConf fsconf; #endif - virtio_serial_conf serial; - virtio_net_conf net; + virtio_serial_conf serial; + virtio_net_conf net; + }; bool ioeventfd_disabled; bool ioeventfd_started; } VirtIOPCIProxy; -- 1.7.7.1