* [PATCH 3/3] qemu: xenstore-raw-access
@ 2009-07-16 13:28 Jean Guyader
0 siblings, 0 replies; only message in thread
From: Jean Guyader @ 2009-07-16 13:28 UTC (permalink / raw)
To: xen-devel
[-- Attachment #1: Type: text/plain, Size: 54 bytes --]
Signed-off-by: Jean Guyader <jean.guyader@citrix.com>
[-- Attachment #2: xenstore-raw-access.patch --]
[-- Type: text/plain, Size: 1251 bytes --]
diff --git a/qemu-xen.h b/qemu-xen.h
index 5e30c61..29b8161 100644
--- a/qemu-xen.h
+++ b/qemu-xen.h
@@ -101,6 +101,9 @@ int xenstore_dom_write(int domid, const char *key, const char *value);
void xenstore_dom_watch(int domid, const char *key, xenstore_callback ftp, void *opaque);
void xenstore_dom_chmod(int domid, const char *key, const char *perms);
+char *xenstore_read(const char *path);
+int xenstore_write(const char *path, const char *val);
+
/* `danger' means that this parameter, variable or function refers to
* an area of xenstore which is writeable by the guest and thus must
* not be trusted by qemu code. For variables containing xenstore
diff --git a/xenstore.c b/xenstore.c
index 1ad6dc9..bb5f848 100644
--- a/xenstore.c
+++ b/xenstore.c
@@ -1562,3 +1562,20 @@ int xenstore_dom_write(int domid, const char *key, const char *value)
free(buf);
return rc;
}
+
+char *xenstore_read(const char *path)
+{
+ char *value = NULL;
+ unsigned int len;
+
+ if (xsh == NULL)
+ return NULL;
+ return xs_read(xsh, XBT_NULL, path, &len);
+}
+
+int xenstore_write(const char *path, const char *val)
+{
+ if (xsh == NULL)
+ return 1;
+ return xs_write(xsh, XBT_NULL, path, val, strlen(val));
+}
[-- Attachment #3: Type: text/plain, Size: 138 bytes --]
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2009-07-16 13:28 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-07-16 13:28 [PATCH 3/3] qemu: xenstore-raw-access Jean Guyader
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.