From a732e1baa864d5b10c5cfd9e3e437563b771c1a8 Mon Sep 17 00:00:00 2001 From: Joerg Roedel Date: Thu, 7 Jul 2011 16:13:11 +0200 Subject: qemu: Add strtosz_suffix_unit function This function does the same as the strtosz_suffix function except that it allows to specify the unit to which the k/M/B/T suffixes apply. This function will be used later to parse the tsc-frequency from the command-line. Signed-off-by: Joerg Roedel Signed-off-by: Marcelo Tosatti --- qemu-common.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'qemu-common.h') diff --git a/qemu-common.h b/qemu-common.h index afbd04d321..389f4d2bff 100644 --- a/qemu-common.h +++ b/qemu-common.h @@ -157,6 +157,8 @@ int fcntl_setfl(int fd, int flag); #define STRTOSZ_DEFSUFFIX_B 'B' int64_t strtosz(const char *nptr, char **end); int64_t strtosz_suffix(const char *nptr, char **end, const char default_suffix); +int64_t strtosz_suffix_unit(const char *nptr, char **end, + const char default_suffix, int64_t unit); /* path.c */ void init_paths(const char *prefix); -- cgit v1.2.3