]> git.sur5r.net Git - u-boot/blobdiff - board/xes/common/board.c
Merge branch 'buildpatman' of http://git.denx.de/u-boot-x86
[u-boot] / board / xes / common / board.c
index 738f0a6486b483395a2c7f37bb8b3144e5b868ac..4ed6f50e5cf8f023dd40b235ff8b2d768b77ee3b 100644 (file)
@@ -1,10 +1,7 @@
 /*
  * Copyright 2009 Extreme Engineering Solutions, Inc.
  *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation; either version 2 of
- * the License, or (at your option) any later version.
+ * SPDX-License-Identifier:    GPL-2.0+
  */
 
 #include <common.h>
@@ -13,7 +10,9 @@
 int checkboard(void)
 {
        char name[] = CONFIG_SYS_BOARD_NAME;
+       char buf[64];
        char *s;
+       int i;
 
 #ifdef CONFIG_SYS_FORM_CUSTOM
        s = "Custom";
@@ -52,12 +51,15 @@ int checkboard(void)
 
        /* Display board specific information */
        puts("       ");
-       if ((s = getenv("board_rev")))
-               printf("Rev %s, ", s);
-       if ((s = getenv("serial#")))
-               printf("Serial# %s, ", s);
-       if ((s = getenv("board_cfg")))
-               printf("Cfg %s", s);
+       i = getenv_f("board_rev", buf, sizeof(buf));
+       if (i > 0)
+               printf("Rev %s, ", buf);
+       i = getenv_f("serial#", buf, sizeof(buf));
+       if (i > 0)
+               printf("Serial# %s, ", buf);
+       i = getenv_f("board_cfg", buf, sizeof(buf));
+       if (i > 0)
+               printf("Cfg %s", buf);
        puts("\n");
 
        return 0;