aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKeir Fraser <keir.fraser@citrix.com>2010-05-11 08:40:52 +0100
committerKeir Fraser <keir.fraser@citrix.com>2010-05-11 08:40:52 +0100
commita80b94ef602eec55dc2bf22cb981543bbf8820bd (patch)
treeb1f5bd295845d8b3727666b75466d4fb5c724903
parentb81b7c79d3caf01c1ff2089ebca43d80159aa7c4 (diff)
downloadxen-a80b94ef602eec55dc2bf22cb981543bbf8820bd.tar.gz
xen-a80b94ef602eec55dc2bf22cb981543bbf8820bd.tar.bz2
xen-a80b94ef602eec55dc2bf22cb981543bbf8820bd.zip
xm: explicitly differentiate between tap and tap2 in config parsing.
From: Jim Fehlig <jfehlig@novell.com> Signed-off-by: Keir Fraser <Keir.Fraser@eu.citrix.com> xen-unstable changeset: 21338:a915a11908e3 xen-unstable date: Tue May 11 08:31:16 2010 +0100
-rw-r--r--tools/python/xen/xm/create.py4
-rw-r--r--tools/python/xen/xm/main.py4
2 files changed, 6 insertions, 2 deletions
diff --git a/tools/python/xen/xm/create.py b/tools/python/xen/xm/create.py
index 73a6121c63..c8e0ab8fa6 100644
--- a/tools/python/xen/xm/create.py
+++ b/tools/python/xen/xm/create.py
@@ -783,8 +783,10 @@ def configure_disks(config_devs, vals):
"""Create the config for disks (virtual block devices).
"""
for (uname, dev, mode, backend, protocol) in vals.disk:
- if uname.startswith('tap:'):
+ if uname.startswith('tap2:'):
cls = 'tap2'
+ elif uname.startswith('tap:'):
+ cls = 'tap'
else:
cls = 'vbd'
diff --git a/tools/python/xen/xm/main.py b/tools/python/xen/xm/main.py
index 0ebcb35fb2..817a4df512 100644
--- a/tools/python/xen/xm/main.py
+++ b/tools/python/xen/xm/main.py
@@ -2487,8 +2487,10 @@ def xm_usb_list_assignable_devices(args):
def parse_block_configuration(args):
dom = args[0]
- if args[1].startswith('tap:'):
+ if args[1].startswith('tap2:'):
cls = 'tap2'
+ elif args[1].startswith('tap:'):
+ cls = 'tap'
else:
cls = 'vbd'