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] imported patch /home/emellor/block_detach.patch

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] imported patch /home/emellor/block_detach.patch
From: Xen patchbot -unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Tue, 04 Oct 2005 23:16:11 +0000
Delivery-date: Tue, 04 Oct 2005 23:13:50 +0000
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/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/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 emellor@ewan
# Node ID 33cd9a7a903b11ac7ff25275952953a0a78a2838
# Parent  22449386d38da0641c2bb95c177fa849533e9ef2
imported patch /home/emellor/block_detach.patch

diff -r 22449386d38d -r 33cd9a7a903b 
tools/python/xen/xend/server/DevController.py
--- a/tools/python/xen/xend/server/DevController.py     Tue Oct  4 23:00:42 2005
+++ b/tools/python/xen/xend/server/DevController.py     Tue Oct  4 23:11:30 2005
@@ -78,8 +78,12 @@
         backpath = xstransact.Read(frontpath, "backend")
 
         xstransact.Remove(frontpath)
-        xstransact.Remove(backpath)
-
+
+        if backpath:
+            xstransact.Remove(backpath)
+        else:
+            raise VmError("Device not connected")
+           
 
     def configurations(self):
         return map(lambda x: self.configuration(int(x)),
diff -r 22449386d38d -r 33cd9a7a903b tools/python/xen/xm/main.py
--- a/tools/python/xen/xm/main.py       Tue Oct  4 23:00:42 2005
+++ b/tools/python/xen/xm/main.py       Tue Oct  4 23:11:30 2005
@@ -165,6 +165,9 @@
     error = str(ex)
     if error == "Not found" and dom != None:
         err("Domain '%s' not found when running 'xm %s'" % (dom, cmd))
+        sys.exit(1)
+    elif error == "Exception: Device not connected":
+        err("Device not connected")
         sys.exit(1)
     else:
         raise ex
@@ -532,7 +535,12 @@
     arg_check(args,2,"block-detach")
 
     dom = args[0]
-    dev = args[1]
+
+    try:
+        dev = int(args[1])
+    except ValueError, e:
+        err("Invalid device id: %s" % args[1])
+        sys.exit(1)
 
     from xen.xend.XendClient import server
     server.xend_domain_device_destroy(dom, 'vbd', dev)

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] imported patch /home/emellor/block_detach.patch, Xen patchbot -unstable <=