diff options
author | Stefan Hajnoczi <stefanha@redhat.com> | 2016-05-09 13:47:34 +0100 |
---|---|---|
committer | Stefan Hajnoczi <stefanha@redhat.com> | 2016-06-20 11:44:11 +0100 |
commit | 8ac9e205bd516d9cedbf28852d77c14ce977b74b (patch) | |
tree | 17575e0e92955a83890d75a478f327997d03bf11 /tests/virtio-net-test.c | |
parent | 482b61844ae7c6df39df0b48ac90ffbc87bed7d2 (diff) | |
download | qemu-8ac9e205bd516d9cedbf28852d77c14ce977b74b.tar.gz qemu-8ac9e205bd516d9cedbf28852d77c14ce977b74b.tar.bz2 qemu-8ac9e205bd516d9cedbf28852d77c14ce977b74b.zip |
libqos: use virtio_ids.h for device ID definitions
Avoid redefining device IDs. Use the standard Linux headers that are
already in the source tree.
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Message-id: 1462798061-30382-2-git-send-email-stefanha@redhat.com
Diffstat (limited to 'tests/virtio-net-test.c')
-rw-r--r-- | tests/virtio-net-test.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/tests/virtio-net-test.c b/tests/virtio-net-test.c index e5c144818e..e49c13ea5f 100644 --- a/tests/virtio-net-test.c +++ b/tests/virtio-net-test.c @@ -20,6 +20,7 @@ #include "libqos/malloc-generic.h" #include "qemu/bswap.h" #include "hw/virtio/virtio-net.h" +#include "standard-headers/linux/virtio_ids.h" #define PCI_SLOT_HP 0x06 #define PCI_SLOT 0x04 @@ -39,9 +40,9 @@ static QVirtioPCIDevice *virtio_net_pci_init(QPCIBus *bus, int slot) { QVirtioPCIDevice *dev; - dev = qvirtio_pci_device_find(bus, QVIRTIO_NET_DEVICE_ID); + dev = qvirtio_pci_device_find(bus, VIRTIO_ID_NET); g_assert(dev != NULL); - g_assert_cmphex(dev->vdev.device_type, ==, QVIRTIO_NET_DEVICE_ID); + g_assert_cmphex(dev->vdev.device_type, ==, VIRTIO_ID_NET); qvirtio_pci_device_enable(dev); qvirtio_reset(&qvirtio_pci, &dev->vdev); |