aboutsummaryrefslogtreecommitdiff
path: root/board/amcc/walnut/walnut.c
diff options
context:
space:
mode:
Diffstat (limited to 'board/amcc/walnut/walnut.c')
-rw-r--r--board/amcc/walnut/walnut.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/board/amcc/walnut/walnut.c b/board/amcc/walnut/walnut.c
index 4f299324cd7..d3287cea194 100644
--- a/board/amcc/walnut/walnut.c
+++ b/board/amcc/walnut/walnut.c
@@ -67,7 +67,8 @@ int board_early_init_f(void)
*/
int checkboard(void)
{
- char *s = getenv("serial#");
+ char buf[64];
+ int i = getenv_f("serial#", buf, sizeof(buf));
uint pvr = get_pvr();
if (pvr == PVR_405GPR_RB) {
@@ -76,9 +77,9 @@ int checkboard(void)
puts("Board: Walnut - AMCC PPC405GP Evaluation Board");
}
- if (s != NULL) {
+ if (i > 0) {
puts(", serial# ");
- puts(s);
+ puts(buf);
}
putc('\n');