提交 d1b8c4c2 编写于 作者: J Joel Stanley 提交者: Rusty Russell

tools/virtio: update internal copies of headers

The virtio headers have changed recently:

 5b1bf7cb virtio_ring: let virtqueue_{kick()/notify()} return a bool
 46f9c2b9 virtio_ring: change host notification API

Update the internal copies to fix the build of virtio_test:

  cc -g -O2 -Wall -I. -I ../../usr/include/ -Wno-pointer-sign
    -fno-strict-overflow -fno-strict-aliasing -fno-common -MMD -U_FORTIFY_SOURCE
    -c -o virtio_test.o virtio_test.c
  In file included from virtio_test.c:15:0:
  ./linux/virtio.h:76:19: error: conflicting types for ‘vring_new_virtqueue’
   struct virtqueue *vring_new_virtqueue(unsigned int index,
                     ^
  In file included from ./linux/virtio_ring.h:1:0,
                   from ../../usr/include/linux/vhost.h:17,
                   from virtio_test.c:14:
  ./linux/../../../include/linux/virtio_ring.h:68:19: note: previous
  declaration of ‘vring_new_virtqueue’ was here
   struct virtqueue *vring_new_virtqueue(unsigned int index,
  virtio_test.c: In function ‘vq_info_add’:
  virtio_test.c:103:12: warning: passing argument 7 of ‘vring_new_virtqueue’
  from incompatible pointer type [enabled by default]
              vq_notify, vq_callback, "test");
              ^
  In file included from virtio_test.c:15:0:
  ./linux/virtio.h:76:19: note: expected ‘void (*)(struct virtqueue *)’ but
  argument is of type ‘_Bool (*)(struct virtqueue *)’
   struct virtqueue *vring_new_virtqueue(unsigned int index,
                     ^
Signed-off-by: NJoel Stanley <joel@jms.id.au>
Signed-off-by: NRusty Russell <rusty@rustcorp.com.au>
上级 33807f4f
...@@ -63,7 +63,7 @@ int virtqueue_add_inbuf(struct virtqueue *vq, ...@@ -63,7 +63,7 @@ int virtqueue_add_inbuf(struct virtqueue *vq,
void *data, void *data,
gfp_t gfp); gfp_t gfp);
void virtqueue_kick(struct virtqueue *vq); bool virtqueue_kick(struct virtqueue *vq);
void *virtqueue_get_buf(struct virtqueue *vq, unsigned int *len); void *virtqueue_get_buf(struct virtqueue *vq, unsigned int *len);
...@@ -79,7 +79,7 @@ struct virtqueue *vring_new_virtqueue(unsigned int index, ...@@ -79,7 +79,7 @@ struct virtqueue *vring_new_virtqueue(unsigned int index,
struct virtio_device *vdev, struct virtio_device *vdev,
bool weak_barriers, bool weak_barriers,
void *pages, void *pages,
void (*notify)(struct virtqueue *vq), bool (*notify)(struct virtqueue *vq),
void (*callback)(struct virtqueue *vq), void (*callback)(struct virtqueue *vq),
const char *name); const char *name);
void vring_del_virtqueue(struct virtqueue *vq); void vring_del_virtqueue(struct virtqueue *vq);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册