From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:53929) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RhmAv-0006uM-Pw for qemu-devel@nongnu.org; Mon, 02 Jan 2012 12:59:58 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RhmAt-0000wS-5V for qemu-devel@nongnu.org; Mon, 02 Jan 2012 12:59:57 -0500 Received: from mail-yx0-f173.google.com ([209.85.213.173]:41542) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RhmAs-0000vQ-Kk for qemu-devel@nongnu.org; Mon, 02 Jan 2012 12:59:54 -0500 Received: by mail-yx0-f173.google.com with SMTP id m6so10102064yen.4 for ; Mon, 02 Jan 2012 09:59:54 -0800 (PST) Sender: Paolo Bonzini From: Paolo Bonzini Date: Mon, 2 Jan 2012 18:59:17 +0100 Message-Id: <1325527166-23898-7-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 06/15] virtio-9p: move property declarations to header file 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/9pfs/virtio-9p-device.h | 5 +++++ hw/virtio-pci.c | 4 +--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/hw/9pfs/virtio-9p-device.h b/hw/9pfs/virtio-9p-device.h index 65789db..7f2a4eb 100644 --- a/hw/9pfs/virtio-9p-device.h +++ b/hw/9pfs/virtio-9p-device.h @@ -21,4 +21,9 @@ typedef struct V9fsConf char *fsdev_id; } V9fsConf; +#define DEFINE_VIRTIO_9P_PROPERTIES(_state, _features_field, _conf_field) \ + DEFINE_VIRTIO_COMMON_FEATURES(VirtIOPCIProxy, _features_field), \ + DEFINE_PROP_STRING("mount_tag", VirtIOPCIProxy, _conf_field.tag), \ + DEFINE_PROP_STRING("fsdev", VirtIOPCIProxy, _conf_field.fsdev_id) + #endif diff --git a/hw/virtio-pci.c b/hw/virtio-pci.c index 07be1ca..6f1d009 100644 --- a/hw/virtio-pci.c +++ b/hw/virtio-pci.c @@ -884,9 +884,7 @@ static PCIDeviceInfo virtio_info[] = { DEFINE_PROP_BIT("ioeventfd", VirtIOPCIProxy, flags, VIRTIO_PCI_FLAG_USE_IOEVENTFD_BIT, true), DEFINE_PROP_UINT32("vectors", VirtIOPCIProxy, nvectors, 2), - DEFINE_VIRTIO_COMMON_FEATURES(VirtIOPCIProxy, host_features), - DEFINE_PROP_STRING("mount_tag", VirtIOPCIProxy, fsconf.tag), - DEFINE_PROP_STRING("fsdev", VirtIOPCIProxy, fsconf.fsdev_id), + DEFINE_VIRTIO_9P_PROPERTIES(VirtIOPCIProxy, host_features, fsconf), DEFINE_PROP_END_OF_LIST(), }, .qdev.reset = virtio_pci_reset, -- 1.7.7.1