From: Alan Cox 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 OSDL Developer Certificate of Origin 1.0 included herein by reference Signed-off-by: Andrew Morton --- 25-akpm/arch/i386/kernel/cpu/mtrr/if.c | 2 +- 1 files changed, 1 insertion(+), 1 deletion(-) diff -puN arch/i386/kernel/cpu/mtrr/if.c~fix-bogus-ioctl-return-in-mtrr arch/i386/kernel/cpu/mtrr/if.c --- 25/arch/i386/kernel/cpu/mtrr/if.c~fix-bogus-ioctl-return-in-mtrr Tue Jul 27 16:31:04 2004 +++ 25-akpm/arch/i386/kernel/cpu/mtrr/if.c Tue Jul 27 16:31:04 2004 @@ -160,7 +160,7 @@ mtrr_ioctl(struct inode *inode, struct f switch (cmd) { default: - return -ENOIOCTLCMD; + return -ENOTTY; case MTRRIOC_ADD_ENTRY: if (!capable(CAP_SYS_ADMIN)) return -EPERM; _