summaryrefslogtreecommitdiff
path: root/hw/misc
diff options
context:
space:
mode:
authorMarkus Armbruster <armbru@redhat.com>2017-02-21 21:13:59 +0100
committerMarkus Armbruster <armbru@redhat.com>2017-02-23 20:35:36 +0100
commite591591b323772eea733de6027f5e8b50692d0ff (patch)
tree1ced565e53764f93f0f4951e07be2ad4ff183b40 /hw/misc
parentd2734d2629266006b0413433778474d5801c60be (diff)
downloadqemu-e591591b323772eea733de6027f5e8b50692d0ff.tar.gz
util/cutils: Rename qemu_strtosz() to qemu_strtosz_MiB()
With qemu_strtosz(), no suffix means mebibytes. It's used rarely. I'm going to add a similar function where no suffix means bytes. Rename qemu_strtosz() to qemu_strtosz_MiB() to make the name qemu_strtosz() available for the new function. Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Message-Id: <1487708048-2131-16-git-send-email-armbru@redhat.com>
Diffstat (limited to 'hw/misc')
-rw-r--r--hw/misc/ivshmem.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/hw/misc/ivshmem.c b/hw/misc/ivshmem.c
index bf57e635d6..b3d9ed99dd 100644
--- a/hw/misc/ivshmem.c
+++ b/hw/misc/ivshmem.c
@@ -1268,7 +1268,7 @@ static void ivshmem_realize(PCIDevice *dev, Error **errp)
s->legacy_size = 4 << 20; /* 4 MB default */
} else {
char *end;
- int64_t size = qemu_strtosz(s->sizearg, &end);
+ int64_t size = qemu_strtosz_MiB(s->sizearg, &end);
if (size < 0 || (size_t)size != size || *end != '\0'
|| !is_power_of_2(size)) {
error_setg(errp, "Invalid size %s", s->sizearg);