diff options
author | Andreas Müller <schnitzeltony@gmx.de> | 2012-01-04 15:26:24 +0000 |
---|---|---|
committer | Albert ARIBAUD <albert.u.boot@aribaud.net> | 2012-01-16 08:40:13 +0100 |
commit | 761ca31e47e483a0c0c66894ead1a2d0db37b314 (patch) | |
tree | 4675f07ac020c4d28acb9dc5f827b6ea7d7e0992 /arch/arm/cpu/armv7/omap-common/spl.c | |
parent | 8775471bb378bbd04dca91153db96c33b30f76e7 (diff) | |
download | u-boot-imx-761ca31e47e483a0c0c66894ead1a2d0db37b314.zip u-boot-imx-761ca31e47e483a0c0c66894ead1a2d0db37b314.tar.gz u-boot-imx-761ca31e47e483a0c0c66894ead1a2d0db37b314.tar.bz2 |
omap_rev_string: output to stdout
* avoid potential buffer overflows
* allow SPL-build not to output "Texas Instruments Revision detection unimplemented"
Signed-off-by: Andreas Müller <schnitzeltony@gmx.de>
Signed-off-by: Tom Rini <trini@ti.com>
Diffstat (limited to 'arch/arm/cpu/armv7/omap-common/spl.c')
-rw-r--r-- | arch/arm/cpu/armv7/omap-common/spl.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/arch/arm/cpu/armv7/omap-common/spl.c b/arch/arm/cpu/armv7/omap-common/spl.c index 74fea4f..9c1f7e3 100644 --- a/arch/arm/cpu/armv7/omap-common/spl.c +++ b/arch/arm/cpu/armv7/omap-common/spl.c @@ -35,6 +35,7 @@ #include <i2c.h> #include <image.h> #include <malloc.h> +#include <linux/compiler.h> DECLARE_GLOBAL_DATA_PTR; @@ -154,7 +155,6 @@ void board_init_r(gd_t *id, ulong dummy) void preloader_console_init(void) { const char *u_boot_rev = U_BOOT_VERSION; - char rev_string_buffer[50]; gd = &gdata; gd->bd = &bdata; @@ -170,14 +170,10 @@ void preloader_console_init(void) printf("\nU-Boot SPL %s (%s - %s)\n", u_boot_rev, U_BOOT_DATE, U_BOOT_TIME); - omap_rev_string(rev_string_buffer); - printf("Texas Instruments %s\n", rev_string_buffer); + omap_rev_string(); } -void __omap_rev_string(char *str) +void __weak omap_rev_string() { - sprintf(str, "Revision detection unimplemented"); + printf("Texas Instruments Revision detection unimplemented\n"); } - -void omap_rev_string(char *str) - __attribute__((weak, alias("__omap_rev_string"))); |