/*
* 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>
int checkboard(void)
{
char name[] = CONFIG_SYS_BOARD_NAME;
+ char buf[64];
char *s;
+ int i;
#ifdef CONFIG_SYS_FORM_CUSTOM
s = "Custom";
/* 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 = env_get_f("board_rev", buf, sizeof(buf));
+ if (i > 0)
+ printf("Rev %s, ", buf);
+ i = env_get_f("serial#", buf, sizeof(buf));
+ if (i > 0)
+ printf("Serial# %s, ", buf);
+ i = env_get_f("board_cfg", buf, sizeof(buf));
+ if (i > 0)
+ printf("Cfg %s", buf);
puts("\n");
return 0;