[PATCH] make_single_applets: fix ": $((fail++))" expansion error

2017-07-14 Thread Kang-Che Sung
$((fail++)) is not a required expression in POSIX, and in "dash" it could produce an error like this: ./make_single_applets.sh: 61: arithmetic expression: expecting primary: "fail++" Replace this with something portable: fail=$((fail+1)) would work. Signed-off-by: Kang-Che Sung

[PATCH 2/2] arch/{sparc,sparc64}/Makefile: define ARCH_FPIC

2017-07-14 Thread Thomas Petazzoni
Building Busybox on SPARC or SPARC64 with CONFIG_BUILD_LIBBUSYBOX=y currently fails with: miscutils/lib.a(i2c_tools.o): In function `i2c_dev_open': i2c_tools.c:(.text.i2c_dev_open+0x14): relocation truncated to fit: R_SPARC_GOT13 against `.LC0' i2c_tools.c:(.text.i2c_dev_open+0x38): relocation

[PATCH 1/2] Makefile: include per-arch Makefile before Makefile.flags

2017-07-14 Thread Thomas Petazzoni
Makefile.flags contains: ARCH_FPIC ?= -fpic ARCH_FPIE ?= -fpie However, arch/$(ARCH)/Makefile gets included *after* Makefile.flags, and therefore doesn't get the chance to provide its own value. Fix this by including arch/$(ARCH)/Makefile *before* Makefile.flags. Signed-off-by: Thomas

[PATCH v2 0/2] (Re-)instate some build guards

2017-07-14 Thread Johannes Schindelin
It would appear that some compile-time flags are used as if they were runtime flags, i.e. they are used in if (...) constructs, not in `#if ... #endif` guards. The effect *should* be the same, except when switching off optimization (e.g. for debugging) where dead code is not removed, possibly

[PATCH v2 1/2] copyfd: reinstate proper guard around munmap()

2017-07-14 Thread Johannes Schindelin
In 4c1392296 (Introduce FEATURE_COPYBUF_KB, 2007-12-02), a feature was introduced where a large stack was allocated via mmap(), and consequently released via munmap(). Since this is overkill for small stacks, the mmap()/munmap() code was guarded inside an #if CONFIG_FEATURE_COPYBUF_KB > 4 ...

[PATCH v2 2/2] ash: use JOBS as the compile time option it actually is

2017-07-14 Thread Johannes Schindelin
Using the constant in a regular `if (...)` pretends that this is anything but a compile time option. Let's use `#if JOBS` instead, making it *much* clearer what `JOBS` actually is. Incidentally, this change fixes the build in setups where there are no headers defining WIFSTOPPED and WSTOPSIG

Re: [PATCH 1/3] copyfd: reinstate proper guard around munmap()

2017-07-14 Thread Johannes Schindelin
Hi Denys, On Fri, 14 Jul 2017, Denys Vlasenko wrote: > On Fri, Jul 14, 2017 at 4:11 PM, Johannes Schindelin > wrote: > > In 4c1392296 (Introduce FEATURE_COPYBUF_KB, 2007-12-02), a feature was > > introduced where a large stack was allocated via mmap(), and > >

Re: [PATCH 3/3] ash: use JOBS as the compile time option it actually is

2017-07-14 Thread Johannes Schindelin
Hi Denys, On Fri, 14 Jul 2017, Denys Vlasenko wrote: > On Fri, Jul 14, 2017 at 4:11 PM, Johannes Schindelin > wrote: > > Using the constant in a regular `if (...)` pretends that this is > > anything but a compile time option. Let's use `#if JOBS` instead, > > making

Re: [PATCH 3/3] ash: use JOBS as the compile time option it actually is

