Re: [Toybox] more gnu nonsense: cp -n

2024-04-02 Thread Ryan Prichard via Toybox
Apparently upstream coreutils "cp -n" changed between 9.1 and 9.2, and the Debian maintainers reverted the change temporarily(?) and also added the "non-portable" error. In coreutils 9.1 and older, "cp -n" quietly skipped a file if the destination existed, but as of 9.2, it instead prints an

Re: [Toybox] Endless bash questions...

2022-06-30 Thread Ryan Prichard via Toybox
On Mon, Jun 6, 2022 at 8:50 AM Chet Ramey wrote: > On 6/4/22 7:12 PM, Rob Landley wrote: > > > > P.S. Currently I'm trying to work out the sequencing of redirects vs > > $(subshells) because these work: > > > > $ bash -c $'if true; then cat; fi << EOF\none two\nEOF' > > one two > > $ bash -c

Re: [Toybox] Question about android's header generation policy.

2021-11-12 Thread Ryan Prichard via Toybox
On Fri, Nov 12, 2021 at 2:08 AM Rob Landley wrote: > Also, Android.bp says to run ./regenerate.sh which isn't there when I "git > clone > https://android.googlesource.com/platform/external/toybox; but _is_ there > in the > aosp full repo checkout I haven't updated since july, and I thought

Re: [Toybox] Allow --help after other arguments?

2021-06-19 Thread Ryan Prichard via Toybox
On Fri, Jun 18, 2021 at 6:46 AM Rob Landley wrote: > On 6/11/21 4:51 PM, Ryan Prichard wrote: > > Yeah, I think my ideal would be for --help to apply to the last > (sub)command > > preceding it. e.g. When it appears after a subcommand name, it would be > parsed > > like any other subcommand

Re: [Toybox] Allow --help after other arguments?

2021-06-11 Thread Ryan Prichard via Toybox
On Thu, Jun 10, 2021 at 7:05 PM Rob Landley wrote: > On 6/9/21 9:00 PM, Ryan Prichard wrote: > > It seems to have broken --help when invoking toybox explicitly: > > Because you asked it to. There's a reason it wasn't doing it from any > position > before. > > > $ ./toybox ls --help > > usage.>

Re: [Toybox] Allow --help after other arguments?

2021-06-09 Thread Ryan Prichard via Toybox
21-06-08 19:10 README $ ./tar -c README > --help && ./tar -tvf --help On Wed, Jun 9, 2021 at 4:46 PM Rob Landley wrote: > On 6/8/21 9:11 PM, Ryan Prichard via Toybox wrote: > > $ ls -l --help > > ls: Unknown option 'help' (see "ls --help") > > &

[Toybox] Allow --help after other arguments?

2021-06-08 Thread Ryan Prichard via Toybox
$ ls -l --help ls: Unknown option 'help' (see "ls --help") I tend to add `--help` to the end of a command line that I'm constructing, so I was surprised by toybox's requirement that `--help` be first. Maybe toybox should be more accommodating? Maybe it'd matter more with an alias, e.g.: $ alias

Re: [Toybox] uptime -s

2020-05-14 Thread Ryan Prichard via Toybox
No, it's fine with me. -Ryan On Thu, May 14, 2020 at 5:38 PM Rob Landley wrote: > On 5/14/20 6:48 PM, Ryan Prichard via Toybox wrote: > > FWIW, the GNU "uptime -s" reports my seconds as 31, whereas busybox and > toybox > > alternate between 29 and 30. > >

Re: [Toybox] uptime -s

2020-05-14 Thread Ryan Prichard via Toybox
FWIW, the GNU "uptime -s" reports my seconds as 31, whereas busybox and toybox alternate between 29 and 30. $ uptime -s 2020-05-11 13:58:31 $ for i in $(seq 5); do sleep 0.5; busybox uptime -s; /x/toybox/toybox uptime -s; done 2020-05-11 13:58:30 2020-05-11 13:58:30 2020-05-11 13:58:29

Re: [Toybox] How can I contribute

2019-10-17 Thread Ryan Prichard via Toybox
On Wed, Oct 16, 2019 at 3:27 PM Rob Landley wrote: > Right now toys/posix/ls.c only puts one space between filenames in -C or > -x mode > (which is the default output), and I have a todo item to increase that to 2 > spaces (which is what other implementations do). The reason is I > misunderstood

Re: [Toybox] [PATCH] ln: add -T, use FLAG()

2019-09-25 Thread Ryan Prichard via Toybox
It looks like coreutils and busybox allow only 2 args with -T. Do we need to diagnose this? touch A B ln -sfT A B L ln: extra operand 'L' busybox ln -sfT A B L ln: -T accepts 2 args max toybox ln -sfT A B L ls -l L lrwxrwxrwx 1 rprichard primarygroup 1 Sep 25 13:38 L -> B With this patch, ln

Re: [Toybox] [PATCH] losetup: fix the race.

2019-08-08 Thread Ryan Prichard via Toybox
On Thu, Aug 8, 2019 at 5:51 AM Rob Landley wrote: > On 8/6/19 5:08 PM, Ryan Prichard wrote: > > On Tue, Aug 6, 2019 at 1:56 PM Rob Landley > <mailto:r...@landley.net>> wrote: > > > > On 8/5/19 7:40 PM, Ryan Prichard via Toybox wrote: > > >

Re: [Toybox] [PATCH] losetup: fix the race.

2019-08-07 Thread Ryan Prichard via Toybox
On Wed, Aug 7, 2019 at 8:59 AM enh via Toybox wrote: > ... (but maybe not. there are pros and cons > either way, and neither is ideal. and i'm guessing that Ryan's mention > of EACCES means that he's seen that problem with losetup too.) > I've only seen the ENOENT error, on Android, and I'm

Re: [Toybox] [PATCH] losetup: fix the race.

2019-08-06 Thread Ryan Prichard via Toybox
On Tue, Aug 6, 2019 at 1:56 PM Rob Landley wrote: > On 8/5/19 7:40 PM, Ryan Prichard via Toybox wrote: > > I think this patch fixes a race I noticed, but in practice I was hitting > a > > different race. After LOOP_CTL_GET_FREE had created a new loop device, > losetup &

Re: [Toybox] [PATCH] losetup: fix the race.

2019-08-05 Thread Ryan Prichard via Toybox
I think this patch fixes a race I noticed, but in practice I was hitting a different race. After LOOP_CTL_GET_FREE had created a new loop device, losetup tried to open /dev/block/loopXXX before the device file existed, failing with ENOENT: strace on failure: ... openat(AT_FDCWD,