static void default_drive(int enable, int snapshot, BlockInterfaceType type,

                          int index, const char *optstr)

{

    QemuOpts *opts;



    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_new(opts, type)) {

        exit(1);

    }

}

static void default_drive(int enable, int snapshot, BlockInterfaceType type,

                          int index, const char *optstr)

{

    QemuOpts *opts;



    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_new(opts, type)) {

        exit(1);

    }

}

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

                          int VAR_3, const char *VAR_4)

{

    QemuOpts *opts;



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

        return;

    }



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

    if (VAR_1) {

        drive_enable_snapshot(opts, NULL);

    }

    if (!drive_new(opts, VAR_2)) {

        exit(1);

    }

}

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