[Toybox] [PATCH] Add "df -i".

2017-11-15 Thread enh
Also switch to u64 for calculations. Some FUSE file systems have inode counts large enough to overflow s64. --- toys/posix/df.c | 69 +++-- 1 file changed, 47 insertions(+), 22 deletions(-) From a79e67ab7846bc5f2f3b2389806230e4c13f2e2d Mon Sep

Re: [Toybox] [PATCH] Make find -exec + obey ARG_MAX just like xargs.

2017-11-27 Thread enh
eptions and wraparounds...) > > On 11/16/2017 04:20 PM, enh wrote: >> correspondingly, i've made bionic's _SC_ARG_MAX return a constant >> 128KiB again. > > Which is cool, and what Linus said to do, but having environment space > subtract from that 128k means you ca

Re: [Toybox] [PATCH] Add "time -v".

2017-11-27 Thread enh
On Fri, Nov 24, 2017 at 6:40 AM, Rob Landley <r...@landley.net> wrote: > On 11/17/2017 02:18 PM, enh wrote: >> i'm not super convinced by this myself, so more of an RFC... >> specifically this was wanted for the "max rss" line, but it's not >> obviously a

[Toybox] status page out of date again

2017-11-27 Thread enh
https://landley.net/toybox/status.html is still talking about 0.7.4, not 0.7.5... -- Elliott Hughes - http://who/enh - http://jessies.org/~enh/ Android native code/tools questions? Mail me/drop by/add me as a reviewer. ___ Toybox mailing list Toybox

Re: [Toybox] [PATCH] Fix losetup for Android.

2017-11-29 Thread enh
actually, the attached (using CFG_TOYBOX_ON_ANDROID) is probably preferable to either... On Wed, Nov 29, 2017 at 6:50 PM, enh <e...@google.com> wrote: > let me know if you'd rather have the #ifdef in portability.h --- i'm > not sure whether your aim is to have all #ifdefery in there,

[Toybox] [PATCH] Fix losetup for Android.

2017-11-29 Thread enh
By reason of historical accident, Android uses "/dev/block/loopX" rather than "/dev/loopX" (though the control file is in the usual place). Work around that. --- toys/other/losetup.c | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) From db3de4728ce26592057b007128b3ec2586ab Mon Sep

Re: [Toybox] [PATCH] Fix losetup for Android.

2017-11-29 Thread enh
, 2017 at 6:49 PM, enh <e...@google.com> wrote: > By reason of historical accident, Android uses "/dev/block/loopX" rather > than "/dev/loopX" (though the control file is in the usual place). Work > around that. > --- > toys/other/losetup.c | 8 +++- >

[Toybox] [PATCH] Add stty(1).

2017-12-01 Thread enh
Full POSIX stty with Linux extensions. Output and behavior match coreutils 8.26 as far as I can tell. For some reason busybox 1.22 stty always shows all the special characters, even when they match "sane". I've matched coreutils, since "shows differences from sane" is easy to describe and

[Toybox] [PATCH] Use NULL rather than 0 in vargs.

2017-12-04 Thread enh
Top bits count too! --- toys/pending/stty.c | 16 1 file changed, 8 insertions(+), 8 deletions(-) From 693e1d9f7a3ebcbb791d1209530cd16aac92bbbc Mon Sep 17 00:00:00 2001 From: Elliott Hughes Date: Mon, 4 Dec 2017 12:31:53 -0800 Subject: [PATCH] Use NULL rather

Re: [Toybox] toybox and NDK sitrep

2017-12-04 Thread enh
On Sat, Dec 2, 2017 at 11:16 PM, Rob Landley <r...@landley.net> wrote: > On 04/28/2017 05:31 PM, enh wrote: >> since rob asked on some other thread earlier this week... >> >> NDK r15beta2 should hopefully ship in time for I/O in a couple of weeks, >> so i had

[Toybox] tests/losetup.test

2017-12-04 Thread enh
print $7}')" +DEV="$(stat -c %d blah.img)" +NODE="$(stat -c %i blah.img)" losetup -f losetup -f -s -losetup -f file +losetup -f $FILE losetup -d -- Elliott Hughes - http://who/enh - http://jessies.org/~enh/ Android native code/tools questions? Mail me/drop by/add me

Re: [Toybox] [PATCH] Fix losetup for Android.

2017-12-04 Thread enh
On Sat, Dec 2, 2017 at 11:15 PM, Rob Landley <r...@landley.net> wrote: > On 11/29/2017 08:50 PM, enh wrote: >> let me know if you'd rather have the #ifdef in portability.h --- i'm >> not sure whether your aim is to have all #ifdefery in there, or >> whether something sho

Re: [Toybox] [PATCH] killall should kill scripts too.

2017-12-16 Thread enh
wins from toybox having a different but also broken heuristic. On Sat, Dec 16, 2017, 15:13 Rob Landley <r...@landley.net> wrote: > Blah, I got deep enough into > https://github.com/landley/mkroot/commits/master I forgot to check my > mail for a couple days... > > On 12/14/2017

