[U-Boot-Users] [PATCH] The fdt boardsetup command criteria was not unique

Scott Wood scottwood at freescale.com
Mon Jun 9 20:16:24 CEST 2008


On Sat, Jun 07, 2008 at 12:29:26PM -0400, Jerry Van Baren wrote:
> diff --git a/common/cmd_fdt.c b/common/cmd_fdt.c
> index ede65ae..8592128 100644
> --- a/common/cmd_fdt.c
> +++ b/common/cmd_fdt.c
> @@ -403,7 +403,8 @@ int do_fdt (cmd_tbl_t * cmdtp, int flag, int argc, char *argv[])
>  	}
>  #ifdef CONFIG_OF_BOARD_SETUP
>  	/* Call the board-specific fixup routine */
> -	else if (argv[1][0] == 'b')
> +	else if ((argv[1][0] == 'b') && (argv[1][1] == 'o') &&
> +		   (argv[1][2] == 'a'))
>  		ft_board_setup(fdt, gd->bd);
>  #endif

strncmp() would be clearer...

-Scott




More information about the U-Boot mailing list