allowed range. This is a widely used error code. See the individual
ioctl requests for specific causes.</entry>
</row>
- <row>
- <entry>EINVAL or ENOTTY</entry>
- <entry>The ioctl is not supported by the driver, actually meaning that
- the required functionality is not available, or the file
- descriptor is not for a media device. The usage of EINVAL is
- deprecated and will be fixed on a latter patch.</entry>
- </row>
<row>
<entry>ENODEV</entry>
<entry>Device not found or was removed.</entry>
<entry>ENOMEM</entry>
<entry>There's not enough memory to handle the desired operation.</entry>
</row>
+ <row>
+ <entry>ENOTTY</entry>
+ <entry>The ioctl is not supported by the driver, actually meaning that
+ the required functionality is not available, or the file
+ descriptor is not for a media device.</entry>
+ </row>
<row>
<entry>ENOSPC</entry>
<entry>On USB devices, the stream ioctl's can return this error, meaning
<date>2011-06-27</date>
<authorinitials>mcc, po</authorinitials>
<revremark>Documented that VIDIOC_QUERYCAP now returns a per-subsystem version instead of a per-driver one.</revremark>
+ <revremark>Standardize an error code for invalid ioctl.</revremark>
</revision>
+
<revision>
<revnumber>2.6.39</revnumber>
<date>2011-03-01</date>
struct v4l2_fh *vfh = NULL;
struct v4l2_format f_copy;
int use_fh_prio = 0;
- long ret = -EINVAL;
+ long ret = -ENOTTY;
if (ops == NULL) {
printk(KERN_WARNING "videodev: \"%s\" has no ioctl_ops.\n",
vfd->name);
- return -EINVAL;
+ return ret;
}
if ((vfd->debug & V4L2_DEBUG_IOCTL) &&