Re: [Bug: Busybox 1.22.1] false return 0 instead of 1 with '--help' switch.

2014-09-17 Thread Denys Vlasenko
On Tuesday 16 September 2014 20:53, Joshua Judson Rosen wrote: On 2014-09-05 12:26, Ralf Friedl wrote: Xabier Oneca -- xOneca wrote: Hello again, 2014-09-05 18:19 GMT+02:00 Xabier Oneca -- xOneca xon...@gmail.com: Hello list, I want to highlight what GNU coreutils' help docs (info

Re: [Bug: Busybox 1.22.1] false return 0 instead of 1 with '--help' switch.

2014-09-16 Thread Joshua Judson Rosen
On 2014-09-05 12:26, Ralf Friedl wrote: Xabier Oneca -- xOneca wrote: Hello again, 2014-09-05 18:19 GMT+02:00 Xabier Oneca -- xOneca xon...@gmail.com: Hello list, I want to highlight what GNU coreutils' help docs (info coreutils 'false invocation') says about false when invoked with

Re: [Bug: Busybox 1.22.1] false return 0 instead of 1 with '--help' switch.

2014-09-05 Thread Xabier Oneca -- xOneca
Hello list, I want to highlight what GNU coreutils' help docs (info coreutils 'false invocation') says about false when invoked with --help: Note that `false' (unlike all other programs documented herein) exits unsuccessfully, even when invoked with `--help' or `--version'. I think Busybox

Re: [Bug: Busybox 1.22.1] false return 0 instead of 1 with '--help' switch.

2014-09-05 Thread Xabier Oneca -- xOneca
Hello again, 2014-09-05 18:19 GMT+02:00 Xabier Oneca -- xOneca xon...@gmail.com: Hello list, I want to highlight what GNU coreutils' help docs (info coreutils 'false invocation') says about false when invoked with --help: Note that `false' (unlike all other programs documented herein)

Re: [Bug: Busybox 1.22.1] false return 0 instead of 1 with '--help' switch.

