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] [PATCH] [stubdom]: fix xenstore VM parameters read

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] [PATCH] [stubdom]: fix xenstore VM parameters read
From: Samuel Thibault <samuel.thibault@xxxxxxxxxxxx>
Date: Mon, 10 Nov 2008 02:54:39 +0100
Delivery-date: Sun, 09 Nov 2008 17:55:04 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <20081110012223.GB4848@xxxxxxxxxxxxxxxxxxxxxxxxx>
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@xxxxxxxxxxxxxxxxxxx
References: <20081110012223.GB4848@xxxxxxxxxxxxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mutt/1.5.12-2006-07-14
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().

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>