Re: [Toybox] [PATCH] Use NULL rather than 0 in vargs. (Rob Landley)

2017-12-16 Thread enh
set it to 9600. There's a > firmware you can flash into it that sets it to 115200, but it's a > separate firmware (not the spi flash the FPGA loads from) and the only > tool they give you to update it is a windows binary. > > Sigh. > > Anyway, what I can test once by hand and wha

Re: [Toybox] [PATCH] Use NULL rather than 0 in vargs.

2017-12-16 Thread enh
On Sun, Dec 10, 2017 at 12:28 PM, Rob Landley <r...@landley.net> wrote: > My first weekend back home in Austin, and GOING to pick something to > spend some time on, and I guess it's this. :) > > On 12/05/2017 11:32 AM, enh wrote: >> want me to switch to arrays? (and

[Toybox] [PATCH] killall should kill scripts too.

2017-12-13 Thread enh
Found running LTP file system tests on Android. Bug: http://b/70627145 --- lib/lib.c | 28 +++- tests/killall.test | 14 ++ 2 files changed, 33 insertions(+), 9 deletions(-) create mode 100644 tests/killall.test From

Re: [Toybox] [PATCH] killall should kill scripts too.

2017-12-18 Thread enh
ubuntu's > killall we would need to read two files _and_ stat /proc/$$/exe. that's still a lot lighter weight than all the work pgrep/pkill have to do, and it's what everyone's already living with anyway... > Rob -- Elliott Hughes - http://who/enh - http://jessies.org/~enh/

Re: [Toybox] [PATCH] killall should kill scripts too.

2017-12-18 Thread enh
On Mon, Dec 18, 2017 at 5:07 PM, enh <e...@google.com> wrote: > On Sun, Dec 17, 2017 at 9:40 AM, Rob Landley <r...@landley.net> wrote: >> On 12/17/2017 11:20 AM, Rob Landley wrote: >>> Sigh. You argument that "we can't just do something easily explained but >

Re: [Toybox] [PATCH] killall should kill scripts too.

2017-12-16 Thread enh
Landley <r...@landley.net> wrote: > On 12/16/2017 06:59 PM, enh wrote: > > That's my point: there's no way to implement this correctly, so the > > least worst choice is to just implement it the same as everyone else. > > Whatever we do will be surprising in some instances,

Re: [Toybox] [PATCH] Add "df -i".

2017-11-17 Thread enh
On Fri, Nov 17, 2017 at 8:39 AM, Rob Landley <r...@landley.net> wrote: > On 11/15/2017 03:11 PM, enh wrote: >> Also switch to u64 for calculations. Some FUSE file systems have inode >> counts large enough to overflow s64. > > 1<<63 = 9,223,372,036,854,775,808 =

[Toybox] [PATCH] Add "time -v".

2017-11-17 Thread enh
This shows the other fields in getrusage. I've chosen to only show the ones actually maintained by Linux. --- toys/posix/time.c | 23 +++ 1 file changed, 19 insertions(+), 4 deletions(-) From d7e80c0b1a6796959625628413215e9c273bf8dd Mon Sep 17 00:00:00 2001 From: Elliott

Re: [Toybox] [PATCH] Add "time -v".

2017-11-17 Thread enh
i'm not super convinced by this myself, so more of an RFC... specifically this was wanted for the "max rss" line, but it's not obviously a good way to measure that for anything but simple single-threaded/no-forking code (because of children). On Fri, Nov 17, 2017 at 12:15 PM, enh <e.

Re: [Toybox] [PATCH] Make find -exec + obey ARG_MAX just like xargs.

2017-11-16 Thread enh
s use a constant" patch too (glibc removed ARG_MAX, so i think we'd want a #ifndef in portability.h). On Thu, Nov 16, 2017 at 2:17 PM, enh <e...@google.com> wrote: > This isn't ideal, but it matches xargs and none of us is likely to have > time to do the best possible thing any time s

[Toybox] [PATCH] Make find -exec + obey ARG_MAX just like xargs.

2017-11-16 Thread enh
This isn't ideal, but it matches xargs and none of us is likely to have time to do the best possible thing any time soon. Bug: http://b/65818597 Test: ./toybox find /usr/local/google/ndkports/ -exec echo {} + --- toys/posix/find.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) From

[Toybox] [PATCH] Add uptime -p.

2017-11-16 Thread enh
We (Android) give up trying to teach folks what "up 142 days, 1:45" means... Bug: http://b/65205261 --- toys/other/uptime.c | 31 +++ 1 file changed, 23 insertions(+), 8 deletions(-) From bdea6d9d0a3acbb89ba0d3c3227f8daab088e6dc Mon Sep 17 00:00:00 2001 From: Elliott

[Toybox] [PATCH] Don't capitalize in the middle of a sentence.

2017-11-16 Thread enh
Before: toy: Unknown option p (See "toy --help") After: toy: Unknown option p (see "toy --help") --- lib/lib.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) From 9638b2ec3869293f8e6c278628736e3f517d42b9 Mon Sep 17 00:00:00 2001 From: Elliott Hughes Date: Thu, 16 Nov

