void scsi_bus_legacy_handle_cmdline(SCSIBus *bus, bool deprecated)

{

    Location loc;

    DriveInfo *dinfo;

    int 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 (deprecated) {

            /* Handling -drive not claimed by machine initialization */

            if (blk_get_attached_dev(blk_by_legacy_dinfo(dinfo))) {

                continue;       /* claimed */

            }

            if (!dinfo->is_default) {

                error_report("warning: bus=%d,unit=%d is deprecated with this"

                             " machine type",

                             bus->busnr, unit);

            }

        }

        scsi_bus_legacy_add_drive(bus, blk_by_legacy_dinfo(dinfo),

                                  unit, false, -1, NULL, &error_fatal);

    }

    loc_pop(&loc);

}

void scsi_bus_legacy_handle_cmdline(SCSIBus *bus, bool deprecated)

{

    Location loc;

    DriveInfo *dinfo;

    int 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 (deprecated) {

            

            if (blk_get_attached_dev(blk_by_legacy_dinfo(dinfo))) {

                continue;       

            }

            if (!dinfo->is_default) {

                error_report("warning: bus=%d,unit=%d is deprecated with this"

                             " machine type",

                             bus->busnr, unit);

            }

        }

        scsi_bus_legacy_add_drive(bus, blk_by_legacy_dinfo(dinfo),

                                  unit, false, -1, NULL, &error_fatal);

    }

    loc_pop(&loc);

}

void FUNC_0(SCSIBus *VAR_0, bool VAR_1)

{

    Location loc;

    DriveInfo *dinfo;

    int 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 (VAR_1) {

            

            if (blk_get_attached_dev(blk_by_legacy_dinfo(dinfo))) {

                continue;       

            }

            if (!dinfo->is_default) {

                error_report("warning: VAR_0=%d,VAR_2=%d is VAR_1 with this"

                             " machine type",

                             VAR_0->busnr, VAR_2);

            }

        }

        scsi_bus_legacy_add_drive(VAR_0, blk_by_legacy_dinfo(dinfo),

                                  VAR_2, false, -1, NULL, &error_fatal);

    }

    loc_pop(&loc);

}

void FUNC_0(SCSIBus *VAR_0, bool VAR_1)
{ Location loc; DriveInfo *dinfo; int 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 (VAR_1) { if (blk_get_attached_dev(blk_by_legacy_dinfo(dinfo))) { continue; } if (!dinfo->is_default) { error_report("warning: VAR_0=%d,VAR_2=%d is VAR_1 with this"
" machine type",
VAR_0->busnr, VAR_2); } } scsi_bus_legacy_add_drive(VAR_0, blk_by_legacy_dinfo(dinfo),
VAR_2, false, -1, NULL, &error_fatal); } loc_pop(&loc); }