mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-10-29 17:33:09 +00:00
Fixe default disk bus selection logic
This commit is contained in:
parent
763a59d84d
commit
25f860dc2f
@ -1,3 +1,7 @@
|
|||||||
|
Thu May 15 12:21:08 EST 2008 Daniel P. Berrange <berrange@redhat.com>
|
||||||
|
|
||||||
|
* src/qemu_conf.c: Fix default disk bus selection logic
|
||||||
|
|
||||||
Thu May 15 12:16:08 EST 2008 Daniel P. Berrange <berrange@redhat.com>
|
Thu May 15 12:16:08 EST 2008 Daniel P. Berrange <berrange@redhat.com>
|
||||||
|
|
||||||
Support xenner bootloader capability
|
Support xenner bootloader capability
|
||||||
|
@ -698,10 +698,20 @@ static int qemudParseDiskXML(virConnectPtr conn,
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!bus) {
|
if (!bus) {
|
||||||
if (disk->device == QEMUD_DISK_FLOPPY)
|
if (disk->device == QEMUD_DISK_FLOPPY) {
|
||||||
disk->bus = QEMUD_DISK_BUS_FDC;
|
disk->bus = QEMUD_DISK_BUS_FDC;
|
||||||
|
} else {
|
||||||
|
if (STRPREFIX((const char *)target, "hd"))
|
||||||
|
disk->bus = QEMUD_DISK_BUS_IDE;
|
||||||
|
else if (STRPREFIX((const char *)target, "sd"))
|
||||||
|
disk->bus = QEMUD_DISK_BUS_SCSI;
|
||||||
|
else if (STRPREFIX((const char *)target, "vd"))
|
||||||
|
disk->bus = QEMUD_DISK_BUS_VIRTIO;
|
||||||
|
else if (STRPREFIX((const char *)target, "xvd"))
|
||||||
|
disk->bus = QEMUD_DISK_BUS_XEN;
|
||||||
else
|
else
|
||||||
disk->bus = QEMUD_DISK_BUS_IDE;
|
disk->bus = QEMUD_DISK_BUS_IDE;
|
||||||
|
}
|
||||||
} else if (STREQ((const char *)bus, "ide"))
|
} else if (STREQ((const char *)bus, "ide"))
|
||||||
disk->bus = QEMUD_DISK_BUS_IDE;
|
disk->bus = QEMUD_DISK_BUS_IDE;
|
||||||
else if (STREQ((const char *)bus, "fdc"))
|
else if (STREQ((const char *)bus, "fdc"))
|
||||||
|
Loading…
Reference in New Issue
Block a user