* [PATCH] Fix error code when read()ing directories in /proc
@ 2000-11-23 17:00 Matt Kraai
0 siblings, 0 replies; only message in thread
From: Matt Kraai @ 2000-11-23 17:00 UTC (permalink / raw)
To: torvalds, linux-kernel
Howdy,
Calling read() on some directories in /proc returns EINVAL, rather
than EISDIR. The other filesystems return EISDIR and the manpage says
this is what should be returned in this situation. The appended patch
applies against 2.4.0-test11.
Matt
diff -urN linux-vanilla/fs/proc/generic.c linux/fs/proc/generic.c
--- linux-vanilla/fs/proc/generic.c Fri Nov 17 16:51:47 2000
+++ linux/fs/proc/generic.c Thu Nov 23 08:00:41 2000
@@ -336,6 +336,7 @@
* the /proc directory.
*/
static struct file_operations proc_dir_operations = {
+ read: generic_read_dir,
readdir: proc_readdir,
};
diff -urN linux-vanilla/fs/proc/root.c linux/fs/proc/root.c
--- linux-vanilla/fs/proc/root.c Fri Nov 17 16:51:47 2000
+++ linux/fs/proc/root.c Thu Nov 23 08:00:27 2000
@@ -82,6 +82,7 @@
* directory handling functions for that..
*/
static struct file_operations proc_root_operations = {
+ read: generic_read_dir,
readdir: proc_root_readdir,
};
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2000-11-23 17:33 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2000-11-23 17:00 [PATCH] Fix error code when read()ing directories in /proc Matt Kraai
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox