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

[Xen-changelog] [xen-unstable] ioemu: Fix xenstore access changes.



# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1201706362 0
# Node ID 5f997b5b8a58a559020a06b1656534dce0086301
# Parent  0343aa1361011e5a280b4d78707a773a62231691
ioemu: Fix xenstore access changes.
Signed-off-by: Keir Fraser <keir.fraser@xxxxxxxxxx>
---
 tools/ioemu/xenstore.c |   11 +++--------
 1 files changed, 3 insertions(+), 8 deletions(-)

diff -r 0343aa136101 -r 5f997b5b8a58 tools/ioemu/xenstore.c
--- a/tools/ioemu/xenstore.c    Wed Jan 30 14:25:55 2008 +0000
+++ b/tools/ioemu/xenstore.c    Wed Jan 30 15:19:22 2008 +0000
@@ -446,20 +446,15 @@ void xenstore_process_event(void *opaque
 
     /* Strip off blktap sub-type prefix */
     bpath = strdup(vec[XS_WATCH_PATH]); 
-    if (bpath)
+    if (bpath == NULL)
         goto out;
     if ((offset = strrchr(bpath, '/')) != NULL) 
         *offset = '\0';
     if (pasprintf(&buf, "%s/type", bpath) == -1) 
         goto out;
     drv = xs_read(xsh, XBT_NULL, buf, &len);
-    if (drv) {
-        if (!strcmp(drv, "tap")) {
-            offset = strchr(image, ':'); 
-            if (offset) 
-                memmove(image, offset+1, strlen(offset+1)+1 );
-        }
-    }
+    if (drv && !strcmp(drv, "tap") && ((offset = strchr(image, ':')) != NULL))
+        memmove(image, offset+1, strlen(offset+1)+1);
 
     if (!strcmp(image, bs_table[hd_index]->filename))
         goto out;  /* identical */

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


 


Rackspace

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