mirror of
https://git.proxmox.com/git/qemu
synced 2025-08-14 15:36:25 +00:00
allow passing null machine pointer to drive_init().
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
This commit is contained in:
parent
f4dbb8dd9a
commit
4d00781419
2
vl.c
2
vl.c
@ -1928,7 +1928,7 @@ DriveInfo *drive_init(QemuOpts *opts, void *opaque,
|
|||||||
translation = BIOS_ATA_TRANSLATION_AUTO;
|
translation = BIOS_ATA_TRANSLATION_AUTO;
|
||||||
cache = 1;
|
cache = 1;
|
||||||
|
|
||||||
if (machine->use_scsi) {
|
if (machine && machine->use_scsi) {
|
||||||
type = IF_SCSI;
|
type = IF_SCSI;
|
||||||
max_devs = MAX_SCSI_DEVS;
|
max_devs = MAX_SCSI_DEVS;
|
||||||
pstrcpy(devname, sizeof(devname), "scsi");
|
pstrcpy(devname, sizeof(devname), "scsi");
|
||||||
|
Loading…
Reference in New Issue
Block a user