Commit cb1d92f6 authored by Wim Van Sebroeck's avatar Wim Van Sebroeck

[WATCHDOG] 2.6.0-rc1 -ENOIOCTLCMD.patch

Make the default return value for the ioctl commands that don't exist = -ENOIOCTLCMD
parent c09b0a36
......@@ -183,7 +183,7 @@ advwdt_ioctl(struct inode *inode, struct file *file, unsigned int cmd,
}
default:
return -ENOTTY;
return -ENOIOCTLCMD;
}
return 0;
}
......
......@@ -175,7 +175,7 @@ static int amdtco_fop_ioctl(struct inode *inode, struct file *file, unsigned int
switch (cmd) {
default:
return -ENOTTY;
return -ENOIOCTLCMD;
case WDIOC_GETSUPPORT:
if (copy_to_user((struct watchdog_info *)arg, &ident, sizeof ident))
......
......@@ -183,7 +183,7 @@ static int cpu5wdt_ioctl(struct inode *inode, struct file *file, unsigned int cm
}
break;
default:
return -EINVAL;
return -ENOIOCTLCMD;
}
return 0;
}
......
......@@ -277,7 +277,7 @@ static int eurwdt_ioctl(struct inode *inode, struct file *file,
switch(cmd) {
default:
return -ENOTTY;
return -ENOIOCTLCMD;
case WDIOC_GETSUPPORT:
return copy_to_user((struct watchdog_info *)arg, &ident,
......
......@@ -255,7 +255,7 @@ static int i810tco_ioctl (struct inode *inode, struct file *file,
};
switch (cmd) {
default:
return -ENOTTY;
return -ENOIOCTLCMD;
case WDIOC_GETSUPPORT:
if (copy_to_user
((struct watchdog_info *) arg, &ident, sizeof (ident)))
......
......@@ -207,7 +207,7 @@ ibwdt_ioctl(struct inode *inode, struct file *file, unsigned int cmd,
break;
default:
return -ENOTTY;
return -ENOIOCTLCMD;
}
return 0;
}
......
......@@ -366,7 +366,7 @@ static int zf_ioctl(struct inode *inode, struct file *file, unsigned int cmd,
break;
default:
return -ENOTTY;
return -ENOIOCTLCMD;
}
return 0;
......
......@@ -192,7 +192,7 @@ static int mixcomwd_ioctl(struct inode *inode, struct file *file,
mixcomwd_ping();
break;
default:
return -ENOTTY;
return -ENOIOCTLCMD;
}
return 0;
}
......
......@@ -255,7 +255,7 @@ static int pcwd_ioctl(struct inode *inode, struct file *file,
switch(cmd) {
default:
return -ENOTTY;
return -ENOIOCTLCMD;
case WDIOC_GETSUPPORT:
if(copy_to_user((void*)arg, &ident, sizeof(ident)))
......
......@@ -180,7 +180,7 @@ static int sc1200wdt_ioctl(struct inode *inode, struct file *file, unsigned int
switch (cmd) {
default:
return -ENOTTY; /* Keep Pavel Machek amused ;) */
return -ENOIOCTLCMD; /* Keep Pavel Machek amused ;) */
case WDIOC_GETSUPPORT:
if (copy_to_user((struct watchdog_info *)arg, &ident, sizeof ident))
......
......@@ -170,7 +170,7 @@ static int scx200_wdt_ioctl(struct inode *inode, struct file *file,
switch (cmd) {
default:
return -ENOTTY;
return -ENOIOCTLCMD;
case WDIOC_GETSUPPORT:
if(copy_to_user((struct watchdog_info *)arg, &ident,
sizeof(ident)))
......
......@@ -303,7 +303,7 @@ static int sh_wdt_ioctl(struct inode *inode, struct file *file,
return retval;
}
default:
return -ENOTTY;
return -ENOIOCTLCMD;
}
return 0;
......
......@@ -170,7 +170,7 @@ static int softdog_ioctl(struct inode *inode, struct file *file,
};
switch (cmd) {
default:
return -ENOTTY;
return -ENOIOCTLCMD;
case WDIOC_GETSUPPORT:
if(copy_to_user((struct watchdog_info *)arg, &ident, sizeof(ident)))
return -EFAULT;
......
......@@ -184,7 +184,7 @@ wdt_ioctl(struct inode *inode, struct file *file, unsigned int cmd,
}
default:
return -ENOTTY;
return -ENOIOCTLCMD;
}
return 0;
}
......
......@@ -182,7 +182,7 @@ static int wafwdt_ioctl(struct inode *inode, struct file *file, unsigned int cmd
}
default:
return -ENOTTY;
return -ENOIOCTLCMD;
}
return 0;
}
......
......@@ -333,7 +333,7 @@ static int wdt_ioctl(struct inode *inode, struct file *file, unsigned int cmd,
switch(cmd)
{
default:
return -ENOTTY;
return -ENOIOCTLCMD;
case WDIOC_GETSUPPORT:
return copy_to_user((struct watchdog_info *)arg, &ident, sizeof(ident))?-EFAULT:0;
......
......@@ -269,7 +269,7 @@ static int wdt977_ioctl(struct inode *inode, struct file *file,
switch(cmd)
{
default:
return -ENOTTY;
return -ENOIOCTLCMD;
case WDIOC_GETSUPPORT:
return copy_to_user((struct watchdog_info *)arg, &ident,
......
......@@ -319,7 +319,7 @@ static int wdtpci_ioctl(struct inode *inode, struct file *file, unsigned int cmd
switch(cmd)
{
default:
return -ENOTTY;
return -ENOIOCTLCMD;
case WDIOC_GETSUPPORT:
return copy_to_user((struct watchdog_info *)arg, &ident, sizeof(ident))?-EFAULT:0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment