mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-03 07:43:54 -06:00
Introduce strtosz_suffix()
This introduces strtosz_suffix() which allows the caller to specify a default suffix in case the non default of MB is wanted. strtosz() is kept as a wrapper for strtosz_suffix() which keeps it's current default of MB. Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com> Reviewed-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
This commit is contained in:
parent
df2dbb4a50
commit
d8427002dc
2 changed files with 21 additions and 3 deletions
|
@ -149,7 +149,14 @@ time_t mktimegm(struct tm *tm);
|
|||
int qemu_fls(int i);
|
||||
int qemu_fdatasync(int fd);
|
||||
int fcntl_setfl(int fd, int flag);
|
||||
|
||||
#define STRTOSZ_DEFSUFFIX_TB 'T'
|
||||
#define STRTOSZ_DEFSUFFIX_GB 'G'
|
||||
#define STRTOSZ_DEFSUFFIX_MB 'M'
|
||||
#define STRTOSZ_DEFSUFFIX_KB 'K'
|
||||
#define STRTOSZ_DEFSUFFIX_B 'B'
|
||||
ssize_t strtosz(const char *nptr, char **end);
|
||||
ssize_t strtosz_suffix(const char *nptr, char **end, const char default_suffix);
|
||||
|
||||
/* path.c */
|
||||
void init_paths(const char *prefix);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue