linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 2/5] vfs: inappropriate ioctl operation on pipe/fifo should return ENOTTY
       [not found] <1303977891-29280-1-git-send-email-lifongsun@gmail.com>
@ 2011-04-28  8:28 ` Lifeng Sun
  0 siblings, 0 replies; only message in thread
From: Lifeng Sun @ 2011-04-28  8:28 UTC (permalink / raw)
  To: Alan Cox; +Cc: Alexander Viro, linux-fsdevel, linux-kernel, Lifeng Sun

ioctl() calls against a pipe or fifo with an inappropriate ioctl
operation are incorrectly returning EINVAL rather than ENOTTY:

  [ENOTTY]
      Inappropriate I/O control operation.

Signed-off-by: Lifeng Sun <lifongsun@gmail.com>
---
 fs/pipe.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/fs/pipe.c b/fs/pipe.c
index da42f7d..fe7ffe4 100644
--- a/fs/pipe.c
+++ b/fs/pipe.c
@@ -665,7 +665,7 @@ static long pipe_ioctl(struct file *filp, unsigned int cmd, unsigned long arg)
 
 			return put_user(count, (int __user *)arg);
 		default:
-			return -EINVAL;
+			return -ENOTTY;
 	}
 }
 
-- 
1.7.5.rc1

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

only message in thread, other threads:[~2011-04-28  8:28 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <1303977891-29280-1-git-send-email-lifongsun@gmail.com>
2011-04-28  8:28 ` [PATCH 2/5] vfs: inappropriate ioctl operation on pipe/fifo should return ENOTTY Lifeng Sun

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).