From: Wim Van Sebroeck Date: Wed, 13 Sep 2006 19:27:29 +0000 (+0200) Subject: [WATCHDOG] use ENOTTY instead of ENOIOCTLCMD in ioctl() X-Git-Tag: firefly_0821_release~32540^2 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=f311896a990a0b766e279defe9adff29160ada03;p=firefly-linux-kernel-4.4.55.git [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: Samuel Tardieu Signed-off-by: Wim Van Sebroeck Acked-by: Alan Cox Signed-off-by: Andrew Morton --- diff --git a/drivers/char/watchdog/iTCO_wdt.c b/drivers/char/watchdog/iTCO_wdt.c index ebd3fc8000e5..8f89948832fc 100644 --- a/drivers/char/watchdog/iTCO_wdt.c +++ b/drivers/char/watchdog/iTCO_wdt.c @@ -494,7 +494,7 @@ static int iTCO_wdt_ioctl (struct inode *inode, struct file *file, } default: - return -ENOIOCTLCMD; + return -ENOTTY; } } diff --git a/drivers/char/watchdog/pnx4008_wdt.c b/drivers/char/watchdog/pnx4008_wdt.c index e7f0450a939d..db2731ba88e3 100644 --- a/drivers/char/watchdog/pnx4008_wdt.c +++ b/drivers/char/watchdog/pnx4008_wdt.c @@ -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) {