diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2008-04-04 11:46:55 +0200 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2008-04-04 14:45:04 +0200 |
commit | 50cc8c5412e804480a10ecdd9546c7b6ad21760e (patch) | |
tree | 86d3a04fd004996fc91839b9a7cad705090bcdc0 /common/hush.c | |
parent | a9912f68c65850d2bed12111aabe8b779c95e365 (diff) | |
download | barebox-50cc8c5412e804480a10ecdd9546c7b6ad21760e.tar.gz barebox-50cc8c5412e804480a10ecdd9546c7b6ad21760e.tar.xz |
Subject: [PATCH] [general] Fixed constant strings in data section issue
For practical reasons I changed all string literals assumed to be constant
to reside in .rodata subsection at end of .text section.
Signed-off-by: Carsten Schlote <schlote@vahanus.net>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'common/hush.c')
-rw-r--r-- | common/hush.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/common/hush.c b/common/hush.c index 878312fbb1..245dedee4d 100644 --- a/common/hush.c +++ b/common/hush.c @@ -1596,7 +1596,7 @@ static int do_sh(cmd_tbl_t *cmdtp, int argc, char *argv[]) return execute_script(argv[1], argc - 1, argv + 1); } -static __maybe_unused char cmd_sh_help[] = +static const __maybe_unused char cmd_sh_help[] = "Usage: sh filename [arguments]\n" "\n" "Execute a shell script\n"; @@ -1618,9 +1618,9 @@ static int do_source(cmd_tbl_t *cmdtp, int argc, char *argv[]) return source_script(argv[1], argc - 1, argv + 1); } -static char *source_aliases[] = { ".", NULL}; +static const char *source_aliases[] = { ".", NULL}; -static __maybe_unused char cmd_source_help[] = +static const __maybe_unused char cmd_source_help[] = "Usage: . filename [arguments]\n" "or source filename [arguments]\n" "\n" @@ -1628,11 +1628,14 @@ static __maybe_unused char cmd_source_help[] = "environment and return the exit status of the last command exe-\n" "cuted from filename\n"; +static const __maybe_unused char cmd_source_usage[] = +"execute shell script in current shell environment"; + U_BOOT_CMD_START(source) .maxargs = CONFIG_MAXARGS, .aliases = source_aliases, .cmd = do_source, - .usage = "execute shell script in current shell environment", + .usage = cmd_source_usage, U_BOOT_CMD_HELP(cmd_source_help) U_BOOT_CMD_END |