lkml.org 
[lkml]   [2002]   [Feb]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] read() from driverfs files can read more bytes
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/

\
 
 \ /
  Last update: 2005-03-22 13:24    [W:0.048 / U:0.568 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site