tizen 2.3.1 release
[platform/kernel/u-boot.git] / board / xes / common / board.c
index 4ed6f50..738f0a6 100644 (file)
@@ -1,7 +1,10 @@
 /*
  * Copyright 2009 Extreme Engineering Solutions, Inc.
  *
- * SPDX-License-Identifier:    GPL-2.0+
+ * 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.
  */
 
 #include <common.h>
@@ -10,9 +13,7 @@
 int checkboard(void)
 {
        char name[] = CONFIG_SYS_BOARD_NAME;
-       char buf[64];
        char *s;
-       int i;
 
 #ifdef CONFIG_SYS_FORM_CUSTOM
        s = "Custom";
@@ -51,15 +52,12 @@ int checkboard(void)
 
        /* Display board specific information */
        puts("       ");
-       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);
+       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);
        puts("\n");
 
        return 0;