void parse_option_size(const char *name, const char *value,

                       uint64_t *ret, Error **errp)

{

    char *postfix;

    double sizef;



    sizef = strtod(value, &postfix);

    if (sizef < 0 || sizef > UINT64_MAX) {

        error_setg(errp, QERR_INVALID_PARAMETER_VALUE, name,

                   "a non-negative number below 2^64");

        return;

    }

    switch (*postfix) {

    case 'T':

        sizef *= 1024;

        /* fall through */

    case 'G':

        sizef *= 1024;

        /* fall through */

    case 'M':

        sizef *= 1024;

        /* fall through */

    case 'K':

    case 'k':

        sizef *= 1024;

        /* fall through */

    case 'b':

    case '\0':

        *ret = (uint64_t) sizef;

        break;

    default:

        error_setg(errp, QERR_INVALID_PARAMETER_VALUE, name, "a size");

        error_append_hint(errp, "You may use k, M, G or T suffixes for "

                          "kilobytes, megabytes, gigabytes and terabytes.\n");

        return;

    }

}

void parse_option_size(const char *name, const char *value,

                       uint64_t *ret, Error **errp)

{

    char *postfix;

    double sizef;



    sizef = strtod(value, &postfix);

    if (sizef < 0 || sizef > UINT64_MAX) {

        error_setg(errp, QERR_INVALID_PARAMETER_VALUE, name,

                   "a non-negative number below 2^64");

        return;

    }

    switch (*postfix) {

    case 'T':

        sizef *= 1024;

        

    case 'G':

        sizef *= 1024;

        

    case 'M':

        sizef *= 1024;

        

    case 'K':

    case 'k':

        sizef *= 1024;

        

    case 'b':

    case '\0':

        *ret = (uint64_t) sizef;

        break;

    default:

        error_setg(errp, QERR_INVALID_PARAMETER_VALUE, name, "a size");

        error_append_hint(errp, "You may use k, M, G or T suffixes for "

                          "kilobytes, megabytes, gigabytes and terabytes.\n");

        return;

    }

}

    char *postfix;     double sizef;     sizef = strtod(value, &postfix);     if (sizef < 0 || sizef > UINT64_MAX) {         error_setg(errp, QERR_INVALID_PARAMETER_VALUE, name,                    "a non-negative number below 2^64");     switch (*postfix) {     case 'T':         sizef *= 1024;     case 'G':         sizef *= 1024;     case 'M':         sizef *= 1024;     case 'K':     case 'k':         sizef *= 1024;     case 'b':     case '\0':         *ret = (uint64_t) sizef;         break;     default:         error_setg(errp, QERR_INVALID_PARAMETER_VALUE, name, "a size");         error_append_hint(errp, "You may use k, M, G or T suffixes for "                           "kilobytes, megabytes, gigabytes and terabytes.\n");
void FUNC_0(const char *VAR_0, const char *VAR_1,

                       uint64_t *VAR_2, Error **VAR_3)

{

    char *VAR_4;

    double VAR_5;



    VAR_5 = strtod(VAR_1, &VAR_4);

    if (VAR_5 < 0 || VAR_5 > UINT64_MAX) {

        error_setg(VAR_3, QERR_INVALID_PARAMETER_VALUE, VAR_0,

                   "a non-negative number below 2^64");

        return;

    }

    switch (*VAR_4) {

    case 'T':

        VAR_5 *= 1024;

        

    case 'G':

        VAR_5 *= 1024;

        

    case 'M':

        VAR_5 *= 1024;

        

    case 'K':

    case 'k':

        VAR_5 *= 1024;

        

    case 'b':

    case '\0':

        *VAR_2 = (uint64_t) VAR_5;

        break;

    default:

        error_setg(VAR_3, QERR_INVALID_PARAMETER_VALUE, VAR_0, "a size");

        error_append_hint(VAR_3, "You may use k, M, G or T suffixes for "

                          "kilobytes, megabytes, gigabytes and terabytes.\n");

        return;

    }

}

void FUNC_0(const char *VAR_0, const char *VAR_1,
uint64_t *VAR_2, Error **VAR_3)
{ char *VAR_4; double VAR_5; VAR_5 = strtod(VAR_1, &VAR_4); if (VAR_5 < 0 || VAR_5 > UINT64_MAX) { error_setg(VAR_3, QERR_INVALID_PARAMETER_VALUE, VAR_0,
"a non-negative number below 2^64"); return; } switch (*VAR_4) { case 'T':
VAR_5 *= 1024; case 'G':
VAR_5 *= 1024; case 'M':
VAR_5 *= 1024; case 'K':
case 'k':
VAR_5 *= 1024; case 'b':
case '\0':
*VAR_2 = (uint64_t) VAR_5; break; default:
error_setg(VAR_3, QERR_INVALID_PARAMETER_VALUE, VAR_0, "a size"); error_append_hint(VAR_3, "You may use k, M, G or T suffixes for "
"kilobytes, megabytes, gigabytes and terabytes.\n"); return; } }