Re: [PATCH 1/5] drivers:tty:fix up ENOIOCTLCMD error handling

2012-08-27 Thread Alan Cox
On Mon, 27 Aug 2012 15:23:12 +0800 Wanlong Gao wrote: > At commit 07d106d0, Linus pointed out that ENOIOCTLCMD should be > translated as ENOTTY to user mode. > For example: > fd = open("/dev/tty", O_RDWR); > ioctl(fd, -1, &argp); > > then the errno should be ENOTTY but not EINVAL. >

[PATCH 1/5] drivers:tty:fix up ENOIOCTLCMD error handling

2012-08-27 Thread Wanlong Gao
At commit 07d106d0, Linus pointed out that ENOIOCTLCMD should be translated as ENOTTY to user mode. For example: fd = open("/dev/tty", O_RDWR); ioctl(fd, -1, &argp); then the errno should be ENOTTY but not EINVAL. Cc: Greg Kroah-Hartman Signed-off-by: Wanlong Gao --- drivers/tt