lkml.org 
[lkml]   [2011]   [Apr]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 2/5] vfs: inappropriate ioctl operation on pipe/fifo should return ENOTTY
Date
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


\
 
 \ /
  Last update: 2011-04-28 10:31    [from the cache]
©2003-2014 Jasper Spaans. Advertise on this site