[Kimchi-devel] [kimchi-devel][PATCH] Issue #623: Fix mismatch in host device details query

lvroyce at linux.vnet.ibm.com lvroyce at linux.vnet.ibm.com
Tue Mar 24 08:43:52 UTC 2015


From: Royce Lv <lvroyce at linux.vnet.ibm.com>

Commit #902d2957 began to use splitted devices names,
while get detailed device still use original names.
Mismatched name results in error raised when listing host devices.
Fix it by using splitted device name as well.

Signed-off-by: Royce Lv <lvroyce at linux.vnet.ibm.com>
---
 src/kimchi/disks.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/kimchi/disks.py b/src/kimchi/disks.py
index a092c17..5cf6885 100644
--- a/src/kimchi/disks.py
+++ b/src/kimchi/disks.py
@@ -64,7 +64,7 @@ def _get_dev_major_min(name):
     dev_list = _get_lsblk_devs(keys)
 
     for dev in dev_list:
-        if dev['name'] == name:
+        if dev['name'].split()[0] == name:
             maj_min = dev['maj:min']
             break
     else:
-- 
1.9.1




More information about the Kimchi-devel mailing list