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

[Xen-changelog] [xen-unstable] Fix breakage of blktap device strings from cset 63d1b02dad347e8feb845d8a8b482e251a478164.



# HG changeset patch
# User Andrew Warfield <andy@xxxxxxxxxxxxx>
# Node ID 4d47322a7729ed8b06d2665e9e4356cf09812ca9
# Parent  f026d4091322be717f66ce87e7c0dc372968a8f2
Fix breakage of blktap device strings from cset 
63d1b02dad347e8feb845d8a8b482e251a478164.

Signed-off-by: Andrew Warfield <andy@xxxxxxxxxxxxx>
---
 tools/python/xen/util/security.py |   12 ++++++++++--
 1 files changed, 10 insertions(+), 2 deletions(-)

diff -r f026d4091322 -r 4d47322a7729 tools/python/xen/util/security.py
--- a/tools/python/xen/util/security.py Tue Nov 14 18:52:58 2006 +0000
+++ b/tools/python/xen/util/security.py Tue Nov 14 11:20:45 2006 -0800
@@ -606,11 +606,17 @@ def unify_resname(resource):
 
     # sanity check on resource name
     try:
-        (type, resfile) = resource.split(":")
+        (type, resfile) = resource.split(":", 1)
     except:
         err("Resource spec '%s' contains no ':' delimiter" % resource)
 
-    if type == "phy":
+    if type == "tap":
+        try:
+            (subtype, resfile) = resfile.split(":")
+        except:
+            err("Resource spec '%s' contains no tap subtype" % resource)
+
+    if type in ["phy", "tap"]:
         if not resfile.startswith("/"):
             resfile = "/dev/" + resfile
 
@@ -619,6 +625,8 @@ def unify_resname(resource):
         err("Invalid resource.")
 
     # from here on absolute file names with resources
+    if type == "tap":
+        type = type + ":" + subtype
     resource = type + ":" + resfile
     return resource
 

_______________________________________________
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®.