diff options
author | Simon Glass <sjg@chromium.org> | 2020-11-04 17:13:46 -0700 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2020-11-06 03:42:10 +0000 |
commit | 29c78b9d50929ae3a2d78752a50314305ab515da (patch) | |
tree | e45598c021acb56e07aa6bc16e09ded157378a5e /include | |
parent | ced69556fb003c0336aa3cf74962127f622aa7ca (diff) | |
download | chrome-ec-29c78b9d50929ae3a2d78752a50314305ab515da.tar.gz |
zephyr: Provide parse_bool()
Add this function to the shim so it can be used in the keyboard code.
Drop strtoul() for now since it has the wrong signature.
BUG=b:167405015
BRANCH=none
TEST=zmake configure .../zephyr-chrome/projects/experimental/volteer \
-B /tmp/z/cos
zmake build /tmp/z/cos
See there are no errors
Signed-off-by: Simon Glass <sjg@chromium.org>
Change-Id: I694369feb192cf49addb7444908b89b6081bffa1
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2521360
Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
Diffstat (limited to 'include')
-rw-r--r-- | include/util.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/include/util.h b/include/util.h index 5594a4a706..47524e8b96 100644 --- a/include/util.h +++ b/include/util.h @@ -124,7 +124,11 @@ int strncmp(const char *s1, const char *s2, size_t n); /* Like strtol(), but for integers. */ int strtoi(const char *nptr, char **endptr, int base); + +/* TODO(b/172592963): This should be unsigned long, and conflicts with Zephyr */ +#ifndef CONFIG_ZEPHYR uint64_t strtoul(const char *nptr, char **endptr, int base); +#endif /* Like strncpy(), but guarantees null termination. */ char *strzcpy(char *dest, const char *src, int len); |