mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-02 07:13:54 -06:00
cutils: add qemu_strtoi & qemu_strtoui parsers for int/unsigned int types
There are qemu_strtoNN functions for various sized integers. This adds two more for plain int & unsigned int types, with suitable range checking. Reviewed-by: Eric Blake <eblake@redhat.com> Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com> Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
This commit is contained in:
parent
63bab2b696
commit
473a2a331e
3 changed files with 770 additions and 0 deletions
|
@ -126,6 +126,10 @@ time_t mktimegm(struct tm *tm);
|
|||
int qemu_fdatasync(int fd);
|
||||
int fcntl_setfl(int fd, int flag);
|
||||
int qemu_parse_fd(const char *param);
|
||||
int qemu_strtoi(const char *nptr, const char **endptr, int base,
|
||||
int *result);
|
||||
int qemu_strtoui(const char *nptr, const char **endptr, int base,
|
||||
unsigned int *result);
|
||||
int qemu_strtol(const char *nptr, const char **endptr, int base,
|
||||
long *result);
|
||||
int qemu_strtoul(const char *nptr, const char **endptr, int base,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue