63a3680 qemu: Fix bus and lun checks when scsi-disk.channel not present

Authored and Committed by John Ferlan 8 years ago
    qemu: Fix bus and lun checks when scsi-disk.channel not present
    
    Found by Laine and discussed a bit on internal IRC.
    
    Commit id c56fe7f1d6 added support for creating a command line to support
    scsi-disk.channel.
    
    Series was here:
    http://www.redhat.com/archives/libvir-list/2012-February/msg01052.html
    
    Which pointed to a design proposal here:
    http://permalink.gmane.org/gmane.comp.emulators.libvirt/50428
    
    Which states (in part):
    
    Libvirt should check for the QEMU "scsi-disk.channel" property.  If it
    is unavailable, QEMU will only support channel=lun=0 and 0<=target<=7.
    
    However, the check added was ensuring that bus != lun *and* bus != 0. So
    if bus == lun and both were non zero, we'd never make the second check.
    Changing this to an *or* check fixes the check, but still is less readable
    than the just checking each for 0
    
        
file modified
+2 -2