[U-Boot] [PATCH] cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected

From: Bartosz Golaszewski bgolaszewski@baylibre.com
The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled.
Signed-off-by: Bartosz Golaszewski bgolaszewski@baylibre.com --- include/command.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/include/command.h b/include/command.h index be74f6ac92..2bfee89df3 100644 --- a/include/command.h +++ b/include/command.h @@ -109,7 +109,8 @@ int cmd_process_error(cmd_tbl_t *cmdtp, int err); #if defined(CONFIG_CMD_MEMORY) || \ defined(CONFIG_CMD_I2C) || \ defined(CONFIG_CMD_ITEST) || \ - defined(CONFIG_CMD_PCI) + defined(CONFIG_CMD_PCI) || \ + defined(CONFIG_CMD_SETEXPR) #define CMD_DATA_SIZE extern int cmd_get_data_size(char* arg, int default_size); #endif

On Mon, May 20, 2019 at 10:22:14AM +0200, Bartosz Golaszewski wrote:
From: Bartosz Golaszewski bgolaszewski@baylibre.com
The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled.
Signed-off-by: Bartosz Golaszewski bgolaszewski@baylibre.com
Applied to u-boot/master, thanks!
participants (2)
-
Bartosz Golaszewski
-
Tom Rini