addhardware: Don't clash with different buses using the same prefix

Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
This commit is contained in:
Martin Kletzander 2014-02-18 12:02:37 +01:00
parent bc5d84b040
commit 4aec369e44

View File

@ -1441,7 +1441,7 @@ class vmmAddHardware(vmmGObjectUI):
# Save occupied places per controller
occupied = collections.defaultdict(int)
for d in used_disks:
if d.bus == disk.bus:
if d.get_target_prefix() == disk.get_target_prefix():
num = virtinst.VirtualDisk.target_to_num(d.target)
occupied[num / 7] += 1
for c in ctrls_scsi: