Re: [PATCH] read() from driverfs files can read more bytes

Pavel Machek (pavel@suse.cz)
Fri, 8 Feb 2002 20:18:24 +0100


Hi!

> Ok, I agree with your argument concerning read().
>
> Concerning reading/writing from offsets, it's up to the drivers for them
> to either support it or not. In the files I've done so far, I return 0 if
> show() is called with an offset. Which will give different results if you
> read byte-by-byte or an entire chunk.
>
> It makes the callbacks simpler, but it is not technically correct.

[snip solution]

Why not just say those files are character devices? It is okay for
character device to behave like crazy ;-).
Pavel

-- 
(about SSSCA) "I don't say this lightly.  However, I really think that the U.S.
no longer is classifiable as a democracy, but rather as a plutocracy." --hpa
-
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/