]> git.proxmox.com Git - mirror_qemu.git/commit - vl.c
Introduce strtosz() library function to convert a string to a byte count.
authorJes Sorensen <Jes.Sorensen@redhat.com>
Thu, 21 Oct 2010 15:15:46 +0000 (17:15 +0200)
committerAnthony Liguori <aliguori@us.ibm.com>
Wed, 3 Nov 2010 17:48:09 +0000 (12:48 -0500)
commit9f9b17a4f0865286391e4d3a0a735230122a2289
treed80f635564a4130868aba2065e36729901c766d0
parent7d72e76228351d18a856f1e4f5365b59d3205dc3
Introduce strtosz() library function to convert a string to a byte count.

strtosz() returns -1 on error. It now supports human unit formats in
eg. 1.0G, with better error handling.

The following suffixes are supported:
B/b = bytes
K/k = KB
M/m = MB
G/g = GB
T/t = TB

This patch changes -numa and -m input to use strtosz().

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
cutils.c
qemu-common.h
vl.c