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