aboutsummaryrefslogtreecommitdiff
path: root/include/command.h
diff options
context:
space:
mode:
authorSimon Glass2023-10-01 19:13:08 -0600
committerTom Rini2023-10-11 15:43:54 -0400
commit6321391ac3e310081768b6170554d4f49416b5c2 (patch)
tree9269b3981c7a34ccd68903d7cfd038ffb47e8780 /include/command.h
parent039f8cc375fb9ad28def3403f2e3483c1ded571e (diff)
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 <sjg@chromium.org>
Diffstat (limited to 'include/command.h')
-rw-r--r--include/command.h6
1 files changed, 6 insertions, 0 deletions
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
/**