The implementation of /proc/sys/... (kernel/sysctl.c) implies that
consecutive "read()" from files simply won't work.
For example, in do_proc_dointvec() and proc_dostring(), and the
operation is READ, then a zero-length is read (and returned) if
the file position isn't 0. The problem is illustrated in this
example:
linux> cat /proc/sys/kernel/osrelease
2.0.32
linux> dd if=/proc/sys/kernel/osrelease bs=2
2.1+0 records in
1+0 records out
And this is definitely incorrect behaviour. Unlike files like
/proc/cmdline, that are implemented in a different manner.
The question is whether this is a feature, or a bug in the basic design ?
Oren.
=========================================================================
______ ____ ___ ___ _ __
MOSIX Development Group ) ) ) ) ) ( ' ) \ /
The Hebrew University / / / / / \ / / \
of Jerusalem, Israel ( ( (___( ___) _(_ __/ \_____________________)
http://www.mosix.cs.huji.ac.il Email: mosix-devel@cs.huji.ac.il
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.altern.org/andrebalsa/doc/lkml-faq.html