diff --git a/Documentation/DocBook/media/v4l/func-ioctl.xml b/Documentation/DocBook/media/v4l/func-ioctl.xml index b60fd37a62953961284e7bf6caca695417a19a7f..2de64be706f59fce8e1cabe42459b1bbbf196a60 100644 --- a/Documentation/DocBook/media/v4l/func-ioctl.xml +++ b/Documentation/DocBook/media/v4l/func-ioctl.xml @@ -64,75 +64,9 @@ their respective function and parameters are specified in - Return Value - - On success the ioctl() function returns -0 and does not reset the -errno variable. On failure --1 is returned, when the ioctl takes an -output or read/write parameter it remains unmodified, and the -errno variable is set appropriately. See below for -possible error codes. Generic errors like EBADF -or EFAULT are not listed in the sections -discussing individual ioctl requests. - Note ioctls may return undefined error codes. Since errors -may have side effects such as a driver reset applications should -abort on unexpected errors. - - - - EBADF - - fd is not a valid open file -descriptor. - - - - EBUSY - - The property cannot be changed right now. Typically -this error code is returned when I/O is in progress or the driver -supports multiple opens and another process locked the property. - - - - EFAULT - - argp references an inaccessible -memory area. - - - - ENOTTY - - fd is not associated with a -character special device. - - - - EINVAL - - The request or the data pointed -to by argp is not valid. This is a very common -error code, see the individual ioctl requests listed in for actual causes. - - - - ENOMEM - - Not enough physical or virtual memory was available to -complete the request. - - - - ERANGE - - The application attempted to set a control with the -&VIDIOC-S-CTRL; ioctl to a value which is out of bounds. - - - + &return-value; + When an ioctl that takes an output or read/write parameter fails, + the parameter remains unmodified. diff --git a/Documentation/DocBook/media/v4l/gen-errors.xml b/Documentation/DocBook/media/v4l/gen-errors.xml index 9bf9ca7f46dc430415ec97939e4259d17995bf48..4268c658652f7f77e86856beb970ce75818aa930 100644 --- a/Documentation/DocBook/media/v4l/gen-errors.xml +++ b/Documentation/DocBook/media/v4l/gen-errors.xml @@ -31,7 +31,8 @@ EINVAL or ENOTTY The ioctl is not supported by the driver, actually meaning that - the required functionality is not available. + the required functionality is not available, or the file + descriptor is not for a media device. ENOMEM @@ -46,3 +47,10 @@ + +Note 1: ioctls may return other error codes. Since errors may have side +effects such as a driver reset, applications should abort on unexpected errors. + + +Note 2: Request-specific error codes are listed in the individual +requests descriptions. diff --git a/Documentation/DocBook/media/v4l/media-func-ioctl.xml b/Documentation/DocBook/media/v4l/media-func-ioctl.xml index e0ee285baf1c22e649d5d49958465df86481d330..39478d0fbcaa68fd730d8edd5f647f9d64df5158 100644 --- a/Documentation/DocBook/media/v4l/media-func-ioctl.xml +++ b/Documentation/DocBook/media/v4l/media-func-ioctl.xml @@ -64,6 +64,7 @@ &return-value; + Request-specific error codes are listed in the individual requests descriptions. When an ioctl that takes an output or read/write parameter fails,