mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-08-26 18:41:17 +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>
|
||||
|
||||
Support xenner bootloader capability
|
||||
|
@ -698,10 +698,20 @@ static int qemudParseDiskXML(virConnectPtr conn,
|
||||
}
|
||||
|
||||
if (!bus) {
|
||||
if (disk->device == QEMUD_DISK_FLOPPY)
|
||||
if (disk->device == QEMUD_DISK_FLOPPY) {
|
||||
disk->bus = QEMUD_DISK_BUS_FDC;
|
||||
else
|
||||
disk->bus = QEMUD_DISK_BUS_IDE;
|
||||
} 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
|
||||
disk->bus = QEMUD_DISK_BUS_IDE;
|
||||
}
|
||||
} else if (STREQ((const char *)bus, "ide"))
|
||||
disk->bus = QEMUD_DISK_BUS_IDE;
|
||||
else if (STREQ((const char *)bus, "fdc"))
|
||||
|
Loading…
Reference in New Issue
Block a user