aboutsummaryrefslogtreecommitdiff
path: root/board/gdsys/405ep/io.c
diff options
context:
space:
mode:
Diffstat (limited to 'board/gdsys/405ep/io.c')
-rw-r--r--board/gdsys/405ep/io.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/board/gdsys/405ep/io.c b/board/gdsys/405ep/io.c
index 0974019ef..db1ea7f0c 100644
--- a/board/gdsys/405ep/io.c
+++ b/board/gdsys/405ep/io.c
@@ -87,8 +87,9 @@ err_out:
*/
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);
@@ -106,9 +107,9 @@ int checkboard(void)
printf("CATCenter Io");
- if (s != NULL) {
+ if (i > 0) {
puts(", serial# ");
- puts(s);
+ puts(buf);
}
puts("\n ");