Re: files under sysfs (linux kernel 2.6)
- From: Pavel Roskin <proski gnu org>
- To: Koblinger Egmont <egmont uhulinux hu>
- Cc: mc-devel gnome org
- Subject: Re: files under sysfs (linux kernel 2.6)
- Date: Sat, 06 Dec 2003 16:38:23 -0500 (EST)
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
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]