static void default_drive(int enable, int snapshot, int use_scsi,

                          BlockInterfaceType type, int index,

                          const char *optstr)

{

    QemuOpts *opts;



    if (type == IF_DEFAULT) {

        type = use_scsi ? IF_SCSI : IF_IDE;

    }



    if (!enable || drive_get_by_index(type, index)) {

        return;

    }



    opts = drive_add(type, index, NULL, optstr);

    if (snapshot) {

        drive_enable_snapshot(opts, NULL);

    }

    if (!drive_init(opts, use_scsi)) {

        exit(1);

    }

}

static void default_drive(int enable, int snapshot, int use_scsi,

                          BlockInterfaceType type, int index,

                          const char *optstr)

{

    QemuOpts *opts;



    if (type == IF_DEFAULT) {

        type = use_scsi ? IF_SCSI : IF_IDE;

    }



    if (!enable || drive_get_by_index(type, index)) {

        return;

    }



    opts = drive_add(type, index, NULL, optstr);

    if (snapshot) {

        drive_enable_snapshot(opts, NULL);

    }

    if (!drive_init(opts, use_scsi)) {

        exit(1);

    }

}

static void FUNC_0(int VAR_0, int VAR_1, int VAR_2,

                          BlockInterfaceType VAR_3, int VAR_4,

                          const char *VAR_5)

{

    QemuOpts *opts;



    if (VAR_3 == IF_DEFAULT) {

        VAR_3 = VAR_2 ? IF_SCSI : IF_IDE;

    }



    if (!VAR_0 || drive_get_by_index(VAR_3, VAR_4)) {

        return;

    }



    opts = drive_add(VAR_3, VAR_4, NULL, VAR_5);

    if (VAR_1) {

        drive_enable_snapshot(opts, NULL);

    }

    if (!drive_init(opts, VAR_2)) {

        exit(1);

    }

}

static void FUNC_0(int VAR_0, int VAR_1, int VAR_2,
BlockInterfaceType VAR_3, int VAR_4,
const char *VAR_5)
{ QemuOpts *opts; if (VAR_3 == IF_DEFAULT) { VAR_3 = VAR_2 ? IF_SCSI : IF_IDE; } if (!VAR_0 || drive_get_by_index(VAR_3, VAR_4)) { return; } opts = drive_add(VAR_3, VAR_4, NULL, VAR_5); if (VAR_1) { drive_enable_snapshot(opts, NULL); } if (!drive_init(opts, VAR_2)) { exit(1); } }