Mauro Carvalho Chehab wrote:
Currently, -EINVAL is used to return either when an IOCTL is not
implemented, or if the ioctl was not implemented.
Hi Mauro,
Thanks for the patch.
The V4L2 core probably should return -ENOIOCTLCMD when an IOCTL isn't
implemented, but as long as vfs_ioctl() would stay as it is, the user
space would still get -EINVAL. Or is vfs_ioctl() about to change?
fs/ioctl.c:
----8<-----------
static long vfs_ioctl(struct file *filp, unsigned int cmd,
unsigned long arg)
{
int error = -ENOTTY;
if (!filp->f_op || !filp->f_op->unlocked_ioctl)
goto out;
error = filp->f_op->unlocked_ioctl(filp, cmd, arg);
if (error == -ENOIOCTLCMD)
error = -EINVAL;
out:
return error;
}
----8<-----------
--
Sakari Ailus
sakari.ailus@xxxxxx
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html