WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] [qemu-xen-unstable] add low level functions from the roo

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [qemu-xen-unstable] add low level functions from the root (read/write). [PATCH 3/3]
From: Ian Jackson <Ian.Jackson@xxxxxxxxxxxxx>
Date: Tue, 21 Jul 2009 08:20:25 -0700
Delivery-date: Tue, 21 Jul 2009 08:20:36 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
commit 4f947e17894a2e58a02fa6c1c712e7691a179212
Author: Ian Jackson <ian.jackson@xxxxxxxxxxxxx>
Date:   Tue Jul 21 15:30:18 2009 +0100

    add low level functions from the root (read/write).  [PATCH 3/3]
    
    This is a series of patch to complete the xenstore interface in qemu.
    
    1: create a callback mecanism for xenstore watches.
    2: add per domain low level xenstore functions (read/chmod/write/watch).
    3: add low level functions from the root (read/write).
    
    Signed-off-by: Jean Guyader <jean.guyader@xxxxxxxxxx>
---
 qemu-xen.h |    3 +++
 xenstore.c |   17 +++++++++++++++++
 2 files changed, 20 insertions(+), 0 deletions(-)

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));
+}
--
generated by git-patchbot for /home/xen/git/qemu-xen-unstable.git

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [qemu-xen-unstable] add low level functions from the root (read/write). [PATCH 3/3], Ian Jackson <=