Commit 786ae877 authored by Rusty Russell's avatar Rusty Russell Committed by Linus Torvalds

[PATCH] ENOTTY for nvram ioctl

Paul Gortmaker <p_gortmaker@yahoo.com>: ENOTTY for nvram ioctl:
   ioctl(d, valid, crap) --> -EINVAL
   ioctl(d, crap, ....)  --> -ENOTTY

  man ioctl agrees:

         ENOTTY The specified request does not apply to the kind of
                object that the descriptor d references.

  Currently we return -EINVAL for both cases which is not as
  informative for debugging stuff.

  Patch is for 2.5.6 but applies cleanly (with minor offset) to 2.4.19p2

  Paul.

(Included in 2.2)
(Included in 2.4)
parent 8018e670
...@@ -325,7 +325,7 @@ static int nvram_ioctl( struct inode *inode, struct file *file, ...@@ -325,7 +325,7 @@ static int nvram_ioctl( struct inode *inode, struct file *file,
return( 0 ); return( 0 );
default: default:
return( -EINVAL ); return( -ENOTTY );
} }
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment