From mboxrd@z Thu Jan 1 00:00:00 1970 From: Roger Pau Monne Subject: [PATCH 2 of 9] libxl: fix for libxl not waiting for devices to disconnect Date: Fri, 14 Oct 2011 15:35:34 +0200 Message-ID: <873e4a1309ce5da03056.1318599334@loki> References: Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org # HG changeset patch # User Roger Pau Monne # Date 1317386335 -7200 # Node ID 873e4a1309ce5da0305611ce2e2b460df052019b # Parent deb93254ad05ffa13caa64f0159800f04c82666b 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 diff -r deb93254ad05 -r 873e4a1309ce 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 @@ -391,6 +391,9 @@ static int wait_for_dev_destroy(libxl__g } free(l1); } + } else { + /* timeout reached */ + rc = 0; } return rc; } @@ -531,7 +534,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--; }