2017-07-14 Thread Johannes Schindelin
Hi Xabier, On Fri, 14 Jul 2017, Xabier Oneca -- xOneca wrote: > 2017-07-14 16:11 GMT+02:00 Johannes Schindelin : > > @@ -4182,7 +4186,9 @@ dowait(int block, struct job *job) > > goto out; > > } > > /* The process wasn't found in job

multipathd?

2017-07-14 Thread Michael Di Domenico
does anyone know if it's possible to run multipathd under busybox? i suspect this is a fools errand given that multipath is a redhat project, which then ties it with udev which then ties it with systemd. i tried just grabbing the multipath binaries from rhel7 and plugging them into my initrd

Re: [PATCH 2/3] inet_common: handle FEATURE_ETC_NETWORKS as a compile-time flag

2017-07-14 Thread Denys Vlasenko
On Fri, Jul 14, 2017 at 4:11 PM, Johannes Schindelin wrote: > This flag is used in #if ... #endif guards elsewhere and there is no > good reason to pretend that it is a runtime flag in just one case. > > This probably was an oversight in a61cb92f2 (make /etc/network

Re: [PATCH 1/3] copyfd: reinstate proper guard around munmap()

2017-07-14 Thread Denys Vlasenko
On Fri, Jul 14, 2017 at 4:11 PM, Johannes Schindelin wrote: > In 4c1392296 (Introduce FEATURE_COPYBUF_KB, 2007-12-02), a feature was > introduced where a large stack was allocated via mmap(), and > consequently released via munmap(). Since this is overkill for small >

Re: [PATCH 3/3] ash: use JOBS as the compile time option it actually is

2017-07-14 Thread Denys Vlasenko
On Fri, Jul 14, 2017 at 4:11 PM, Johannes Schindelin wrote: > Using the constant in a regular `if (...)` pretends that this is > anything but a compile time option. Let's use `#if JOBS` instead, > making it *much* clearer what `JOBS` actually is. > > Incidentally, this

Re: [PATCH 3/3] ash: use JOBS as the compile time option it actually is

2017-07-14 Thread Xabier Oneca -- xOneca
Hello Johannes, 2017-07-14 16:11 GMT+02:00 Johannes Schindelin : > Using the constant in a regular `if (...)` pretends that this is > anything but a compile time option. Let's use `#if JOBS` instead, > making it *much* clearer what `JOBS` actually is. > > Incidentally,

Re: move files using find

2017-07-14 Thread David Henderson
Nevermind. I ended up figuring it out. Granted it's not for BB, but just as a follow-up if anyone comes across this thread they will have what I came up with: find /tmp/test -type f \( -name \*.typelib -o -name \*.gir \) -exec /bin/sh -c 'TEMP="${1#*/}"; mkdir -p "${0}/${TEMP%/*}" 2>/dev/null;

[PATCH 1/3] copyfd: reinstate proper guard around munmap()

2017-07-14 Thread Johannes Schindelin
In 4c1392296 (Introduce FEATURE_COPYBUF_KB, 2007-12-02), a feature was introduced where a large stack was allocated via mmap(), and consequently released via munmap(). Since this is overkill for small stacks, the mmap()/munmap() code was guarded inside an #if CONFIG_FEATURE_COPYBUF_KB > 4 ...

[PATCH 3/3] ash: use JOBS as the compile time option it actually is

2017-07-14 Thread Johannes Schindelin
Using the constant in a regular `if (...)` pretends that this is anything but a compile time option. Let's use `#if JOBS` instead, making it *much* clearer what `JOBS` actually is. Incidentally, this change fixes the build in setups where there are no headers defining WIFSTOPPED and WSTOPSIG

[PATCH 2/3] inet_common: handle FEATURE_ETC_NETWORKS as a compile-time flag

2017-07-14 Thread Johannes Schindelin
This flag is used in #if ... #endif guards elsewhere and there is no good reason to pretend that it is a runtime flag in just one case. This probably was an oversight in a61cb92f2 (make /etc/network parsing configurable. -200 bytes when off., 2007-06-19). Besides, it fixes a compile problem on

[PATCH 0/3] (Re-)instate some build guards

2017-07-14 Thread Johannes Schindelin
It would appear that some compile-time flags are used as if they were runtime flags, i.e. they are used in if (...) constructs, not in `#if ... #endif` guards. The effect *should* be the same, except when switching off optimization (e.g. for debugging) where dead code is not removed, possibly

Re: move files using find

2017-07-14 Thread David Henderson
Oops! It does appear that I was using GNU find, not BB. Sorry about that. Any thoughts on how this can be done without execdir then using BB find? Thanks, Dave On 7/14/17, Denys Vlasenko wrote: > On Thu, Jul 13, 2017 at 11:52 PM, David Henderson >

Re: move files using find

2017-07-14 Thread Denys Vlasenko
On Thu, Jul 13, 2017 at 11:52 PM, David Henderson wrote: > Good evening all! I am trying to move files from one location to > another while preserving the path. If I search for a directory, it > seems like I have found the correct syntax: > > find

Re: [PATCH] cat: allow compiling out -n and -b

2017-07-14 Thread Denys Vlasenko
Applied, thanks On Thu, Jul 13, 2017 at 3:35 PM, Kang-Che Sung wrote: > When these options were introduced in d88f94a5df3a2edb8ba56fab5c13674b452f87ab > it provides no config options to compile them out. Now provide one. > > Introduce config FEATURE_CATN. > > Signed-off-by:

[PATCH] add-remove-shell: fix crash when shell is already added

2017-07-14 Thread Timo Teräs
Avoid dereferencing 'don_add' in strcmp since it is invalid pointer. Signed-off-by: Timo Teräs --- Please include in -fixes for v1.27.0 loginutils/add-remove-shell.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/loginutils/add-remove-shell.c