files under sysfs (linux kernel 2.6)
Pavel Roskin
proski at gnu.org
Sat Dec 6 21:38:23 UTC 2003
On Fri, 5 Dec 2003, Koblinger Egmont wrote:
> Linux kernel 2.6 has a new virtual filesystem, similar to /proc, it is
> called sysfs and AFAIK it's supposed to be mounted to /sys.
>
> As this one has virtual files, just as /proc, their size is not known in
> advance, hence stat returns a fix value for the file size.
>
> For /proc, 0 is returned for the size by stat, however, I can perfectly
> view those file with mc or mcedit.
>
> Under /sys, stat usually returns 4096 for these files, but their contents
> is usually much more shorter, only a few bytes. At least joe and vim can
> open them perfectly. However, mc's viewer and editor fills up the buffer
> with zero bytes up to the length of 4096 bytes.
I confirm this problem. It's not hard to fix. The file size should be
adjusted when the end of file is encountered.
I hope the bug tracking system will be fixed soon. The CVS repository
went up yesterday for a short time, but today it's down again.
--
Regards,
Pavel Roskin
More information about the mc-devel
mailing list