cutils: Add qemu_strtol() wrapper

Add wrapper for strtol() function. Include unit tests.

Signed-off-by: Carlos L. Torres <carlos.torres@rackspace.com>
Message-Id: <07199f1c0ff3892790c6322123aee1e92f580550.1437346779.git.carlos.torres@rackspace.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
Carlos L. Torres 2015-07-19 18:02:17 -05:00 committed by Paolo Bonzini
parent d1142fb83e
commit 764e0fa497
3 changed files with 379 additions and 0 deletions

View file

@ -203,6 +203,8 @@ int qemu_fls(int i);
int qemu_fdatasync(int fd);
int fcntl_setfl(int fd, int flag);
int qemu_parse_fd(const char *param);
int qemu_strtol(const char *nptr, const char **endptr, int base,
long *result);
int parse_uint(const char *s, unsigned long long *value, char **endptr,
int base);