Hi,
Using busybox 1.13.2 on an ARM board, I use 'cat
/sys/class/net/eth0/speed' in a script in /etc/network/if-pre-up.d/
called by ifup. strace shows that read() is not happy:
open("/sys/class/net/eth0/speed", O_RDONLY|O_LARGEFILE) = 3
read(3, 0xbed1cc88, 4096) = -1 EINVAL (Invalid argument)
cat: read error: Invalid argument
strace from the command line shows:
open("/sys/class/net/eth0/speed", O_RDONLY|O_LARGEFILE) = 3
read(3, "100\n", 4096) = 4
Running the same command in a shell is fine, /bin/sh points to busybox
(not bash), and if I try a text file with 'cat /tmp/catme' also in the
ifup script, all is fine.
Why might a sysfs entry behave differently than a text file in this case?
Thanks!
,
John
_______________________________________________
busybox mailing list
[email protected]
http://lists.busybox.net/mailman/listinfo/busybox