There are some helper functions for this for various types of data;
readnum, readstring, etc. I can't remember if there is a 'readbytes' but it
would be useful to add....

On Sun, Dec 6, 2015 at 1:05 PM, 'Davide Libenzi' via Akaros <
[email protected]> wrote:

> When userspace open a device for read, it typically reads the response in
> chunks, with rolling offsets for the reads.
> In the few devices I had my eyes on (kprof/mpstat for one), and in the new
> interrupts one, we build a new response at every read, and use the offset
> to return the proper section of it.
> This is clearly not right, as offsets mean different things at different
> times, as response contents are not the same.
> These kind of devices needs to have some notion of caching the content,
> otherwise userspace will read garbage on the seams.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Akaros" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to [email protected].
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Akaros" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to