aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2009-09-29 12:25:30 +0200
committerDenys Vlasenko <vda.linux@googlemail.com>2009-09-29 12:25:30 +0200
commitc34c033c4256f88e759c5f7a59526b4397852a82 (patch)
tree2c88fbe15bc7d99bff25da48f850f751b639ede7
parent8f7a6d294fd0940e531bb8fef197b1b74fe2a842 (diff)
downloadbusybox-w32-c34c033c4256f88e759c5f7a59526b4397852a82.tar.gz
busybox-w32-c34c033c4256f88e759c5f7a59526b4397852a82.tar.bz2
busybox-w32-c34c033c4256f88e759c5f7a59526b4397852a82.zip
ash,hush: share string
function old new delta optschanged 133 139 +6 hush_main 997 982 -15 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 1/1 up/down: 6/-15) Total: -9 bytes text data bss dec hexfilename 823160 445 7668 831273 caf29busybox_old 823102 445 7668 831215 caeefbusybox_unstripped Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
-rw-r--r--shell/ash.c9
-rw-r--r--shell/hush.c11
2 files changed, 12 insertions, 8 deletions
diff --git a/shell/ash.c b/shell/ash.c
index 952961373..e5503a140 100644
--- a/shell/ash.c
+++ b/shell/ash.c
@@ -8539,12 +8539,13 @@ setinteractive(int on)
8539 static smallint did_banner; 8539 static smallint did_banner;
8540 8540
8541 if (!did_banner) { 8541 if (!did_banner) {
8542 out1fmt( 8542 /* note: ash and hush share this string */
8543 "\n\n" 8543 out1fmt("\n\n%s %s\n"
8544 "%s built-in shell (ash)\n"
8545 "Enter 'help' for a list of built-in commands." 8544 "Enter 'help' for a list of built-in commands."
8546 "\n\n", 8545 "\n\n",
8547 bb_banner); 8546 bb_banner,
8547 "built-in shell (ash)"
8548 );
8548 did_banner = 1; 8549 did_banner = 1;
8549 } 8550 }
8550 } 8551 }
diff --git a/shell/hush.c b/shell/hush.c
index b515eabd2..3012a1f73 100644
--- a/shell/hush.c
+++ b/shell/hush.c
@@ -6816,10 +6816,13 @@ int hush_main(int argc, char **argv)
6816 */ 6816 */
6817 6817
6818 if (!ENABLE_FEATURE_SH_EXTRA_QUIET && G_interactive_fd) { 6818 if (!ENABLE_FEATURE_SH_EXTRA_QUIET && G_interactive_fd) {
6819 printf("\n\n%s hush - the humble shell\n", bb_banner); 6819 /* note: ash and hush share this string */
6820 if (ENABLE_HUSH_HELP) 6820 printf("\n\n%s %s\n"
6821 puts("Enter 'help' for a list of built-in commands."); 6821 IF_HUSH_HELP("Enter 'help' for a list of built-in commands.\n")
6822 puts(""); 6822 "\n",
6823 bb_banner,
6824 "hush - the humble shell"
6825 );
6823 } 6826 }
6824 6827
6825 parse_and_run_file(stdin); 6828 parse_and_run_file(stdin);