summaryrefslogtreecommitdiffstats
path: root/commands/edit.c
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2008-04-04 11:46:55 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2008-04-04 14:45:04 +0200
commit50cc8c5412e804480a10ecdd9546c7b6ad21760e (patch)
tree86d3a04fd004996fc91839b9a7cad705090bcdc0 /commands/edit.c
parenta9912f68c65850d2bed12111aabe8b779c95e365 (diff)
downloadbarebox-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 'commands/edit.c')
-rw-r--r--commands/edit.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/commands/edit.c b/commands/edit.c
index 3a685ebeef..6fb4a61efd 100644
--- a/commands/edit.c
+++ b/commands/edit.c
@@ -237,7 +237,7 @@ static int edit_read_file(const char *path)
if (!lineend)
break;
- linestr = lineend + 1;
+ linestr = lineend + 1;
}
free(filebuffer);
}
@@ -550,9 +550,9 @@ out:
return 0;
}
-static char *edit_aliases[] = { "sedit", NULL};
+static const char *edit_aliases[] = { "sedit", NULL};
-static __maybe_unused char cmd_edit_help[] =
+static const __maybe_unused char cmd_edit_help[] =
"Usage: (s)edit <file>\n"
"This is a very small editor. Its only features are moving the cursor with\n"
"the usual keys and typing characters.\n"
@@ -561,11 +561,13 @@ static __maybe_unused char cmd_edit_help[] =
"\n"
"If called as sedit the editor uses ansi codes to scroll the screen.\n";
+static const __maybe_unused char cmd_edit_usage[] = "edit a file";
+
U_BOOT_CMD_START(edit)
.maxargs = 2,
.cmd = do_edit,
.aliases = edit_aliases,
- .usage = "edit a file",
+ .usage = cmd_edit_usage,
U_BOOT_CMD_HELP(cmd_edit_help)
U_BOOT_CMD_END