public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [PATCH] CRITICAL error in v2013.04-rc2 (true and false not working)
@ 2013-04-04 17:46 Pali Rohár
  2013-04-04 20:33 ` Wolfgang Denk
  0 siblings, 1 reply; 13+ messages in thread
From: Pali Rohár @ 2013-04-04 17:46 UTC (permalink / raw)
  To: u-boot

Hello,

with this version of gcc which is default in ubuntu 12.10:

$ arm-linux-gnueabi-gcc -v
Using built-in specs.
COLLECT_GCC=arm-linux-gnueabi-gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/arm-linux-gnueabi/4.7/lto-wrapper
Target: arm-linux-gnueabi
Configured with: ../src/configure -v --with-pkgversion='Ubuntu/Linaro 4.7.2-1ubuntu1' --with-
bugurl=file:///usr/share/doc/gcc-4.7/README.Bugs --enable-languages=c,c++,go,fortran,objc,obj-c++ --prefix=/usr --program-
suffix=-4.7 --enable-shared --enable-linker-build-id --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-
threads=posix --with-gxx-include-dir=/usr/arm-linux-gnueabi/include/c++/4.7.2 --libdir=/usr/lib --enable-nls --enable-
clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --enable-gnu-unique-object --disable-libitm --enable-plugin 
--enable-objc-gc --enable-multilib --disable-sjlj-exceptions --with-arch=armv5t --with-float=soft --disable-werror --enable-
checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=arm-linux-gnueabi --program-prefix=arm-linux-
gnueabi- --includedir=/usr/arm-linux-gnueabi/include --with-headers=/usr/arm-linux-gnueabi/include --with-libs=/usr/arm-linux-
gnueabi/lib
Thread model: posix
gcc version 4.7.2 (Ubuntu/Linaro 4.7.2-1ubuntu1)

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.

This happen when stdbool.h from C99 compiler is included in cmd_test.c and then true and false macros are expanded to 1 and 
0. Quick fix for this is adding #undef before U_BOOT_CMD:

diff --git a/common/cmd_test.c b/common/cmd_test.c
index d4ec186..a7ec8ac 100644
--- a/common/cmd_test.c
+++ b/common/cmd_test.c
@@ -155,6 +155,7 @@ static int do_false(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
 	return 1;
 }
 
+#undef false
 U_BOOT_CMD(
 	false,	CONFIG_SYS_MAXARGS,	1,	do_false,
 	"do nothing, unsuccessfully",
@@ -166,6 +167,7 @@ static int do_true(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
 	return 0;
 }
 
+#undef true
 U_BOOT_CMD(
 	true,	CONFIG_SYS_MAXARGS,	1,	do_true,
 	"do nothing, successfully",

Without above patch and with gcc 4.7.2 it is not possible to use u-boot on Nokia RX-51, becuase it has true and false commands 
in preboot env.

Please fix this problem in u-boot v2013.04.

-- 
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: <http://lists.denx.de/pipermail/u-boot/attachments/20130404/db5ec94e/attachment.pgp>

^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [U-Boot] [PATCH] CRITICAL error in v2013.04-rc2 (true and false not working)
  2013-04-04 17:46 [U-Boot] [PATCH] CRITICAL error in v2013.04-rc2 (true and false not working) Pali Rohár
@ 2013-04-04 20:33 ` Wolfgang Denk
  2013-04-04 20:34   ` York Sun
  2013-04-04 21:05   ` York Sun
  0 siblings, 2 replies; 13+ messages in thread
From: Wolfgang Denk @ 2013-04-04 20:33 UTC (permalink / raw)
  To: u-boot

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.

Thanks.
 

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Generally speaking, there are other ways to accomplish whatever it is
that you think you need ...                               - Doug Gwyn

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [U-Boot] [PATCH] CRITICAL error in v2013.04-rc2 (true and false not working)
  2013-04-04 20:33 ` Wolfgang Denk
@ 2013-04-04 20:34   ` York Sun
  2013-04-04 21:05   ` York Sun
  1 sibling, 0 replies; 13+ messages in thread
From: York Sun @ 2013-04-04 20:34 UTC (permalink / raw)
  To: u-boot

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.
> 
> Thanks.

Thanks for catching it. I am working on the fix now.

York

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [U-Boot] [PATCH] CRITICAL error in v2013.04-rc2 (true and false not working)
  2013-04-04 20:33 ` Wolfgang Denk
  2013-04-04 20:34   ` York Sun
@ 2013-04-04 21:05   ` York Sun
  2013-04-04 21:19     ` Pali Rohár
  2013-04-04 21:37     ` Tom Rini
  1 sibling, 2 replies; 13+ messages in thread
