[lkml]   [2003]   [May]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: 2.5.86+: sizes of almost all files in sysfs are 4k?
Patrick Mochel, Tue, May 13, 2003 18:58:34 +0200:
> > If the size is not simple/possible to calculate, maybe using 0
> > would be an option for the cases where the size doesn't carry
> > any information (like in procfs)?
> It was 0 before, which works fine for cat(1). By hardcoding the size, some
> bugs are exposed, since the size is reset for some reason when you try to
> open the file for writing, even if open(2) returns an error.
> Ideally, we should be calculating the size, and using that. However, that
> would involve keeping type information about the file around, which we
> don't currently do. Research/patches in this area would be greatly
> appreciated.

we could also pretend the files are sparse, and return zero-filled data.
Though, i fear, this will also confuse something.

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

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