From: Yosuke Iwamatsu <y-iwamatsu@ab.jp.nec.com>
To: xen-devel@lists.xensource.com
Subject: [PATCH] Xend: Fix Device Duplicate Check
Date: Mon, 17 Dec 2007 18:28:05 +0900 [thread overview]
Message-ID: <47664125.8090907@ab.jp.nec.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 227 bytes --]
Hi,
This patch fixes device duplicate check as follows.
- Add duplicate check for the blktap device
- Do case-insensitve comparison for mac addresses
Regards,
-------------------
Yosuke Iwamatsu
NEC Corporation
[-- Attachment #2: duplicate_check.patch --]
[-- Type: text/plain, Size: 1414 bytes --]
# HG changeset patch
# User y-iwamatsu@ab.jp.nec.com
# Date 1197871440 -32400
# Node ID f9b5560cfe23eba8870bcca48fb42bf9fb4fbd65
# Parent 966a6d3b74087474df337e00b31cbecf495b442a
Xend: Fix device duplicate check.
Signed-off-by: Yosuke Iwamatsu <y-iwamatsu@ab.jp.nec.com>
diff -r 966a6d3b7408 -r f9b5560cfe23 tools/python/xen/xend/XendConfig.py
--- a/tools/python/xen/xend/XendConfig.py Fri Dec 14 11:50:24 2007 +0000
+++ b/tools/python/xen/xend/XendConfig.py Mon Dec 17 15:04:00 2007 +0900
@@ -1023,7 +1023,7 @@ class XendConfig(dict):
def device_duplicate_check(self, dev_type, dev_info, defined_config):
defined_devices_sxpr = self.all_devices_sxpr(target = defined_config)
- if dev_type == 'vbd':
+ if dev_type == 'vbd' or dev_type == 'tap':
dev_uname = dev_info.get('uname')
blkdev_name = dev_info.get('dev')
devid = self._blkdev_name_to_number(blkdev_name)
@@ -1046,7 +1046,7 @@ class XendConfig(dict):
for o_dev_type, o_dev_info in defined_devices_sxpr:
if dev_type == o_dev_type:
- if dev_mac == sxp.child_value(o_dev_info, 'mac'):
+ if dev_mac.lower() == sxp.child_value(o_dev_info, 'mac').lower():
raise XendConfigError('The mac "%s" is already defined' %
dev_mac)
[-- Attachment #3: Type: text/plain, Size: 138 bytes --]
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel
next reply other threads:[~2007-12-17 9:28 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-12-17 9:28 Yosuke Iwamatsu [this message]
2007-12-18 1:21 ` [PATCH] Xend: Fix Device Duplicate Check Masaki Kanno
2007-12-18 6:47 ` Yosuke Iwamatsu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=47664125.8090907@ab.jp.nec.com \
--to=y-iwamatsu@ab.jp.nec.com \
--cc=xen-devel@lists.xensource.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.