Re: read() called twice for /proc files

David S. Miller (
Mon, 24 Sep 2001 18:35:55 -0700 (PDT)

From: Tim Hockin <>
Date: Mon, 24 Sep 2001 18:29:49 -0700

This results in the actual read taking twice as long. Perhaps I am missing

EOF isn't known until you return the zero. You can watch the loff_t
arg to the read operation to see if it is at the end, and if so just
avoid retouching the device or whatever and go straight to returning

Franks a lot,
David S. Miller
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at