int register_savevm_live(const char *idstr,

                         int instance_id,

                         int version_id,

                         SaveLiveStateHandler *save_live_state,

                         SaveStateHandler *save_state,

                         LoadStateHandler *load_state,

                         void *opaque)

{

    SaveStateEntry *se;



    se = qemu_malloc(sizeof(SaveStateEntry));

    pstrcpy(se->idstr, sizeof(se->idstr), idstr);

    se->version_id = version_id;

    se->section_id = global_section_id++;

    se->save_live_state = save_live_state;

    se->save_state = save_state;

    se->load_state = load_state;

    se->opaque = opaque;

    se->vmsd = NULL;



    if (instance_id == -1) {

        se->instance_id = calculate_new_instance_id(idstr);

    } else {

        se->instance_id = instance_id;

    }

    /* add at the end of list */

    TAILQ_INSERT_TAIL(&savevm_handlers, se, entry);

    return 0;

}

int register_savevm_live(const char *idstr,

                         int instance_id,

                         int version_id,

                         SaveLiveStateHandler *save_live_state,

                         SaveStateHandler *save_state,

                         LoadStateHandler *load_state,

                         void *opaque)

{

    SaveStateEntry *se;



    se = qemu_malloc(sizeof(SaveStateEntry));

    pstrcpy(se->idstr, sizeof(se->idstr), idstr);

    se->version_id = version_id;

    se->section_id = global_section_id++;

    se->save_live_state = save_live_state;

    se->save_state = save_state;

    se->load_state = load_state;

    se->opaque = opaque;

    se->vmsd = NULL;



    if (instance_id == -1) {

        se->instance_id = calculate_new_instance_id(idstr);

    } else {

        se->instance_id = instance_id;

    }

    

    TAILQ_INSERT_TAIL(&savevm_handlers, se, entry);

    return 0;

}

int FUNC_0(const char *VAR_0,

                         int VAR_1,

                         int VAR_2,

                         SaveLiveStateHandler *VAR_3,

                         SaveStateHandler *VAR_4,

                         LoadStateHandler *VAR_5,

                         void *VAR_6)

{

    SaveStateEntry *se;



    se = qemu_malloc(sizeof(SaveStateEntry));

    pstrcpy(se->VAR_0, sizeof(se->VAR_0), VAR_0);

    se->VAR_2 = VAR_2;

    se->section_id = global_section_id++;

    se->VAR_3 = VAR_3;

    se->VAR_4 = VAR_4;

    se->VAR_5 = VAR_5;

    se->VAR_6 = VAR_6;

    se->vmsd = NULL;



    if (VAR_1 == -1) {

        se->VAR_1 = calculate_new_instance_id(VAR_0);

    } else {

        se->VAR_1 = VAR_1;

    }

    

    TAILQ_INSERT_TAIL(&savevm_handlers, se, entry);

    return 0;

}

int FUNC_0(const char *VAR_0,
int VAR_1,
int VAR_2,
SaveLiveStateHandler *VAR_3,
SaveStateHandler *VAR_4,
LoadStateHandler *VAR_5,
void *VAR_6)
{ SaveStateEntry *se; se = qemu_malloc(sizeof(SaveStateEntry)); pstrcpy(se->VAR_0, sizeof(se->VAR_0), VAR_0); se->VAR_2 = VAR_2; se->section_id = global_section_id++; se->VAR_3 = VAR_3; se->VAR_4 = VAR_4; se->VAR_5 = VAR_5; se->VAR_6 = VAR_6; se->vmsd = NULL; if (VAR_1 == -1) { se->VAR_1 = calculate_new_instance_id(VAR_0); } else { se->VAR_1 = VAR_1; } TAILQ_INSERT_TAIL(&savevm_handlers, se, entry); return 0; }