On 10/28/2016 06:04 PM, enh wrote:
> Annoyingly, this means writing a new dmesg implementation that uses /dev/kmsg
> rather than the klogctl system call. Worse, pre-3.5 kernels don't support
> that, so we need to keep the old implementation around as long as we still
> care about those kernels.

Sigh. Let's see, new api...

https://www.kernel.org/doc/Documentation/ABI/testing/dev-kmsg

(Which is the official location for that, by the way. free-electrons is
nice but if kernel.org is going to provide it...)

It's from this guy:

http://www.theregister.co.uk/2014/04/05/torvalds_sievers_dust_up/

This should end well.

> Since I'm here, add the fancy colors from modern dmesg and the -C flag.

There's no way _not_ to color the output except piping it through cat.

I assume dmesg -cC is allowed? And -Crtw etc? Ubuntu 14.04 hasn't got a
-w so I can't test that, but:

  $ dmesg -Crt
  dmesg: --raw can't be used together with level, facility, decode,
  delta, ctime or notime options

Sigh, I need to upgrade lib/args.c to have a syntax to say "these
letters all conflict with the _first_ letter but not each other". [$abc]
maybe? Throw it on the todo heap... (Still neck-deep in GPS-land for
another week. Learning to calculating the G2 register of the LFSR for a
given PRN value. No really, those all mean something. Unfortunatley the
example program the hardware engineer wrote for us was written in bad perl.)

I can't easily test legacy_mode() but it looks like TT.size is never set
if you don't specify -s (defaults to 0) and it'll perror_exit("klogctl")
in that case?

Poking at it...

Rob
_______________________________________________
Toybox mailing list
Toybox@lists.landley.net
http://lists.landley.net/listinfo.cgi/toybox-landley.net

Reply via email to