[Toybox] freadahead()
Rob Landley
rob at landley.net
Thu Sep 22 22:41:13 PDT 2022
On 9/22/22 18:59, enh wrote:
> On Tue, Apr 12, 2022 at 9:02 PM Rob Landley wrote:
> > The number I'm looking for is "how many bytes can I read from the FILE
> pointer
> > without triggering another underlying read from the fd" because I
> can't re-read
> > that data from the fd. So I need to fetch the data out of the buffer
> and handle
> > it before calling the "takes the rest as a filehandle" function. In
> the case of
> > patch.c, something like reading the remaining FILE * data into
> toybuf() and
> > doing a write() to the output fd before calling sendfile().
> >
> > ah, right. that makes more sense. yeah, i'll add this.
>
> Yay! Thank you.
>
> well, that took a while, but better late than
> never: https://android-review.googlesource.com/c/platform/bionic/+/2227544
And now https://www.mail-archive.com/austin-group-l@opengroup.org/msg10171.html
Rob
More information about the Toybox
mailing list