Lines Matching full:h
12 #include "qemu/osdep.h"
13 #include "qemu/uuid.h"
14 #include "qapi/error.h"
16 #include "hw/xen/xen_native.h"
17 #include "hw/xen/xen_backend_ops.h"
22 * must be undefined before including xenctrl.h
28 #include <xenctrl.h>
34 #include <xenevtchn.h>
35 #include <xengnttab.h>
36 #include <xenforeignmemory.h>
218 struct qemu_xs_handle *h = opaque; in watch_event() local
221 char **v = xs_check_watch(h->xsh); in watch_event()
227 notifier_list_notify(&h->notifiers, v); in watch_event()
235 struct qemu_xs_handle *h; in libxenstore_open() local
241 h = g_new0(struct qemu_xs_handle, 1); in libxenstore_open()
242 h->xsh = xsh; in libxenstore_open()
244 notifier_list_init(&h->notifiers); in libxenstore_open()
245 qemu_set_fd_handler(xs_fileno(h->xsh), watch_event, NULL, h); in libxenstore_open()
247 return h; in libxenstore_open()
250 static void libxenstore_close(struct qemu_xs_handle *h) in libxenstore_close() argument
252 g_assert(notifier_list_empty(&h->notifiers)); in libxenstore_close()
253 qemu_set_fd_handler(xs_fileno(h->xsh), NULL, NULL, NULL); in libxenstore_close()
254 xs_close(h->xsh); in libxenstore_close()
255 g_free(h); in libxenstore_close()
258 static char *libxenstore_get_domain_path(struct qemu_xs_handle *h, in libxenstore_get_domain_path() argument
261 return xs_get_domain_path(h->xsh, domid); in libxenstore_get_domain_path()
264 static char **libxenstore_directory(struct qemu_xs_handle *h, in libxenstore_directory() argument
268 return xs_directory(h->xsh, t, path, num); in libxenstore_directory()
271 static void *libxenstore_read(struct qemu_xs_handle *h, xs_transaction_t t, in libxenstore_read() argument
274 return xs_read(h->xsh, t, path, len); in libxenstore_read()
277 static bool libxenstore_write(struct qemu_xs_handle *h, xs_transaction_t t, in libxenstore_write() argument
281 return xs_write(h->xsh, t, path, data, len); in libxenstore_write()
284 static bool libxenstore_create(struct qemu_xs_handle *h, xs_transaction_t t, in libxenstore_create() argument
299 if (!xs_mkdir(h->xsh, t, path)) { in libxenstore_create()
303 return xs_set_permissions(h->xsh, t, path, perms_list, in libxenstore_create()
307 static bool libxenstore_destroy(struct qemu_xs_handle *h, xs_transaction_t t, in libxenstore_destroy() argument
310 return xs_rm(h->xsh, t, path); in libxenstore_destroy()
356 static struct qemu_xs_watch *libxenstore_watch(struct qemu_xs_handle *h, in libxenstore_watch() argument
362 notifier_list_add(&h->notifiers, &w->notifier); in libxenstore_watch()
364 if (!xs_watch(h->xsh, path, w->token)) { in libxenstore_watch()
373 static void libxenstore_unwatch(struct qemu_xs_handle *h, in libxenstore_unwatch() argument
376 xs_unwatch(h->xsh, w->path, w->token); in libxenstore_unwatch()
381 static xs_transaction_t libxenstore_transaction_start(struct qemu_xs_handle *h) in libxenstore_transaction_start() argument
383 return xs_transaction_start(h->xsh); in libxenstore_transaction_start()
386 static bool libxenstore_transaction_end(struct qemu_xs_handle *h, in libxenstore_transaction_end() argument
389 return xs_transaction_end(h->xsh, t, abort); in libxenstore_transaction_end()