Commit f311896a authored by Wim Van Sebroeck's avatar Wim Van Sebroeck

[WATCHDOG] use ENOTTY instead of ENOIOCTLCMD in ioctl()

Return ENOTTY instead of ENOIOCTLCMD in user-visible ioctl() results

The watchdog drivers used to return ENOIOCTLCMD for bad ioctl() commands.
ENOIOCTLCMD should not be visible by the user, so use ENOTTY instead.
Signed-off-by: default avatarSamuel Tardieu <sam@rfc1149.net>
Signed-off-by: default avatarWim Van Sebroeck <wim@iguana.be>
Acked-by: default avatarAlan Cox <alan@redhat.com>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
parent 1bef84be
......@@ -494,7 +494,7 @@ static int iTCO_wdt_ioctl (struct inode *inode, struct file *file,
}
default:
return -ENOIOCTLCMD;
return -ENOTTY;
}
}
......
......@@ -184,7 +184,7 @@ static int
pnx4008_wdt_ioctl(struct inode *inode, struct file *file, unsigned int cmd,
unsigned long arg)
{
int ret = -ENOIOCTLCMD;
int ret = -ENOTTY;
int time;
switch (cmd) {
......
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