linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Matt Kraai <kraai@alumni.carnegiemellon.edu>
To: torvalds@transmeta.com, linux-kernel@vger.kernel.org
Subject: [PATCH] Fix error code when read()ing directories in /proc
Date: Thu, 23 Nov 2000 09:00:48 -0800	[thread overview]
Message-ID: <20001123090048.A321@debian> (raw)

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/

                 reply	other threads:[~2000-11-23 17:33 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20001123090048.A321@debian \
    --to=kraai@alumni.carnegiemellon.edu \
    --cc=linux-kernel@vger.kernel.org \
    --cc=torvalds@transmeta.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).