Re: [PATCH v2] fixdep: add fstat error handling

2024-04-25 Thread David Leonard
On Tue, 23 Apr 2024, Sam James wrote: } - fstat(fd, ); + if (fstat(fd, ) < 0) { + fprintf(stderr, "fixdep: fstat"); + perror(filename); + exit(2); + } if (st.st_size == 0) { close(fd);

RE: Failing shell code under busybox 1.36.1 that worked with 1.31.1

2024-02-15 Thread 'David Leonard'
break; +#endif +#if BASH_PARAM_TRANSFORM + case '@': + /* ${v@operator} */ + subtype = VSTRANSFORM; + newsyn = BASESYNTAX; + break; #endif }

Re: Failing shell code under busybox 1.36.1 that worked with 1.31.1

2024-02-15 Thread David Leonard
_result="$_result '${_p//'/'\"'\"'}'" Busybox ash has a CONFIG_ASH_BASH_COMPAT config to get this ${var//...} replacement behaviour. And, in bash, the ' in the pattern section is treated as a quote start. To give the ' a literal meaning, use \' eg ${_p//\'/..repl..} In current

Re: [PATCH] hwclock: add get/set parameters option

2023-07-05 Thread David Leonard
On Mon, 3 Jul 2023, Andrej Picej wrote: Gentle ping. On 5. 06. 23 10:57, Andrej Picej wrote: In kernel 5.16 special ioctls were introduced to get/set RTC parameters. Add option to get/set parameters into busybox version of hwclock. Implementation is similar to the one already used in

Re: [PATCH] getfattr: new applet

2023-07-05 Thread David Leonard
On Mon, 3 Jul 2023, 余生与君 wrote: Gentle ping. On Sun, Jun 18, 2023 at 4:53 PM LoveSy wrote: function old new delta getfattr_main - 380+380 print_attr

Re: [PATCH 2/2] od: add tests

2023-05-11 Thread David Leonard
On Fri, 12 May 2023, David Leonard wrote: * Added tests for od (non-DESKTOP little-endian) * Allow 'optional' to invert meaning of a config option with '!' Hmm, that patch seems to have been a bit mangled in transit. Attaching. From 78f493ff5b29834dc537d554ba702160a58f70b1 Mon Sep 17 00:00:00

[PATCH 2/2] od: add tests

2023-05-11 Thread David Leonard
* Added tests for od (non-DESKTOP little-endian) * Allow 'optional' to invert meaning of a config option with '!' --- testsuite/od.tests | 191 +++ testsuite/testing.sh | 10 +++ 2 files changed, 201 insertions(+) diff --git a/testsuite/od.tests

[PATCH 1/2] od: fix -O

2023-05-11 Thread David Leonard
od with option -O (4-byte octal) was incorrectly displaying 2-byte decimal when built without CONFIG_DESKTOP --- coreutils/od.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/coreutils/od.c b/coreutils/od.c index 6f22331e0..dcf1bd6f6 100644 --- a/coreutils/od.c +++

Re: [PATCH v4] readlink: slight size optimization

2023-04-24 Thread David Leonard
On Mon, 24 Apr 2023, Harald van Dijk wrote: coreutils/readlink.c:91:27: warning: adding 'unsigned int' to a string does not append to the string [-Wstring-plus-int] printf("%s%s", buf, "\n" + (opt & 1)); ~^~~ coreutils/readlink.c:91:27: note: use

Re: [PATCH v2] find: implement -nouser, -nogroup

2023-01-29 Thread David Leonard
* v2 Fix ifdef guard typo found by Kang-Che Sung Subject: [PATCH v2] find: implement -nouser, -nogroup https://pubs.opengroup.org/onlinepubs/9699919799/utilities/find.html -nouser The primary shall evaluate as true if the file belongs to a user ID for which the getpwuid() function

Re: [PATCH] find: implement -nouser, -nogroup

2023-01-29 Thread David Leonard
On Sun, 29 Jan 2023, Kang-Che Sung wrote: > +IF_FEATURE_FIND_NOUSER( ACTS(nouser)) > +IF_FEATURE_FIND_NOUSER( ACTS(nogroup)) Typo. (Should be IF_FEATURE_FIND_NOGROUP) Thanks! > +ACTF(nouser) > +{ > +       return !getpwuid(statbuf->st_uid); > +} I think there is a logic hole here. getpwuid

Re: [PATCH] find: implement -nouser, -nogroup

2023-01-28 Thread David Leonard
Resending patch for 'find -nouser', 'find -nogroup'. Refreshed bloatcheck Subject: [PATCH] find: implement -nouser, -nogroup https://pubs.opengroup.org/onlinepubs/9699919799/utilities/find.html -nouser The primary shall evaluate as true if the file belongs to a user ID for which

Re: [PATCH] find: implement -ok

2023-01-28 Thread David Leonard
Resending patch for 'find -ok'. I re-ran bloatcheck (x86_64). Subject: [PATCH] find: implement -ok https://pubs.opengroup.org/onlinepubs/9699919799/utilities/find.html -ok utility_name [argument ...] ; The -ok primary shall be equivalent to -exec, except that the use of a to

Re: [PATCH] Added miscutil/tree.c

2022-04-11 Thread David Leonard
ped tree: tree.tempdir: No such file or directory FAIL: tree error opening dir FAIL: tree single file FAIL: tree nested directories and files -- From: David Leonard Date: Tue, 12 Apr 2022 14:13:09 +1000 Subject: [PATCH 1/2] libbb/recursive_action: add ACTION_MORE flag For tree-like call

[PATCH] find: implement -nouser, -nogroup

2022-03-27 Thread David Leonard
Implement's POSIX's -nouser and -nogroup primaries for find. From 48e78e55f367a427cf613f199cfa9060af08a304 Mon Sep 17 00:00:00 2001 From: David Leonard Date: Mon, 28 Mar 2022 11:14:13 +1000 Subject: [PATCH] find: implement -nouser, -nogroup function

[PATCH] find: implement -ok

2022-03-27 Thread David Leonard
-- (add/remove: 0/0 grow/shrink: 5/0 up/down: 191/0) Total: 191 bytesFrom 7ac4795a2767e1fc2a5fbc759290f8ce22000864 Mon Sep 17 00:00:00 2001 From: David Leonard Date: Mon, 28 Mar 2022 10:55:18 +1000 Subject: [PATCH 1/2] find: implement -ok

Re: [PATCH] tsort: new applet

2022-02-20 Thread David Leonard
INY bb_error_msg("cycle at %s", G.nodes[i]->name); + fprintf(stderr, "tsort: cycle at %s\n", G.nodes[i]->name); +#endifFrom 354deec608184a9d82ad117328eff4b3c60f300d Mon Sep 17 00:00:00 2001 From: David Leonard Date: Sun, 20 Feb 2022 14:29:45 +1000 Subje

[PATCH] tsort: new applet

2022-02-20 Thread David Leonard
/tsort.tests | 110 + 3 files changed, 307 insertions(+), 1 deletion(-) create mode 100644 coreutils/tsort.c create mode 100755 testsuite/tsort.testsFrom d398d3dbfd8d1356137d574fd168a61cf58898c2 Mon Sep 17 00:00:00 2001 From: David Leonard Date: Sun, 20 Feb 2022 14:29:45 +1000

Re: [PATCH] date: permit compatible dates in -d option

2020-10-28 Thread David Leonard
I'd like to withdraw this patch. It turns out that hwclock was not the cause. On Fri, 16 Oct 2020, David Leonard wrote: When FEATURE_DATE_COMPAT is enabled, also permit POSIX-style MMDDHHMM[[CC]YY] formats to be used with -d. This form is used by ancient versions of hwclock. --- coreutils

[PATCH] date: permit compatible dates in -d option

2020-10-15 Thread David Leonard
When FEATURE_DATE_COMPAT is enabled, also permit POSIX-style MMDDHHMM[[CC]YY] formats to be used with -d. This form is used by ancient versions of hwclock. --- coreutils/date.c | 50 +--- testsuite/date/date-compat-works | 7 + 2 files changed,