void do_migrate_set_speed(Monitor *mon, const QDict *qdict, QObject **ret_data)

{

    double d;

    char *ptr;

    FdMigrationState *s;

    const char *value = qdict_get_str(qdict, "value");



    d = strtod(value, &ptr);

    switch (*ptr) {

    case 'G': case 'g':

        d *= 1024;

    case 'M': case 'm':

        d *= 1024;

    case 'K': case 'k':

        d *= 1024;

    default:

        break;

    }



    max_throttle = (uint32_t)d;

    s = migrate_to_fms(current_migration);



    if (s) {

        qemu_file_set_rate_limit(s->file, max_throttle);

    }

    

}

void do_migrate_set_speed(Monitor *mon, const QDict *qdict, QObject **ret_data)

{

    double d;

    char *ptr;

    FdMigrationState *s;

    const char *value = qdict_get_str(qdict, "value");



    d = strtod(value, &ptr);

    switch (*ptr) {

    case 'G': case 'g':

        d *= 1024;

    case 'M': case 'm':

        d *= 1024;

    case 'K': case 'k':

        d *= 1024;

    default:

        break;

    }



    max_throttle = (uint32_t)d;

    s = migrate_to_fms(current_migration);



    if (s) {

        qemu_file_set_rate_limit(s->file, max_throttle);

    }

    

}

void FUNC_0(Monitor *VAR_0, const QDict *VAR_1, QObject **VAR_2)

{

    double VAR_3;

    char *VAR_4;

    FdMigrationState *s;

    const char *VAR_5 = qdict_get_str(VAR_1, "VAR_5");



    VAR_3 = strtod(VAR_5, &VAR_4);

    switch (*VAR_4) {

    case 'G': case 'g':

        VAR_3 *= 1024;

    case 'M': case 'm':

        VAR_3 *= 1024;

    case 'K': case 'k':

        VAR_3 *= 1024;

    default:

        break;

    }



    max_throttle = (uint32_t)VAR_3;

    s = migrate_to_fms(current_migration);



    if (s) {

        qemu_file_set_rate_limit(s->file, max_throttle);

    }

    

}

void FUNC_0(Monitor *VAR_0, const QDict *VAR_1, QObject **VAR_2)
{ double VAR_3; char *VAR_4; FdMigrationState *s; const char *VAR_5 = qdict_get_str(VAR_1, "VAR_5"); VAR_3 = strtod(VAR_5, &VAR_4); switch (*VAR_4) { case 'G': case 'g':
VAR_3 *= 1024; case 'M': case 'm':
VAR_3 *= 1024; case 'K': case 'k':
VAR_3 *= 1024; default:
break; } max_throttle = (uint32_t)VAR_3; s = migrate_to_fms(current_migration); if (s) { qemu_file_set_rate_limit(s->file, max_throttle); } }