tools/virtio: more stubs
[firefly-linux-kernel-4.4.55.git] / tools / virtio / virtio_test.c
index 00ea679b3826e8fa92971767ae66fb613e428dcd..67873c30c5bf52a0e98a63dffe2f59804a9365f7 100644 (file)
@@ -11,6 +11,7 @@
 #include <sys/types.h>
 #include <fcntl.h>
 #include <stdbool.h>
+#include <linux/virtio_types.h>
 #include <linux/vhost.h>
 #include <linux/virtio.h>
 #include <linux/virtio_ring.h>
@@ -60,7 +61,7 @@ void vhost_vq_setup(struct vdev_info *dev, struct vq_info *info)
 {
        struct vhost_vring_state state = { .index = info->idx };
        struct vhost_vring_file file = { .index = info->idx };
-       unsigned long long features = dev->vdev.features[0];
+       unsigned long long features = dev->vdev.features;
        struct vhost_vring_addr addr = {
                .index = info->idx,
                .desc_user_addr = (uint64_t)(unsigned long)info->vring.desc,
@@ -113,8 +114,7 @@ static void vdev_info_init(struct vdev_info* dev, unsigned long long features)
 {
        int r;
        memset(dev, 0, sizeof *dev);
-       dev->vdev.features[0] = features;
-       dev->vdev.features[1] = features >> 32;
+       dev->vdev.features = features;
        dev->buf_size = 1024;
        dev->buf = malloc(dev->buf_size);
        assert(dev->buf);