diff options
author | Andrey Smirnov <andrew.smirnov@gmail.com> | 2018-10-26 18:31:50 -0700 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2018-10-29 09:10:38 +0100 |
commit | e8e26a40956a4bd6847e3c341cda4d34d4086a01 (patch) | |
tree | 92781ae78b69dafc71f696c44c56e67b96425267 /lib/kstrtox.h | |
parent | febf5c7fd011de956fd2400b162d22f3dea5e520 (diff) | |
download | barebox-e8e26a40956a4bd6847e3c341cda4d34d4086a01.tar.gz barebox-e8e26a40956a4bd6847e3c341cda4d34d4086a01.tar.xz |
lib: Port kstrtox.c from Linux kernel
Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'lib/kstrtox.h')
-rw-r--r-- | lib/kstrtox.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/kstrtox.h b/lib/kstrtox.h new file mode 100644 index 0000000000..3b4637bcd2 --- /dev/null +++ b/lib/kstrtox.h @@ -0,0 +1,9 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +#ifndef _LIB_KSTRTOX_H +#define _LIB_KSTRTOX_H + +#define KSTRTOX_OVERFLOW (1U << 31) +const char *_parse_integer_fixup_radix(const char *s, unsigned int *base); +unsigned int _parse_integer(const char *s, unsigned int base, unsigned long long *res); + +#endif |