Skip to content

Commit f311896

Browse files
author
Wim Van Sebroeck
committed
[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 <[email protected]> Signed-off-by: Wim Van Sebroeck <[email protected]> Acked-by: Alan Cox <[email protected]> Signed-off-by: Andrew Morton <[email protected]>
1 parent 1bef84b commit f311896

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

drivers/char/watchdog/iTCO_wdt.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -494,7 +494,7 @@ static int iTCO_wdt_ioctl (struct inode *inode, struct file *file,
494494
}
495495

496496
default:
497-
return -ENOIOCTLCMD;
497+
return -ENOTTY;
498498
}
499499
}
500500

drivers/char/watchdog/pnx4008_wdt.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ static int
184184
pnx4008_wdt_ioctl(struct inode *inode, struct file *file, unsigned int cmd,
185185
unsigned long arg)
186186
{
187-
int ret = -ENOIOCTLCMD;
187+
int ret = -ENOTTY;
188188
int time;
189189

190190
switch (cmd) {

0 commit comments

Comments
 (0)