Re: [Toybox] Yes, I'm aware dreamhost has deleted the mailing list web archive again.

2017-11-01 Thread enh
https://github.com/landley/toybox/commit/2d893a4077c12732238f5a9fc9c31fda8bcc3ed9 fixes the cut and chmod tests for me. thanks! On Tue, Oct 17, 2017 at 11:19 AM, enh <e...@google.com> wrote: > On Wed, Oct 11, 2017 at 1:58 PM, Rob Landley <r...@landley.net> wrote: >> >>

[Toybox] [PATCH] file(1): add ogg, TrueType font, LLVM bitcode, PEM certs, and PE executables.

2017-11-01 Thread enh
More of the files encountered on the Android system image (plus PE executables, which we build but which shouldn't actually make it to the system image!). --- toys/posix/file.c | 43 +++ 1 file changed, 43 insertions(+) From

Re: [Toybox] [PATCH] Use NULL rather than 0 in vargs.

2017-12-05 Thread enh
want me to switch to arrays? (and if so, presumably using ARRAY_LEN rather than an explicit end element?) On Mon, Dec 4, 2017 at 10:47 PM, Rob Landley <r...@landley.net> wrote: > On 12/04/2017 03:27 PM, enh wrote: >> Top bits count too! > > Sigh. This is why I use array

[Toybox] ls (/-b/-q) (/on a tty)

2017-12-08 Thread enh
the Android Studio folks noticed that `ls foo\ bar` changed from returning "foo bar" to "foo\ bar" recently. testing a little bit, -b and -q seem to be wrong, and it seems like a tty should imply -q rather than -b. (`info ls` agrees about the latter, but doesn't distinguish between the two

Re: [Toybox] [PATCH] killall should kill scripts too.

2017-12-20 Thread enh
On Tue, Dec 19, 2017 at 2:35 PM, Rob Landley <r...@landley.net> wrote: > > > On 12/18/2017 11:15 PM, enh wrote: >> On Mon, Dec 18, 2017 at 5:07 PM, enh <e...@google.com> wrote: >>>> Having killall need to do similar grinding over a large number of >

Re: [Toybox] [PATCH] killall should kill scripts too.

2017-12-20 Thread enh
On Tue, Dec 19, 2017 at 1:38 PM, Rob Landley <r...@landley.net> wrote: > > > On 12/18/2017 07:07 PM, enh wrote: >> On Sun, Dec 17, 2017 at 9:40 AM, Rob Landley <r...@landley.net> wrote: >>> On 12/17/2017 11:20 AM, Rob Landley wrote: >>>> Sigh. You

Re: [Toybox] [PATCH] Implement `file -`.

2018-05-04 Thread enh
hanged, 33 insertions(+), 7 deletions(-) On Thu, May 3, 2018 at 8:12 PM, enh <e...@google.com> wrote: > the FSF file(1) is inconsistent too, in a way that suggests it's being > clever: > > ~$ file /dev/zero > /dev/zero: character special (1/5) > ~$ file - < /dev/zero > /de

Re: [Toybox] Thinking about fuser.

2018-05-10 Thread enh
"i have no existing users for this so my opinion is worthless, but..." breaking any existing users for consistency doesn't sound worth the trouble? YAGNI. On Thu, May 10, 2018 at 8:06 AM, Rob Landley wrote: > I haven't implemented fuser because the way it works is kinda

Re: [Toybox] [PATCH] Implement `file -`.

2018-05-07 Thread enh
06:19 PM, enh wrote: >> AFK, but I'm using glibc too, from Debian testing. > > I found it, the stdin case is using the stat.length value to see how much to > read but never did the stat, so it's uninitialized stack crap. When it's > zero... > > Oops. Oddly enough, the com

Re: [Toybox] [PATCH] Implement `file -`.

2018-05-05 Thread enh
AFK, but I'm using glibc too, from Debian testing. On Sat, May 5, 2018, 16:01 Rob Landley <r...@landley.net> wrote: > On 05/05/2018 02:14 PM, enh wrote: > > On Sat, May 5, 2018 at 10:53 AM, Rob Landley <r...@landley.net> wrote: > > well, strictly i think only

Re: [Toybox] [PATCH] Support fractional seconds (and other time units) in `top -d`.

2018-05-05 Thread enh
ping? On Thu, May 3, 2018 at 3:25 PM, enh <e...@google.com> wrote: > LTP uses `top -d 0.1`, which isn't convincingly useful, but general > support for other time units might be useful, and switching to xparsetime > addresses both at once. > > Also fix 3169d948c049664bcf7

Re: [Toybox] [PATCH] Implement `file -`.

2018-05-24 Thread enh
ping? On Mon, May 7, 2018 at 1:35 PM Rob Landley <r...@landley.net> wrote: > I got distracted over the weekend, but lemme see if I can come up with a more > elegant solution this evening before falling back to that plan. > Thanks, > Rob > On 05/07/2018 01:50 PM, e

[Toybox] [PATCH] top: running processes are shown in bold.

2018-06-11 Thread enh
--- toys/posix/ps.c | 5 + 1 file changed, 5 insertions(+) From 2018ddfc88b334aff5b768a053c2617d2a23a27c Mon Sep 17 00:00:00 2001 From: Elliott Hughes Date: Mon, 11 Jun 2018 17:14:29 -0700 Subject: [PATCH] top: running processes are shown in bold. --- toys/posix/ps.c | 5 + 1 file

[Toybox] [PATCH] top: remove flicker in interactive mode.

2018-06-12 Thread enh
--- toys/posix/ps.c | 10 +++--- 1 file changed, 7 insertions(+), 3 deletions(-) From 7eef628e471a4b8d100dc7c3c6afb88d96c9c77d Mon Sep 17 00:00:00 2001 From: Elliott Hughes Date: Tue, 12 Jun 2018 12:04:30 -0700 Subject: [PATCH] top: remove flicker in interactive mode. --- toys/posix/ps.c |

Re: [Toybox] [PATCH] top: remove flicker in interactive mode.

2018-06-12 Thread enh
note that this will only apply on top of yesterday's patch to top. (if, like me, you're wondering: no, this difference in buffering doesn't explain why toybox top uses 2x the CPU of procps top... this patch doesn't change that.) On Tue, Jun 12, 2018 at 12:05 PM enh wrote: > > --- > t

[Toybox] [PATCH] ping: add -m, switch to xsetsockopt.

2018-06-13 Thread enh
Bug: http://b/28027677 toybox ping doesn't support -m mark Test: strace -e setsockopt ./toybox ping -c 1 -m 0x1000 127.0.0.1 --- toys/net/ping.c | 14 +++--- 1 file changed, 11 insertions(+), 3 deletions(-) From 4f89d588340764706af24f77a712b1bfc88f79ee Mon Sep 17 00:00:00 2001 From:

[Toybox] [PATCH] ping: support ping6 as a synonym for `ping -6`.

2018-06-13 Thread enh
Sadly, this is what existing scripts seem to do. --- toys/net/ping.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) From 994b448d09927adf948e48241a4904773ebb6810 Mon Sep 17 00:00:00 2001 From: Elliott Hughes Date: Wed, 13 Jun 2018 15:01:17 -0700 Subject: [PATCH] ping: support ping6 as a

