From 9f9b17a4f0865286391e4d3a0a735230122a2289 Mon Sep 17 00:00:00 2001 From: Jes Sorensen Date: Thu, 21 Oct 2010 17:15:46 +0200 Subject: 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 Signed-off-by: Anthony Liguori --- qemu-common.h | 1 + 1 file changed, 1 insertion(+) (limited to 'qemu-common.h') diff --git a/qemu-common.h b/qemu-common.h index 21fc3a530..b3957f185 100644 --- a/qemu-common.h +++ b/qemu-common.h @@ -149,6 +149,7 @@ time_t mktimegm(struct tm *tm); int qemu_fls(int i); int qemu_fdatasync(int fd); int fcntl_setfl(int fd, int flag); +ssize_t strtosz(const char *nptr, char **end); /* path.c */ void init_paths(const char *prefix); -- cgit v1.2.3