X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=board%2Fgw8260%2Fgw8260.c;h=bbae0a89223e9b1835f574443cf520d8833d80d6;hb=3285d4ca197928a048d3dda86751b5d26e6e0e86;hp=28f5ca99e87db3d847f404592d11621b090d651f;hpb=f82642e33899766892499b163e60560fbbf87773;p=oweals%2Fu-boot.git diff --git a/board/gw8260/gw8260.c b/board/gw8260/gw8260.c index 28f5ca99e8..bbae0a8922 100644 --- a/board/gw8260/gw8260.c +++ b/board/gw8260/gw8260.c @@ -11,23 +11,7 @@ * Advent Networks, Inc. * Oliver Brown * - * See file CREDITS for list of people who contributed to this - * project. - * - * 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. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, - * MA 02111-1307 USA + * SPDX-License-Identifier: GPL-2.0+ */ /*********************************************************************/ @@ -214,13 +198,13 @@ const iop_conf_t iop_conf_tab[4][32] = { /*********************************************************************/ int checkboard (void) { - char *str; + char buf[64]; + int i = getenv_f("serial#", buf, sizeof(buf)); puts ("Board: Advent Networks gw8260\n"); - str = getenv ("serial#"); - if (str != NULL) { - printf ("SN: %s\n", str); + if (i > 0) { + printf("SN: %s\n", buf); } return 0; } @@ -544,15 +528,11 @@ int mem_test_walk (void) /*********************************************************************/ int testdram (void) { - char *s; int rundata, runaddress, runwalk; - s = getenv ("testdramdata"); - rundata = (s && (*s == 'y')) ? 1 : 0; - s = getenv ("testdramaddress"); - runaddress = (s && (*s == 'y')) ? 1 : 0; - s = getenv ("testdramwalk"); - runwalk = (s && (*s == 'y')) ? 1 : 0; + rundata = getenv_yesno("testdramdata") == 1; + runaddress = getenv_yesno("testdramaddress") == 1; + runwalk = getenv_yesno("testdramwalk") == 1; if ((rundata == 1) || (runaddress == 1) || (runwalk == 1)) { printf ("Testing RAM ... ");