[WATCHDOG] use ENOTTY instead of ENOIOCTLCMD in ioctl()
authorWim Van Sebroeck <wim@iguana.be>
Wed, 13 Sep 2006 19:27:29 +0000 (21:27 +0200)
committerWim Van Sebroeck <wim@iguana.be>
Tue, 3 Oct 2006 20:51:18 +0000 (22:51 +0200)
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 <sam@rfc1149.net>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
Acked-by: Alan Cox <alan@redhat.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
drivers/char/watchdog/iTCO_wdt.c
drivers/char/watchdog/pnx4008_wdt.c

index ebd3fc8000e5e414bb5d094720c05d77120a01bb..8f89948832fc3e46d868685f900a84b26f83e273 100644 (file)
@@ -494,7 +494,7 @@ static int iTCO_wdt_ioctl (struct inode *inode, struct file *file,
                }
 
                default:
-                       return -ENOIOCTLCMD;
+                       return -ENOTTY;
        }
 }
 
index e7f0450a939d9cf686f78ba957052e15d4b1285f..db2731ba88e303c48a2333cf424fff0937acbceb 100644 (file)
@@ -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) {