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

Rob Landley rob at landley.net
Sat May 5 17:24:24 PDT 2018


Yeah, sorry, the todo item this spun off is "lib/args.c updates" but I spent
today distracted*.

Rob

* I.E. trying to figuring out how ubifs (and the ubi layer under it) work,
preferably with qemu emulating flash, and how to genericize
https://balau82.wordpress.com/2010/02/28/hello-world-for-bare-metal-arm-using-qemu/
for multiple archtectures, especially ones with an ELF loader. (I've had a todo
item forever to try to get QEMU's elf loader hooked up to the -kernel argument
on _all_ architectures so I can just feed it vmlinux and be done with it, and
the j-core stuff has an ELF loader as its stage 1 bootloader, and I think u-boot
can do that too. Making binary with _start() instead of main() is easy enough
(the magic argument is --nostartfiles) but the three constants in the _proper_
direct write loop:

  char *str = "hello world\n";
  while (*str && (WRITE_READY&*STATUS)) *OUTPUT = *str++;

vary for each architecture, and yes that's a legitimate use for "volatile"...

*shrug* The weekend.

Still Rob

On 05/05/2018 02:15 PM, enh wrote:
> ping?
> 
> On Thu, May 3, 2018 at 3:25 PM, enh <enh at 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 3169d948c049664bcf7216d4c4ae751881099d3e where I mistakenly
>> treated `rev` and `toys.optflags&FLAG_b` as interchangeable. (Without
>> this second fix, `top -b` looks fine but `top` is broken!)
>>
>> Also fix xparsetime to reject input such as "monkey" or "1monkey".
>> ---
>>  lib/xwrap.c     | 10 +++++++---
>>  tests/top.test  |  6 ++++++
>>  toys/posix/ps.c | 23 +++++++++++++++--------
>>  3 files changed, 28 insertions(+), 11 deletions(-)
>>
> _______________________________________________
> Toybox mailing list
> Toybox at lists.landley.net
> http://lists.landley.net/listinfo.cgi/toybox-landley.net
> 



More information about the Toybox mailing list