mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-08 18:23:57 -06:00
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>
This commit is contained in:
parent
d2734d2629
commit
e591591b32
6 changed files with 24 additions and 24 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue