mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-02 15:23:53 -06:00
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>
This commit is contained in:
parent
2a1ac12b0b
commit
a732e1baa8
2 changed files with 13 additions and 5 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue