aboutsummaryrefslogtreecommitdiff
path: root/qapi/opts-visitor.c
diff options
context:
space:
mode:
authorMarkus Armbruster <armbru@redhat.com>2017-02-21 21:14:00 +0100
committerMarkus Armbruster <armbru@redhat.com>2017-02-23 20:35:36 +0100
commit466dea14e677555dd24465aca75d00a3537ad062 (patch)
treee1df0ed42f3bbac5bafe441aaad90b3d8ced3a3f /qapi/opts-visitor.c
parente591591b323772eea733de6027f5e8b50692d0ff (diff)
downloadqemu-466dea14e677555dd24465aca75d00a3537ad062.zip
qemu-466dea14e677555dd24465aca75d00a3537ad062.tar.gz
qemu-466dea14e677555dd24465aca75d00a3537ad062.tar.bz2
util/cutils: New qemu_strtosz()
Most callers of qemu_strtosz_suffix() pass QEMU_STRTOSZ_DEFSUFFIX_B. Capture the pattern in new qemu_strtosz(). Inline qemu_strtosz_suffix() into its only remaining caller. Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Message-Id: <1487708048-2131-17-git-send-email-armbru@redhat.com>
Diffstat (limited to 'qapi/opts-visitor.c')
-rw-r--r--qapi/opts-visitor.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/qapi/opts-visitor.c b/qapi/opts-visitor.c
index 1048bbc..360d337 100644
--- a/qapi/opts-visitor.c
+++ b/qapi/opts-visitor.c
@@ -489,8 +489,7 @@ opts_type_size(Visitor *v, const char *name, uint64_t *obj, Error **errp)
return;
}
- val = qemu_strtosz_suffix(opt->str ? opt->str : "", &endptr,
- QEMU_STRTOSZ_DEFSUFFIX_B);
+ val = qemu_strtosz(opt->str ? opt->str : "", &endptr);
if (val < 0 || *endptr) {
error_setg(errp, QERR_INVALID_PARAMETER_VALUE, opt->name,
"a size value representible as a non-negative int64");