Re: [PATCH 1/1] makedevs: set path size to match linux

2017-07-05 Thread Kang-Che Sung
On Thu, Jul 6, 2017 at 8:04 AM, Denys Vlasenko wrote: > On Tue, Jun 27, 2017 at 3:20 PM, Kang-Che Sung wrote: >> Hello. Can I suggest another way? >> How about modifying the `line` buffer so it can be used directly as the name, >> and avoid the malloc problem or STRINGIFY

Re: [PATCH 1/1] makedevs: set path size to match linux

2017-06-27 Thread Kang-Che Sung
On Tue, Jun 27, 2017 at 3:53 PM, walter harms wrote: > > Am 27.06.2017 05:31, schrieb Baruch Siach: >> >> On Mon, Jun 26, 2017 at 08:45:42PM -0500, Matthew Weber wrote: >>> On Mon, Jun 26, 2017 at 7:36 PM, Emmanuel Deloget wrote: On Mon, Jun 26, 2017 at 11:23 PM, Matthew Weber wrote: >

Re: ash buildin "read" interrupted on SIGCHLD

2017-06-01 Thread Kang-Che Sung
On Thu, Jun 1, 2017 at 5:36 PM, Guido Classen wrote: > I was curious how to catch SIGCHLD using trap and what behavior we should > expect. Could you also provide a test for trap in conjunction with SIGCHLD. I was about to ask the same question, until I realize that the SIGCHLD handling behavior w

Re: tree

2017-05-02 Thread Kang-Che Sung
On Wed, May 3, 2017 at 6:00 AM, Jethro Tull wrote: > why tree is not in busybox? Short answer: Because no one has been implementing it in Busybox yet. ___ busybox mailing list busybox@busybox.net http://lists.busybox.net/mailman/listinfo/busybox

Re: [PATCH 3/3] ash: exec: -a option for setting zeroth arg

2017-04-12 Thread Kang-Che Sung
Back in January 2017, a person named Patrick Pief has suggested a similar patch to add "exec -a" support: http://lists.busybox.net/pipermail/busybox/2017-January/085146.html Is your patch same as his or is there any difference? ___ busybox mailing list

Re: A good scripting language for busybox?

2017-03-17 Thread Kang-Che Sung
On Fri, Mar 17, 2017 at 11:20 PM, Pavel Aronsky wrote: > Apologies for maybe a wild or off-topic question. > After dealing with quite a few products with busybox and its ash shell used > as the primary scripting language, I'd like to ask you, busybox experts: > what are alternatives? > > This page

Re: [RFC 1/2] Add hidden option FEATURE_HAVE_SEAMLESS_COMPRESSION

2017-03-15 Thread Kang-Che Sung
On Tue, Mar 14, 2017 at 1:42 AM, Denys Vlasenko wrote: > Sorry about the delay. > > This change make future entries in config affect the past. > In menuconfig, this makes items in module submenu affect > items in archival submenu. This does not feel right. My intention is that, in the future, we

Re: kill builtin in ash might behave like killall

2017-03-03 Thread Kang-Che Sung
On 03/03/2017 01:01 PM, Emmanuel Deloget wrote: > > Hello, > > I'm using BB 1.26.2 with an heavily modified LEDE where I added > procps-ng and sysvinit. Given that setup, I'm using /usr/bin/kill from > props-ng and killall5 from sysvinit, meaning that I have the following > configuration: > > # CON

Fwd: Busybox fails to build on my Pentium 133MHz

2017-02-27 Thread Kang-Che Sung
(Resent the mail in order to CC to the mailing list) On 26 February 2017 23:40:49 CET, "Gunner C. Hooper" wrote: >I built static busybox on a Pentium III to run on my Pentium 133MHz >with >64MB of RAM. It runs perfectly on the Pentium III, but when I try to >run >it on the Pentium 133MHz, I get t

Re: Busybox fails to build on my Pentium 133MHz

2017-02-27 Thread Kang-Che Sung
On Mon, Feb 27, 2017 at 3:24 PM, Bernhard Reutner-Fischer wrote: > On 26 February 2017 23:40:49 CET, "Gunner C. Hooper" > wrote: >>I built static busybox on a Pentium III to run on my Pentium 133MHz >>with >>64MB of RAM. It runs perfectly on the Pentium III, but when I try to >>run >>it on the P

Re: [PATCH 2/2] vi: don't touch file with :x when modified_count == 0

