From d5fd0b49210c941de8a1fce3947ace92243ab5ca Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Tue, 14 Oct 2008 07:05:24 -0400 Subject: strings cmd: drop old CONFIG_CFG_STRINGS define We don't need CONFIG_CFG_STRINGS anymore now that we have the define CONFIG_CMD_STRINGS and Makefile control. Signed-off-by: Mike Frysinger --- common/cmd_strings.c | 4 ---- 1 file changed, 4 deletions(-) (limited to 'common/cmd_strings.c') diff --git a/common/cmd_strings.c b/common/cmd_strings.c index bbf56a033..db54f29e2 100644 --- a/common/cmd_strings.c +++ b/common/cmd_strings.c @@ -10,8 +10,6 @@ #include #include -#ifdef CONFIG_CFG_STRINGS - static char *start_addr, *last_addr; int do_strings(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) @@ -45,5 +43,3 @@ U_BOOT_CMD(strings, 3, 1, do_strings, "strings - display strings\n", " [byte count]\n" " - display strings at for at least [byte count] or first double NUL\n"); - -#endif -- cgit v1.2.3-70-g09d2 From 774ce72026f74ac9641bcbbc588b20f2e13f7ab8 Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Tue, 4 Nov 2008 16:03:46 -0500 Subject: strings: use puts() rather than printf() When running `strings` on really long strings, the stack tends to get smashed due to printf(). Switch to puts() instead since we're only passing the data through. Signed-off-by: Mike Frysinger --- common/cmd_strings.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'common/cmd_strings.c') diff --git a/common/cmd_strings.c b/common/cmd_strings.c index db54f29e2..7d05cf8e9 100644 --- a/common/cmd_strings.c +++ b/common/cmd_strings.c @@ -29,7 +29,8 @@ int do_strings(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) char *addr = start_addr; do { - printf("%s\n", addr); + puts(addr); + puts("\n"); addr += strlen(addr) + 1; } while (addr[0] && addr < last_addr); -- cgit v1.2.3-70-g09d2