summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/strtox.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/strtox.c b/lib/strtox.c
index cfe61240cc..08d912ebf8 100644
--- a/lib/strtox.c
+++ b/lib/strtox.c
@@ -65,3 +65,12 @@ unsigned long long simple_strtoull (const char *cp, char **endp, unsigned int ba
return result;
}
EXPORT_SYMBOL(simple_strtoull);
+
+long long simple_strtoll(const char *cp, char **endp, unsigned int base)
+{
+ if (*cp == '-')
+ return -simple_strtoull(cp + 1, endp, base);
+
+ return simple_strtoull(cp, endp, base);
+}
+EXPORT_SYMBOL(simple_strtoll);