You've already forked linux-apfs
mirror of
https://github.com/linux-apfs/linux-apfs.git
synced 2026-05-01 15:00:59 -07:00
[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 <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>
This commit is contained in:
committed by
Wim Van Sebroeck
parent
25ff3780d4
commit
795b89d207
@@ -183,7 +183,7 @@ static int acq_ioctl(struct inode *inode, struct file *file, unsigned int cmd,
|
||||
}
|
||||
|
||||
default:
|
||||
return -ENOIOCTLCMD;
|
||||
return -ENOTTY;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -176,7 +176,7 @@ advwdt_ioctl(struct inode *inode, struct file *file, unsigned int cmd,
|
||||
}
|
||||
|
||||
default:
|
||||
return -ENOIOCTLCMD;
|
||||
return -ENOTTY;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -236,7 +236,7 @@ static int ali_ioctl(struct inode *inode, struct file *file,
|
||||
return put_user(timeout, p);
|
||||
|
||||
default:
|
||||
return -ENOIOCTLCMD;
|
||||
return -ENOTTY;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -277,7 +277,7 @@ static int fop_ioctl(struct inode *inode, struct file *file, unsigned int cmd, u
|
||||
case WDIOC_GETTIMEOUT:
|
||||
return put_user(timeout, p);
|
||||
default:
|
||||
return -ENOIOCTLCMD;
|
||||
return -ENOTTY;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -168,7 +168,7 @@ static int at91_wdt_ioctl(struct inode *inode, struct file *file,
|
||||
return 0;
|
||||
|
||||
default:
|
||||
return -ENOIOCTLCMD;
|
||||
return -ENOTTY;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -125,7 +125,7 @@ static int booke_wdt_ioctl (struct inode *inode, struct file *file,
|
||||
return -EINVAL;
|
||||
return 0;
|
||||
default:
|
||||
return -ENOIOCTLCMD;
|
||||
return -ENOTTY;
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
||||
@@ -183,7 +183,7 @@ static int cpu5wdt_ioctl(struct inode *inode, struct file *file, unsigned int cm
|
||||
}
|
||||
break;
|
||||
default:
|
||||
return -ENOIOCTLCMD;
|
||||
return -ENOTTY;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -144,7 +144,7 @@ static int
|
||||
ep93xx_wdt_ioctl(struct inode *inode, struct file *file, unsigned int cmd,
|
||||
unsigned long arg)
|
||||
{
|
||||
int ret = -ENOIOCTLCMD;
|
||||
int ret = -ENOTTY;
|
||||
|
||||
switch (cmd) {
|
||||
case WDIOC_GETSUPPORT:
|
||||
|
||||
@@ -240,7 +240,7 @@ static int eurwdt_ioctl(struct inode *inode, struct file *file,
|
||||
|
||||
switch(cmd) {
|
||||
default:
|
||||
return -ENOIOCTLCMD;
|
||||
return -ENOTTY;
|
||||
|
||||
case WDIOC_GETSUPPORT:
|
||||
return copy_to_user(argp, &ident, sizeof(ident)) ? -EFAULT : 0;
|
||||
|
||||
@@ -315,7 +315,7 @@ static int esb_ioctl (struct inode *inode, struct file *file,
|
||||
return put_user(heartbeat, p);
|
||||
|
||||
default:
|
||||
return -ENOIOCTLCMD;
|
||||
return -ENOTTY;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -356,7 +356,7 @@ static int i8xx_tco_ioctl (struct inode *inode, struct file *file,
|
||||
}
|
||||
|
||||
default:
|
||||
return -ENOIOCTLCMD;
|
||||
return -ENOTTY;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -199,7 +199,7 @@ ibwdt_ioctl(struct inode *inode, struct file *file, unsigned int cmd,
|
||||
break;
|
||||
|
||||
default:
|
||||
return -ENOIOCTLCMD;
|
||||
return -ENOTTY;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -295,7 +295,7 @@ static int asr_ioctl(struct inode *inode, struct file *file,
|
||||
}
|
||||
}
|
||||
|
||||
return -ENOIOCTLCMD;
|
||||
return -ENOTTY;
|
||||
}
|
||||
|
||||
static int asr_open(struct inode *inode, struct file *file)
|
||||
|
||||
@@ -112,7 +112,7 @@ static int indydog_ioctl(struct inode *inode, struct file *file,
|
||||
|
||||
switch (cmd) {
|
||||
default:
|
||||
return -ENOIOCTLCMD;
|
||||
return -ENOTTY;
|
||||
case WDIOC_GETSUPPORT:
|
||||
if (copy_to_user((struct watchdog_info *)arg,
|
||||
&ident, sizeof(ident)))
|
||||
|
||||
@@ -107,7 +107,7 @@ static int
|
||||
ixp2000_wdt_ioctl(struct inode *inode, struct file *file, unsigned int cmd,
|
||||
unsigned long arg)
|
||||
{
|
||||
int ret = -ENOIOCTLCMD;
|
||||
int ret = -ENOTTY;
|
||||
int time;
|
||||
|
||||
switch (cmd) {
|
||||
|
||||
@@ -102,7 +102,7 @@ static int
|
||||
ixp4xx_wdt_ioctl(struct inode *inode, struct file *file, unsigned int cmd,
|
||||
unsigned long arg)
|
||||
{
|
||||
int ret = -ENOIOCTLCMD;
|
||||
int ret = -ENOTTY;
|
||||
int time;
|
||||
|
||||
switch (cmd) {
|
||||
|
||||
@@ -329,7 +329,7 @@ static int zf_ioctl(struct inode *inode, struct file *file, unsigned int cmd,
|
||||
break;
|
||||
|
||||
default:
|
||||
return -ENOIOCTLCMD;
|
||||
return -ENOTTY;
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
||||
@@ -185,7 +185,7 @@ static int mixcomwd_ioctl(struct inode *inode, struct file *file,
|
||||
mixcomwd_ping();
|
||||
break;
|
||||
default:
|
||||
return -ENOIOCTLCMD;
|
||||
return -ENOTTY;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -125,7 +125,7 @@ static int mpc83xx_wdt_ioctl(struct inode *inode, struct file *file,
|
||||
case WDIOC_GETTIMEOUT:
|
||||
return put_user(timeout_sec, p);
|
||||
default:
|
||||
return -ENOIOCTLCMD;
|
||||
return -ENOTTY;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -126,7 +126,7 @@ static int mpc8xx_wdt_ioctl(struct inode *inode, struct file *file,
|
||||
break;
|
||||
|
||||
default:
|
||||
return -ENOIOCTLCMD;
|
||||
return -ENOTTY;
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user