diff options
author | sos22@douglas.cl.cam.ac.uk <sos22@douglas.cl.cam.ac.uk> | 2006-06-13 15:17:01 +0100 |
---|---|---|
committer | sos22@douglas.cl.cam.ac.uk <sos22@douglas.cl.cam.ac.uk> | 2006-06-13 15:17:01 +0100 |
commit | 70d8ee3676a6a18f8784f14b1d312e6055b2ce82 (patch) | |
tree | 0d309302a9f55368fa13b023cc3ccc8056d1d06b /extras/mini-os/include/xenbus.h | |
parent | 063f4cc497686d8409877fdc7e6ee0166106d6d2 (diff) | |
download | xen-70d8ee3676a6a18f8784f14b1d312e6055b2ce82.tar.gz xen-70d8ee3676a6a18f8784f14b1d312e6055b2ce82.tar.bz2 xen-70d8ee3676a6a18f8784f14b1d312e6055b2ce82.zip |
This patch exposes XenBus functions to Mini-OS applications.
Signed-of-by: John D. Ramsdell <ramsdell@mitre.org>
Diffstat (limited to 'extras/mini-os/include/xenbus.h')
-rw-r--r-- | extras/mini-os/include/xenbus.h | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/extras/mini-os/include/xenbus.h b/extras/mini-os/include/xenbus.h index 2bd60898db..485f2e48d6 100644 --- a/extras/mini-os/include/xenbus.h +++ b/extras/mini-os/include/xenbus.h @@ -1,6 +1,34 @@ #ifndef XENBUS_H__ #define XENBUS_H__ +/* Initialize the XenBus system. */ void init_xenbus(void); +/* Read the value associated with a path. Returns a malloc'd error + string on failure and sets *value to NULL. On success, *value is + set to a malloc'd copy of the value. */ +char *xenbus_read(const char *path, char **value); + +/* Associates a value with a path. Returns a malloc'd error string on + failure. */ +char *xenbus_write(const char *path, const char *value); + +/* Removes the value associated with a path. Returns a malloc'd error + string on failure. */ +char *xenbus_rm(const char *path); + +/* List the contents of a directory. Returns a malloc'd error string + on failure and sets *contents to NULL. On success, *contents is + set to a malloc'd array of pointers to malloc'd strings. The array + is NULL terminated. May block. */ +char *xenbus_ls(const char *prefix, char ***contents); + +/* Reads permissions associated with a path. Returns a malloc'd error + string on failure and sets *value to NULL. On success, *value is + set to a malloc'd copy of the value. */ +char *xenbus_get_perms(const char *path, char **value); + +/* Sets the permissions associated with a path. Returns a malloc'd + error string on failure. */ +char *xenbus_set_perms(const char *path, domid_t dom, char perm); #endif /* XENBUS_H__ */ |