From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:43357) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ugcmp-0002MA-U6 for qemu-devel@nongnu.org; Sun, 26 May 2013 11:23:14 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Ugcmj-0005Yu-Md for qemu-devel@nongnu.org; Sun, 26 May 2013 11:23:07 -0400 Received: from mx1.redhat.com ([209.132.183.28]:35300) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ugcmj-0005Yq-Ep for qemu-devel@nongnu.org; Sun, 26 May 2013 11:23:01 -0400 Date: Sun, 26 May 2013 18:23:19 +0300 From: "Michael S. Tsirkin" Message-ID: <1369581694-1655-8-git-send-email-mst@redhat.com> References: <1369581694-1655-1-git-send-email-mst@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1369581694-1655-1-git-send-email-mst@redhat.com> Subject: [Qemu-devel] [PATCH v2 07/11] virtio-rng: switch to linux-headers List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Paolo Bonzini , Peter Maydell It's easier to keep everything in sync if we just use linux headers for virtio constants. Add virtio_rng.h header from linux 3.10-rc1, and remove duplicate symbols from virtio-rng.h Signed-off-by: Michael S. Tsirkin --- include/hw/virtio/virtio-rng.h | 5 ++--- linux-headers/linux/virtio_rng.h | 8 ++++++++ 2 files changed, 10 insertions(+), 3 deletions(-) create mode 100644 linux-headers/linux/virtio_rng.h diff --git a/include/hw/virtio/virtio-rng.h b/include/hw/virtio/virtio-rng.h index debaa15..a0cc62e 100644 --- a/include/hw/virtio/virtio-rng.h +++ b/include/hw/virtio/virtio-rng.h @@ -14,14 +14,13 @@ #include "sysemu/rng.h" #include "sysemu/rng-random.h" +#include "linux/virtio_rng.h" +#include "linux/virtio_ids.h" #define TYPE_VIRTIO_RNG "virtio-rng-device" #define VIRTIO_RNG(obj) \ OBJECT_CHECK(VirtIORNG, (obj), TYPE_VIRTIO_RNG) -/* The Virtio ID for the virtio rng device */ -#define VIRTIO_ID_RNG 4 - struct VirtIORNGConf { RngBackend *rng; uint64_t max_bytes; diff --git a/linux-headers/linux/virtio_rng.h b/linux-headers/linux/virtio_rng.h new file mode 100644 index 0000000..c4d5de8 --- /dev/null +++ b/linux-headers/linux/virtio_rng.h @@ -0,0 +1,8 @@ +#ifndef _LINUX_VIRTIO_RNG_H +#define _LINUX_VIRTIO_RNG_H +/* This header is BSD licensed so anyone can use the definitions to implement + * compatible drivers/servers. */ +#include +#include + +#endif /* _LINUX_VIRTIO_RNG_H */ -- MST