Skip to content

Commit

Permalink
[WATCHDOG] use ENOTTY instead of ENOIOCTLCMD in ioctl()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Wim Van Sebroeck committed Oct 3, 2006
1 parent 1bef84b commit f311896
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion drivers/char/watchdog/iTCO_wdt.c
Original file line number Diff line number Diff line change
Expand Up @@ -494,7 +494,7 @@ static int iTCO_wdt_ioctl (struct inode *inode, struct file *file,
}

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

Expand Down
2 changes: 1 addition & 1 deletion drivers/char/watchdog/pnx4008_wdt.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit f311896

Please sign in to comment.