Re: [PATCH] add exec -a support (preliminary)

2017-01-31 Thread James Bowlin
On Wed, Feb 01, 2017 at 07:30 AM, Denys Vlasenko said: > It can be reasonably easily implemented, but I have hard time > imagining why would you need it in real-world usage. > > Usually when people ask for something I assume they do need it > (and can imagine some scenarios). In this case, I don't

Re: [PATCH] add exec -a support (preliminary)

2017-01-31 Thread Denys Vlasenko
On Fri, Jan 27, 2017 at 12:56 AM, Patrick Pief wrote: > There were several times where I thought that having "exec -a" in busybox > would > be neat, and while "exec -a" is not POSIX it is still supported in a lot of > shells (see http://unix.stackexchange.com/q/250681/117599 ). It can be reasona

[PATCH] cmdline module options can be disabled on "big" modutils

2017-01-31 Thread Kang-Che Sung
Allow module options on command line to be disabled on "big" modutils. Config FEATURE_MODPROBE_SMALL_OPTIONS_ON_CMDLINE is renamed to FEATURE_CMDLINE_MODULE_OPTIONS and no longer depends on !MODPROBE_SMALL (I'm not sure if disabling this is useful on "big" modutils, but at least the macro can ser

Re: [PATCH] modutils: remove redundant "select PLATFORM_LINUX" configs

2017-01-31 Thread Denys Vlasenko
applied, thanks On Tue, Jan 31, 2017 at 6:17 PM, Kang-Che Sung wrote: > It is enough to have only applets' configs select PLATFORM_LINUX. > > Signed-off-by: Kang-Che Sung > --- > modutils/Config.src | 11 --- > modutils/lsmod.c| 1 - > modutils/modprobe.c | 1 - > 3 files changed,

Re: modprobe (small vs big) behavior inconsistency

2017-01-31 Thread Denys Vlasenko
On Tue, Jan 31, 2017 at 2:53 PM, Kang-Che Sung wrote: > I just discovered an inconsistency between the two modprobe > implementations (modprobe-small and the "big" modprobe). > > It's about "checking whether module has already loaded" part. > Both implementations open and parse /proc/modules file,

Re: [PATCH] modprobe-small: move lsmod code out of modprobe_main()

2017-01-31 Thread Denys Vlasenko
applied, thanks On Tue, Jan 31, 2017 at 10:30 AM, Kang-Che Sung wrote: > Having lsmod code inside modprobe_main() makes some of the applet name > checking code awkward. Besides, this make busybox x86_64 binary a few > bytes smaller. :) > > Signed-off-by: Kang-Che Sung > > function

Re: Changes re: MODPROBE_SMALL

2017-01-31 Thread Denys Vlasenko
On Mon, Jan 30, 2017 at 10:58 PM, Olivier Brunel wrote: > Hi, > > So something changed in 1.26.1 which at first thought was a bug, but > seems it is in fact the intended behavior. Now, selecting > MODPROBE_SMALL will not result in any applet available, as one needs to > also select which applets a

Re: [PATCH] ash: improve / fix glob expansion

2017-01-31 Thread Denys Vlasenko
>> I plan to massage it into this - do you see any bugs? > Looks okay. I'm committing this version, yell if something wrong. hasmeta(const char *p) { static const char chars[] ALIGN1 = { '*', '?', '[', '\\', CTLQUOTEMARK, CTLESC, 0 }; for (;;) {

Re: [PATCH] ash: improve / fix glob expansion

2017-01-31 Thread Felix Fietkau
On 2017-01-31 21:29, Denys Vlasenko wrote: > On Sun, Jan 29, 2017 at 2:14 PM, Felix Fietkau wrote: >> When using musl libc glob() a very long string can cause glob() to fail, >> which leads to an out of memory error being raised by ash. >> >> This can happen easily if a very long quoted string con

Re: [PATCH] ash: improve / fix glob expansion

2017-01-31 Thread Denys Vlasenko
On Sun, Jan 29, 2017 at 2:14 PM, Felix Fietkau wrote: > When using musl libc glob() a very long string can cause glob() to fail, > which leads to an out of memory error being raised by ash. > > This can happen easily if a very long quoted string contains *, even > though no glob expansion should e

Re: [PATCH] ash: improve / fix glob expansion

2017-01-31 Thread Felix Fietkau
On 2017-01-31 19:42, Denys Vlasenko wrote: > On Sun, Jan 29, 2017 at 2:14 PM, Felix Fietkau wrote: >> When using musl libc glob() a very long string can cause glob() to fail, >> which leads to an out of memory error being raised by ash. > > But it works with glibc glob(), right? It works, but it'

Re: [PATCH] ash: improve / fix glob expansion

2017-01-31 Thread Denys Vlasenko
On Sun, Jan 29, 2017 at 2:14 PM, Felix Fietkau wrote: > When using musl libc glob() a very long string can cause glob() to fail, > which leads to an out of memory error being raised by ash. But it works with glibc glob(), right? So other programs will also be affected. Let's fix it in musl (at l

[PATCH] modutils: remove redundant "select PLATFORM_LINUX" configs

2017-01-31 Thread Kang-Che Sung
It is enough to have only applets' configs select PLATFORM_LINUX. Signed-off-by: Kang-Che Sung --- modutils/Config.src | 11 --- modutils/lsmod.c| 1 - modutils/modprobe.c | 1 - 3 files changed, 13 deletions(-) diff --git a/modutils/Config.src b/modutils/Config.src index 1aee57ee

Re: ifplugd shell script not working

2017-01-31 Thread Kang-Che Sung
On Tue, Jan 31, 2017 at 10:49 PM, Sriram V wrote: > 1. ifplugd is a command which accepts a shell script as an argument. > 2. if the link is up/down. It is supposed to invoke the shell script. > 3. The code does a vfork and exec (2) system call. > 4. I find that vfork is successful. However exec o

ifplugd shell script not working

2017-01-31 Thread Sriram V
Hello, 1. ifplugd is a command which accepts a shell script as an argument. 2. if the link is up/down. It is supposed to invoke the shell script. 3. The code does a vfork and exec (2) system call. 4. I find that vfork is successful. However exec on a shell script (with executable permissions does)

Re: Android Port for Busybox?

2017-01-31 Thread Sriram V
Hi Kang Che, Thats right, it was a toolchain issue. I have got a static busybox working on my system. Regards, Sriram On Tue, Jan 31, 2017 at 5:11 PM, Kang-Che Sung wrote: > On Tue, Jan 31, 2017 at 4:50 AM, Sriram V wrote: >> I am using Android kitkat. I was compiling busybox for android and

modprobe (small vs big) behavior inconsistency

2017-01-31 Thread Kang-Che Sung
I just discovered an inconsistency between the two modprobe implementations (modprobe-small and the "big" modprobe). It's about "checking whether module has already loaded" part. Both implementations open and parse /proc/modules file, however, the "small" version will read the "Live", "Loading" or

Re: Android Port for Busybox?

2017-01-31 Thread Kang-Che Sung
On Tue, Jan 31, 2017 at 4:50 AM, Sriram V wrote: > I am using Android kitkat. I was compiling busybox for android and i > get the following error when i select ifplugd. > > ifplugd.c:38:23: fatal error: linux/mii.h: No such file or directory > > I am compiling with an Android toolchain in android

[PATCH] modprobe-small: move lsmod code out of modprobe_main()

2017-01-31 Thread Kang-Che Sung
Having lsmod code inside modprobe_main() makes some of the applet name checking code awkward. Besides, this make busybox x86_64 binary a few bytes smaller. :) Signed-off-by: Kang-Che Sung function old new delta lsmod_main -