From: York Sun @ 2013-04-04 21:05 UTC (permalink / raw)
  To: u-boot

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

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [U-Boot] [PATCH] CRITICAL error in v2013.04-rc2 (true and false not working)
  2013-04-04 21:05   ` York Sun
@ 2013-04-04 21:19     ` Pali Rohár
  2013-04-04 21:21       ` York Sun
  2013-04-04 21:37     ` Tom Rini
  1 sibling, 1 reply; 13+ messages in thread
From: Pali Rohár @ 2013-04-04 21:19 UTC (permalink / raw)
  To: u-boot

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...

-- 
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: <http://lists.denx.de/pipermail/u-boot/attachments/20130404/c3b3b8e6/attachment-0001.pgp>

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [U-Boot] [PATCH] CRITICAL error in v2013.04-rc2 (true and false not working)
  2013-04-04 21:19     ` Pali Rohár
@ 2013-04-04 21:21       ` York Sun
  2013-04-04 21:26         ` Pali Rohár
  2013-04-04 21:47         ` Wolfgang Denk
  0 siblings, 2 replies; 13+ messages in thread
From: York Sun @ 2013-04-04 21:21 UTC (permalink / raw)
  To: u-boot

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

^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [U-Boot] [PATCH] CRITICAL error in v2013.04-rc2 (true and false not working)
  2013-04-04 21:21       ` York Sun
@ 2013-04-04 21:26         ` Pali Rohár
  2013-04-04 21:31           ` York Sun
  2013-04-04 21:47         ` Wolfgang Denk
  1 sibling, 1 reply; 13+ messages in thread
From: Pali Rohár @ 2013-04-04 21:26 UTC (permalink / raw)
  To: u-boot

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: <http://lists.denx.de/pipermail/u-boot/attachments/20130404/4d23e139/attachment.pgp>

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [U-Boot] [PATCH] CRITICAL error in v2013.04-rc2 (true and false not working)
  2013-04-04 21:26         ` Pali Rohár
@ 2013-04-04 21:31           ` York Sun
  2013-04-04 21:50             ` Wolfgang Denk
  0 siblings, 1 reply; 13+ messages in thread
From: York Sun @ 2013-04-04 21:31 UTC (permalink / raw)
  To: u-boot

On 04/04/2013 02:26 PM, Pali Roh?r wrote:
> 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.
> 

Thanks, Pali.

Wolfgang, shall we change U_BOOT_CMD to take string instead of
stringifying or use the local undef?

York

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [U-Boot] [PATCH] CRITICAL error in v2013.04-rc2 (true and false not working)
  2013-04-04 21:05   ` York Sun
  2013-04-04 21:19     ` Pali Rohár
@ 2013-04-04 21:37     ` Tom Rini
  1 sibling, 0 replies; 13+ messages in thread
From: Tom Rini @ 2013-04-04 21:37 UTC (permalink / raw)
  To: u-boot

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 04/04/2013 05:05 PM, 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.

The problem is with how U_BOOT_CMD is constructed.  We pass in the
command name as the first arg, but don't stringify it until some
levels later.  I can't think of a better work-around than #define
_STDBOOL_H at the top, with a big fat comment.

- -- 
Tom
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQIcBAEBAgAGBQJRXfKZAAoJENk4IS6UOR1Wn2oP/RpQll6j7FanZr5ClwgFwerX
2ESvlkoGmrhlz5lFzk2IPXl8ZGsSVjVFdjkbPZgcXzHcYTGFNi/+wCCALp0GD7D5
G3JVQFeYPEB+3/C+d98jcsex/8wGNPdQXZI6oYhH1yXyXrbhQdVij/ieX/aTYepG
iOb9hXwf2P80uNwnnoVN6b9QEfy09hWcgpv0cnfREOykRv0cEq0Ybj7PioGxiXuh
RtdVK2o3K0Zw4ruLq7FNUL5vF6AUPOrqDbtlC0Hd3n0shfqEWlAjbQLvBJougLba
HHvCCQe/nr6o88vJ+SCGwWIZ/xHTQf/zX064pWGCpMQKKOZEP6/pR97EL9s6Jga1
2Hb795bBeCZYuKFJhcmmIQqJ+5uCqbWBXGMoSlrZim5rWmAteYGCtBXuY2iqVbbY
KJ+PO1C9vZJM3FiY0+4ctNrETTyzXyDb9k0umiZUviZBwTJX2ll2pvg/f7/7hdL/
HfAc+FiiyV3NwgL1eT0BduEfT0PyIsswFqKGbK3dTs/6d53E6Dr0S0I4OGHBT2up
1StlfuFw2jEfwNiPHnXJoYyDjjxkDP78Jb35WJB22WeNH73Zj1TtRTYA1Wagvzqs
7yE8iaUI7g2hyBk9XW8xqoHE4ziPUCvXQfunxd7C2Xy7mTyKYKXKwDWIpwj+MKmr
DNezPxxDIQSjDryhUfEg
=vWhK
-----END PGP SIGNATURE-----

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [U-Boot] [PATCH] CRITICAL error in v2013.04-rc2 (true and false not working)
  2013-04-04 21:21       ` York Sun
  2013-04-04 21:26         ` Pali Rohár
