mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-22 20:45:18 +00:00
qemu: Remove redundant condition
No need to check whether we're dealing with a pSeries guest twice within just a few lines. Signed-off-by: Andrea Bolognani <abologna@redhat.com>
This commit is contained in:
parent
73b9b8fe36
commit
629fdca0d0
@ -5238,8 +5238,10 @@ virQEMUCapsFillDomainDeviceDiskCaps(virQEMUCapsPtr qemuCaps,
|
||||
VIR_DOMAIN_DISK_DEVICE_LUN);
|
||||
|
||||
/* PowerPC pseries based VMs do not support floppy device */
|
||||
if (!qemuDomainMachineIsPSeries(machine, qemuCaps->arch))
|
||||
if (!qemuDomainMachineIsPSeries(machine, qemuCaps->arch)) {
|
||||
VIR_DOMAIN_CAPS_ENUM_SET(disk->diskDevice, VIR_DOMAIN_DISK_DEVICE_FLOPPY);
|
||||
VIR_DOMAIN_CAPS_ENUM_SET(disk->bus, VIR_DOMAIN_DISK_BUS_FDC);
|
||||
}
|
||||
|
||||
if (qemuDomainMachineHasBuiltinIDE(machine))
|
||||
VIR_DOMAIN_CAPS_ENUM_SET(disk->bus, VIR_DOMAIN_DISK_BUS_IDE);
|
||||
@ -5249,10 +5251,6 @@ virQEMUCapsFillDomainDeviceDiskCaps(virQEMUCapsPtr qemuCaps,
|
||||
VIR_DOMAIN_DISK_BUS_VIRTIO,
|
||||
/* VIR_DOMAIN_DISK_BUS_SD */);
|
||||
|
||||
/* PowerPC pseries based VMs do not support floppy device */
|
||||
if (!qemuDomainMachineIsPSeries(machine, qemuCaps->arch))
|
||||
VIR_DOMAIN_CAPS_ENUM_SET(disk->bus, VIR_DOMAIN_DISK_BUS_FDC);
|
||||
|
||||
if (virQEMUCapsGet(qemuCaps, QEMU_CAPS_DEVICE_USB_STORAGE))
|
||||
VIR_DOMAIN_CAPS_ENUM_SET(disk->bus, VIR_DOMAIN_DISK_BUS_USB);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user