Skip to contentSkip to conversation

: fix xenstore VM parameters read

stubdom New Samuel Thibault 1 participant 2 messages Nov 10, 2008

lore
Share & tools
lore
#0 lore raw

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().

xenstore.c +2 -0
index d064df1..e7e0df5 100644
@@ -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) {
#1 lore raw

PATCH 1/1 : fix xenstore VM parameters read

I forgot the [PATCH] prefix to get Keir's attention :)

Samuel Thibault, le Mon 10 Nov 2008 02:22:23 +0100, a écrit :

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().

xenstore.c +2 -0
index d064df1..e7e0df5 100644
@@ -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) {