void ide_init2_with_non_qdev_drives(IDEBus *bus, DriveInfo *hd0,

                                    DriveInfo *hd1, qemu_irq irq)

{

    int i;

    DriveInfo *dinfo;



    for(i = 0; i < 2; i++) {

        dinfo = i == 0 ? hd0 : hd1;

        ide_init1(bus, i);

        if (dinfo) {

            if (ide_init_drive(&bus->ifs[i], dinfo->bdrv,

                               dinfo->media_cd ? IDE_CD : IDE_HD, NULL,

                               *dinfo->serial ? dinfo->serial : NULL) < 0) {

                error_report("Can't set up IDE drive %s", dinfo->id);

                exit(1);

            }

            bdrv_attach_dev_nofail(dinfo->bdrv, &bus->ifs[i]);

        } else {

            ide_reset(&bus->ifs[i]);

        }

    }

    bus->irq = irq;

    bus->dma = &ide_dma_nop;

}

void ide_init2_with_non_qdev_drives(IDEBus *bus, DriveInfo *hd0,

                                    DriveInfo *hd1, qemu_irq irq)

{

    int i;

    DriveInfo *dinfo;



    for(i = 0; i < 2; i++) {

        dinfo = i == 0 ? hd0 : hd1;

        ide_init1(bus, i);

        if (dinfo) {

            if (ide_init_drive(&bus->ifs[i], dinfo->bdrv,

                               dinfo->media_cd ? IDE_CD : IDE_HD, NULL,

                               *dinfo->serial ? dinfo->serial : NULL) < 0) {

                error_report("Can't set up IDE drive %s", dinfo->id);

                exit(1);

            }

            bdrv_attach_dev_nofail(dinfo->bdrv, &bus->ifs[i]);

        } else {

            ide_reset(&bus->ifs[i]);

        }

    }

    bus->irq = irq;

    bus->dma = &ide_dma_nop;

}

void FUNC_0(IDEBus *VAR_0, DriveInfo *VAR_1,

                                    DriveInfo *VAR_2, qemu_irq VAR_3)

{

    int VAR_4;

    DriveInfo *dinfo;



    for(VAR_4 = 0; VAR_4 < 2; VAR_4++) {

        dinfo = VAR_4 == 0 ? VAR_1 : VAR_2;

        ide_init1(VAR_0, VAR_4);

        if (dinfo) {

            if (ide_init_drive(&VAR_0->ifs[VAR_4], dinfo->bdrv,

                               dinfo->media_cd ? IDE_CD : IDE_HD, NULL,

                               *dinfo->serial ? dinfo->serial : NULL) < 0) {

                error_report("Can't set up IDE drive %s", dinfo->id);

                exit(1);

            }

            bdrv_attach_dev_nofail(dinfo->bdrv, &VAR_0->ifs[VAR_4]);

        } else {

            ide_reset(&VAR_0->ifs[VAR_4]);

        }

    }

    VAR_0->VAR_3 = VAR_3;

    VAR_0->dma = &ide_dma_nop;

}

void FUNC_0(IDEBus *VAR_0, DriveInfo *VAR_1,
DriveInfo *VAR_2, qemu_irq VAR_3)
{ int VAR_4; DriveInfo *dinfo; for(VAR_4 = 0; VAR_4 < 2; VAR_4++) { dinfo = VAR_4 == 0 ? VAR_1 : VAR_2; ide_init1(VAR_0, VAR_4); if (dinfo) { if (ide_init_drive(&VAR_0->ifs[VAR_4], dinfo->bdrv,
dinfo->media_cd ? IDE_CD : IDE_HD, NULL,
*dinfo->serial ? dinfo->serial : NULL) < 0) { error_report("Can't set up IDE drive %s", dinfo->id); exit(1); } bdrv_attach_dev_nofail(dinfo->bdrv, &VAR_0->ifs[VAR_4]); } else { ide_reset(&VAR_0->ifs[VAR_4]); } } VAR_0->VAR_3 = VAR_3; VAR_0->dma = &ide_dma_nop; }