Reviewed-by: Aline Manera <alinefm(a)linux.vnet.ibm.com>
On 24/03/2015 05:43, lvroyce(a)linux.vnet.ibm.com wrote:
From: Royce Lv <lvroyce(a)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(a)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: