diff options
author | Ahmad Fatoum <ahmad@a3f.at> | 2020-11-26 19:31:54 +0100 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2020-11-27 10:02:36 +0100 |
commit | 8f57bc80c3e6a9f1c5318b52b98e9cc3268d10a8 (patch) | |
tree | 4bdd637c26eeacb9928cf36f2e91ca09a5084c6b /include | |
parent | 870f45338872b5ac02b2f87b6409036a6292ecf3 (diff) | |
download | barebox-8f57bc80c3e6a9f1c5318b52b98e9cc3268d10a8.tar.gz barebox-8f57bc80c3e6a9f1c5318b52b98e9cc3268d10a8.tar.xz |
commands: implement and use parse_assignment helper
We have the split by '=' snippet at multiple locations that parse
key=value pairs. Consolidate them to a single location. This makes code
a bit easier to read at the cost of an extra 8 bytes (LZO-compressed
THUMB2 barebox, static inline version is bigger).
No functional change.
Signed-off-by: Ahmad Fatoum <ahmad@a3f.at>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'include')
-rw-r--r-- | include/command.h | 1 | ||||
-rw-r--r-- | include/string.h | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/include/command.h b/include/command.h index 860eae3e35..ccae568f87 100644 --- a/include/command.h +++ b/include/command.h @@ -13,6 +13,7 @@ #include <linux/list.h> #include <linux/stringify.h> #include <linux/stddef.h> +#include <string.h> #ifndef __ASSEMBLY__ diff --git a/include/string.h b/include/string.h index b51566fd00..ef0b5e199e 100644 --- a/include/string.h +++ b/include/string.h @@ -14,5 +14,6 @@ void *__nokasan_default_memset(void *, int, __kernel_size_t); void *__default_memcpy(void * dest,const void *src,size_t count); void *__nokasan_default_memcpy(void * dest,const void *src,size_t count); +char *parse_assignment(char *str); #endif /* __STRING_H */ |