int scsi_bus_legacy_handle_cmdline(SCSIBus *bus)

{

    Location loc;

    DriveInfo *dinfo;

    int res = 0, unit;



    loc_push_none(&loc);

    for (unit = 0; unit < bus->info->max_target; 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, false, -1)) {

            res = -1;

            break;

        }

    }

    loc_pop(&loc);

    return res;

}

int scsi_bus_legacy_handle_cmdline(SCSIBus *bus)

{

    Location loc;

    DriveInfo *dinfo;

    int res = 0, unit;



    loc_push_none(&loc);

    for (unit = 0; unit < bus->info->max_target; 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, false, -1)) {

            res = -1;

            break;

        }

    }

    loc_pop(&loc);

    return res;

}

    for (unit = 0; unit < bus->info->max_target; unit++) {
int FUNC_0(SCSIBus *VAR_0)

{

    Location loc;

    DriveInfo *dinfo;

    int VAR_1 = 0, VAR_2;



    loc_push_none(&loc);

    for (VAR_2 = 0; VAR_2 < VAR_0->info->max_target; VAR_2++) {

        dinfo = drive_get(IF_SCSI, VAR_0->busnr, VAR_2);

        if (dinfo == NULL) {

            continue;

        }

        qemu_opts_loc_restore(dinfo->opts);

        if (!scsi_bus_legacy_add_drive(VAR_0, dinfo->bdrv, VAR_2, false, -1)) {

            VAR_1 = -1;

            break;

        }

    }

    loc_pop(&loc);

    return VAR_1;

}

int FUNC_0(SCSIBus *VAR_0)
{ Location loc; DriveInfo *dinfo; int VAR_1 = 0, VAR_2; loc_push_none(&loc); for (VAR_2 = 0; VAR_2 < VAR_0->info->max_target; VAR_2++) { dinfo = drive_get(IF_SCSI, VAR_0->busnr, VAR_2); if (dinfo == NULL) { continue; } qemu_opts_loc_restore(dinfo->opts); if (!scsi_bus_legacy_add_drive(VAR_0, dinfo->bdrv, VAR_2, false, -1)) { VAR_1 = -1; break; } } loc_pop(&loc); return VAR_1; }