[PATCH] chmod: correctly report changed modes

2021-09-15 Thread Wolf
Chmod used to incorrectly report as changed even files for which the mode did not change. This was caused by extra bits in the st_mode, that were not present when parsed from passed argument in the form of octal number. --- Before the patch: +$ mkdir /tmp/q +$ busybox chmod -c 0600 /tmp/q mode of

[PATCH] applets/usage_pod.c: Prefer fputs

2021-02-18 Thread Gray Wolf
When printf has just single %s argument, it can be replaced with fputs, which is faster. One could hope that compiler would optimize that, but there is no reason not to use the fputs directly. --- applets/usage_pod.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/applets/usage

Re: read stdin into variable?

2020-11-08 Thread Wolf
On 2020-11-08 21:41:51 +, Harald van Dijk wrote: > > There are two good workarounds. One is yours, which ensures read a b is not > executed in a subshell environment. Depending on the use case, another good > alternative is > > echo 12 34 | { > read a b > echo "'${a}''${b}'" > } > > This

Re: gawk vs. BusyBox awk treatment of FS empty matches

2020-11-01 Thread Wolf
Just my $0.02 on this: On 2020-11-01 20:02:24 +, David Čepelík wrote: > I've noticed an interesting discrepancy between gawk and BusyBox awk: > when the FS is set to e.g. ` *` (space asterisk), gawk will not consider > empty matches of the regular expression (see e.g. [1]) while BusyBox > will

Ping for a patch

2020-07-06 Thread Wolf
Hello, Some time back I've posted patch for crontab, so I would just like to ping it for an update. http://lists.busybox.net/pipermail/busybox/2020-June/088027.html Thank you, W. -- There are only two hard things in Computer Science: cache invalidation, naming things and off-by-one errors. s

[PATCH] crontab: Fix -e with editors saving using renaming strategy

2020-06-12 Thread Gray Wolf
file needs to be re-opened after the editor terminates for the changes to properly save. Fixes #12491 Signed-off-by: Wolf --- miscutils/crontab.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/miscutils/crontab.c b/miscutils/crontab.c index c71d914fc..411a18a50 100644

Re: Non-responsive maintainer?

2020-06-06 Thread Wolf
On 2020-06-06 20:26:09 +0200, Bernhard Reutner-Fischer wrote: > I'd ping the busybox list every 3 or 4 weeks. Thanks, I've tried to ping it once I think in April, will keep at it then. > Which patch do you refer to, please? This patch [0] fixing this bug [1] related to crontab -e. I want it fixe

Re: Non-responsive maintainer?

2020-06-06 Thread Wolf
On 2020-06-05 12:10:54 +0200, Bernhard Reutner-Fischer wrote: > [..] > > So: Please involve yourself more closely in the project, like you > would foster any other opensource community project. So, to make an example, if I have a patch in limbo from 21st of January, what are some actionable thing

Fix 12491: crontab -e discards change with EDITOR=vim

2020-04-29 Thread Gray Wolf
Hello, I'm sending this patch once more after more then 3 months, seems like the previous one was overlooked. Would appreciate any feedback so I can make necessary changes to get this merged. I think the bug is very unpleasant surprise and would be nice to have it fixed. Have a nice day, W.

[PATCH] crontab: Fix -e with editors saving using renaming strategy

2020-04-29 Thread Gray Wolf
file needs to be re-opened after the editor terminates for the changes to properly save. Fixes #12491 Signed-off-by: Wolf --- miscutils/crontab.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/miscutils/crontab.c b/miscutils/crontab.c index c71d914fc..411a18a50 100644

[PATCH v2] grep: Fix -f FILE when FILE is empty and -x provided

2020-04-29 Thread Gray Wolf
Grep currently special-cased empty pattern file to be the same as pattern file with one empty line (empty pattern). That does mirror how GNU grep behaves, except when -x is provided. In that case .* pattern needs to be used instead. --- Change configured git name to pass the check. findutils/grep

[PATCH] grep: Fix -f FILE when FILE is empty and -x provided

2020-04-27 Thread Wolf
Grep currently special-cased empty pattern file to be the same as pattern file with one empty line (empty pattern). That does mirror how GNU grep behaves, except when -x is provided. In that case .* pattern needs to be used instead. --- findutils/grep.c | 5 +++-- testsuite/grep.tests | 6

grep: Fix -f FILE when FILE is empty and -x provided

2020-04-27 Thread Wolf
Hello, while implementing whitelist mechanism in my shell scripting, I've noticed an inconsistency between busybox's grep and GNU grep. They handle -xf EMPTY_FILE flags differently when EMPTY_FILE is well... empty. GNU grep in that case handles it as if /.*/ pattern was provided, while busybox us

Re: How to rebuild only changed files?

2020-04-25 Thread Wolf
Hello, On 2020-04-23 10:47:33 +0200, Jean-Philippe Brucker wrote: > Note that with recent versions of make (4.3), the whole of busybox is > rebuilt every time. I sent a patch last month to fix it: > > https://www.mail-archive.com/busybox@busybox.net/msg26520.html Thank you! That does fix the iss

Re: How to rebuild only changed files?

2020-04-22 Thread Wolf
On 2020-04-22 21:35:24 +0200, Tito wrote: > out of curiosity what are the mount options of your building directory? I'm building in ~/devel/busybox, which is directly on root partition (I do not have separate /home): + $ mount | grep ' / ' /dev/mapper/storage-root on / type btrfs (rw,noatime,s

How to contribute to busybox and push patches forward?

2020-04-22 Thread Wolf
Hello, I would like to ask what is correct way to push forward patch in the busybox project. I've posted patch to this mailing list, even attached it to the bug report it fixes. And after 3 months I still did not hear anything. It would be nice to at least get some kind of reaction. If the patch

How to rebuild only changed files?

2020-04-22 Thread Wolf
Hello, I would like to ask about some tips for developing the busybox. Currently I just make defconfig make -j8 which seems to work fine and produces busybox binary. However, making tiny change to findutils/grep.c (in my case) and running the make again, it rebuilds *lots* of stu

[PATCH] crontab: Fix -e with editors saving using renaming strategy

2020-01-21 Thread Wolf
file needs to be re-opened after the editor terminates for the changes to properly save. Fixes #12491 Signed-off-by: Wolf --- miscutils/crontab.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/miscutils/crontab.c b/miscutils/crontab.c index c71d914fc..411a18a50 100644

Are you the right guys to ask...?

2008-09-18 Thread Robert Wolf
Hello Busybox, Here is the situation: 1. I have an embedded system, it is called KB-9202B (made by KwikByte). 2. Apparently it has got busybox installed (but I am not 100% sure). 3. I can connect my PC to it (using serial cable RS-232C) and I can talk to it in "Linux". 4. I can also tran