From e87dfb0526be231de89b299531a0e637d343fccd Mon Sep 17 00:00:00 2001 From: Andrii Anisov Date: Thu, 6 Aug 2020 12:42:52 +0300 Subject: 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 Signed-off-by: Anastasiia Lukianenko Signed-off-by: Oleksandr Andrushchenko --- include/vsprintf.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'include') diff --git a/include/vsprintf.h b/include/vsprintf.h index d9fb68a..2290083 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 -- cgit v1.1