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

[Xen-changelog] [xen-unstable] libxl, xl: Fix two minor bugs in domain d

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] libxl, xl: Fix two minor bugs in domain destruction
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Tue, 13 Apr 2010 14:55:32 -0700
Delivery-date: Tue, 13 Apr 2010 15:03:08 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1271090726 -3600
# Node ID 117c79b7066d0477df09a784fbf37be371ce93aa
# Parent  be6e58cc247554057aca710ed8b373911b0b65d3
libxl,xl: Fix two minor bugs in domain destruction

* If /local/domain/<domid>/device does not exist, this is not
  necessarily an error.  It probably means the domain has been
  partially destroyed already.

* Have xl report errors from libxl_domain_destroy.

Signed-off-by: Ian Jackson <Ian.Jackson@xxxxxxxxxxxxx>
---
 tools/libxl/libxl_device.c |    2 +-
 tools/libxl/xl.c           |    4 +++-
 2 files changed, 4 insertions(+), 2 deletions(-)

diff -r be6e58cc2475 -r 117c79b7066d tools/libxl/libxl_device.c
--- a/tools/libxl/libxl_device.c        Mon Apr 12 17:44:47 2010 +0100
+++ b/tools/libxl/libxl_device.c        Mon Apr 12 17:45:26 2010 +0100
@@ -301,7 +301,7 @@ int libxl_devices_destroy(struct libxl_c
     if (!l1) {
         XL_LOG(&clone, XL_LOG_ERROR, "%s is empty", path);
         libxl_ctx_free(&clone);
-        return -1;
+        return 0;
     }
     for (i = 0; i < num1; i++) {
         if (!strcmp("vfs", l1[i]))
diff -r be6e58cc2475 -r 117c79b7066d tools/libxl/xl.c
--- a/tools/libxl/xl.c  Mon Apr 12 17:44:47 2010 +0100
+++ b/tools/libxl/xl.c  Mon Apr 12 17:45:26 2010 +0100
@@ -1277,8 +1277,10 @@ void unpause_domain(char *p)
 
 void destroy_domain(char *p)
 {
+    int rc;
     find_domain(p);
-    libxl_domain_destroy(&ctx, domid, 0);
+    rc = libxl_domain_destroy(&ctx, domid, 0);
+    if (rc) { fprintf(stderr,"destroy failed (rc=%d)\n.",rc); exit(-1); }
 }
 
 void list_domains(int verbose)

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] libxl, xl: Fix two minor bugs in domain destruction, Xen patchbot-unstable <=