2017-02-22 Thread Kang-Che Sung
(Mail resent again to CC to busybox mailing list) On Wed, Feb 22, 2017 at 10:03 PM, walter harms wrote: > > > Am 22.02.2017 14:11, schrieb Yousong Zhou: >> @@ -1034,7 +1034,9 @@ static void colon(char *buf) >>|| strncmp(p, "wn", cnt) == 0 >>|| (p[0] == 'x' && !p[1]) >> ) { >

Re: [PATCH] vi: avoid touching a new file with ZZ when no editing has been done

2017-02-20 Thread Kang-Che Sung
On Mon, Feb 20, 2017 at 7:58 PM, Yousong Zhou wrote: > Well, I guess :x and ZZ are different since the early days of busybox > vi: it's the case with 1.20.0 and 1.22.1. The case with ZZ is more > substantial both as a regression and as a flaw even when looking it > alone without comparison with t

Re: [PATCH] vi: avoid touching a new file with ZZ when no editing has been done

2017-02-20 Thread Kang-Che Sung
On Mon, Feb 20, 2017 at 7:12 PM, Yousong Zhou wrote: > On 20 February 2017 at 19:02, Kang-Che Sung wrote: >> On Mon, Feb 20, 2017 at 4:40 PM, Yousong Zhou wrote: >>> On 13 February 2017 at 11:00, Yousong Zhou wrote: >>>> This is the behaviour observed with sta

Re: [PATCH] vi: avoid touching a new file with ZZ when no editing has been done

2017-02-20 Thread Kang-Che Sung
On Mon, Feb 20, 2017 at 4:40 PM, Yousong Zhou wrote: > On 13 February 2017 at 11:00, Yousong Zhou wrote: >> This is the behaviour observed with standard vim and busybox vi of at >> least 1.22.1. It was changed with commit "32afd3a vi: some >> simplifications" which happened before 1.23.0. >> >>

[RFC 1/2] Add hidden option FEATURE_HAVE_SEAMLESS_COMPRESSION

2017-02-17 Thread Kang-Che Sung
Currently the applets that select FEATURE_HAVE_SEAMLESS_COMPRESSION are: zcat, dpkg, dpkg_deb, rpm, rpm2cpio, tar, loadfont, fbsplash, man, depmod, insmod, modinfo and modprobe. I hope this will help tracking which of the applets will use seamless compression more easily. Signed-off-by: Kan

[RFC 2/2] Simplify check on disabling FEATURE_COMPRESS_USAGE

2017-02-17 Thread Kang-Che Sung
well. Signed-off-by: Kang-Che Sung --- libbb/appletlib.c | 21 +++-- 1 file changed, 7 insertions(+), 14 deletions(-) diff --git a/libbb/appletlib.c b/libbb/appletlib.c index 7f0d62060..02ffd319b 100644 --- a/libbb/appletlib.c +++ b/libbb/appletlib.c @@ -57,22 +57,15 @@ * and we

[PATCH] Fix FEATURE_{GZIP,BZIP2}_DECOMPRESS link error

2017-02-17 Thread Kang-Che Sung
... when gzip is selected but not gunzip nor zcat, or when bzip2 is selected but not bunzip2 nor bzcat. This regression is introduced in b130f9f758b6404c6d0911a1c120937ae6ab47f8 ("Allow 'gzip -d' and 'bzip2 -d' without gunzip or bunzip2") Signed-off-by: Kang-Che

Re: [PATCH] modprobe: simplify code (printf in do_modprobe())

2017-02-12 Thread Kang-Che Sung
On Mon, Feb 13, 2017 at 4:55 AM, Denys Vlasenko wrote: > This would print extra trailing space. > > On Thu, Feb 9, 2017 at 4:02 PM, Kang-Che Sung wrote: >> Signed-off-by: Kang-Che Sung >> --- >> modutils/modprobe.c | 5 ++--- >> 1 file changed, 2 insertions(+)

Re: [PATCH 3/3] modprobe-small: define and use DEPMOD_OPT_n (option mask)

2017-02-10 Thread Kang-Che Sung
On Fri, Feb 10, 2017 at 9:09 PM, Xabier Oneca -- xOneca wrote: > Hello, > > 2017-02-09 15:48 GMT+01:00 Kang-Che Sung : >> Signed-off-by: Kang-Che Sung >> --- >> modutils/modprobe-small.c | 3 ++- >> 1 file changed, 2 insertions(+), 1 deletion(-) >> >

[PATCH] modprobe: simplify code (printf in do_modprobe())

2017-02-09 Thread Kang-Che Sung
Signed-off-by: Kang-Che Sung --- modutils/modprobe.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/modutils/modprobe.c b/modutils/modprobe.c index a6224fa63..58e8b5a15 100644 --- a/modutils/modprobe.c +++ b/modutils/modprobe.c @@ -466,10 +466,9 @@ static int

[PATCH 1/3] modprobe-small: document '-n' in depmod usage

2017-02-09 Thread Kang-Che Sung
Signed-off-by: Kang-Che Sung --- modutils/modprobe-small.c | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/modutils/modprobe-small.c b/modutils/modprobe-small.c index 431b8aeb2..41fd89172 100644 --- a/modutils/modprobe-small.c +++ b/modutils/modprobe-small.c @@ -893,8

[PATCH 3/3] modprobe-small: define and use DEPMOD_OPT_n (option mask)

2017-02-09 Thread Kang-Che Sung
Signed-off-by: Kang-Che Sung --- modutils/modprobe-small.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/modutils/modprobe-small.c b/modutils/modprobe-small.c index 52765bc99..43625490b 100644 --- a/modutils/modprobe-small.c +++ b/modutils/modprobe-small.c @@ -79,6 +79,7

[PATCH 2/3] Update depmod & modprobe upstream help text in comments

2017-02-09 Thread Kang-Che Sung
No code changes. Signed-off-by: Kang-Che Sung --- modutils/modprobe-small.c | 38 +++--- 1 file changed, 23 insertions(+), 15 deletions(-) diff --git a/modutils/modprobe-small.c b/modutils/modprobe-small.c index 0ac39f66f..52765bc99 100644 --- a/modutils

Re: [PATCH] modutils: fix config options dependency (2)

2017-02-07 Thread Kang-Che Sung
On Tue, Feb 7, 2017 at 11:40 PM, Denys Vlasenko wrote: > On Tue, Feb 7, 2017 at 4:38 PM, Kang-Che Sung wrote: >> On Tue, Feb 7, 2017 at 11:21 PM, Denys Vlasenko >> wrote: >>> >>> How about this? >>> >>> - if (is_depmod ||

Re: [PATCH] modutils: fix config options dependency (2)

2017-02-07 Thread Kang-Che Sung
On Tue, Feb 7, 2017 at 11:21 PM, Denys Vlasenko wrote: > On Tue, Feb 7, 2017 at 4:38 AM, Kang-Che Sung wrote: >> On Tue, Feb 7, 2017 at 4:56 AM, Denys Vlasenko >> wrote: >>> >>> Not really. If you would explain it, it might increase chances of it >>&g

Re: [PATCH] Replace int -> uint to avoid signed integer overflow

2017-02-06 Thread Kang-Che Sung
(Forgot to CC the mailing list on the last sent mail. Resent to CC the mailing list) On Tue, Feb 7, 2017 at 6:59 AM, Rob Landley wrote: > My attitude towards false positives may have been influenced by people > running static checkers against toybox and submitting long spreadsheets > of results,

Re: [PATCH] modutils: fix config options dependency (2)

2017-02-06 Thread Kang-Che Sung
On Tue, Feb 7, 2017 at 4:56 AM, Denys Vlasenko wrote: > On Mon, Feb 6, 2017 at 4:38 AM, Kang-Che Sung wrote: >> Thank you, but I hope you understand why I propose the not-so-simple route in >> the patch. Especially regarding the use of is_depmod_or_modprobe macro. > > Not

Re: [PATCH] Replace int -> uint to avoid signed integer overflow

2017-02-06 Thread Kang-Che Sung
In case that Rob Landley isn't convinced, there is another argument supporting casting to unsigned before bit shifting: There are little cases that left shifting to sign bit is actually useful. AFAIK, the use of 1<<31 cases are no other than 1. intended to represent a signed INTn_MIN constant, 2.

Re: [PATCH] Replace int -> uint to avoid signed integer overflow

2017-02-06 Thread Kang-Che Sung
On Mon, Feb 6, 2017 at 3:22 PM, Rob Landley wrote: > On 02/05/2017 09:10 PM, Kang-Che Sung wrote: >> On Mon, Feb 6, 2017 at 8:52 AM, Rob Landley wrote: >>> What's an archive input that actually fails? What's an example of a >>> processor machine language that

Re: [PATCH] modutils: fix config options dependency (2)

2017-02-05 Thread Kang-Che Sung
On Mon, Feb 6, 2017 at 2:04 AM, Denys Vlasenko wrote: > Applied a simpler version of it. Thanks > > On Wed, Feb 1, 2017 at 10:22 AM, Kang-Che Sung wrote: >> - The modprobe-small implementation of rmmod no longer chdir's to >> "/lib/modules/`uname -r`"

Re: [PATCH] Replace int -> uint to avoid signed integer overflow

2017-02-05 Thread Kang-Che Sung
On Mon, Feb 6, 2017 at 8:52 AM, Rob Landley wrote: > > On 02/01/2017 12:35 PM, Rostislav Skudnov wrote: >> An example of such an error (should be compiled with DEBUG_SANITIZE): >> >> runtime error: left shift of 1 by 31 places cannot be represented in >> type 'int' > > Sure it can. We know exactly

Can we bring 'test' applet's help back?

2017-02-05 Thread Kang-Che Sung
This is just an idea. After 'test' and '[' become separate, individually selectable applets, it could be possible to bring the help of '[' and '[[' back after they got removed in commit de5edadee2dca2896492f97ab3a56e389305e74d ("special-case {true,false,test} --help") I mean that "test --help" wi

[PATCH] Reorder modutils config options & fix yet more dependency

2017-02-01 Thread Kang-Che Sung
now moved to Config.src under "Common options" section. (I wished to edit this config so that it also work with "big" modutils, but it's not done at the moment. Sorry.) Signed-off-by: Kang-Che Sung --- modutils/Config.src | 43 +---

[PATCH] modutils: fix config options dependency (2)

2017-02-01 Thread Kang-Che Sung
ILE no longer depend on MODPROBE_SMALL as the latter may not enable depmod or modprobe that requires these configs. - Clarify DEFAULT_DEPMOD_FILE's description regarding the ".bb" name suffix. Signed-off-by: Kang-Che Sung --- modutils/Config.src | 10 ++

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

2017-01-31 Thread Kang-Che Sung
ut at least the macro can serve as a marker and ensure both implementations of same feature have consistent behavior.) Signed-off-by: Kang-Che Sung --- modutils/Config.src | 8 modutils/insmod.c | 6 +++--- modutils/modprobe-small.c | 23 --- modut

[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

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

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

[PATCH] Fix modutils config options dependency.

2017-01-28 Thread Kang-Che Sung
!MODPROBE_SMALL for now. I'm not sure whether the lack of try_to_mmap_module in modprobe-small is intentional. If not, please reject my changes. Signed-off-by: Kang-Che Sung --- configs/TEST_nommu_defconfig | 3 --- configs/TEST_rh9_defconfig| 3 --- configs/android2_defconfig| 3 --- co

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

2017-01-27 Thread Kang-Che Sung
a BASH_ preprocessor symbol, though. (Better ask Denys Vlasenko, the maintainer.) And, don't duplicate another function if what you did is only extending a functionality of that function. BusyBox is coded with size in mind. Duplicating a function will mean wasti

Why preferring smallint to bool in some places?

2017-01-25 Thread Kang-Che Sung
s "show_dirname" variable is supposed to hold a boolean value, but why not declare it with the type bool? What's the rationale behind preferring smallint? Thank you. Kang-Che Sung ___ busybox mailing list busybox@busybox.net http://lists.busybox.net/mailman/listinfo/busybox

Re: bugs in a couple scripts

2017-01-21 Thread Kang-Che Sung
On Sun, Jan 22, 2017 at 6:56 AM, J wrote: > Hello mailing list, > > i found (the hard way) that scripts/gen_build_files.sh is making unsafe > assumptions about the nature of /bin/sh; it appears to be presuming that > it's bash or dash or something: > -- > GEN runit/Kbuild > /usr/src/install/

Re: [PATCH 2/2] Split bash compatible extensions into separate options.

2017-01-11 Thread Kang-Che Sung
On Wed, Jan 11, 2017 at 4:09 PM, Denys Vlasenko wrote: > On Tue, Jan 10, 2017 at 8:17 PM, Kang-Che Sung wrote: >> All of the bash compatibility options will now depend on >> CONFIG_*_BASH_COMPAT, and CONFIG_*_BASH_COMPAT become an option that >> alone doesn't add any c

Re: [PATCH 2/2] Split bash compatible extensions into separate options.

2017-01-10 Thread Kang-Che Sung
On Wed, Jan 11, 2017 at 3:17 AM, Kang-Che Sung wrote: > (Note: this is a large patch. Patch included as mail attachment) > > All of the bash compatibility options will now depend on > CONFIG_*_BASH_COMPAT, and CONFIG_*_BASH_COMPAT become an option that > alone doesn't add any

[PATCH 2/2] Split bash compatible extensions into separate options.

2017-01-10 Thread Kang-Che Sung
makes it self-documenting about what bash-compatible features we have. Signed-off-by: Kang-Che Sung --- coreutils/test.c | 8 ++- shell/ash.c | 216 +-- shell/hush.c | 133 ++ 3 files changed, 239 inser

[PATCH 1/2] hush: add [[ to the builtins list

2017-01-10 Thread Kang-Che Sung
Otherwise the [[ EXPR ]] construct will not run. "hush: can't execute '[[': No such file or directory" It seems like this thing has not been working from the beginning :( (commit 9d617c44d2b1135d14b7dafd01a1d3992293f4d9) Signed-off-by: Kang-Che Sung --- shell/hush.c |

Please revert "ash: make dot command search current directory first, as bash does."

2017-01-10 Thread Kang-Che Sung
Please revert commit 8ad78e1ec7b2e873953f9f476fb63b5893526c39 "ash: make dot command search current directory first, as bash does." This dot command behavior neither follows bash's behavior nor POSIX's. Bash behavior is: Dot command search on PATH first, *then* search the current directory. And b

Re: [PATCH] dpkg & dpkg_deb: don't depend on FEATURE_SEAMLESS_GZ

2017-01-09 Thread Kang-Che Sung
On Tue, Jan 10, 2017 at 12:43 AM, Denys Vlasenko wrote: > On Sat, Jan 7, 2017 at 2:48 AM, Kang-Che Sung wrote: >>>> My understanding is that .deb files usually use .gz compression, >>>> and building dpkg without support for .gz results in a useless tool: >>>&g

[PATCH] kill: optimizations for single-applet build

2017-01-09 Thread Kang-Che Sung
intanence a little bit easier. From 7296087fc1e2b729477ce5c3cb1a2b254370510e Mon Sep 17 00:00:00 2001 From: Kang-Che Sung Date: Tue, 10 Jan 2017 00:26:31 +0800 Subject: [PATCH] kill: optimizations for single-applet build * Fix a bug with a configuration in which the shell's kill builtin would be mistreated as

Re: [PATCH 1/2] Need not build kill.c when ash's job control is off.

2017-01-09 Thread Kang-Che Sung
On Mon, Jan 9, 2017 at 11:03 PM, Jody Bruchon wrote: > On 2017-01-09 9:59 AM, Kang-Che Sung wrote: >> >> ash's 'kill' builtin depends on the job control config option. >> > What about external 'kill' command /bin/kill? It should be built if >

[PATCH 2/2] Document ash and hush config options in more detail.

2017-01-09 Thread Kang-Che Sung
sabled at build time.) Signed-off-by: Kang-Che Sung --- shell/ash.c | 30 +- shell/hush.c | 15 ++- 2 files changed, 35 insertions(+), 10 deletions(-) diff --git a/shell/ash.c b/shell/ash.c index 9c46a93e0..272682d78 100644 --- a/shell/ash.c +++ b/shell/a

[PATCH 1/2] Need not build kill.c when ash's job control is off.

2017-01-09 Thread Kang-Che Sung
ash's 'kill' builtin depends on the job control config option. Signed-off-by: Kang-Che Sung --- procps/Kbuild.src | 5 + procps/kill.c | 3 +-- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/procps/Kbuild.src b/procps/Kbuild.src index 82f37f0df..dedef88

Re: [RFC] modprobe-small: optimizations for single applet build

2017-01-09 Thread Kang-Che Sung
On Mon, Jan 9, 2017 at 4:49 PM, Denys Vlasenko wrote: > CONFIG_MODPROBE_SMALL=y > CONFIG_DEPMOD=y > # CONFIG_INSMOD is not set > CONFIG_LSMOD=y > # CONFIG_FEATURE_LSMOD_PRETTY_2_6_OUTPUT is not set > CONFIG_MODINFO=y > # CONFIG_MODPROBE is not set > # CONFIG_FEATURE_MODPROBE_BLACKLIST is not set >

Re: [PATCH] Allow 'gzip -d' and 'bzip2 -d' without gunzip or bunzip2

2017-01-09 Thread Kang-Che Sung
On Mon, Jan 9, 2017 at 4:06 PM, Denys Vlasenko wrote: > > FEATURE_BZIP2_DECOMPRESS has no type and is rejected by config system. > > #if FEATURE_BZIP2_DECOMPRESS is missing "ENABLE_". Acknowledged the errors. Sorry then. Forgot to test that after editing the code :( __

[RFC] modprobe-small: optimizations for single applet build

2017-01-08 Thread Kang-Che Sung
946 112 358538c0d new/busybox_MODPROBE 34718 946 112 357768bc0 old/busybox_RMMOD 7502 714 104 8320 2080 new/busybox_RMMOD Signed-off-by: Kang-Che Sung --- modutils/modprobe-small.c | 72 +-- 1 file change

[PATCH] Allow 'gzip -d' and 'bzip2 -d' without gunzip or bunzip2

2017-01-08 Thread Kang-Che Sung
Idea copied from the "ip" applet. (Patch included as mail attachment.) From 7a9d46fe8cb7acd383059c2496e94c229823c1be Mon Sep 17 00:00:00 2001 From: Kang-Che Sung Date: Sun, 8 Jan 2017 14:28:34 +0800 Subject: [PATCH] Allow 'gzip -d' and 'bzip2 -d' without gunzip or

[PATCH] hush: fix config text typo (HUSH_MEMLEAK)

2017-01-08 Thread Kang-Che Sung
Signed-off-by: Kang-Che Sung --- shell/hush.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/shell/hush.c b/shell/hush.c index 9b62d5c0d..01c334a46 100644 --- a/shell/hush.c +++ b/shell/hush.c @@ -291,7 +291,7 @@ //config: default n //config: depends on HUSH

Re: [PATCH] Fix ash "kill %1" not working if CONFIG_ASH is disabled

2017-01-08 Thread Kang-Che Sung
On Mon, Jan 9, 2017 at 10:03 AM, Kang-Che Sung wrote: > On Sun, Jan 8, 2017 at 7:40 PM, Xabier Oneca -- xOneca > wrote: >> Hello Kang-Che, >> >>> diff --git a/procps/kill.c b/procps/kill.c >>> index 57a33bcaa..198c78de0 100644 >>> --- a/procps/

[PATCH] Fix ash "kill %1" not working if CONFIG_ASH is disabled

2017-01-08 Thread Kang-Che Sung
Fix ash "kill %1" not working if CONFIG_ASH is disabled but ash is launched by 'sh' or 'bash' name Signed-off-by: Kang-Che Sung --- procps/kill.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/procps/kill.c b/procps/kill.c index 57a33bcaa.

[PATCH] Fix code bloat caused by zcat's seamless magic

2017-01-07 Thread Kang-Che Sung
into the binary unnecessarily. Fix this by disabling SEAMLESS_MAGIC option flag (setting its value to 0) when zcat is disabled. This will help the compiler optimize out bbunpack() and no longer generate open_zipped() function call. Signed-off-by: Kang-Che Sung --- archival/bbunzip.c | 4 ++-- 1 file change

[PATCH] No longer prompt PLATFORM_LINUX option for user.

2017-01-07 Thread Kang-Che Sung
pt user of this config question. Signed-off-by: Kang-Che Sung From 7eb49828448feb5225ed6c210ae962cbdcc484c3 Mon Sep 17 00:00:00 2001 From: Explorer09 Date: Sat, 7 Jan 2017 15:16:46 +0800 Subject: [PATCH] No longer prompt PLATFORM_LINUX option for user. With the new "select PLATFORM_LINUX&quo

Re: [PATCH] dpkg & dpkg_deb: don't depend on FEATURE_SEAMLESS_GZ

2017-01-06 Thread Kang-Che Sung
On Sat, Jan 7, 2017 at 2:31 AM, Jody Bruchon wrote: > On 2017-01-06 13:23, Denys Vlasenko wrote: >> >> On Fri, Jan 6, 2017 at 4:18 AM, Kang-Che Sung >> wrote: >>> >>> CONFIG_DPKG and CONFIG_DPKG_DEB unnecessarily depend on >>> CONFIG_FEATURE_SEAML

Re: Compiling busybox for ARM-V7

2017-01-06 Thread Kang-Che Sung
On Fri, Jan 6, 2017 at 7:54 PM, Bob Dunlop wrote: > I'm not sure passing the parameters to make like this works, > they don't get passed to sub processes ? I've always set them > in the environment so all children are guaranteed to see them. > > I'd stick the commands in a scripts for easy repeti

Re: Compiling busybox for ARM-V7

2017-01-05 Thread Kang-Che Sung
On Fri, Jan 6, 2017 at 12:07 PM, Vered Zvi wrote: > I compiled busybox 1.25.1 for ARM-V7 using crosstool-ng toolchain. > > I used the commands: > > TOOLCHAIN=/home/zvivered/module/CARD/linux4.1.13/toolchain > make clean > make ARCH=arm > CROSS_COMPILE=$TOOLCHAIN/crosstool/release/bin/arm-cortex_a

[PATCH] dpkg & dpkg_deb: don't depend on FEATURE_SEAMLESS_GZ

2017-01-05 Thread Kang-Che Sung
are already aware of no-GZ configuration, it's safe to remove that dependency. Signed-off-by: Kang-Che Sung --- archival/dpkg.c | 1 - archival/dpkg_deb.c | 1 - 2 files changed, 2 deletions(-) diff --git a/archival/dpkg.c b/archival/dpkg.c index f133299e3..22bc6f161 100644

[PATCH v2] Explicltly group ash options and hush options

2017-01-04 Thread Kang-Che Sung
[...] So all ash options would now be indented under "ash". [1] "Documentation/kbuild/kconfig-language.txt" in Linux kernel source Signed-off-by: Kang-Che Sung From abdf0c53e17d8f58336f0558bcee1e2848474901 Mon Sep 17 00:00:00 2001 From: Explorer09 Date: Thu,

FAST_FUNC not working well with GCC's LTO

2017-01-04 Thread Kang-Che Sung
code, so this is the best suggestion I could have. The changes will be something like below. I would like some comments about this problem and my suggestion. Please? Kang-Che Sung ("Explorer") diff --git a/include/platform.h b/include/platform.h index c987d418c..7e537b950 10

Re: [PATCH 1/3] Fix allnoconfig that ash is built in by default.

2017-01-04 Thread Kang-Che Sung
01 From: Explorer09 Date: Sun, 25 Dec 2016 08:32:37 +0800 Subject: [PATCH] Fix allnoconfig that ash is built in by default. Change the config order that SH_IS_* and BASH_IS_* will be prompted after ASH and HUSH. And if CONFIG_ASH=n, SH_IS_* choice will default to SH_IS_NONE. Signed-off-by: Kang-Che Sung -

[PATCH 3/3] Clarify help text of CONFIG_{SH,BASH}_IS_* options.

2017-01-03 Thread Kang-Che Sung
guration. Also clarify help text of CONFIG_BASH_IS_* that bash compatibility in ash is not complete. (It shouldn't be anyway - ash can't support every bash quirk out there.) Signed-off-by: Kang-Che Sung --- shell/Config.src | 28 +++- 1 file changed, 27 insertion

[PATCH 2/3] Explicltly group "ash options" and "hush options"

2017-01-03 Thread Kang-Che Sung
"depends on ASH || SH_IS_ASH || BASH_IS_ASH" lines and such be grouped into one place. Signed-off-by: Kang-Che Sung --- shell/Config.src | 9 - shell/ash.c | 20 +--- shell/hush.c | 16 +--- 3 files changed, 14 insertions(+), 31 deletio

[PATCH 1/3] Fix allnoconfig that ash is built in by default.

2017-01-03 Thread Kang-Che Sung
(This mail and patch was sent to busybox mailing list on Dec 25, 2016, and I'm re-sending again for people to notice.) Change the config order that SH_IS_* and BASH_IS_* will be prompted after ASH and HUSH. And if CONFIG_ASH=n, SH_IS_* choice will default to SH_IS_NONE. Signed-off-by: Kan

FAST_FUNC not working well with LTO (Link Time Optimization)

2016-12-25 Thread Kang-Che Sung
this problem and my suggestion. Please? Kang-Che Sung ("Explorer") diff --git a/include/platform.h b/include/platform.h index c987d418c..7e537b950 100644 --- a/include/platform.h +++ b/include/platform.h @@ -108,13 +108,19 @@ * and/or smaller by using modified ABI. It is usually only nee

[PATCH 3/3] Clarify help text of CONFIG_{SH,BASH}_IS_* options.

2016-12-24 Thread Kang-Che Sung
way - ash can't support every bash quirk out there.) Signed-off-by: Kang-Che Sung --- shell/Config.src | 28 +++- 1 file changed, 27 insertions(+), 1 deletion(-) diff --git a/shell/Config.src b/shell/Config.src index 1fb05fab6..997f42f91 100644 --- a/shell/Config.src ++

[PATCH 2/3] Explicltly group "ash options" and "hush options"

2016-12-24 Thread Kang-Che Sung
This tries to workaround a menuconfig bug that all ash options are no longer indented under "ash" after SH_IS_ASH becomes independently selectable. Also allows "depends on ASH || SH_IS_ASH || BASH_IS_ASH" lines and such be grouped into one place. Signed-off-by: Kang-

[PATCH 1/3] Fix allnoconfig that ash is built in by default.

2016-12-24 Thread Kang-Che Sung
Change the config order that SH_IS_* and BASH_IS_* will be prompted after ASH and HUSH. And if CONFIG_ASH=n, SH_IS_* choice will default to SH_IS_NONE. Signed-off-by: Kang-Che Sung --- shell/Config.src | 8 +++- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/shell/Config.src

Potential regression with ash "pause()" commit

2016-10-31 Thread Kang-Che Sung
Hello. I want to mention that in this commit "ash: use pause(), not sigsuspend(), in wait builtin" 8f7b0248adca9a88351fd7f3dd208775242f3fe6 there could be a regression. I recently read about Problems with pause() in glibc manual

Re: Ash wildcard usability bug

2016-10-26 Thread Kang-Che Sung
On Wed, Oct 26, 2016 at 5:28 PM, Lauri Kasanen wrote: > On Wed, Oct 26, 2016, at 05:44, Kang-Che Sung wrote: >> I wonder why you can't implement an easy workaround using ls or >> something. >> >> filename="`ls *zip | head -n 1`" >> nc 10.0.

Re: Ash wildcard usability bug

2016-10-25 Thread Kang-Che Sung
On Wed, Oct 26, 2016 at 1:24 AM, Lauri Kasanen wrote: > > Well, I did try to use tab completion: cat < *zip[TAB] > > Of course it doesn't work. In my case, I had many files sharing a > prefix, but only one ending in *zip, so typing that was several > times faster than letter- tab, oh more letters,

Re: possible bug in 'sum' command, with a demo

2016-09-22 Thread Kang-Che Sung
> I can't reproduce the same result in the latest BusyBox version from git. > Perhaps this has been fixed already? Oops. My mistake. Used the wrong input. Here's the corrected one: $ printf '145146\n\n'| ./busybox cksum 1560277601 8 $ printf '145146\n\n'| cksum 1560277601 8 $

Re: possible bug in 'sum' command, with a demo

2016-09-22 Thread Kang-Che Sung
On Thu, Sep 22, 2016 at 11:57 PM, Anne Salemme wrote: > > I am using BusyBox version v1.22.1 inside MobaXterm, and came across what > looks like a bug in the ‘sum’ command…maybe not a bug, but definitely not > expected…here is a little demo for you…thanks, I love BusyBox! > > Demo shows that g

Re: [PATCH] libbb: More informative "short write" error

2016-09-05 Thread Kang-Che Sung
On Tue, Sep 6, 2016 at 5:30 AM, Denys Vlasenko wrote: > On Mon, Sep 5, 2016 at 10:46 PM, Tito wrote: >> >> Hi, >> isn't "short write" redundant? > > No, it is not: it says that some bytes were written. > As opposed to the situation when no bytes were written, > error happened right away. Um, exc

Re: Altscreens for less and more

2016-09-05 Thread Kang-Che Sung
On Mon, Sep 5, 2016 at 3:43 PM, Cág wrote: > Forgot to mention: I booted into Debian, opened my st terminal > that *has* support for altscreen (in config.h you can disable it though) > and tried both BusyBox and Coreutils less(1). Coreutils' one opened > an altscreen, BusyBox' one didn't. > .

[PATCH] docs: Update filenames in keep_data_small.txt

2016-08-02 Thread Kang-Che Sung
ompress_unzip.c -> decompress_gunzip.c (since commit 774bce8e8ba1e424c953e8f13aee8f0778c8a911) libbb/messages.c -> libbb/ptr_to_globals.c (since commit 574f2f43948bb21d6e4187936ba5a5afccba25f6) Signed-off-by: Kang-Che Sung --- docs/keep_data_small.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 del

BusyBox 'ash' should reset SIGQUIT action of its children (Bug)

2016-07-15 Thread Kang-Che Sung
I recently discovered this bug, but since BusyBox website is offline for now, I think I'll report here first. Test case (try on a freshly logged-in tty where busybox ash isn't the default shell): $ bash $ exec bash $ yes >/dev/null $ # (Press Ctrl+\ ) $ dash $ exec dash

[PATCH 2/2] doc: Update bb_common_bufsiz1 usage

2016-06-28 Thread Kang-Che Sung
ned-off-by: Kang-Che Sung --- docs/keep_data_small.txt | 17 ++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/docs/keep_data_small.txt b/docs/keep_data_small.txt index 218d4f2..32f57c3 100644 --- a/docs/keep_data_small.txt +++ b/docs/keep_data_small.txt @@ -124,

[PATCH 1/2] doc: Update filenames in keep_data_small.txt

2016-06-28 Thread Kang-Che Sung
ince commit 574f2f43948bb21d6e4187936ba5a5afccba25f6) Signed-off-by: Kang-Che Sung --- docs/keep_data_small.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/keep_data_small.txt b/docs/keep_data_small.txt index 3ced1a6..218d4f2 100644 --- a/docs/keep_data_small.txt +++ b/docs/keep_data_small.t

<    1   2