]> git.proxmox.com Git - mirror_qemu.git/commit
option: Fix checking of sizes for overflow and trailing crap
authorMarkus Armbruster <armbru@redhat.com>
Tue, 21 Feb 2017 20:14:08 +0000 (21:14 +0100)
committerMarkus Armbruster <armbru@redhat.com>
Thu, 23 Feb 2017 19:35:36 +0000 (20:35 +0100)
commit75cdcd1553e74b5edc58aed23e3b2da8dabb1876
tree65345fb1cb4518f0d9ca6abef0db9486e334b985
parentf46bfdbfc8f95cf65d7818ef68a801e063c40332
option: Fix checking of sizes for overflow and trailing crap

parse_option_size()'s checking for overflow and trailing crap is
wrong.  Has always been that way.  qemu_strtosz() gets it right, so
use that.

This adds support for size suffixes 'P', 'E', and ignores case for all
suffixes, not just 'k'.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Message-Id: <1487708048-2131-25-git-send-email-armbru@redhat.com>
tests/test-qemu-opts.c
util/qemu-option.c