box101:~ # cat /sys/class/net/eno1/carrier
cat: /sys/class/net/eno1/carrier: Invalid argument
What the...? OK, so what does strace say?
...
open("/sys/class/net/eno1/carrier", O_RDONLY) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=4096, ...}) = 0
fadvise64(3, 0, 0, POSIX_FADV_SEQUENTIAL) = 0
read(3, 0x19c8000, 65536) = -1 EINVAL (Invalid argument)
...
So let me get this straight... The file opens perfectly, yet reading from it is somehow an error?
What's more annoying is that on box103, the exact same command works perfectly! On box101, I can read every single file in that directory except carrier.
Can anyone explain what the hell is going on here?
-EINVALerror. Power management configurations may issue this error too on an interface that is already plugged and up. – Mar 18 '15 at 14:06