> line at a time - the library assembles the lines into the requested
> buffer's worth

Nice - this way you may easily generate quite large files using a buffer
covering just one line. This probably also means that Read returns in
most cases less bytes than requested, just as much as needed for the
current line up to \n. The server likely has to keep some information
like the next read-offset expected, and the next line number, so that it
can check whether the next read-request actually asks for the next line
 -- if it doesn't ignore seek/offsets at all, which also seems practicable.

> writing files can be flagged smilarly:
> 
> line at a time - newlines and leading and trailing whitespace
> stripped

I suppose this is adequate for control files waiting for commands. One
can leave the fd open, and send one line after the other as needed.

One thing I like about the idea using 9p even in smaller systems is,
that you can define one file to be something like a "serial terminal".
If one has a lot of such embedded devices connected to a network, one
can easily have a "command line" for each of them without the need to
connect each to a real serial port.

Michael

Reply via email to