From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jerry Van Baren Date: Mon, 09 Jun 2008 14:52:49 -0400 Subject: [U-Boot-Users] [PATCH] The fdt boardsetup command criteria was not unique In-Reply-To: <20080609181624.GB2907@loki.buserror.net> References: <20080607162926.GA27072@cideas.com> <20080609181624.GB2907@loki.buserror.net> Message-ID: <484D7C01.7050606@ge.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Scott Wood wrote: > 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 Yeah, but that is the way the rest of them are. :-/ Hmmm, looking at the other command/cmd_*.c files, it looks like my parsing character-by-character is in the minority vs. strncmp(). Best regards, gvb