From patchwork Mon Jun 20 17:11:19 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 70471 Delivered-To: patch@linaro.org Received: by 10.140.28.4 with SMTP id 4csp1612410qgy; Mon, 20 Jun 2016 10:12:30 -0700 (PDT) X-Received: by 10.28.66.148 with SMTP id k20mr314599wmi.55.1466442750720; Mon, 20 Jun 2016 10:12:30 -0700 (PDT) Return-Path: Received: from theia.denx.de (theia.denx.de. [85.214.87.163]) by mx.google.com with ESMTP id i129si17105880wmg.11.2016.06.20.10.12.30; Mon, 20 Jun 2016 10:12:30 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 85.214.87.163 as permitted sender) client-ip=85.214.87.163; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@nifty.com; spf=pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 85.214.87.163 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 6B969A7638; Mon, 20 Jun 2016 19:12:27 +0200 (CEST) Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id s6lw4VYvqCx6; Mon, 20 Jun 2016 19:12:27 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id D3103A7552; Mon, 20 Jun 2016 19:12:26 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 3511FA7638 for ; Mon, 20 Jun 2016 19:12:23 +0200 (CEST) Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id tuxD0epLlxVE for ; Mon, 20 Jun 2016 19:12:23 +0200 (CEST) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5 (only DNSBL check requested) Received: from conuserg-08.nifty.com (conuserg-08.nifty.com [210.131.2.75]) by theia.denx.de (Postfix) with ESMTPS id 587C8A7558 for ; Mon, 20 Jun 2016 19:12:18 +0200 (CEST) Received: from grover.sesame (FL1-119-242-215-193.osk.mesh.ad.jp [119.242.215.193]) (authenticated) by conuserg-08.nifty.com with ESMTP id u5KHBOOr018559; Tue, 21 Jun 2016 02:11:29 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-08.nifty.com u5KHBOOr018559 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1466442691; bh=7YHODPBTzV5ULCQTgtvbsIue/NQf9+FSQXIom5ZuEQs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=RvC8oCnlDeGJufS/ds5Vg+WtWMUMy9ZPKEG+XfpIYPby0yLMKfj5tALWq4/3DvQFT lWs8M4gPdQc0nMHMwsjci8ehrUkYELLMAalraQUnsae3oiH4Amy0DHNnFDuigZLB/c khmbGxdKDHMkiyplG5B5O2ykLZEh8pOobi6V87c8IjNxaA4zx6zJDrXbbdQc1UZU7B lEjqLQ4ydeu237ltQGxywZSCuUtKT45eACauaJ3aSgHfrH3MH/BosGcJeBxaYW5ze0 tyI+TWqD3LPYgqsTrAbwWICvZBkxnlr7ukvFbGNoRxDM847HxDOTWkNAGmFLZD1B7B jLb6S51ENrYCA== X-Nifty-SrcIP: [119.242.215.193] From: Masahiro Yamada To: u-boot@lists.denx.de Date: Tue, 21 Jun 2016 02:11:19 +0900 Message-Id: <1466442679-6644-2-git-send-email-yamada.masahiro@socionext.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1466442679-6644-1-git-send-email-yamada.masahiro@socionext.com> References: <1466442679-6644-1-git-send-email-yamada.masahiro@socionext.com> Cc: Stephen Warren , Joe Hershberger , Albert ARIBAUD , Stefan Roese Subject: [U-Boot] [PATCH 2/2] hush: complete renaming CONFIG_SYS_HUSH_PARSER to CONFIG_HUSH_PARSER X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.15 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" There is no more define of CONFIG_SYS_HUSH_PARSER. Rename some remaining references and drop the backward compatible Kconfig entry. Signed-off-by: Masahiro Yamada --- board/work-microwave/work_92105/work_92105_display.c | 4 ++-- cmd/Kconfig | 6 ------ cmd/Makefile | 4 ++-- common/Makefile | 5 +---- common/cli.c | 14 +++++++------- test/command_ut.c | 2 +- 6 files changed, 13 insertions(+), 22 deletions(-) -- 1.9.1 _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot diff --git a/board/work-microwave/work_92105/work_92105_display.c b/board/work-microwave/work_92105/work_92105_display.c index c8b1013..3d7438e 100644 --- a/board/work-microwave/work_92105/work_92105_display.c +++ b/board/work-microwave/work_92105/work_92105_display.c @@ -311,8 +311,8 @@ U_BOOT_CMD( * only HUSH can understand them. */ -#if !defined(CONFIG_SYS_HUSH_PARSER) -#error CONFIG_CMD_HD44760 requires CONFIG_SYS_HUSH_PARSER +#if !defined(CONFIG_HUSH_PARSER) +#error CONFIG_CMD_HD44760 requires CONFIG_HUSH_PARSER #endif static int do_hd44780(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[]) diff --git a/cmd/Kconfig b/cmd/Kconfig index 42e0e39..d69b817 100644 --- a/cmd/Kconfig +++ b/cmd/Kconfig @@ -13,7 +13,6 @@ config CMDLINE config HUSH_PARSER bool "Use hush shell" - select SYS_HUSH_PARSER depends on CMDLINE help This option enables the "hush" shell (from Busybox) as command line @@ -24,11 +23,6 @@ config HUSH_PARSER If disabled, you get the old, much simpler behaviour with a somewhat smaller memory footprint. -config SYS_HUSH_PARSER - bool - help - Backward compatibility. - config SYS_PROMPT string "Shell prompt" default "=> " diff --git a/cmd/Makefile b/cmd/Makefile index 9ce7861..a1731be 100644 --- a/cmd/Makefile +++ b/cmd/Makefile @@ -49,7 +49,7 @@ obj-$(CONFIG_ENV_IS_IN_EEPROM) += eeprom.o obj-$(CONFIG_CMD_EEPROM) += eeprom.o obj-$(CONFIG_EFI_STUB) += efi.o obj-$(CONFIG_CMD_ELF) += elf.o -obj-$(CONFIG_SYS_HUSH_PARSER) += exit.o +obj-$(CONFIG_HUSH_PARSER) += exit.o obj-$(CONFIG_CMD_EXT4) += ext4.o obj-$(CONFIG_CMD_EXT2) += ext2.o obj-$(CONFIG_CMD_FAT) += fat.o @@ -123,7 +123,7 @@ obj-$(CONFIG_CMD_STRINGS) += strings.o obj-$(CONFIG_CMD_TERMINAL) += terminal.o obj-$(CONFIG_CMD_TIME) += time.o obj-$(CONFIG_CMD_TRACE) += trace.o -obj-$(CONFIG_SYS_HUSH_PARSER) += test.o +obj-$(CONFIG_HUSH_PARSER) += test.o obj-$(CONFIG_CMD_TPM) += tpm.o obj-$(CONFIG_CMD_TPM_TEST) += tpm_test.o obj-$(CONFIG_CMD_TSI148) += tsi148.o diff --git a/common/Makefile b/common/Makefile index 34cb898..e08cd3e 100644 --- a/common/Makefile +++ b/common/Makefile @@ -11,10 +11,7 @@ obj-y += init/ obj-y += main.o obj-y += exports.o obj-y += hash.o -ifdef CONFIG_SYS_HUSH_PARSER -obj-y += cli_hush.o -endif - +obj-$(CONFIG_HUSH_PARSER) += cli_hush.o obj-$(CONFIG_AUTOBOOT) += autoboot.o # This option is not just y/n - it can have a numeric value diff --git a/common/cli.c b/common/cli.c index 18d7e19..a433ef2 100644 --- a/common/cli.c +++ b/common/cli.c @@ -28,7 +28,7 @@ DECLARE_GLOBAL_DATA_PTR; */ int run_command(const char *cmd, int flag) { -#ifndef CONFIG_SYS_HUSH_PARSER +#ifndef CONFIG_HUSH_PARSER /* * cli_run_command can return 0 or 1 for success, so clean up * its result. @@ -55,7 +55,7 @@ int run_command(const char *cmd, int flag) */ int run_command_repeatable(const char *cmd, int flag) { -#ifndef CONFIG_SYS_HUSH_PARSER +#ifndef CONFIG_HUSH_PARSER return cli_simple_run_command(cmd, flag); #else /* @@ -79,7 +79,7 @@ int run_command_list(const char *cmd, int len, int flag) if (len == -1) { len = strlen(cmd); -#ifdef CONFIG_SYS_HUSH_PARSER +#ifdef CONFIG_HUSH_PARSER /* hush will never change our string */ need_buff = 0; #else @@ -94,7 +94,7 @@ int run_command_list(const char *cmd, int len, int flag) memcpy(buff, cmd, len); buff[len] = '\0'; } -#ifdef CONFIG_SYS_HUSH_PARSER +#ifdef CONFIG_HUSH_PARSER rcode = parse_string_outer(buff, FLAG_PARSE_SEMICOLON); #else /* @@ -214,7 +214,7 @@ err: void cli_loop(void) { -#ifdef CONFIG_SYS_HUSH_PARSER +#ifdef CONFIG_HUSH_PARSER parse_file_outer(); /* This point is never reached */ for (;;); @@ -222,12 +222,12 @@ void cli_loop(void) cli_simple_loop(); #else printf("## U-Boot command line is disabled. Please enable CONFIG_CMDLINE\n"); -#endif /*CONFIG_SYS_HUSH_PARSER*/ +#endif /*CONFIG_HUSH_PARSER*/ } void cli_init(void) { -#ifdef CONFIG_SYS_HUSH_PARSER +#ifdef CONFIG_HUSH_PARSER u_boot_hush_start(); #endif diff --git a/test/command_ut.c b/test/command_ut.c index 54bf62b..21283eb 100644 --- a/test/command_ut.c +++ b/test/command_ut.c @@ -43,7 +43,7 @@ static int do_ut_cmd(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) assert(run_command_list("false", -1, 0) == 1); assert(run_command_list("echo", -1, 0) == 0); -#ifdef CONFIG_SYS_HUSH_PARSER +#ifdef CONFIG_HUSH_PARSER run_command("setenv foo 'setenv black 1\nsetenv adder 2'", 0); run_command("run foo", 0); assert(getenv("black") != NULL);