Skip to contentSkip to conversation

Expose XenBus functions to Mini-OS applications

PATCH New John D. Ramsdell 1 participant 1 message Jun 8, 2006

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Expose XenBus functions to Mini-OS applications

This patch exposes XenBus functions to Mini-OS applications.

Only in xen-unstable/extras/mini-os/console: console.o Only in xen-unstable/extras/mini-os/console: xencons_ring.o Only in xen-unstable/extras/mini-os: events.o
Only in xen-unstable/extras/mini-os: hypervisor.o Only in xen-unstable/extras/mini-os/include: xen

extras/mini-os/include/xenbus.h +28 -0
diff -ur oxen-unstable/extras/mini-os/include/xenbus.h xen-unstable/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__ */

Only in xen-unstable/extras/mini-os: kernel.o Only in xen-unstable/extras/mini-os/lib: math.o Only in xen-unstable/extras/mini-os/lib: printf.o Only in xen-unstable/extras/mini-os/lib: string.o Only in xen-unstable/extras/mini-os/lib: xmalloc.o Only in xen-unstable/extras/mini-os: libminios.a Only in xen-unstable/extras/mini-os: mini-os.elf Only in xen-unstable/extras/mini-os: mini-os.gz Only in xen-unstable/extras/mini-os: mm.o Only in xen-unstable/extras/mini-os: sched.o Only in xen-unstable/extras/mini-os: time.o Only in xen-unstable/extras/mini-os: traps.o Only in xen-unstable/extras/mini-os: x86_32.o

extras/mini-os/xenbus/xenbus.c +130 -25

241 lines not on this page · raw message

Only in xen-unstable/extras/mini-os/xenbus: xenbus.c~ Only in xen-unstable/extras/mini-os/xenbus: xenbus.o Only in xen-unstable/patches/linux-2.6.16.13: .makedep Only in xen-unstable/xen/arch/x86: asm-offsets.s Only in xen-unstable/xen/arch/x86/boot: x86_32.o Only in xen-unstable/xen/include: asm
Only in xen-unstable/xen/include/asm-x86: asm-offsets.h Only in xen-unstable/xen/include/xen: acm_policy.h Only in xen-unstable/xen/include/xen: banner.h Only in xen-unstable/xen/include/xen: compile.h Only in xen-unstable/xen/tools/figlet: figlet Only in xen-unstable/xen/tools: symbols