![]() | |||||||||||||
Messages in this thread |
On Mon, 17 Nov 2003 viro@parcelfarce.linux.theplanet.co.uk wrote: > EOF had been reached when read() returns 0. Until then read() returns > an arbitrary amount of bytes between 1 and 'size' argument. Since you > are using read(2) directly, use it correctly... I know that for read(2) in general but I thought that the whole point of using "sequential record" files (aka seq_file) is that they guarantee read(2) to return a number of fixed-size records, hence the name "sequential record". Especially since the ->show() function is packing those records into m->buf as "whole" entities, not in "halves" or such. I believe you of course (as you wrote seq_file) but it still seems that as long as the implementation (i.e. my module) is working with whole records it is ok to assume that read() will return them as whole, i.e. not break a record between two calls to read(2). Is this really not true? Kind regards Tigran - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/ | ||||||||||||
| Last update: 2005-03-22 12:58 [from the cache] ©2003-2008 | |||||||||||||