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    [W:0.030 / U:31.336 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site