files under sysfs (linux kernel 2.6)



Hi,

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.

It shouldn't do so...

Tested with mc 4.6.0, kernel 2.6.0-test11.


bye,

Egmont




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]