Reason: netfilter procfs files try to fit entire records into the user
buffer. Do a read shorter than record size and you've got zero. And
read() returning 0 means you-know-what...
BTW, from strace output in cpuinfo bug report SuSE bash does reads by 128
bytes. Which means that while read i; do echo $i; done </proc/net/ip_conntrack
will come out empty (lots of lines are longer than 160 characters).
I'll try to see if seq_file is suitable there, but in any case something
needs to be done - read() should return 0 _only_ at EOF and 128 bytes
definitely counts as reasonable buffer size.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/