]> git.proxmox.com Git - mirror_qemu.git/blame - include/hw/xen/xen-bus-helper.h
Replace GCC_FMT_ATTR with G_GNUC_PRINTF
[mirror_qemu.git] / include / hw / xen / xen-bus-helper.h
CommitLineData
094a2239
PD
1/*
2 * Copyright (c) 2018 Citrix Systems Inc.
3 *
4 * This work is licensed under the terms of the GNU GPL, version 2 or later.
5 * See the COPYING file in the top-level directory.
6 */
7
8#ifndef HW_XEN_BUS_HELPER_H
9#define HW_XEN_BUS_HELPER_H
10
11#include "hw/xen/xen_common.h"
12
13const char *xs_strstate(enum xenbus_state state);
14
15void xs_node_create(struct xs_handle *xsh, xs_transaction_t tid,
16 const char *node, struct xs_permissions perms[],
17 unsigned int nr_perms, Error **errp);
18void xs_node_destroy(struct xs_handle *xsh, xs_transaction_t tid,
19 const char *node, Error **errp);
20
21/* Write to node/key unless node is empty, in which case write to key */
22void xs_node_vprintf(struct xs_handle *xsh, xs_transaction_t tid,
23 const char *node, const char *key, Error **errp,
24 const char *fmt, va_list ap)
9edc6313 25 G_GNUC_PRINTF(6, 0);
094a2239
PD
26void xs_node_printf(struct xs_handle *xsh, xs_transaction_t tid,
27 const char *node, const char *key, Error **errp,
28 const char *fmt, ...)
9edc6313 29 G_GNUC_PRINTF(6, 7);
094a2239
PD
30
31/* Read from node/key unless node is empty, in which case read from key */
32int xs_node_vscanf(struct xs_handle *xsh, xs_transaction_t tid,
33 const char *node, const char *key, Error **errp,
34 const char *fmt, va_list ap);
35int xs_node_scanf(struct xs_handle *xsh, xs_transaction_t tid,
36 const char *node, const char *key, Error **errp,
37 const char *fmt, ...);
38
82a29e30
PD
39/* Watch node/key unless node is empty, in which case watch key */
40void xs_node_watch(struct xs_handle *xsh, const char *node, const char *key,
41 char *token, Error **errp);
42void xs_node_unwatch(struct xs_handle *xsh, const char *node, const char *key,
43 const char *token, Error **errp);
44
094a2239 45#endif /* HW_XEN_BUS_HELPER_H */