From 8ed660166ce9cdeb63b4cf710c663407b7ec9128 Mon Sep 17 00:00:00 2001 From: Leo C Date: Fri, 22 Apr 2016 11:21:03 +0200 Subject: Store only command line input in history buffer, but not data (i.e mm command) --- include/cli.h | 2 +- include/cli_readline.h | 11 ++++++++--- include/config.h | 2 +- include/debug.h | 2 +- 4 files changed, 11 insertions(+), 6 deletions(-) (limited to 'include') diff --git a/include/cli.h b/include/cli.h index 4920cc4..20e852f 100644 --- a/include/cli.h +++ b/include/cli.h @@ -4,7 +4,7 @@ * (C) Copyright 2014 Google, Inc * Simon Glass * - * SPDX-License-Identifier: GPL-2.0+ + * SPDX-License-Identifier: GPL-2.0 */ #ifndef CLI_H diff --git a/include/cli_readline.h b/include/cli_readline.h index 4471568..0e165cc 100644 --- a/include/cli_readline.h +++ b/include/cli_readline.h @@ -4,12 +4,15 @@ * (C) Copyright 2014 Google, Inc * Simon Glass * - * SPDX-License-Identifier: GPL-2.0+ + * SPDX-License-Identifier: GPL-2.0 */ #ifndef CLI_READLINE_H #define CLI_READLINE_H +#include "common.h" +#include + extern char console_buffer[]; /* console I/O buffer */ /** @@ -18,9 +21,10 @@ extern char console_buffer[]; /* console I/O buffer */ * This is a convenience function which calls cli_readline_into_buffer(). * * @prompt: Prompt to display + * @enable_history: Use history buffer if true * @return command line length excluding terminator, or -ve on error */ -int cli_readline(const FLASH char *const prompt); +int cli_readline(const FLASH char *const prompt, bool enable_history); /** * readline_into_buffer() - read a line into a buffer @@ -44,7 +48,8 @@ int cli_readline(const FLASH char *const prompt); * parameter), then -2 is returned. If a break is detected (Ctrl-C) then * -1 is returned. */ -//int cli_readline_into_buffer(const char *const prompt, char *buffer, int timeout); +//int cli_readline_into_buffer(const char *const prompt, char *buffer, +// int timeout, bool enable_history); #endif /* CLI_READLINE_H */ diff --git a/include/config.h b/include/config.h index 1501989..efc793e 100644 --- a/include/config.h +++ b/include/config.h @@ -1,7 +1,7 @@ /* * (C) Copyright 2014 Leo C. * - * SPDX-License-Identifier: GPL-2.0+ + * SPDX-License-Identifier: GPL-2.0 */ #ifndef CONFIG_H diff --git a/include/debug.h b/include/debug.h index 39c15b0..0ee0129 100644 --- a/include/debug.h +++ b/include/debug.h @@ -4,7 +4,7 @@ * (C) Copyright 2000-2009 * Wolfgang Denk, DENX Software Engineering, wd@denx.de. * - * SPDX-License-Identifier: GPL-2.0+ + * SPDX-License-Identifier: GPL-2.0 */ -- cgit v1.2.3