aboutsummaryrefslogtreecommitdiff
path: root/hw/scsi-bus.c
diff options
context:
space:
mode:
authorMarkus Armbruster <armbru@redhat.com>2010-05-27 21:08:18 +0200
committerKevin Wolf <kwolf@redhat.com>2010-07-06 17:05:49 +0200
commit42e766a24b53ff5042576449dd526f734ca8f659 (patch)
treefbda63a023c39dd08b67f71a00feb9232709cdef /hw/scsi-bus.c
parent94ac726842d37b50c7742ecb643bebe2e5d72cd2 (diff)
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>
Diffstat (limited to 'hw/scsi-bus.c')
-rw-r--r--hw/scsi-bus.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/hw/scsi-bus.c b/hw/scsi-bus.c
index b84b9b98b5..d69c74c4ef 100644
--- a/hw/scsi-bus.c
+++ b/hw/scsi-bus.c
@@ -102,19 +102,23 @@ SCSIDevice *scsi_bus_legacy_add_drive(SCSIBus *bus, BlockDriverState *bdrv, int
int scsi_bus_legacy_handle_cmdline(SCSIBus *bus)
{
+ Location loc;
DriveInfo *dinfo;
int res = 0, unit;
+ loc_push_none(&loc);
for (unit = 0; unit < MAX_SCSI_DEVS; unit++) {
dinfo = drive_get(IF_SCSI, bus->busnr, unit);
if (dinfo == NULL) {
continue;
}
+ qemu_opts_loc_restore(dinfo->opts);
if (!scsi_bus_legacy_add_drive(bus, dinfo->bdrv, unit)) {
res = -1;
break;
}
}
+ loc_pop(&loc);
return res;
}