[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] [stubdom]: fix xenstore VM parameters read



stubdom: fix xenstore VM parameters read

For now, stub domains can not read the uuid, and thus
xenstore_vm_key_path fails(). We have to cope with that instead of
passing NULL to xs_read().

Signed-off-by: Samuel Thibault <samuel.thibault@xxxxxxxxxxxx>

diff --git a/xenstore.c b/xenstore.c
index d064df1..e7e0df5 100644
--- a/xenstore.c
+++ b/xenstore.c
@@ -1124,6 +1124,8 @@ char *xenstore_vm_read(int domid, char *key, unsigned int 
*len)
     char *path = NULL, *value = NULL;
 
     path = xenstore_vm_key_path(domid, key);
+    if (!path)
+        return NULL;
 
     value = xs_read(xsh, XBT_NULL, path, len);
     if (value == NULL) {

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


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.