pm_smbus: rename variable to avoid shadowing
[qemu/kevin.git] / subprojects / libvhost-user / link-test.c
blobe01d6eb1fa2766ed60a3ca6504be90ccaa2f6800
1 /*
2 * A trivial unit test to check linking without glib. A real test suite should
3 * probably based off libvhost-user-glib instead.
4 */
5 #include <assert.h>
6 #include <stdlib.h>
7 #include "libvhost-user.h"
9 static void
10 panic(VuDev *dev, const char *err)
12 abort();
15 static void
16 set_watch(VuDev *dev, int fd, int condition,
17 vu_watch_cb cb, void *data)
19 abort();
22 static void
23 remove_watch(VuDev *dev, int fd)
25 abort();
28 static const VuDevIface iface = {
32 int
33 main(int argc, const char *argv[])
35 bool rc;
36 uint16_t max_queues = 2;
37 int socket = 0;
38 VuDev dev = { 0, };
40 rc = vu_init(&dev, max_queues, socket, panic, NULL, set_watch, remove_watch, &iface);
41 assert(rc == true);
42 vu_deinit(&dev);
44 return 0;