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

[Xen-devel] [PATCH 3 of 9] libxl: fix for libxl not waiting for devices to disconnect



# HG changeset patch
# User Roger Pau Monne <roger.pau@xxxxxxxxxxxxx>
# Date 1317386335 -7200
# Node ID 31b3caad18ac904a242c5bd1ea2bb0e574cd0453
# Parent  d10abc15d963b00658405be71981f5726e24c0aa
libxl: fix for libxl not waiting for devices to disconnect

libxl was ignoring the timeout and the number of devices to wait before 
destroying them.

Signed-off-by: Roger Pau Monne <roger.pau@xxxxxxxxxxxxx>

diff -r d10abc15d963 -r 31b3caad18ac tools/libxl/libxl_device.c
--- a/tools/libxl/libxl_device.c        Fri Sep 30 14:38:55 2011 +0200
+++ b/tools/libxl/libxl_device.c        Fri Sep 30 14:38:55 2011 +0200
@@ -422,6 +422,9 @@ static int wait_for_dev_destroy(libxl__g
             }
             free(l1);
         }
+    } else {
+        /* timeout reached */
+        rc = 0;
     }
     return rc;
 }
@@ -482,7 +485,7 @@ int libxl__devices_destroy(libxl__gc *gc
         tv.tv_usec = 0;
         while (n_watches > 0) {
             if (wait_for_dev_destroy(gc, &tv)) {
-                break;
+                continue;
             } else {
                 n_watches--;
             }

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


 


Rackspace

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