opts_type_size(Visitor *v, const char *name, uint64_t *obj, Error **errp)

{

    OptsVisitor *ov = to_ov(v);

    const QemuOpt *opt;

    int64_t val;



    opt = lookup_scalar(ov, name, errp);

    if (!opt) {

        return;

    }



    val = qemu_strtosz(opt->str ? opt->str : "", NULL);

    if (val < 0) {

        error_setg(errp, QERR_INVALID_PARAMETER_VALUE, opt->name,

                   "a size value representible as a non-negative int64");

        return;

    }



    *obj = val;

    processed(ov, name);

}

opts_type_size(Visitor *v, const char *name, uint64_t *obj, Error **errp)

{

    OptsVisitor *ov = to_ov(v);

    const QemuOpt *opt;

    int64_t val;



    opt = lookup_scalar(ov, name, errp);

    if (!opt) {

        return;

    }



    val = qemu_strtosz(opt->str ? opt->str : "", NULL);

    if (val < 0) {

        error_setg(errp, QERR_INVALID_PARAMETER_VALUE, opt->name,

                   "a size value representible as a non-negative int64");

        return;

    }



    *obj = val;

    processed(ov, name);

}

FUNC_0(Visitor *VAR_0, const char *VAR_1, uint64_t *VAR_2, Error **VAR_3)

{

    OptsVisitor *ov = to_ov(VAR_0);

    const QemuOpt *VAR_4;

    int64_t val;



    VAR_4 = lookup_scalar(ov, VAR_1, VAR_3);

    if (!VAR_4) {

        return;

    }



    val = qemu_strtosz(VAR_4->str ? VAR_4->str : "", NULL);

    if (val < 0) {

        error_setg(VAR_3, QERR_INVALID_PARAMETER_VALUE, VAR_4->VAR_1,

                   "a size value representible as a non-negative int64");

        return;

    }



    *VAR_2 = val;

    processed(ov, VAR_1);

}

FUNC_0(Visitor *VAR_0, const char *VAR_1, uint64_t *VAR_2, Error **VAR_3)
{ OptsVisitor *ov = to_ov(VAR_0); const QemuOpt *VAR_4; int64_t val; VAR_4 = lookup_scalar(ov, VAR_1, VAR_3); if (!VAR_4) { return; } val = qemu_strtosz(VAR_4->str ? VAR_4->str : "", NULL); if (val < 0) { error_setg(VAR_3, QERR_INVALID_PARAMETER_VALUE, VAR_4->VAR_1,
"a size value representible as a non-negative int64"); return; } *VAR_2 = val; processed(ov, VAR_1); }