]> git.sur5r.net Git - u-boot/blobdiff - board/gdsys/405ep/iocon.c
Merge branch 'master' of git://git.denx.de/u-boot-nios
[u-boot] / board / gdsys / 405ep / iocon.c
index 20770e4eff99a73e8efbcfa31019706ffe950622..ce533408943e7a0ff7ddabbd105ccec64160f06a 100644 (file)
@@ -69,8 +69,9 @@ enum {
  */
 int checkboard(void)
 {
+       char buf[64];
+       int i = getenv_f("serial#", buf, sizeof(buf));
        ihs_fpga_t *fpga = (ihs_fpga_t *) CONFIG_SYS_FPGA_BASE(0);
-       char *s = getenv("serial#");
        u16 versions = in_le16(&fpga->versions);
        u16 fpga_version = in_le16(&fpga->fpga_version);
        u16 fpga_features = in_le16(&fpga->fpga_features);
@@ -98,9 +99,9 @@ int checkboard(void)
 
        printf("IoCon");
 
-       if (s != NULL) {
+       if (i > 0) {
                puts(", serial# ");
-               puts(s);
+               puts(buf);
        }
        puts("\n       ");