[Toybox] [PATCH] ping: fix -q behavior.

2018-06-14 Thread enh
This matches iputils and busybox. --- toys/net/ping.c | 18 -- 1 file changed, 8 insertions(+), 10 deletions(-) From c9c6dfe0542fd962dc0706935f1e39d8e5d5364e Mon Sep 17 00:00:00 2001 From: Elliott Hughes Date: Thu, 14 Jun 2018 16:08:32 -0700 Subject: [PATCH] ping: fix -q

[Toybox] [PATCH] Add tests for file stdin behavior.

2018-06-11 Thread enh
--- tests/file.test | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) From 1cadc76dc377ecdd1e3a606723ee1213b84c59af Mon Sep 17 00:00:00 2001 From: Elliott Hughes Date: Mon, 11 Jun 2018 13:17:34 -0700 Subject: [PATCH] Add tests for file stdin behavior. --- tests/file.test | 8

Re: [Toybox] Has soong replaced ninja?

2018-05-30 Thread enh
soong is a level above ninja. ninja is still the back-end. but instead of kati translating makefiles into ninja files, soong turns blueprint (.bp) files into ninja files. the way i've heard it described is that ninja is the assembly language for make-like tasks, but not something you should use

[Toybox] off-topic: /sbin --- "static" or "system"

2018-05-30 Thread enh
do you have a canonical reference to the first unix with an /sbin? the question came up of what the "s" originally stood for. i'd always believed "static" because that's what the old-timers told me when i first came across unix in 1993. finding the first unix with /sbin might lead to a proper

Re: [Toybox] Alternatives to github?

2018-06-05 Thread enh
one thing to bear in mind: i've heard from folks at chinese OEMs that thanks to the great firewall, if something's not on github, it's basically inaccessible to them. they're more likely to be able to look at some random's claimed github _fork_ of AOSP than AOSP itself, for example :-/ On Sun, Jun

Re: [Toybox] fmt tests.

2018-06-27 Thread enh
On Fri, Jun 22, 2018 at 4:06 PM Rob Landley wrote: > > On 06/22/2018 03:24 PM, enh wrote: > >‘fmt’ prefers breaking lines at the end of a sentence, and tries to > > avoid line breaks after the first word of a sentence or before the last > > word of a sentence. A “se

Re: [Toybox] fmt tests.

2018-06-22 Thread enh
On Wed, Jun 20, 2018 at 10:30 PM Rob Landley wrote: > > So I redid fmt.c and think it's ready to promote, but now I'm tweaking it to > pass the fmt tests and... making them match what ubuntu's doing exactly is > weird? > > $ echo -e 'hello world\n this is some text' | fmt -w 10 > hello > world >

Re: [Toybox] Does anybody use ipcmk?