@ 2013-04-04 21:47         ` Wolfgang Denk
  2013-04-04 21:48           ` York Sun
  1 sibling, 1 reply; 13+ messages in thread
From: Wolfgang Denk @ 2013-04-04 21:47 UTC (permalink / raw)
  To: u-boot

Dear York Sun,

In message <515DEED2.90908@freescale.com> you wrote:
>
> Would this fix be acceptable?

No...

> +#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

... as it would completely remove the command entries if "true" was
not defined.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
A right is not what someone gives you; it's what no one can take from
you.                                                   - Ramsey Clark

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [U-Boot] [PATCH] CRITICAL error in v2013.04-rc2 (true and false not working)
  2013-04-04 21:47         ` Wolfgang Denk
@ 2013-04-04 21:48           ` York Sun
  0 siblings, 0 replies; 13+ messages in thread
From: York Sun @ 2013-04-04 21:48 UTC (permalink / raw)
  To: u-boot

On 04/04/2013 02:47 PM, Wolfgang Denk wrote:
> Dear York Sun,
> 
> In message <515DEED2.90908@freescale.com> you wrote:
>>
>> Would this fix be acceptable?
> 
> No...
> 
>> +#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
> 
> ... as it would completely remove the command entries if "true" was
> not defined.
> 

Right. I will go with Tom's suggestion.

York

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [U-Boot] [PATCH] CRITICAL error in v2013.04-rc2 (true and false not working)
  2013-04-04 21:31           ` York Sun
@ 2013-04-04 21:50             ` Wolfgang Denk
  2013-04-04 21:58               ` York Sun
  0 siblings, 1 reply; 13+ messages in thread
From: Wolfgang Denk @ 2013-04-04 21:50 UTC (permalink / raw)
  To: u-boot

Dear York,

In message <515DF125.8060106@freescale.com> you wrote:
>
> Wolfgang, shall we change U_BOOT_CMD to take string instead of
> stringifying or use the local undef?

I tend to prefer Pali Rohar's fix.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Ernest asks Frank how long he has been working for the company.
        "Ever since they threatened to fire me."

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [U-Boot] [PATCH] CRITICAL error in v2013.04-rc2 (true and false not working)
  2013-04-04 21:50             ` Wolfgang Denk
@ 2013-04-04 21:58               ` York Sun
  0 siblings, 0 replies; 13+ messages in thread
From: York Sun @ 2013-04-04 21:58 UTC (permalink / raw)
  To: u-boot

On 04/04/2013 02:50 PM, Wolfgang Denk wrote:
> Dear York,
> 
> In message <515DF125.8060106@freescale.com> you wrote:
>>
>> Wolfgang, shall we change U_BOOT_CMD to take string instead of
>> stringifying or use the local undef?
> 
> I tend to prefer Pali Rohar's fix.
> 

I sent out two fixes. No strong feeling of either one.

York

^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2013-04-04 21:58 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-04-04 17:46 [U-Boot] [PATCH] CRITICAL error in v2013.04-rc2 (true and false not working) Pali Rohár
2013-04-04 20:33 ` Wolfgang Denk
2013-04-04 20:34   ` York Sun
2013-04-04 21:05   ` York Sun
2013-04-04 21:19     ` Pali Rohár
2013-04-04 21:21       ` York Sun
2013-04-04 21:26         ` Pali Rohár
2013-04-04 21:31           ` York Sun
2013-04-04 21:50             ` Wolfgang Denk
2013-04-04 21:58               ` York Sun
2013-04-04 21:47         ` Wolfgang Denk
2013-04-04 21:48           ` York Sun
2013-04-04 21:37     ` Tom Rini

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox