[Toybox] [PATCH] devmem: add -f FILE, arbitrary amounts of data.

Ivo van Poorten ivopvp at gmail.com
Thu Jul 25 15:01:25 PDT 2024


On Thu, 25 Jul 2024 14:17:51 -0400 enh via Toybox
<toybox at lists.landley.net> wrote:
> +    fd = xopen(TT.f ?: "/dev/mem", (writing ? O_RDWR : O_RDONLY) |
> O_SYNC);

Don't know Rob cares about this, but ?: is not ISO C. It's a GNU
extension. Up until a few minutes ago I didn't even know this existed :)
Would be nice if this was eventually added to the C standard as it's
clearly very handy and it also avoids double evaluation in case of foo =
f(x) ? f(x) : bar;

Regards,
Ivo


More information about the Toybox mailing list