diff options
author | Joerg Roedel <joerg.roedel@amd.com> | 2011-07-07 16:13:11 +0200 |
---|---|---|
committer | Marcelo Tosatti <mtosatti@redhat.com> | 2011-08-05 12:04:27 -0300 |
commit | a732e1baa864d5b10c5cfd9e3e437563b771c1a8 (patch) | |
tree | 8de5136d1a0cda612d757952f0a804b851ade64a /qemu-common.h | |
parent | 2a1ac12b0bb29054f5fbc8144c800ca7634c0658 (diff) |
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 <joerg.roedel@amd.com>
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Diffstat (limited to 'qemu-common.h')
-rw-r--r-- | qemu-common.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/qemu-common.h b/qemu-common.h index afbd04d32..389f4d2bf 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); |