aboutsummaryrefslogtreecommitdiff
path: root/tests/virtio-scsi-test.c
diff options
context:
space:
mode:
authorStefan Hajnoczi <stefanha@redhat.com>2016-05-09 13:47:34 +0100
committerStefan Hajnoczi <stefanha@redhat.com>2016-06-20 11:44:11 +0100
commit8ac9e205bd516d9cedbf28852d77c14ce977b74b (patch)
tree17575e0e92955a83890d75a478f327997d03bf11 /tests/virtio-scsi-test.c
parent482b61844ae7c6df39df0b48ac90ffbc87bed7d2 (diff)
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-scsi-test.c')
-rw-r--r--tests/virtio-scsi-test.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/tests/virtio-scsi-test.c b/tests/virtio-scsi-test.c
index 5f1a8aefeb..26bb0e312d 100644
--- a/tests/virtio-scsi-test.c
+++ b/tests/virtio-scsi-test.c
@@ -17,6 +17,7 @@
#include "libqos/malloc.h"
#include "libqos/malloc-pc.h"
#include "libqos/malloc-generic.h"
+#include "standard-headers/linux/virtio_ids.h"
#define PCI_SLOT 0x02
#define PCI_FN 0x00
@@ -163,10 +164,10 @@ static QVirtIOSCSI *qvirtio_scsi_pci_init(int slot)
vs->alloc = pc_alloc_init();
vs->bus = qpci_init_pc();
- dev = qvirtio_pci_device_find(vs->bus, QVIRTIO_SCSI_DEVICE_ID);
+ dev = qvirtio_pci_device_find(vs->bus, VIRTIO_ID_SCSI);
vs->dev = (QVirtioDevice *)dev;
g_assert(dev != NULL);
- g_assert_cmphex(vs->dev->device_type, ==, QVIRTIO_SCSI_DEVICE_ID);
+ g_assert_cmphex(vs->dev->device_type, ==, VIRTIO_ID_SCSI);
qvirtio_pci_device_enable(dev);
qvirtio_reset(&qvirtio_pci, vs->dev);