2018-07-02 Thread enh
On Mon, Jul 2, 2018 at 12:37 PM Rob Landley wrote: > > On 07/02/2018 10:37 AM, enh wrote: > > (sysv ipc is disabled in multiple ways on Android. you can't pass CTS > > with a kernel that supports it.) > > Indeed, but the CLONE_NEWIPC container namespace implies it'll proba

Re: [Toybox] [PATCH] bufgetgrgid: fix for very large groups.

2018-07-02 Thread enh
On Sat, Jun 30, 2018 at 7:45 PM Rob Landley wrote: > > On 06/28/2018 06:41 PM, enh wrote: > > In theory, both getpwuid_r and getgrgid_r need to loop until the buffer > > is large enough. In practice, that's true for me with getgrgid_r. > > A fixed size 512 byte al

Re: [Toybox] [PATCH] bufgetgrgid: fix for very large groups.

2018-07-02 Thread enh
On Sat, Jun 30, 2018 at 10:12 PM Rob Landley wrote: > > On 06/30/2018 09:45 PM, Rob Landley wrote: > > Sigh, but I might as well keep the two functions matching in case I do work > > out > > a way to collapse them together later. > > Question, which requires some context first: > > I've been

Re: [Toybox] Github "failed to load latest commit information"?

2018-06-30 Thread enh
It's working for me. On Sat, Jun 30, 2018, 07:29 Rob Landley wrote: > https://github.com/landley/toybox/tree/master/toys is giving me an error, > but > clicking on the error message doesn't give details. > > Microsoft hasn't even owned it a month yet, this is silly. The commit log > seems >

Re: [Toybox] Does anybody use ipcmk?

2018-07-02 Thread enh
(sysv ipc is disabled in multiple ways on Android. you can't pass CTS with a kernel that supports it.) On Sun, Jul 1, 2018 at 7:32 PM Rob Landley wrote: > > toys/pending/ipcs.c and toys/pending/iprm.c will list and delete sysv > inter-process communication resources (shared memory, message queue,

[Toybox] [PATCH] Add uuidgen.

2018-05-02 Thread enh
Reuse create_uuid, but make it match the current RFC. --- lib/lib.c | 23 --- tests/uuidgen.test | 7 +++ toys/pending/uuidgen.c | 25 + 3 files changed, 40 insertions(+), 15 deletions(-) create mode 100755 tests/uuidgen.test

[Toybox] new coreutils ls quoting options...

2018-05-02 Thread enh
i was surprised to see all the files in `ls` output indented by one space today. turns out that was because there was a file with a space in the name in that directory. /tmp/x$ touch 'hello.txt' 'hello world.txt' /tmp/x$ ls hello.txt 'hello world.txt' /tmp/x$ ls -1 hello.txt 'hello world.txt'

[Toybox] float parsing in args.c

2018-05-03 Thread enh
seems like '.' (as opposed to '#') doesn't actually work? generates a `FLAGS_.` and breaks the build if i try to use it. nothing's using it yet, and the place i was going to use it ended up better off with xparsetime anyway. (also the code.html docs are out of date wrt to the corresponding big

Re: [Toybox] new coreutils ls quoting options...

2018-05-03 Thread enh
On Thu, May 3, 2018 at 2:31 PM, Rob Landley <r...@landley.net> wrote: > > On 05/03/2018 12:55 AM, enh wrote: > > i was surprised to see all the files in `ls` output indented by one > > space today. turns out that was because there was a file with a space > > in the

[Toybox] [PATCH] Implement `file -`.

2018-05-03 Thread enh
Previously we'd just always bogusly report "empty". --- tests/file.test | 2 ++ toys/posix/file.c | 20 +--- 2 files changed, 19 insertions(+), 3 deletions(-) From fe3639f24995cc96f5a05eacae52f0b624f3af7c Mon Sep 17 00:00:00 2001 From: Elliott Hughes Date:

Re: [Toybox] [PATCH] Implement `file -`.

2018-05-03 Thread enh
the FSF file(1) is inconsistent too, in a way that suggests it's being clever: ~$ file /dev/zero /dev/zero: character special (1/5) ~$ file - < /dev/zero /dev/stdin: data ~$ On Thu, May 3, 2018, 18:36 Rob Landley <r...@landley.net> wrote: > On 05/03/2018 06:40 P

Re: [Toybox] TOYBOX_VERSION

2017-10-19 Thread enh
ping on TOYBOX_VENDOR? On Mon, Oct 16, 2017 at 5:20 PM, enh <e...@google.com> wrote: > On Mon, Oct 16, 2017 at 2:24 PM, Rob Landley <r...@landley.net> wrote: >> Hey, didn't wind up in spam this time! (Gmail learns.) >> >> On 10/16/2017 12:29 PM, enh wrote: &

Re: [Toybox] [PATCH] killall should kill scripts too.

2017-12-23 Thread enh
On Wed, Dec 20, 2017 at 10:34 AM, enh <e...@google.com> wrote: > On Tue, Dec 19, 2017 at 2:35 PM, Rob Landley <r...@landley.net> wrote: >> >> >> On 12/18/2017 11:15 PM, enh wrote: >>> On Mon, Dec 18, 2017 at 5:07 PM, enh <e...@google.com> wrote:

[Toybox] [PATCH] Add xxd -i (and xxd -ri).

2017-12-24 Thread enh
The original xxd doesn't support -r with -i. The original also outputs "unsigned char name[] = { ... };" for input other than stdin, but that actually makes it less useful --- many languages support array initializers, but far fewer support that exact declaration syntax. Also fix the -c range

[Toybox] [PATCH] Add fmt.

2017-12-23 Thread enh
A very simple implementation of fmt, good enough for my daily use of !!fmt in vi to reflow checkin comments like this. --- tests/fmt.test | 21 +++ toys/pending/fmt.c | 78 ++ 2 files changed, 99 insertions(+) create mode 100755

Re: [Toybox] [PATCH] Revert "Fix "ps -T 1234" to show thread belonging to that PID."

2018-01-24 Thread enh
On Wed, Jan 24, 2018 at 1:14 PM, Rob Landley <r...@landley.net> wrote: > On 01/24/2018 10:40 AM, enh wrote: >>> You want it to go _back_ to this old behavior, the new one where it >>> matches the other ps is wrong? >> >> having -AT broken breaks bug reports,

Re: [Toybox] gunzip.c cleanup

2018-01-17 Thread enh
On Sun, Jan 14, 2018 at 10:29 AM, Rob Landley <r...@landley.net> wrote: > On 01/08/2018 07:27 PM, enh wrote: >> but, yeah, i should have said so in TODO comments. (i thought i did >> comment the former, but that may have been lost in the toybox >> obfuscated c competi

Re: [Toybox] gunzip.c cleanup

2018-01-17 Thread enh
On Sun, Jan 14, 2018 at 10:29 AM, Rob Landley <r...@landley.net> wrote: > On 01/08/2018 07:27 PM, enh wrote: >> but, yeah, i should have said so in TODO comments. (i thought i did >> comment the former, but that may have been lost in the toybox >> obfuscated c competi

Re: [Toybox] [PATCH] Revert "Fix "ps -T 1234" to show thread belonging to that PID."

2018-01-24 Thread enh
0 MemoryInfra 244430 90655 ? 00:00:01 TaskSchedulerRe On Wed, Jan 24, 2018 at 8:40 AM, enh <e...@google.com> wrote: > On Wed, Jan 24, 2018 at 8:18 AM, Rob Landley <r...@landley.net> wrote: >> On 01/23/2018 05:13 PM, enh wrote: >>> This reverts commit 416397

Re: [Toybox] [PATCH] Revert "Fix "ps -T 1234" to show thread belonging to that PID."

2018-01-24 Thread enh
On Wed, Jan 24, 2018 at 8:18 AM, Rob Landley <r...@landley.net> wrote: > On 01/23/2018 05:13 PM, enh wrote: >> This reverts commit 416397e14858c75a9bf20d05f7729595e03943df. >> >> Reason: this breaks -AT while not actually fixing the -T PID problem. >> >> Prev

Re: [Toybox] Release prep.

2018-02-05 Thread enh
On Sun, Feb 4, 2018 at 6:14 PM, Rob Landley wrote: > For some reason I thought the next release should happen the middle of > this month, but it turns out it was the middle of last month. (Ok, I've > been distracted.) > > So I'm giving myself one more week to tidy up loose ends.

Re: [Toybox] Release prep.

2018-02-05 Thread enh
On Mon, Feb 5, 2018 at 10:43 AM, Rob Landley <r...@landley.net> wrote: > On 02/05/2018 11:34 AM, enh wrote: >> On Sun, Feb 4, 2018 at 6:14 PM, Rob Landley <r...@landley.net> wrote: >>> For some reason I thought the next release should happen the middle of &g

Re: [Toybox] crc64?

2018-02-05 Thread enh
i think the world has mostly moved on to SHA already anyway, at this level of the stack. things like CRC are just for hardware these days. (Android recently removed a software CRC from adb.) On Sun, Feb 4, 2018 at 7:35 PM, Rob Landley wrote: > On 02/04/2018 07:54 PM, Rob

Re: [Toybox] Release prep.

2018-02-07 Thread enh
On Mon, Feb 5, 2018 at 11:01 AM, enh <e...@google.com> wrote: > On Mon, Feb 5, 2018 at 10:43 AM, Rob Landley <r...@landley.net> wrote: >> On 02/05/2018 11:34 AM, enh wrote: >>> On Sun, Feb 4, 2018 at 6:14 PM, Rob Landley <r...@landley.net> wrote: >>>

[Toybox] [PATCH] Fix the pidof comm test.

2018-02-08 Thread enh
If we have a 15-byte name, we don't know whether comm actually matches or is a truncated form of a longer name that has a common prefix. For example, with "this-is-a-very-long-name-that-is-too-long", we shouldn't match "this-is-a-very-" (but the old code would). Bug: http://b/73123244 ---

Re: [Toybox] [PATCH] Fix the pidof comm test.

2018-02-08 Thread enh
ons(-) On Thu, Feb 8, 2018 at 10:44 PM, enh <e...@google.com> wrote: > If we have a 15-byte name, we don't know whether comm actually matches > or is a truncated form of a longer name that has a common prefix. > > For example, with "this-is-a-very-long-name-that-is-too-

Re: [Toybox] making ./configure executable.

2018-02-06 Thread enh
On Tue, Feb 6, 2018 at 8:45 AM, Rob Landley wrote: > On 02/05/2018 09:41 PM, Robert Thompson wrote: >> Yeah, I ran into some similar issues years ago... In my case, I got >> burned into learning not to assume that bash (or any other shell) is >> correct, or even necessarily

Re: [Toybox] Release prep.

2018-02-09 Thread enh
On Fri, Feb 9, 2018 at 9:07 AM, Andreas Gampe wrote: > On Fri, Feb 9, 2018 at 7:36 AM, Rob Landley wrote: >> >> >> On 02/08/2018 10:44 AM, Andreas Gampe wrote: >>> Argh. I should have given you the full failure message (or be more >>> explicit in the

Re: [Toybox] [PATCH] Revert "Fix "ps -T 1234" to show thread belonging to that PID."

2018-02-13 Thread enh
On Sat, Feb 10, 2018 at 10:40 AM, Rob Landley <r...@landley.net> wrote: > Ok, trying again at ps -T. > > On 01/24/2018 10:42 AM, enh wrote: >> random example on my laptop: >> >> /tmp/toybox$ ./toybox ps -AT >> ... >> 244083 244083 ? 00:17:32 c

Re: [Toybox] getprop.c

2018-02-14 Thread enh
On Wed, Feb 14, 2018 at 8:06 AM, Rob Landley wrote: > I'm working on release notes and I noticed this is the android toybox repo: > > Author: Tom Cherry > Date: Thu Jan 4 10:13:59 2018 -0800 > > Reland: Stop building getprop > > We've

Re: [Toybox] getprop.c

2018-02-14 Thread enh
they're unrelated. (the distinction between native system properties and Java system properties -- both of which are relevant on Android -- causes a deal of confusion.) On Wed, Feb 14, 2018 at 3:00 PM, scsijon wrote: > > May I point out that getprop and setprop are

Re: [Toybox] toys/android/log.c with android NDK?

2018-02-14 Thread enh
On Wed, Feb 14, 2018 at 3:36 PM, Rob Landley wrote: > I grabbed the current ndk (-r16b), make_standalone_toolchain.py'd an --arch > x86_64 --api 26 toolchain, and then built defconfig toybox with it, and at > link > time it failed to find: > > '__android_log_write' >

Re: [Toybox] Numeric values in dd operands

2018-02-20 Thread enh
On Tue, Feb 20, 2018 at 9:28 AM, Rob Landley wrote: > On 02/19/2018 09:09 PM, scsijon wrote: >> On 02/20/2018 08:32 AM, toybox-requ...@lists.landley.net wrote: >>> Are you actually using that mid-number multiplier? I was asking on the list >>> last >>> year if anyone anywhere

Re: [Toybox] Numeric values in dd operands

2018-02-20 Thread enh
On Tue, Feb 20, 2018 at 9:57 AM, Rob Landley <r...@landley.net> wrote: > On 02/20/2018 11:32 AM, enh wrote: >> On Tue, Feb 20, 2018 at 9:28 AM, Rob Landley <r...@landley.net> wrote: >>> A real user piped up and said their existing script doesn't work with m

Re: [Toybox] RFC: "ps -o ?", "logger -p ?", "kill -s ?"

2018-02-20 Thread enh
wasn't that the whole reason behind adding the suggestion to the syntax error message? ps: Missing argument to -o (see "ps --help") i think the only real problem is the old bug where commands like top don't show the -o/-O help from ps. (a quick workaround would be to mention the "see also" in

[Toybox] [PATCH] Fix xargs -0 with -n.

2017-12-25 Thread enh
Also make -0 and -E mutually exclusive (rather than just ignore -E with -0). Bug: https://github.com/landley/toybox/issues/78 --- tests/xargs.test | 3 +++ toys/posix/xargs.c | 5 ++--- 2 files changed, 5 insertions(+), 3 deletions(-) From 6b4d00aec3fa6695b5ca916f37e2e37ab330dffc Mon Sep 17

Re: [Toybox] toybox: modprobe patch

2018-08-02 Thread enh
Did you see my alternative patch, either on the internal bug or this mailing list? I don't think we actually want to return errno... On Thu, Aug 2, 2018, 14:01 xiewen wrote: > hi Guys: > > I find a bug in modprobe.c: > In the following case, modprobe will fail: > First ins_mod

Re: [Toybox] pcre2grep

2018-08-02 Thread enh
On Thu, Aug 2, 2018 at 1:56 PM Rob Landley wrote: > I see > > http://lists.landley.net/pipermail/toybox-landley.net/2018-August/009585.html > but never got a copy through the list, I'm guessing gmail bounced it as > spam. > did you see my several recent "ping" emails for other patches? there's

Re: [Toybox] pcre2grep

2018-08-03 Thread enh
/me wonders if he should have got that @android.com vanity address after all... :-) On Fri, Aug 3, 2018 at 7:32 AM Rob Landley wrote: > On 08/02/2018 03:56 PM, Rob Landley wrote: > > I see > > > http://lists.landley.net/pipermail/toybox-landley.net/2018-August/009585.html > > but never got a

Re: [Toybox] [PATCH] wc: fix the column width heuristics even further.

2018-07-30 Thread enh
ping? On Thu, Jul 26, 2018 at 4:38 PM enh wrote: > > This was found by > https://kernel.googlesource.com/pub/scm/linux/kernel/git/shuah/linux-kselftest/+/master/tools/testing/selftests/splice/default_file_splice_read.sh > which broke after the recent change. > > Plus this actu

Re: [Toybox] [PATCH] Add tests for grep with implicit/explicit BREs and explicit EREs.

2018-07-30 Thread enh
ping? On Thu, Jul 26, 2018 at 3:44 PM enh wrote: > This is in POSIX, but pcre2grep gets it wrong ( > https://bugs.exim.org/show_bug.cgi?id=2294). > --- > tests/grep.test | 8 > 1 file changed, 8 insertions(+) > > __

Re: [Toybox] [PATCH] file: slightly improve .class, add .dex.

2018-07-30 Thread enh
ping? On Tue, Jul 24, 2018 at 11:49 AM enh wrote: > > --- > tests/file.test | 12 +++- > toys/posix/file.c | 10 +++--- > 2 files changed, 14 insertions(+), 8 deletions(-) > > ___ Toybox mailing list Toybox@l

[Toybox] [PATCH] Add tests for grep with implicit/explicit BREs and explicit EREs.

2018-07-26 Thread enh
This is in POSIX, but pcre2grep gets it wrong ( https://bugs.exim.org/show_bug.cgi?id=2294). --- tests/grep.test | 8 1 file changed, 8 insertions(+) From 6af18fe70dcea718ceddecb4070aa9344c20398f Mon Sep 17 00:00:00 2001 From: Elliott Hughes Date: Thu, 26 Jul 2018 15:42:02 -0700

[Toybox] [PATCH] wc: fix the column width heuristics even further.

2018-07-26 Thread enh
This was found by https://kernel.googlesource.com/pub/scm/linux/kernel/git/shuah/linux-kselftest/+/master/tools/testing/selftests/splice/default_file_splice_read.sh which broke after the recent change. Plus this actually fixes another of our existing test failures on the host. I'm assuming we

[Toybox] [PATCH] Fix modprobe error handling.

2018-08-01 Thread enh
modprobe was failing if you `modprobe a.ko`, then `modprobe b.ko` where b.ko depends on a.ko --- b.ko will fail to load because a.ko is already loaded. The code to handle this was incorrectly checking `rc` rather than `errno` against EEXIST. (We should pull the insmod.c equivalent of `ins_mod`

[Toybox] pcre2grep

2018-08-01 Thread enh
FYI, pcre2grep probably not ever going to be "POSIX enough"... https://bugs.exim.org/show_bug.cgi?id=2294 so after a brief trial in master, Android's back to BSD grep for now... ___ Toybox mailing list Toybox@lists.landley.net

Re: [Toybox] [CLEANUP][watch.c]

2018-08-20 Thread enh
PM enh wrote: > > > On Sun, Aug 19, 2018 at 2:44 PM Rob Landley wrote: > >> On 08/16/2018 08:37 PM, haroon maqsood wrote: >> > Hi PFA, >> > my attempt at cleanup of watch.c in pending. >> > Thanks >> > Haroon >> >> A little more de

Re: [Toybox] [CLEANUP][watch.c]

2018-08-20 Thread enh
On Sun, Aug 19, 2018 at 2:44 PM Rob Landley wrote: > On 08/16/2018 08:37 PM, haroon maqsood wrote: > > Hi PFA, > > my attempt at cleanup of watch.c in pending. > > Thanks > > Haroon > > A little more description of what you did would be nice. Let's see... > requiring > -n to be at least one

Re: [Toybox] Android microcom questions.

2018-08-17 Thread enh
On Fri, Aug 17, 2018 at 10:08 AM Rob Landley wrote: > Microcom says it's from "the android open source project", so presumably I > should send questions that way: Why do you open the tty in nonblocking > mode and > then immediately switch to blocking mode for the reads (guarded by poll so > they

[Toybox] [PATCH] Add .wav support to file(1).

2018-08-23 Thread enh
--- toys/posix/file.c | 27 +++ 1 file changed, 27 insertions(+) From 5e2f474478853a683aaa0839929ff76315037b23 Mon Sep 17 00:00:00 2001 From: Elliott Hughes Date: Thu, 23 Aug 2018 15:47:08 -0700 Subject: [PATCH] Add .wav support to file(1). --- toys/posix/file.c | 27

<    2   3   4   5   6   7   8   9   10   11   >