diff options
author | Andrii Anisov <andrii_anisov@epam.com> | 2020-08-06 12:42:52 +0300 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2020-08-14 22:18:30 +0300 |
commit | e87dfb0526be231de89b299531a0e637d343fccd (patch) | |
tree | 22321a741fed68f97ffc74287bc00660c7f5d39e /include | |
parent | 242587dca4a7e34023b4c87d5b52a74b2fe7255d (diff) | |
download | u-boot-e87dfb0526be231de89b299531a0e637d343fccd.tar.xz |
lib: sscanf: add sscanf implementation
Port sscanf implementation from mini-os and introduce new
Kconfig option to enable it: CONFIG_SSCANF. Disable by default.
Signed-off-by: Andrii Anisov <andrii_anisov@epam.com>
Signed-off-by: Anastasiia Lukianenko <anastasiia_lukianenko@epam.com>
Signed-off-by: Oleksandr Andrushchenko <oleksandr_andrushchenko@epam.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/vsprintf.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/include/vsprintf.h b/include/vsprintf.h index d9fb68add0..2290083eba 100644 --- a/include/vsprintf.h +++ b/include/vsprintf.h @@ -234,4 +234,12 @@ char *strmhz(char *buf, unsigned long hz); */ void str_to_upper(const char *in, char *out, size_t len); +/** + * sscanf - Unformat a buffer into a list of arguments + * @buf: input buffer + * @fmt: formatting of buffer + * @...: resulting arguments + */ +int sscanf(const char *buf, const char *fmt, ...); + #endif |