2014-09-05 Thread Ralf Friedl
Xabier Oneca -- xOneca wrote: Hello again, 2014-09-05 18:19 GMT+02:00 Xabier Oneca -- xOneca xon...@gmail.com: Hello list, I want to highlight what GNU coreutils' help docs (info coreutils 'false invocation') says about false when invoked with --help: Note that `false' (unlike all other

Re: [Bug: Busybox 1.22.1] false return 0 instead of 1 with '--help' switch.

2014-09-05 Thread Joshua Judson Rosen
i.e.: GNU false --help `fails', just like in POSIX and in Busybox's `other false' (the builtin false/falsecmd() in ash). So can we just fix it? What did you think of the patch that I sent? On 2014-09-03 11:13, Denys Vlasenko wrote: $ /bin/false --version false (GNU coreutils) 8.7 ... $

Re: [Bug: Busybox 1.22.1] false return 0 instead of 1 with '--help' switch.

2014-09-05 Thread Xabier Oneca -- xOneca
Hello Ralf, El 05/09/2014 18:26, Ralf Friedl ralf.fri...@online.de escribió: Xabier Oneca -- xOneca wrote: Hello again, 2014-09-05 18:19 GMT+02:00 Xabier Oneca -- xOneca xon...@gmail.com: Hello list, I want to highlight what GNU coreutils' help docs (info coreutils 'false

Re: [Bug: Busybox 1.22.1] false return 0 instead of 1 with '--help' switch.

2014-09-05 Thread Ralf Friedl
Xabier Oneca -- xOneca wrote: And I want to add that --help will only be used ever in an interactive shell by a person, so the return value may be dispensable. (i.e. doesn't mind to the user how does --help return as soon as the help text is printed in screen) Actually this is the

Re: [Bug: Busybox 1.22.1] false return 0 instead of 1 with '--help' switch.

2014-09-03 Thread Denys Vlasenko
$ /bin/false --version false (GNU coreutils) 8.7 ... $ /bin/false --help; echo $? Usage: /bin/false [ignored command line arguments] or: /bin/false OPTION Exit with a status code indicating failure. --help display this help and exit --version output version information and

Re: [OpenWrt-Devel] [Bug: Busybox 1.22.1] false return 0 instead of 1 with '--help' switch.

2014-09-02 Thread Alive4Ever
On Friday, August 29, 2014 02:08:56 PM Bastian Bittorf wrote: * Alive4ever alive4e...@live.com [29.08.2014 14:03]: I'm using an embedded system with busybox v1.22.1, running Openwrt Chaos Chalmer r42321, mips24k AR9330 When I call 'busybox false --help', the return status is zero. I

Re: [Bug: Busybox 1.22.1] false return 0 instead of 1 with '--help' switch.

2014-09-02 Thread Joshua Judson Rosen
On 2014-09-01 09:50, Harald Becker wrote: IMO to display the usage information with --help is a successful execution and shall return 0 as other commands does, but I see the problem when the return value of false may be tricked by giving the --help parameter ... as this compatibility with GNU

Re: [Bug: Busybox 1.22.1] false return 0 instead of 1 with '--help' switch.

2014-09-02 Thread Harald Becker
Hi Joshua ! It's also interesting that busybox false --help behaves completely differently depending on whether it's invoked from within a busybox shell or not: This is wrong! You called different versions, not Busybox false. * invoking false as an ash builtin bypasses the --help

Re: [Bug: Busybox 1.22.1] false return 0 instead of 1 with '--help' switch.

2014-09-02 Thread Joshua Judson Rosen
On 2014-09-02 14:22, Harald Becker wrote: Hi Joshua ! It's also interesting that busybox false --help behaves completely differently depending on whether it's invoked from within a busybox shell or not: This is wrong! Hi Harald-- It might be wrong, but it's nonetheless true and not a

AW: [Bug: Busybox 1.22.1] false return 0 instead of 1 with '--help' switch.

2014-09-01 Thread dietmar.schindler
Von: Laurent Bercot Gesendet: Samstag, 30. August 2014 11:38 POSIX does not specify anything about --help. It's a GNU extension, like every long option. For true or false, POSIX does not specify any option at all: http://pubs.opengroup.org/onlinepubs/9699919799/utilities/false.html

Re: AW: [Bug: Busybox 1.22.1] false return 0 instead of 1 with '--help' switch.

2014-09-01 Thread Laurent Bercot
On 01/09/2014 09:20, dietmar.schind...@manroland-web.com wrote: That does not follow. http://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap01.html#tag_17_04 talks in the OPTIONS section about arbitrary options that the implementation may provide as an extension (as --help is) and

Re: [Bug: Busybox 1.22.1] false return 0 instead of 1 with '--help' switch.

2014-09-01 Thread Bastian Bittorf
* Laurent Bercot ska-dietl...@skarnet.org [01.09.2014 12:36]: Note the always, which is not necessary, but serves to drive the point home. I maintain that false is NEVER allowed to return 0, --help or not. i agree. the discussion is a little but driving away IMHO, because: (i wrote already)

AW: AW: [Bug: Busybox 1.22.1] false return 0 instead of 1 with '--help' switch.

2014-09-01 Thread dietmar.schindler
Von: Laurent Bercot Gesendet: Montag, 1. September 2014 10:49 On 01/09/2014 09:20, dietmar.schind...@manroland-web.com wrote: That does not follow. http://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap01.html#tag_17_04 talks in the OPTIONS section about arbitrary options

Re: [Bug: Busybox 1.22.1] false return 0 instead of 1 with '--help' switch.

2014-09-01 Thread tito
On Monday 01 September 2014 12:40:06 Bastian Bittorf wrote: * Laurent Bercot ska-dietl...@skarnet.org [01.09.2014 12:36]: Note the always, which is not necessary, but serves to drive the point home. I maintain that false is NEVER allowed to return 0, --help or not. i agree. the

Re: [Bug: Busybox 1.22.1] false return 0 instead of 1 with '--help' switch.

2014-09-01 Thread Harald Becker
root at box:~ busybox false --help BusyBox v1.22.1 (2014-08-28 18:55:30 EDT) multi-call binary. Usage: false Return an exit code of FALSE (1) root at box:~ echo $? 0 root at box:~ false --help root at box:~ echo $? 1 This shows me, your false is not same as Busybox internal false. You are

Re: [Bug: Busybox 1.22.1] false return 0 instead of 1 with '--help' switch.

2014-09-01 Thread Bastian Bittorf
* Harald Becker ra...@gmx.de [01.09.2014 14:38]: This shows me, your false is not same as Busybox internal false. You are probably using a different false executable, script or alias. Try which false and ls -al WHAT_YOU_GET_FROM_WHICH. seems to be this busybox one 8-): root@luxusAsus:~

Re: [Bug: Busybox 1.22.1] false return 0 instead of 1 with '--help' switch.

2014-09-01 Thread Harald Becker
seems to be this busybox one 8-): How can that be? root@luxusAsus:~ which false /bin/false root@luxusAsus:~ which busybox /bin/busybox root@luxusAsus:~ ls -la /bin/false lrwxrwxrwx1 root root 7 Aug 29 16:06 /bin/false - busybox Ok! root@luxusAsus:~ false --help

