mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* PATCH: fix bogus ioctl return in mtrr
@ 2004-07-27 22:56 Alan Cox
  0 siblings, 0 replies; only message in thread
From: Alan Cox @ 2004-07-27 22:56 UTC (permalink / raw)
  To: akpm, linux-kernel

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;




^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2004-07-27 22:57 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-07-27 22:56 PATCH: fix bogus ioctl return in mtrr Alan Cox

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®