]> xenbits.xensource.com Git - qemu-xen-4.0-testing.git/commitdiff
stubdom: fix xenstore VM parameters read
authorKeir Fraser <kfraser@endor.localdomain>
Mon, 10 Nov 2008 10:45:28 +0000 (10:45 +0000)
committerKeir Fraser <kfraser@endor.localdomain>
Mon, 10 Nov 2008 10:45:28 +0000 (10:45 +0000)
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@ens-lyon.org>
xenstore.c

index 31d33b5f16998f38701eb97fe6df383f4ae490fe..a7a2d4c1ba385dfd3c7731b20f1cef45934f6374 100644 (file)
@@ -1120,6 +1120,8 @@ char *xenstore_vm_read(int domid, const 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) {