ia64/xen-unstable

view extras/mini-os/include/xenbus.h @ 10392:464324585311

This patch exposes XenBus functions to Mini-OS applications.

Signed-of-by: John D. Ramsdell <ramsdell@mitre.org>
author sos22@douglas.cl.cam.ac.uk
date Tue Jun 13 15:17:01 2006 +0100 (2006-06-13)
parents 8c21c8ea5fff
children fed18f971f72
line source
1 #ifndef XENBUS_H__
2 #define XENBUS_H__
4 /* Initialize the XenBus system. */
5 void init_xenbus(void);
7 /* Read the value associated with a path. Returns a malloc'd error
8 string on failure and sets *value to NULL. On success, *value is
9 set to a malloc'd copy of the value. */
10 char *xenbus_read(const char *path, char **value);
12 /* Associates a value with a path. Returns a malloc'd error string on
13 failure. */
14 char *xenbus_write(const char *path, const char *value);
16 /* Removes the value associated with a path. Returns a malloc'd error
17 string on failure. */
18 char *xenbus_rm(const char *path);
20 /* List the contents of a directory. Returns a malloc'd error string
21 on failure and sets *contents to NULL. On success, *contents is
22 set to a malloc'd array of pointers to malloc'd strings. The array
23 is NULL terminated. May block. */
24 char *xenbus_ls(const char *prefix, char ***contents);
26 /* Reads permissions associated with a path. Returns a malloc'd error
27 string on failure and sets *value to NULL. On success, *value is
28 set to a malloc'd copy of the value. */
29 char *xenbus_get_perms(const char *path, char **value);
31 /* Sets the permissions associated with a path. Returns a malloc'd
32 error string on failure. */
33 char *xenbus_set_perms(const char *path, domid_t dom, char perm);
34 #endif /* XENBUS_H__ */