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

                       uint64_t *ret, Error **errp)

{

    uint64_t size;

    int err;



    err = qemu_strtosz(value, NULL, &size);

    if (err == -ERANGE) {

        error_setg(errp, "Value '%s' is too large for parameter '%s'",

                   value, name);

        return;

    }

    if (err) {

        error_setg(errp, QERR_INVALID_PARAMETER_VALUE, name,

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

        error_append_hint(errp, "Optional suffix k, M, G, T, P or E means"

                          " kilo-, mega-, giga-, tera-, peta-\n"

                          "and exabytes, respectively.\n");

        return;

    }

    *ret = size;

}

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

                       uint64_t *ret, Error **errp)

{

    uint64_t size;

    int err;



    err = qemu_strtosz(value, NULL, &size);

    if (err == -ERANGE) {

        error_setg(errp, "Value '%s' is too large for parameter '%s'",

                   value, name);

        return;

    }

    if (err) {

        error_setg(errp, QERR_INVALID_PARAMETER_VALUE, name,

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

        error_append_hint(errp, "Optional suffix k, M, G, T, P or E means"

                          " kilo-, mega-, giga-, tera-, peta-\n"

                          "and exabytes, respectively.\n");

        return;

    }

    *ret = size;

}

void FUNC_0(const char *VAR_0, const char *VAR_1,

                       uint64_t *VAR_2, Error **VAR_3)

{

    uint64_t size;

    int VAR_4;



    VAR_4 = qemu_strtosz(VAR_1, NULL, &size);

    if (VAR_4 == -ERANGE) {

        error_setg(VAR_3, "Value '%s' is too large for parameter '%s'",

                   VAR_1, VAR_0);

        return;

    }

    if (VAR_4) {

        error_setg(VAR_3, QERR_INVALID_PARAMETER_VALUE, VAR_0,

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

        error_append_hint(VAR_3, "Optional suffix k, M, G, T, P or E means"

                          " kilo-, mega-, giga-, tera-, peta-\n"

                          "and exabytes, respectively.\n");

        return;

    }

    *VAR_2 = size;

}

void FUNC_0(const char *VAR_0, const char *VAR_1,
uint64_t *VAR_2, Error **VAR_3)
{ uint64_t size; int VAR_4; VAR_4 = qemu_strtosz(VAR_1, NULL, &size); if (VAR_4 == -ERANGE) { error_setg(VAR_3, "Value '%s' is too large for parameter '%s'",
VAR_1, VAR_0); return; } if (VAR_4) { error_setg(VAR_3, QERR_INVALID_PARAMETER_VALUE, VAR_0,
"a non-negative number below 2^64"); error_append_hint(VAR_3, "Optional suffix k, M, G, T, P or E means"
" kilo-, mega-, giga-, tera-, peta-\n"
"and exabytes, respectively.\n"); return; } *VAR_2 = size; }