Re: /proc and /kern

Alexander Viro (
Fri, 4 Dec 1998 16:32:19 -0500 (EST)

On 3 Dec 1998, Mirian Crzig Lennox wrote:

> At a minimum, it would be nice if there were some way for stat() to
> tell the caller "this is a file of indefinite size", rather than the
> misleading "this is an empty file". That way, ls could be modified to
> display "--" or some other non-numeric for the file size.

You have it. lseek(foo,0,SEEK_END)==-ESPIPE worked for ages on
VAXen and it works on Linux. All you need is to replace lseek() method for
those files with dummy returning -ESPIPE. Look for file_operations
structures in fs/proc/*.c - they contain method tables. grep is your

There are no "civil aviation for dummies" books out there and most of
you would probably be scared and spend a lot of your time looking up
if there was one. :-)			  Jordan Hubbard in c.u.b.f.m

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to Please read the FAQ at