From: Alan Cox <alan@redhat.com>
To: akpm@osdl.org, linux-kernel@vger.kernel.org
Subject: PATCH: fix bogus ioctl return in mtrr
Date: Tue, 27 Jul 2004 18:56:33 -0400 [thread overview]
Message-ID: <20040727225633.GA23921@devserv.devel.redhat.com> (raw)
This is fairly self explanatory - ENOIOCTLCMD is an internal code outside of
the -1 to -511 range. The correct return for an unknown ioctl is -ENOTTY
although some Linux devices return the incorrect -EINVAL result.
Patch-By: Alan Cox <alan@redhat.com>
OSDL Developer Certificate of Origin 1.0 included herein by reference
diff -u --new-file --recursive --exclude-from /usr/src/exclude linux-2.6.7/arch/i386/kernel/cpu/mtrr/if.c 2.6.7-ac/arch/i386/kernel/cpu/mtrr/if.c
--- linux-2.6.7/arch/i386/kernel/cpu/mtrr/if.c 2004-06-16 21:10:14.000000000 +0100
+++ 2.6.7-ac/arch/i386/kernel/cpu/mtrr/if.c 2004-06-26 19:01:54.000000000 +0100
@@ -160,7 +160,7 @@
switch (cmd) {
default:
- return -ENOIOCTLCMD;
+ return -ENOTTY;
case MTRRIOC_ADD_ENTRY:
if (!capable(CAP_SYS_ADMIN))
return -EPERM;
reply other threads:[~2004-07-27 22:57 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=20040727225633.GA23921@devserv.devel.redhat.com \
--to=alan@redhat.com \
--cc=akpm@osdl.org \
--cc=linux-kernel@vger.kernel.org \
/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
all inboxes | Powered by JetHome®