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

2024-07-31 Thread enh via Toybox
ping? On Mon, Jul 29, 2024 at 8:48 AM enh wrote: > > ping? > > On Fri, Jul 26, 2024 at 7:52 PM Rob Landley wrote: > > > > On 7/26/24 07:13, enh via Toybox wrote: > > >> Don't know Rob cares about this, but ?: is not ISO C. It's a GNU > > >> extension. > > > > Specifically https://gcc.gnu.org/onl

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

2024-07-29 Thread enh via Toybox
ping? On Fri, Jul 26, 2024 at 7:52 PM Rob Landley wrote: > > On 7/26/24 07:13, enh via Toybox wrote: > >> Don't know Rob cares about this, but ?: is not ISO C. It's a GNU > >> extension. > > Specifically https://gcc.gnu.org/onlinedocs/gcc-14.1.0/gcc/Conditionals.html > > > with 80 existing uses o

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

2024-07-26 Thread Rob Landley
On 7/26/24 07:13, enh via Toybox wrote: >> Don't know Rob cares about this, but ?: is not ISO C. It's a GNU >> extension. Specifically https://gcc.gnu.org/onlinedocs/gcc-14.1.0/gcc/Conditionals.html > with 80 existing uses of https://en.wikipedia.org/wiki/Elvis_operator > in toybox, i'm pretty su

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

2024-07-26 Thread enh via Toybox
with 80 existing uses of https://en.wikipedia.org/wiki/Elvis_operator in toybox, i'm pretty sure rob knows this already :-) On Thu, Jul 25, 2024 at 6:01 PM Ivo van Poorten wrote: > > On Thu, 25 Jul 2024 14:17:51 -0400 enh via Toybox > wrote: > > +fd = xopen(TT.f ?: "/dev/mem", (writing ? O_R

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

2024-07-25 Thread Ivo van Poorten
On Thu, 25 Jul 2024 14:17:51 -0400 enh via Toybox 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

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

2024-07-25 Thread enh via Toybox
-f lets people use /dev/port for x86 i/o ports (rather than needing a separate x86-only command), or /dev/nvram, or /dev/cpu/*/msr, or /sys/bus/pci/devices/*:*:*.* ... you get the idea. It also means we can write some tests. (Though of course, the tests don't tell us whether this actually works wi