dom0/qvm-block: fix connecting devices to dom0

This commit is contained in:
Marek Marczykowski 2012-02-16 10:25:16 +01:00
parent c759dcfe15
commit c39fc7f6f1

View File

@ -167,7 +167,7 @@ def block_find_unused_frontend(vm = None):
major = 202
# prefer xvdi
for minor in range(8*16,254,16)+range(0,8*16,16):
if str(major << 8 | minor) not in vbd_list:
if vbd_list is None or str(major << 8 | minor) not in vbd_list:
return block_devid_to_name(major << 8 | minor)
return None