Re: udev problem (and fix) for /dev/mtdblock*

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

 



On Mon, Mar 23, 2009 at 21:39, David Brownell <david-b@xxxxxxxxxxx> wrote:
> On Monday 23 March 2009, Kay Sievers wrote:
>> > OTP data in lot of the NAND chips I have here exceeds the sysfs 4KB
>> > binary file limit; 20KB commonly, 128KB for OneNand.
>>
>> There is no such limit for binary sysfs files. We have many large file
>> there, which map such sizes.
>
> Odd, just the other day I created one with actual size of 8KB.
> But "ls -l" showed 4K.

There are larger files:
$ ls -l /sys/devices/pci .../usb1/1-1/descriptors
-r--r--r-- 1 root root 65553 2009-03-23 22:12 ... /usb1/1-1/descriptors

> That's clearly a limit... and "cp" was
> unable to read the whole thing, it stopped at 4K.  "dd" could
> read everything though:  dd bs=1k count=8 did it.

Some larger files seem to work here:
$ ls -l /sys/devices/pci0000:00/0000:00:02.0/rom
-r-------- 1 root root 131072 2009-03-23 22:13 /sys/devices/pci ...

$ cat /sys/devices/pci0000:00/0000:00:02.0/rom | wc -c
65536

$ dd if=/sys/devices/.../rom of=/dev/null bs=1
65536+0 records in
65536+0 records out
65536 bytes (66 kB) copied, 0.103753 s, 632 kB/s

> Something seems odd with binary sysfs files in general.  I've
> observed something zapping size down to zero after userspace
> did some oddball reads ... of the "past EOF" variety, ISTR.

Hmm, never seen such a thing, but the logic is implemented per-file,
so it might be something that should be fixed in the driver that
created the file.

Kay
--
To unsubscribe from this list: send the line "unsubscribe linux-hotplug" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel]     [Linux DVB]     [Asterisk Internet PBX]     [DCCP]     [Netdev]     [X.org]     [Util Linux NG]     [Fedora Women]     [ALSA Devel]     [Linux USB]

  Powered by Linux