From 6321391ac3e310081768b6170554d4f49416b5c2 Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Sun, 1 Oct 2023 19:13:08 -0600 Subject: cli: Drop #ifdefs for CONFIG_AUTO_COMPLETE in cli_readline Use a static inline and adjust the logic to avoid the need for #ifdefs in cli_readline_into_buffer() Signed-off-by: Simon Glass --- include/command.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'include/command.h') diff --git a/include/command.h b/include/command.h index 34ea989b39b..1c4ec4257a5 100644 --- a/include/command.h +++ b/include/command.h @@ -95,6 +95,12 @@ int var_complete(int argc, char *const argv[], char last_char, int maxv, char *cmdv[]); int cmd_auto_complete(const char *const prompt, char *buf, int *np, int *colp); +#else +static inline int cmd_auto_complete(const char *const prompt, char *buf, + int *np, int *colp) +{ + return 0; +} #endif /** -- cgit v1.2.3