]> git.ipfire.org Git - people/ms/u-boot.git/blobdiff - board/amcc/bamboo/bamboo.c
Fix incorrect use of getenv() before relocation
[people/ms/u-boot.git] / board / amcc / bamboo / bamboo.c
index d4205e034ba4a7980d3d9d7f1a96a7d9e3c1f9aa..79788a80fc60924ac71a768b72cf6ad7df5532d9 100644 (file)
@@ -440,12 +440,13 @@ int board_early_init_f(void)
 
 int checkboard(void)
 {
-       char *s = getenv("serial#");
+       char buf[64];
+       int i = getenv_f("serial#", buf, sizeof(buf));
 
        printf("Board: Bamboo - AMCC PPC440EP Evaluation Board");
-       if (s != NULL) {
+       if (i > 0) {
                puts(", serial# ");
-               puts(s);
+               puts(buf);
        }
        putc('\n');