Fix incorrect use of getenv() before relocation
[pandora-u-boot.git] / board / amcc / bluestone / bluestone.c
index fe8929c..584f5ef 100644 (file)
@@ -78,13 +78,14 @@ int board_early_init_f(void)
 
 int checkboard(void)
 {
-       char *s = getenv("serial#");
+       char buf[64];
+       int i = getenv_f("serial#", buf, sizeof(buf));
 
        puts("Board: Bluestone Evaluation Board");
 
-       if (s != NULL) {
+       if (i > 0) {
                puts(", serial# ");
-               puts(s);
+               puts(buf);
        }
        putc('\n');