Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

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

[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
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -494,7 +494,7 @@ static int iTCO_wdt_ioctl (struct inode *inode, struct file *file,
		}

		default:
			return -ENOIOCTLCMD;
			return -ENOTTY;
	}
}

+1 −1
Original line number Diff line number Diff line
@@ -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) {