From mboxrd@z Thu Jan 1 00:00:00 1970 From: Pali =?utf-8?q?Roh=C3=A1r?= Date: Thu, 4 Apr 2013 23:26:30 +0200 Subject: [U-Boot] [PATCH] CRITICAL error in v2013.04-rc2 (true and false not working) In-Reply-To: <515DEED2.90908@freescale.com> References: <201304041946.55455@pali> <201304042319.39473@pali> <515DEED2.90908@freescale.com> Message-ID: <201304042326.31013@pali> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Thursday 04 April 2013 23:21:22 York Sun wrote: > On 04/04/2013 02:19 PM, Pali Roh?r wrote: > > On Thursday 04 April 2013 23:05:18 York Sun wrote: > >> On 04/04/2013 01:33 PM, Wolfgang Denk wrote: > >>> Dear Pali Roh?r, > >>> > >>> In message <201304041946.55455@pali> you wrote: > >>>> u-boot "true" and "false" hush commands are copiled > >>>> incorrectly in uboot v2013.04-rc2 > >>>> (c8142633e169665b246352918df5b76fd243bb71) > >>>> > >>>> when I run help in u-boot it show: > >>>> > >>>> # help > >>>> 0 - do nothing, unsuccessfully > >>>> 1 - do nothing, successfully > >>>> ? - alias for 'help' > >>>> base - print or set address offset > >>>> ... > >>>> > >>>> Instead "0" and "1" there should be "false" and "true" > >>>> command. > >>> > >>> I confirm the problem. > >>> > >>> York, your commit 472d546 "Consolidate bool type" is > >>> causing this issue, so I suggest you send a fix, please. > >>> > >>> Please check for other, similar use cases. > >> > >> I found the cause but I don't know the best fix. Please > >> help. > >> > >> This is cause by common/cmd_test.c. It has command "true" > >> and "false". Shall I undef true and false before the > >> U_BOOT_CMD in this file, or use True and False as the > >> names? If there is a better way to do that, please > >> enlighten me. > >> > >> York > > > > If you rename commands "true" and "false" to "True" and > > "False" you will break all code which using it. Now RX-51 > > board do not booting due to missing "true" and "false" > > commands... > > Would this fix be acceptable? > > diff --git a/common/cmd_test.c b/common/cmd_test.c > index d4ec186..2ce3d3d 100644 > --- a/common/cmd_test.c > +++ b/common/cmd_test.c > @@ -155,6 +155,10 @@ static int do_false(cmd_tbl_t *cmdtp, int > flag, int argc, char * const argv[]) > return 1; > } > > +#ifdef true > +#undef true > +#undef false > + > U_BOOT_CMD( > false, CONFIG_SYS_MAXARGS, 1, do_false, > "do nothing, unsuccessfully", > @@ -171,3 +175,5 @@ U_BOOT_CMD( > "do nothing, successfully", > NULL > ); > + > +#endif > > York I already proposed patch in first email: http://lists.denx.de/pipermail/u-boot/2013-April/151009.html Adding #undef true and #undef false fixing this problem. -- Pali Roh?r pali.rohar at gmail.com -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 198 bytes Desc: This is a digitally signed message part. URL: