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-devel

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

To: xen-devel@xxxxxxxxxxxxx
Subject: [Xen-devel] [stubdom]: fix xenstore VM parameters read
From: Samuel Thibault <samuel.thibault@xxxxxxxxxxxx>
Date: Mon, 10 Nov 2008 02:22:23 +0100
Cc:
Delivery-date: Sun, 09 Nov 2008 17:50:05 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Mail-followup-to: Samuel Thibault <samuel.thibault@xxxxxxxxxxxx>, xen-devel@xxxxxxxxxxxxx
Resent-date: Mon, 10 Nov 2008 02:49:41 +0100
Resent-date: Mon, 10 Nov 2008 02:49:42 +0100
Resent-from: Samuel Thibault <samuel.thibault@xxxxxxxxxxxx>
Resent-message-id: <20081110014941.GD4848@xxxxxxxxxxxxxxxxxxxxxxxxx>
Resent-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mutt/1.5.12-2006-07-14
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

<Prev in Thread] Current Thread [Next in Thread>