aboutsummaryrefslogtreecommitdiff
path: root/hw/pci.h
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2012-02-15 09:22:54 +0100
committerPaolo Bonzini <pbonzini@redhat.com>2012-02-24 14:54:51 +0100
commitd3d250bddb3f6aa6c26e9dadf10e82d9fd8bfce3 (patch)
tree574b7eda22a6880e41830d9c4bc98e1f695aa1ec /hw/pci.h
parent9fac25bf6ee6e3291ccb27feb9ad9b63506c7a60 (diff)
downloadqemu-d3d250bddb3f6aa6c26e9dadf10e82d9fd8bfce3.zip
qemu-d3d250bddb3f6aa6c26e9dadf10e82d9fd8bfce3.tar.gz
qemu-d3d250bddb3f6aa6c26e9dadf10e82d9fd8bfce3.tar.bz2
scsi: fix searching for an empty id
The conditions for detecting no free target or LUN were wrong. The LUN loop was followed by an "if" condition that is never true, because the loop is exited as soon as lun becomes equal to bus->info->max_lun, and never becomes greater than it. The target loop had a wrong condition (<= instead of <). Once this is fixed, the loop would fail in the same way as the LUN loop. The fix is to see whether scsi_device_find returned the device with the last (channel, target, LUN) pair, and fail if so. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'hw/pci.h')
0 files changed, 0 insertions, 0 deletions