Re: [Bug: Busybox 1.22.1] false return 0 instead of 1 with '--help' switch.

2014-09-01 Thread Bastian Bittorf
* Harald Becker ra...@gmx.de [01.09.2014 15:27]: How can that be, if both false are Busybox? Please try: /bin/false --help; echo $? Also you may have a look at your aliases? thanks for digging into this, here it is: root@luxusAsus:~ alias lr='logread' myssh='echo executing: ssh -i

Re: [Bug: Busybox 1.22.1] false return 0 instead of 1 with '--help' switch.

2014-09-01 Thread Harald Becker
root@luxusAsus:~ type false false is a shell builtin Ohps! # thats an explanation! 8-) Indeed! :-) ... but this tells nothing about which return code false --help shall give. IMO to display the usage information with --help is a successful execution and shall return 0 as other

[Bug: Busybox 1.22.1] false return 0 instead of 1 with '--help' switch.

2014-08-30 Thread Alive4ever
I'm using an embedded system with busybox v1.22.1, running Openwrt Chaos Chalmer r42321, mips24k AR9330 When I call 'busybox false --help', the return status is zero. I think it has nothing todo with openwrt, because it's the output of busybox, not the problem on openwrt performance. I feel

Re: [Bug: Busybox 1.22.1] false return 0 instead of 1 with '--help' switch.

2014-08-30 Thread walter harms
Am 30.08.2014 09:45, schrieb Alive4ever: I'm using an embedded system with busybox v1.22.1, running Openwrt Chaos Chalmer r42321, mips24k AR9330 When I call 'busybox false --help', the return status is zero. I think it has nothing todo with openwrt, because it's the output of busybox,

Re: [Bug: Busybox 1.22.1] false return 0 instead of 1 with '--help' switch.

2014-08-30 Thread Laurent Bercot
On 30/08/2014 10:33, walter harms wrote: Does POSIX specify anyhing about that --help ? POSIX does not specify anything about --help. It's a GNU extension, like every long option. For true or false, POSIX does not specify any option at all:

Re: [Bug: Busybox 1.22.1] false return 0 instead of 1 with '--help' switch.

2014-08-30 Thread walter harms
Am 30.08.2014 11:38, schrieb Laurent Bercot: On 30/08/2014 10:33, walter harms wrote: Does POSIX specify anyhing about that --help ? POSIX does not specify anything about --help. It's a GNU extension, like every long option. For true or false, POSIX does not specify any option at all:

Re: [Bug: Busybox 1.22.1] false return 0 instead of 1 with '--help' switch.

2014-08-30 Thread Laurent Bercot
The question is would it break something if --help would return EXIT_FAILURE everytime ? Well the usual GNU --help behaviour is to return EXIT_SUCCESS after displaying the help. false is the exception, not the rule, and should be specialcased in busybox as it is in GNU coreutils. My opinion

Re: [Bug: Busybox 1.22.1] false return 0 instead of 1 with '--help' switch.

2014-08-30 Thread tito
On Saturday 30 August 2014 13:02:50 Laurent Bercot wrote: The question is would it break something if --help would return EXIT_FAILURE everytime ? Well the usual GNU --help behaviour is to return EXIT_SUCCESS after displaying the help. false is the exception, not the rule, and should

Re: [OpenWrt-Devel] [Bug: Busybox 1.22.1] false return 0 instead of 1 with '--help' switch.

2014-08-30 Thread Bastian Bittorf
* Alive4ever alive4e...@live.com [29.08.2014 14:03]: I'm using an embedded system with busybox v1.22.1, running Openwrt Chaos Chalmer r42321, mips24k AR9330 When I call 'busybox false --help', the return status is zero. I think it has nothing todo with openwrt, because it's the output of