mirror of https://github.com/proxmox/mirror_qemu
scsi: Error locations for -drive if=scsi device initialization
Signed-off-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>master
parent
94ac726842
commit
42e766a24b
|
@ -102,19 +102,23 @@ SCSIDevice *scsi_bus_legacy_add_drive(SCSIBus *bus, BlockDriverState *bdrv, int
|
||||||
|
|
||||||
int scsi_bus_legacy_handle_cmdline(SCSIBus *bus)
|
int scsi_bus_legacy_handle_cmdline(SCSIBus *bus)
|
||||||
{
|
{
|
||||||
|
Location loc;
|
||||||
DriveInfo *dinfo;
|
DriveInfo *dinfo;
|
||||||
int res = 0, unit;
|
int res = 0, unit;
|
||||||
|
|
||||||
|
loc_push_none(&loc);
|
||||||
for (unit = 0; unit < MAX_SCSI_DEVS; unit++) {
|
for (unit = 0; unit < MAX_SCSI_DEVS; unit++) {
|
||||||
dinfo = drive_get(IF_SCSI, bus->busnr, unit);
|
dinfo = drive_get(IF_SCSI, bus->busnr, unit);
|
||||||
if (dinfo == NULL) {
|
if (dinfo == NULL) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
qemu_opts_loc_restore(dinfo->opts);
|
||||||
if (!scsi_bus_legacy_add_drive(bus, dinfo->bdrv, unit)) {
|
if (!scsi_bus_legacy_add_drive(bus, dinfo->bdrv, unit)) {
|
||||||
res = -1;
|
res = -1;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
loc_pop(&loc);
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue