DocBook: Add return error codes to LIRC ioctl session
Subsystems (2)
A message that is not in the archive (sent off-list or not yet received): [email protected]
RFC PATCH v3 1/17 DocBook: Add a chapter to describe media errors
There are several errors reported by V4L that aren't described. They can occur on almost all ioctl's. Instead of adding them into each ioctl, create a new chapter.
For V4L, the new chapter will automatically be listed on all places, as there's a macro used everywhere there.
create mode 100644 Documentation/DocBook/media/v4l/gen-errors.xml
Documentation/DocBook/.gitignore +2 -0
@@ -8,5 +8,7 @@ *.dvi *.log *.out +*.png +*.gif media-indices.tmpl media-entities.tmpl
Documentation/DocBook/media/Makefile +39 -3
62 lines not on this page · raw message
Documentation/DocBook/media/v4l/gen-errors.xml new file +17 -0
@@ -0,0 +1,17 @@ +<title>Generic Error Codes</title> + +<table frame="none" pgwide="1" id="gen-errors"> + <title>Generic error codes</title> + <tgroup cols="2"> + &cs-str; + <tbody valign="top"> + <row> + <entry>EBUSY</entry> + <entry>The ioctl can't be handled because the device is busy. This is + typically return while device is streaming, and an ioctl tried to + change something that would affect the stream, or would require the + usage of a hardware resource that was already allocated.</entry> + </row> + </tbody> + </tgroup> +</table>
Documentation/DocBook/media_api.tmpl +6 -1
@@ -8,7 +8,7 @@ <!ENTITY ie "i. e."> <!ENTITY fd "File descriptor returned by <link linkend='func-open'><function>open()</function></link>."> <!ENTITY i2c "I<superscript>2</superscript>C"> -<!ENTITY return-value "<title>Return Value</title><para>On success <returnvalue>0</returnvalue> is returned, on error <returnvalue>-1</returnvalue> and the <varname>errno</varname> variable is set appropriately:</para>"> +<!ENTITY return-value "<title>Return Value</title><para>On success <returnvalue>0</returnvalue> is returned, on error <returnvalue>-1</returnvalue> and the <varname>errno</varname> variable is set appropriately. The generic error codes are described at the <link linkend='gen-errors'>Generic Error Codes</link> chapter.</para>"> <!ENTITY manvol "<manvolnum>2</manvolnum>"> <!-- Table templates: structs, structs w/union, defines. -->
@@ -110,6 +109,11 @@ Foundation. A copy of the license is included in the chapter entitled &sub-media-controller; </part> +<chapter id="gen_errors"> +&sub-gen-errors; +</chapter> + + &sub-fdl-appendix; </book>
Signature · 1 line
1.7.1
RFC PATCH v3 2/17 DocBook: Use the generic ioctl error codes for all V4L ioctl's
In reply to a message not in the archiveBe sure that all VIDIOC_* ioctl are using the return error macro, and aren't specifying generic error codes internally.
Documentation/DocBook/media/v4l/gen-errors.xml +18 -1
@@ -10,7 +10,24 @@ <entry>The ioctl can't be handled because the device is busy. This is typically return while device is streaming, and an ioctl tried to change something that would affect the stream, or would require the - usage of a hardware resource that was already allocated.</entry> + usage of a hardware resource that was already allocated. The ioctl + must not be retried without performing another action to fix the + problem first (typically: stop the stream before retrying).</entry> + </row> + <row> + <entry>EINVAL</entry> + <entry>The ioctl is not supported by the driver, actually meaning that + the required functionality is not available.</entry> + </row> + <row> + <entry>ENOMEM</entry> + <entry>There's not enough memory to handle the desired operation.</entry> + </row> + <row> + <entry>ENOSPC</entry> + <entry>On USB devices, the stream ioctl's can return this error meaning + that this request would overcommit the usb bandwidth reserved + for periodic transfers (up to 80% of the USB bandwidth).</entry> </row> </tbody> </tgroup>
Documentation/DocBook/media/v4l/vidioc-cropcap.xml +2 -11
@@ -156,19 +156,10 @@ on 22 Oct 2002 subject "Re:[V4L][patches!] Re:v4l2/kernel-2.5" --> <term><errorcode>EINVAL</errorcode></term> <listitem> <para>The &v4l2-cropcap; <structfield>type</structfield> is -invalid or the ioctl is not supported. This is not permitted for -video capture, output and overlay devices, which must support -<constant>VIDIOC_CROPCAP</constant>.</para> +invalid. This is not permitted for video capture, output and overlay devices, +which must support <constant>VIDIOC_CROPCAP</constant>.</para> </listitem> </varlistentry> </variablelist> </refsect1> </refentry> - -<!-- -Local Variables: -mode: sgml -sgml-parent-document: "v4l2.sgml" -indent-tabs-mode: nil -End: --->
Documentation/DocBook/media/v4l/vidioc-dbg-g-chip-ident.xml +1 -10
@@ -258,18 +258,9 @@ could not identify it.</entry> <varlistentry> <term><errorcode>EINVAL</errorcode></term> <listitem> - <para>The driver does not support this ioctl, or the -<structfield>match_type</structfield> is invalid.</para> + <para>The <structfield>match_type</structfield> is invalid.</para> </listitem> </varlistentry> </variablelist> </refsect1> </refentry> - -<!-- -Local Variables: -mode: sgml -sgml-parent-document: "v4l2.sgml" -indent-tabs-mode: nil -End: --->
Documentation/DocBook/media/v4l/vidioc-dbg-g-register.xml +0 -17
@@ -247,15 +247,6 @@ register.</entry> <variablelist> <varlistentry> - <term><errorcode>EINVAL</errorcode></term> - <listitem> - <para>The driver does not support this ioctl, or the kernel -was not compiled with the <constant>CONFIG_VIDEO_ADV_DEBUG</constant> -option, or the <structfield>match_type</structfield> is invalid, or the -selected chip or register does not exist.</para> - </listitem> - </varlistentry> - <varlistentry> <term><errorcode>EPERM</errorcode></term> <listitem> <para>Insufficient permissions. Root privileges are required
@@ -265,11 +256,3 @@ to execute these ioctls.</para> </variablelist> </refsect1> </refentry> - -<!-- -Local Variables: -mode: sgml -sgml-parent-document: "v4l2.sgml" -indent-tabs-mode: nil -End: --->
Documentation/DocBook/media/v4l/vidioc-dqevent.xml +3 -7
@@ -136,11 +136,7 @@ </table> </refsect1> + <refsect1> + &return-value; + </refsect1> </refentry> -<!-- -Local Variables: -mode: sgml -sgml-parent-document: "v4l2.sgml" -indent-tabs-mode: nil -End: --->
Documentation/DocBook/media/v4l/vidioc-encoder-cmd.xml +1 -10
@@ -180,8 +180,7 @@ Pictures</wordasword>, rather than immediately.</entry> <varlistentry> <term><errorcode>EINVAL</errorcode></term> <listitem> - <para>The driver does not support this ioctl, or the -<structfield>cmd</structfield> field is invalid.</para> + <para>The <structfield>cmd</structfield> field is invalid.</para> </listitem> </varlistentry> <varlistentry>
@@ -194,11 +193,3 @@ the encoder was not running.</para> </variablelist> </refsect1> </refentry> - -<!-- -Local Variables: -mode: sgml -sgml-parent-document: "v4l2.sgml" -indent-tabs-mode: nil -End: --->
Documentation/DocBook/media/v4l/vidioc-enum-frameintervals.xml +0 -11
@@ -254,17 +254,6 @@ enumerated.</entry> <refsect1> &return-value; - - <para>See the description section above for a list of return -values that <varname>errno</varname> can have.</para> </refsect1> </refentry> - -<!-- -Local Variables: -mode: sgml -sgml-parent-document: "v4l2.sgml" -indent-tabs-mode: nil -End: --->
Documentation/DocBook/media/v4l/vidioc-enum-framesizes.xml +0 -11
@@ -267,16 +267,5 @@ application should zero out all members except for the <refsect1> &return-value; - - <para>See the description section above for a list of return -values that <varname>errno</varname> can have.</para> </refsect1> </refentry> - -<!-- -Local Variables: -mode: sgml -sgml-parent-document: "v4l2.sgml" -indent-tabs-mode: nil -End: --->
Documentation/DocBook/media/v4l/vidioc-enumaudio.xml +1 -11
@@ -68,19 +68,9 @@ until the driver returns <errorcode>EINVAL</errorcode>.</para> <varlistentry> <term><errorcode>EINVAL</errorcode></term> <listitem> - <para>The number of the audio input is out of bounds, or -there are no audio inputs at all and this ioctl is not -supported.</para> + <para>The number of the audio input is out of bounds.</para> </listitem> </varlistentry> </variablelist> </refsect1> </refentry> - -<!-- -Local Variables: -mode: sgml -sgml-parent-document: "v4l2.sgml" -indent-tabs-mode: nil -End: --->
Documentation/DocBook/media/v4l/vidioc-enumaudioout.xml +1 -11
@@ -71,19 +71,9 @@ signal to a sound card are not audio outputs in this sense.</para> <varlistentry> <term><errorcode>EINVAL</errorcode></term> <listitem> - <para>The number of the audio output is out of bounds, or -there are no audio outputs at all and this ioctl is not -supported.</para> + <para>The number of the audio output is out of bounds.</para> </listitem> </varlistentry> </variablelist> </refsect1> </refentry> - -<!-- -Local Variables: -mode: sgml -sgml-parent-document: "v4l2.sgml" -indent-tabs-mode: nil -End: --->
Documentation/DocBook/media/v4l/vidioc-g-audio.xml +1 -17
@@ -164,25 +164,9 @@ tuner.</entry> <listitem> <para>No audio inputs combine with the current video input, or the number of the selected audio input is out of bounds or it does -not combine, or there are no audio inputs at all and the ioctl is not -supported.</para> - </listitem> - </varlistentry> - <varlistentry> - <term><errorcode>EBUSY</errorcode></term> - <listitem> - <para>I/O is in progress, the input cannot be -switched.</para> +not combine.</para> </listitem> </varlistentry> </variablelist> </refsect1> </refentry> - -<!-- -Local Variables: -mode: sgml -sgml-parent-document: "v4l2.sgml" -indent-tabs-mode: nil -End: --->
Documentation/DocBook/media/v4l/vidioc-g-audioout.xml +1 -17
@@ -130,25 +130,9 @@ applications must set the array to zero.</entry> <listitem> <para>No audio outputs combine with the current video output, or the number of the selected audio output is out of bounds or -it does not combine, or there are no audio outputs at all and the -ioctl is not supported.</para> - </listitem> - </varlistentry> - <varlistentry> - <term><errorcode>EBUSY</errorcode></term> - <listitem> - <para>I/O is in progress, the output cannot be -switched.</para> +it does not combine.</para> </listitem> </varlistentry> </variablelist> </refsect1> </refentry> - -<!-- -Local Variables: -mode: sgml -sgml-parent-document: "v4l2.sgml" -indent-tabs-mode: nil -End: --->
Documentation/DocBook/media/v4l/vidioc-g-crop.xml +0 -17
@@ -122,22 +122,5 @@ for &v4l2-cropcap; <structfield>bounds</structfield> is used.</entry> <refsect1> &return-value; - - <variablelist> - <varlistentry> - <term><errorcode>EINVAL</errorcode></term> - <listitem> - <para>Cropping is not supported.</para> - </listitem> - </varlistentry> - </variablelist> </refsect1> </refentry> - -<!-- -Local Variables: -mode: sgml -sgml-parent-document: "v4l2.sgml" -indent-tabs-mode: nil -End: --->
Documentation/DocBook/media/v4l/vidioc-g-dv-preset.xml +3 -9
@@ -97,14 +97,8 @@ If the preset is not supported, it returns an &EINVAL; </para> </tbody> </tgroup> </table> - + </refsect1> + <refsect1> + &return-value; </refsect1> </refentry> - -<!-- -Local Variables: -mode: sgml -sgml-parent-document: "v4l2.sgml" -indent-tabs-mode: nil -End: --->
Documentation/DocBook/media/v4l/vidioc-g-dv-timings.xml +3 -8
@@ -212,12 +212,7 @@ bit 0 (V4L2_DV_VSYNC_POS_POL) is for vertical sync polarity and bit 1 (V4L2_DV_H </tgroup> </table> </refsect1> + <refsect1> + &return-value; + </refsect1> </refentry> - -<!-- -Local Variables: -mode: sgml -sgml-parent-document: "v4l2.sgml" -indent-tabs-mode: nil -End: --->
Documentation/DocBook/media/v4l/vidioc-g-enc-index.xml +0 -17
@@ -192,22 +192,5 @@ this mask to obtain the picture coding type.</entry> <refsect1> &return-value; - - <variablelist> - <varlistentry> - <term><errorcode>EINVAL</errorcode></term> - <listitem> - <para>The driver does not support this ioctl.</para> - </listitem> - </varlistentry> - </variablelist> </refsect1> </refentry> - -<!-- -Local Variables: -mode: sgml -sgml-parent-document: "v4l2.sgml" -indent-tabs-mode: nil -End: --->
Documentation/DocBook/media/v4l/vidioc-g-fbuf.xml +1 -18
@@ -446,28 +446,11 @@ overlay.</para> </listitem> </varlistentry> <varlistentry> - <term><errorcode>EBUSY</errorcode></term> - <listitem> - <para>The framebuffer parameters cannot be changed at this -time because overlay is already enabled, or capturing is enabled -and the hardware cannot capture and overlay simultaneously.</para> - </listitem> - </varlistentry> - <varlistentry> <term><errorcode>EINVAL</errorcode></term> <listitem> - <para>The ioctl is not supported or the -<constant>VIDIOC_S_FBUF</constant> parameters are unsuitable.</para> + <para>The <constant>VIDIOC_S_FBUF</constant> parameters are unsuitable.</para> </listitem> </varlistentry> </variablelist> </refsect1> </refentry> - -<!-- -Local Variables: -mode: sgml -sgml-parent-document: "v4l2.sgml" -indent-tabs-mode: nil -End: --->
Documentation/DocBook/media/v4l/vidioc-g-fmt.xml +2 -18
@@ -184,29 +184,13 @@ capture and output devices.</entry> <variablelist> <varlistentry> - <term><errorcode>EBUSY</errorcode></term> - <listitem> - <para>The data format cannot be changed at this -time, for example because I/O is already in progress.</para> - </listitem> - </varlistentry> - <varlistentry> <term><errorcode>EINVAL</errorcode></term> <listitem> <para>The &v4l2-format; <structfield>type</structfield> -field is invalid, the requested buffer type not supported, or -<constant>VIDIOC_TRY_FMT</constant> was called and is not -supported with this buffer type.</para> +field is invalid, the requested buffer type not supported, or the +format is not supported with this buffer type.</para> </listitem> </varlistentry> </variablelist> </refsect1> </refentry> - -<!-- -Local Variables: -mode: sgml -sgml-parent-document: "v4l2.sgml" -indent-tabs-mode: nil -End: --->
Documentation/DocBook/media/v4l/vidioc-g-input.xml +1 -18
@@ -75,26 +75,9 @@ querying or negotiating any other parameters.</para> <varlistentry> <term><errorcode>EINVAL</errorcode></term> <listitem> - <para>The number of the video input is out of bounds, or -there are no video inputs at all and this ioctl is not -supported.</para> - </listitem> - </varlistentry> - <varlistentry> - <term><errorcode>EBUSY</errorcode></term> - <listitem> - <para>I/O is in progress, the input cannot be -switched.</para> + <para>The number of the video input is out of bounds.</para> </listitem> </varlistentry> </variablelist> </refsect1> </refentry> - -<!-- -Local Variables: -mode: sgml -sgml-parent-document: "v4l2.sgml" -indent-tabs-mode: nil -End: --->
Documentation/DocBook/media/v4l/vidioc-g-jpegcomp.xml +0 -17
@@ -159,22 +159,5 @@ to add them.</para> <refsect1> &return-value; - - <variablelist> - <varlistentry> - <term><errorcode>EINVAL</errorcode></term> - <listitem> - <para>This ioctl is not supported.</para> - </listitem> - </varlistentry> - </variablelist> </refsect1> </refentry> - -<!-- -Local Variables: -mode: sgml -sgml-parent-document: "v4l2.sgml" -indent-tabs-mode: nil -End: --->
Documentation/DocBook/media/v4l/vidioc-g-output.xml +1 -17
@@ -76,25 +76,9 @@ negotiating any other parameters.</para> <term><errorcode>EINVAL</errorcode></term> <listitem> <para>The number of the video output is out of bounds, or -there are no video outputs at all and this ioctl is not -supported.</para> - </listitem> - </varlistentry> - <varlistentry> - <term><errorcode>EBUSY</errorcode></term> - <listitem> - <para>I/O is in progress, the output cannot be -switched.</para> +there are no video outputs at all.</para> </listitem> </varlistentry> </variablelist> </refsect1> </refentry> - -<!-- -Local Variables: -mode: sgml -sgml-parent-document: "v4l2.sgml" -indent-tabs-mode: nil -End: --->
Documentation/DocBook/media/v4l/vidioc-g-parm.xml +0 -17
@@ -311,22 +311,5 @@ excessive motion blur. </para> <refsect1> &return-value; - - <variablelist> - <varlistentry> - <term><errorcode>EINVAL</errorcode></term> - <listitem> - <para>This ioctl is not supported.</para> - </listitem> - </varlistentry> - </variablelist> </refsect1> </refentry> - -<!-- -Local Variables: -mode: sgml -sgml-parent-document: "v4l2.sgml" -indent-tabs-mode: nil -End: --->
Documentation/DocBook/media/v4l/vidioc-g-priority.xml +1 -2
@@ -120,8 +120,7 @@ recording.</entry> <varlistentry> <term><errorcode>EINVAL</errorcode></term> <listitem> - <para>The requested priority value is invalid, or the -driver does not support access priorities.</para> + <para>The requested priority value is invalid.</para> </listitem> </varlistentry> <varlistentry>
Documentation/DocBook/media/v4l/vidioc-g-sliced-vbi-cap.xml +1 -10
@@ -246,19 +246,10 @@ line systems.</entry> <varlistentry> <term><errorcode>EINVAL</errorcode></term> <listitem> - <para>The device does not support sliced VBI capturing or -output, or the value in the <structfield>type</structfield> field is + <para>The value in the <structfield>type</structfield> field is wrong.</para> </listitem> </varlistentry> </variablelist> </refsect1> </refentry> - -<!-- -Local Variables: -mode: sgml -sgml-parent-document: "v4l2.sgml" -indent-tabs-mode: nil -End: --->
Documentation/DocBook/media/v4l/vidioc-g-std.xml +1 -8
@@ -82,14 +82,7 @@ standards.</para> <varlistentry> <term><errorcode>EINVAL</errorcode></term> <listitem> - <para>This ioctl is not supported, or the -<constant>VIDIOC_S_STD</constant> parameter was unsuitable.</para> - </listitem> - </varlistentry> - <varlistentry> - <term><errorcode>EBUSY</errorcode></term> - <listitem> - <para>The device is busy and therefore can not change the standard</para> + <para>The <constant>VIDIOC_S_STD</constant> parameter was unsuitable.</para> </listitem> </varlistentry> </variablelist>
Documentation/DocBook/media/v4l/vidioc-log-status.xml +0 -17
@@ -37,22 +37,5 @@ was introduced in Linux 2.6.15.</para> <refsect1> &return-value; - - <variablelist> - <varlistentry> - <term><errorcode>EINVAL</errorcode></term> - <listitem> - <para>The driver does not support this ioctl.</para> - </listitem> - </varlistentry> - </variablelist> </refsect1> </refentry> - -<!-- -Local Variables: -mode: sgml -sgml-parent-document: "v4l2.sgml" -indent-tabs-mode: nil -End: --->
Documentation/DocBook/media/v4l/vidioc-overlay.xml +1 -10
@@ -65,19 +65,10 @@ <varlistentry> <term><errorcode>EINVAL</errorcode></term> <listitem> - <para>Video overlay is not supported, or the -parameters have not been set up. See <xref + <para>The overlay parameters have not been set up. See <xref linkend="overlay" /> for the necessary steps.</para> </listitem> </varlistentry> </variablelist> </refsect1> </refentry> - -<!-- -Local Variables: -mode: sgml -sgml-parent-document: "v4l2.sgml" -indent-tabs-mode: nil -End: --->
Documentation/DocBook/media/v4l/vidioc-qbuf.xml +0 -17
@@ -158,15 +158,6 @@ or no buffers have been allocated yet, or the <structfield>userptr</structfield> or <structfield>length</structfield> are invalid.</para> </listitem> - </varlistentry> - <varlistentry> - <term><errorcode>ENOMEM</errorcode></term> - <listitem> - <para>Not enough physical or virtual memory was available to -enqueue a user pointer buffer.</para> - </listitem> - </varlistentry> - <varlistentry> <term><errorcode>EIO</errorcode></term> <listitem> <para><constant>VIDIOC_DQBUF</constant> failed due to an
@@ -184,11 +175,3 @@ continue streaming. </variablelist> </refsect1> </refentry> - -<!-- -Local Variables: -mode: sgml -sgml-parent-document: "v4l2.sgml" -indent-tabs-mode: nil -End: --->
Documentation/DocBook/media/v4l/vidioc-query-dv-preset.xml +0 -22
@@ -61,27 +61,5 @@ returned.</para> <refsect1> &return-value; - <variablelist> - <varlistentry> - <term><errorcode>EINVAL</errorcode></term> - <listitem> - <para>This ioctl is not supported.</para> - </listitem> - </varlistentry> - <varlistentry> - <term><errorcode>EBUSY</errorcode></term> - <listitem> - <para>The device is busy and therefore can not sense the preset</para> - </listitem> - </varlistentry> - </variablelist> </refsect1> </refentry> - -<!-- -Local Variables: -mode: sgml -sgml-parent-document: "v4l2.sgml" -indent-tabs-mode: nil -End: --->
Documentation/DocBook/media/v4l/vidioc-querycap.xml +0 -19
@@ -283,24 +283,5 @@ linkend="mmap">streaming</link> I/O method.</entry> <refsect1> &return-value; - - <variablelist> - <varlistentry> - <term><errorcode>EINVAL</errorcode></term> - <listitem> - <para>The device is not compatible with this -specification.</para> - </listitem> - </varlistentry> - </variablelist> </refsect1> </refentry> - -<!-- -Local Variables: -mode: sgml -sgml-parent-document: "v4l2.sgml" -indent-tabs-mode: nil -End: ---> -
Documentation/DocBook/media/v4l/vidioc-querystd.xml +0 -23
@@ -62,28 +62,5 @@ current video input or output.</para> <refsect1> &return-value; - - <variablelist> - <varlistentry> - <term><errorcode>EINVAL</errorcode></term> - <listitem> - <para>This ioctl is not supported.</para> - </listitem> - </varlistentry> - <varlistentry> - <term><errorcode>EBUSY</errorcode></term> - <listitem> - <para>The device is busy and therefore can not detect the standard</para> - </listitem> - </varlistentry> - </variablelist> </refsect1> </refentry> - -<!-- -Local Variables: -mode: sgml -sgml-parent-document: "v4l2.sgml" -indent-tabs-mode: nil -End: --->
Documentation/DocBook/media/v4l/vidioc-reqbufs.xml +0 -16
@@ -122,14 +122,6 @@ higher. This array should be zeroed by applications.</entry> <variablelist> <varlistentry> - <term><errorcode>EBUSY</errorcode></term> - <listitem> - <para>The driver supports multiple opens and I/O is already -in progress, or reallocation of buffers was attempted although one or -more are still mapped.</para> - </listitem> - </varlistentry> - <varlistentry> <term><errorcode>EINVAL</errorcode></term> <listitem> <para>The buffer type (<structfield>type</structfield> field) or the
@@ -140,11 +132,3 @@ supported.</para> </variablelist> </refsect1> </refentry> - -<!-- -Local Variables: -mode: sgml -sgml-parent-document: "v4l2.sgml" -indent-tabs-mode: nil -End: --->
Documentation/DocBook/media/v4l/vidioc-streamon.xml +3 -11
@@ -88,9 +88,9 @@ synchronize with other events.</para> <varlistentry> <term><errorcode>EINVAL</errorcode></term> <listitem> - <para>Streaming I/O is not supported, the buffer -<structfield>type</structfield> is not supported, or no buffers have -been allocated (memory mapping) or enqueued (output) yet.</para> + <para>The buffer<structfield>type</structfield> is not supported, + or no buffers have been allocated (memory mapping) or enqueued + (output) yet.</para> </listitem> </varlistentry> <varlistentry>
@@ -105,11 +105,3 @@ been allocated (memory mapping) or enqueued (output) yet.</para> </variablelist> </refsect1> </refentry> - -<!-- -Local Variables: -mode: sgml -sgml-parent-document: "v4l2.sgml" -indent-tabs-mode: nil -End: --->
Documentation/DocBook/media/v4l/vidioc-subdev-g-fmt.xml +3 -0
@@ -177,4 +177,7 @@ </varlistentry> </variablelist> </refsect1> + <refsect1> + &return-value; + </refsect1> </refentry>
Documentation/DocBook/media/v4l/vidioc-subscribe-event.xml +3 -8
@@ -290,13 +290,8 @@ </tbody> </tgroup> </table> - + </refsect1> + <refsect1> + &return-value; </refsect1> </refentry> -<!-- -Local Variables: -mode: sgml -sgml-parent-document: "v4l2.sgml" -indent-tabs-mode: nil -End: --->
Signature · 1 line
1.7.1
RFC PATCH v3 3/17 DocBook: Use the generic error code page also for MC API
In reply to a message not in the archiveInstead of having their own generic error codes at the MC API, move its section to the generic one and be sure that all media ioctl's will point to it.
Documentation/DocBook/media/v4l/gen-errors.xml +15 -1
@@ -5,6 +5,11 @@ <tgroup cols="2"> &cs-str; <tbody valign="top"> + <!-- Keep it ordered alphabetically --> + <row> + <entry>EBADF</entry> + <entry><parameter>fd</parameter> is not a valid open file descriptor.</entry> + </row> <row> <entry>EBUSY</entry> <entry>The ioctl can't be handled because the device is busy. This is
@@ -15,7 +20,16 @@ problem first (typically: stop the stream before retrying).</entry> </row> <row> + <entry>EFAULT</entry> + <entry><parameter>fd</parameter> is not a valid open file descriptor.</entry> + </row> + <row> <entry>EINVAL</entry> + <entry>One or more of the ioctl parameters are invalid. This is a widely + error code. see the individual ioctl requests for actual 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.</entry> </row>
@@ -25,7 +39,7 @@ </row> <row> <entry>ENOSPC</entry> - <entry>On USB devices, the stream ioctl's can return this error meaning + <entry>On USB devices, the stream ioctl's can return this error, meaning that this request would overcommit the usb bandwidth reserved for periodic transfers (up to 80% of the USB bandwidth).</entry> </row>
Documentation/DocBook/media/v4l/media-func-ioctl.xml +2 -46
56 lines not on this page · raw message
Documentation/DocBook/media/v4l/media-ioc-device-info.xml +1 -2
@@ -127,7 +127,6 @@ </refsect1> <refsect1> - <title>Return value</title> - <para>This function doesn't return specific error codes.</para> + &return-value; </refsect1> </refentry>
Signature · 1 line
1.7.1
Re: [PATCH RFCv3 03/17] [media] DocBook: Use the generic error code page also for MC API
Quoted 23 lines · On Wednesday, July 06, 2011 20:03:52 Mauro Carvalho Chehab wrote:
Instead of having their own generic error codes at the MC API, move its section to the generic one and be sure that all media ioctl's will point to it.
Signed-off-by Mauro Carvalho Chehab <[email protected]>Documentation/DocBook/media/v4l/gen-errors.xml +5
-0@@ -5,6 +5,11 @@ <tgroup cols="2"> &cs-str; <tbody valign="top"> + <!-- Keep it ordered alphabetically --> + <row> + <entry>EBADF</entry> + <entry><parameter>fd</parameter> is not a valid open file descriptor.</entry> + </row> <row> <entry>EBUSY</entry> <entry>The ioctl can't be handled because the device is busy. This is
Documentation/DocBook/media/v4l/gen-errors.xml line 24
Quoted 5 lines
Documentation/DocBook/media/v4l/gen-errors.xml +2
-0@@ -15,7 +20,16 @@ problem first (typically: stop the stream before retrying).</entry> </row> <row> + <entry>EFAULT</entry> + <entry><parameter>fd</parameter> is not a valid open file descriptor.</entry>
This seems to be a copy-and-paste error. The original text in media-func-ioctl.xml says this:
<para><parameter>argp</parameter> references an inaccessible memory area.</para>
Documentation/DocBook/media/v4l/gen-errors.xml line 28
Quoted 4 lines
Documentation/DocBook/media/v4l/gen-errors.xml +3
-0+ </row> + <row> <entry>EINVAL</entry> + <entry>One or more of the ioctl parameters are invalid. This is a widely
widely -> widely used
Documentation/DocBook/media/v4l/gen-errors.xml line 29
Quoted 1 line
Documentation/DocBook/media/v4l/gen-errors.xml +1
-0+ error code. see the individual ioctl requests for actual causes.</entry>
see -> See
Regards,
Hans
Quoted 90 lines
Documentation/DocBook/media/v4l/gen-errors.xml +4
-1+ </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.</entry> </row>@@ -25,7 +39,7 @@ </row> <row> <entry>ENOSPC</entry> - <entry>On USB devices, the stream ioctl's can return this error meaning + <entry>On USB devices, the stream ioctl's can return this error, meaning that this request would overcommit the usb bandwidth reserved for periodic transfers (up to 80% of the USB bandwidth).</entry> </row>Documentation/DocBook/media/v4l/media-func-ioctl.xml +2
-46@@ -63,54 +63,10 @@ </refsect1> <refsect1> - <title>Return Value</title> - - <para><function>ioctl()</function> returns <returnvalue>0</returnvalue> on - success. On failure, <returnvalue>-1</returnvalue> is returned, and the - <varname>errno</varname> variable is set appropriately. Generic error codes - are listed below, and request-specific error codes are listed in the + &return-value; + <para>Request-specific error codes are listed in the individual requests descriptions.</para> <para>When an ioctl that takes an output or read/write parameter fails, the parameter remains unmodified.</para> - - <variablelist> - <varlistentry> - <term><errorcode>EBADF</errorcode></term> - <listitem> - <para><parameter>fd</parameter> is not a valid open file descriptor. - </para> - </listitem> - </varlistentry> - <varlistentry> - <term><errorcode>EFAULT</errorcode></term> - <listitem> - <para><parameter>argp</parameter> references an inaccessible memory - area.</para> - </listitem> - </varlistentry> - <varlistentry> - <term><errorcode>EINVAL</errorcode></term> - <listitem> - <para>The <parameter>request</parameter> or the data pointed to by - <parameter>argp</parameter> is not valid. This is a very common error - code, see the individual ioctl requests listed in - <xref linkend="media-user-func" /> for actual causes.</para> - </listitem> - </varlistentry> - <varlistentry> - <term><errorcode>ENOMEM</errorcode></term> - <listitem> - <para>Insufficient kernel memory was available to complete the - request.</para> - </listitem> - </varlistentry> - <varlistentry> - <term><errorcode>ENOTTY</errorcode></term> - <listitem> - <para><parameter>fd</parameter> is not associated with a character - special device.</para> - </listitem> - </varlistentry> - </variablelist> </refsect1> </refentry>Documentation/DocBook/media/v4l/media-ioc-device-info.xml +1
-2@@ -127,7 +127,6 @@ </refsect1> <refsect1> - <title>Return value</title> - <para>This function doesn't return specific error codes.</para> + &return-value; </refsect1> </refentry>
Re: [PATCH RFCv3 03/17] [media] DocBook: Use the generic error code page also for MC API
Em 07-07-2011 12:29, Hans Verkuil escreveu:
Quoted 32 lines · On Wednesday, July 06, 2011 20:03:52 Mauro Carvalho Chehab wrote:
Quoted 23 lines
Instead of having their own generic error codes at the MC API, move its section to the generic one and be sure that all media ioctl's will point to it.
Signed-off-by Mauro Carvalho Chehab <[email protected]>Documentation/DocBook/media/v4l/gen-errors.xml +5
-0@@ -5,6 +5,11 @@ <tgroup cols="2"> &cs-str; <tbody valign="top"> + <!-- Keep it ordered alphabetically --> + <row> + <entry>EBADF</entry> + <entry><parameter>fd</parameter> is not a valid open file descriptor.</entry> + </row> <row> <entry>EBUSY</entry> <entry>The ioctl can't be handled because the device is busy. This isDocumentation/DocBook/media/v4l/gen-errors.xml line 24
Quoted 5 lines
Documentation/DocBook/media/v4l/gen-errors.xml +2
-0@@ -15,7 +20,16 @@ problem first (typically: stop the stream before retrying).</entry> </row> <row> + <entry>EFAULT</entry> + <entry><parameter>fd</parameter> is not a valid open file descriptor.</entry>This seems to be a copy-and-paste error. The original text in media-func-ioctl.xml says this:
Quoted 2 lines
<para><parameter>argp</parameter> references an inaccessible memory area.</para>
Ah, yes. Anyway, a latter patch changes it to:
<entry>EFAULT</entry>
<entry>There was a failure while copying data from/to userspace.</entry>
</row>referencing a parameter name there is a bad thing anyway, as this is now at the common ioctl error code.
Instead of just using a posix-like error code:
EFAULT Bad address (POSIX.1)
I opted to use a more valuable description, explaining the reason for such error, e. g. that there was a failure at the data copy from/to userspace.
It may be better to change it to:
<entry>EFAULT</entry>
<entry>There was a failure while copying data from/to userspace, probably
caused by an invalid pointer reference.</entry>
I think I'll add the above description at the latter patch.
I was intending to add there the other possible error causes found at V4L/DVB API's and drivers, but the changes I did took me a longer time than I was expecting originally. I'll eventually do that when I have more time.
It would be really great if we could find some volunteer to help syncing the media API specs with the code.
Quoted 10 lines
Documentation/DocBook/media/v4l/gen-errors.xml line 28
Quoted 4 lines
Documentation/DocBook/media/v4l/gen-errors.xml +3
-0+ </row> + <row> <entry>EINVAL</entry> + <entry>One or more of the ioctl parameters are invalid. This is a widelywidely -> widely used
Documentation/DocBook/media/v4l/gen-errors.xml line 29
Quoted 1 line
Documentation/DocBook/media/v4l/gen-errors.xml +1
-0+ error code. see the individual ioctl requests for actual causes.</entry>see -> See
Fixed.
Thanks!
Mauro
Hans Verkuil
Acked-byRe: [PATCH RFCv3 03/17] [media] DocBook: Use the generic error code page also for MC API
Quoted 33 lines · On Thursday, July 07, 2011 19:15:24 Mauro Carvalho Chehab wrote:
Em 07-07-2011 12:29, Hans Verkuil escreveu:
Quoted 32 lines · On Wednesday, July 06, 2011 20:03:52 Mauro Carvalho Chehab wrote:
Quoted 23 lines
Instead of having their own generic error codes at the MC API, move its section to the generic one and be sure that all media ioctl's will point to it.
Signed-off-by Mauro Carvalho Chehab <[email protected]>Documentation/DocBook/media/v4l/gen-errors.xml +5
-0@@ -5,6 +5,11 @@ <tgroup cols="2"> &cs-str; <tbody valign="top"> + <!-- Keep it ordered alphabetically --> + <row> + <entry>EBADF</entry> + <entry><parameter>fd</parameter> is not a valid open file descriptor.</entry> + </row> <row> <entry>EBUSY</entry> <entry>The ioctl can't be handled because the device is busy. This isDocumentation/DocBook/media/v4l/gen-errors.xml line 24
Quoted 5 lines
Documentation/DocBook/media/v4l/gen-errors.xml +2
-0@@ -15,7 +20,16 @@ problem first (typically: stop the stream before retrying).</entry> </row> <row> + <entry>EFAULT</entry> + <entry><parameter>fd</parameter> is not a valid open file descriptor.</entry>This seems to be a copy-and-paste error. The original text in media-func-ioctl.xml says this:
Quoted 4 lines
Quoted 2 lines
<para><parameter>argp</parameter> references an inaccessible memory area.</para>Ah, yes. Anyway, a latter patch changes it to:
OK, I missed that. It was a bit confusing to review.
Quoted 36 lines
<entry>EFAULT</entry> <entry>There was a failure while copying data from/to userspace.</entry> </row>referencing a parameter name there is a bad thing anyway, as this is now at the common ioctl error code.
Instead of just using a posix-like error code:
EFAULT Bad address (POSIX.1)I opted to use a more valuable description, explaining the reason for such error, e. g. that there was a failure at the data copy from/to userspace.
It may be better to change it to:
<entry>EFAULT</entry>
<entry>There was a failure while copying data from/to userspace, probably
caused by an invalid pointer reference.</entry>I think I'll add the above description at the latter patch.
I was intending to add there the other possible error causes found at V4L/DVB API's and drivers, but the changes I did took me a longer time than I was expecting originally. I'll eventually do that when I have more time.
It would be really great if we could find some volunteer to help syncing the media API specs with the code.
Quoted 7 lines
Documentation/DocBook/media/v4l/gen-errors.xml line 28
Quoted 4 lines
Documentation/DocBook/media/v4l/gen-errors.xml +3
-0+ </row> + <row> <entry>EINVAL</entry> + <entry>One or more of the ioctl parameters are invalid. This is a widelywidely -> widely used
Quoted 5 lines
Quoted 3 lines
Documentation/DocBook/media/v4l/gen-errors.xml line 29
Quoted 1 line
Documentation/DocBook/media/v4l/gen-errors.xml +1
-0+ error code. see the individual ioctl requests for actual causes.</entry>see -> See
Fixed.
OK, with these changes you have my
as well for this patch.
Just for my understanding: do you plan on merging this for 3.1? I have no objection to that. Together with the querycap version changes it is easy to add compatibility support to libv4l should that be necessary. I'm not convinced there won't be any fallout from this change, but at least there is a decent way of working around it if needed. And there is no doubt that -ENOTTY is a much better return code.
When this is merged I'll modify v4l2-compliance, v4l2-ctl (if necessary) and qv4l2.
Regards,
Hans
Re: [PATCH RFCv3 03/17] [media] DocBook: Use the generic error code page also for MC API
Em 07-07-2011 14:28, Hans Verkuil escreveu:
Quoted 34 lines · On Thursday, July 07, 2011 19:15:24 Mauro Carvalho Chehab wrote:
Quoted 33 lines
Em 07-07-2011 12:29, Hans Verkuil escreveu:
Quoted 32 lines · On Wednesday, July 06, 2011 20:03:52 Mauro Carvalho Chehab wrote:
Quoted 23 lines
Instead of having their own generic error codes at the MC API, move its section to the generic one and be sure that all media ioctl's will point to it.
Signed-off-by Mauro Carvalho Chehab <[email protected]>Documentation/DocBook/media/v4l/gen-errors.xml +5
-0@@ -5,6 +5,11 @@ <tgroup cols="2"> &cs-str; <tbody valign="top"> + <!-- Keep it ordered alphabetically --> + <row> + <entry>EBADF</entry> + <entry><parameter>fd</parameter> is not a valid open file descriptor.</entry> + </row> <row> <entry>EBUSY</entry> <entry>The ioctl can't be handled because the device is busy. This isDocumentation/DocBook/media/v4l/gen-errors.xml line 24
Quoted 5 lines
Documentation/DocBook/media/v4l/gen-errors.xml +2
-0@@ -15,7 +20,16 @@ problem first (typically: stop the stream before retrying).</entry> </row> <row> + <entry>EFAULT</entry> + <entry><parameter>fd</parameter> is not a valid open file descriptor.</entry>This seems to be a copy-and-paste error. The original text in media-func-ioctl.xml says this:
Quoted 6 lines
Quoted 4 lines
Quoted 2 lines
<para><parameter>argp</parameter> references an inaccessible memory area.</para>Ah, yes. Anyway, a latter patch changes it to:
OK, I missed that. It was a bit confusing to review.
Yeah. Documentation patches are harder to handle than normal patches. I did several changes on the existing patches, but perfecting each patch individually will probably take forever.
Quoted 40 lines
Quoted 40 lines
<entry>EFAULT</entry> <entry>There was a failure while copying data from/to userspace.</entry> </row>referencing a parameter name there is a bad thing anyway, as this is now at the common ioctl error code.
Instead of just using a posix-like error code:
EFAULT Bad address (POSIX.1)I opted to use a more valuable description, explaining the reason for such error, e. g. that there was a failure at the data copy from/to userspace.
It may be better to change it to:
<entry>EFAULT</entry>
<entry>There was a failure while copying data from/to userspace, probably
caused by an invalid pointer reference.</entry>I think I'll add the above description at the latter patch.
I was intending to add there the other possible error causes found at V4L/DVB API's and drivers, but the changes I did took me a longer time than I was expecting originally. I'll eventually do that when I have more time.
It would be really great if we could find some volunteer to help syncing the media API specs with the code.
Quoted 10 lines
Documentation/DocBook/media/v4l/gen-errors.xml line 28
Quoted 4 lines
Documentation/DocBook/media/v4l/gen-errors.xml +3
-0+ </row> + <row> <entry>EINVAL</entry> + <entry>One or more of the ioctl parameters are invalid. This is a widelywidely -> widely used
Documentation/DocBook/media/v4l/gen-errors.xml line 29
Quoted 1 line
Documentation/DocBook/media/v4l/gen-errors.xml +1
-0+ error code. see the individual ioctl requests for actual causes.</entry>see -> See
Quoted 7 lines
Quoted 1 line
Fixed.
OK, with these changes you have my
Acked-by Hans Verkuil <[email protected]>as well for this patch.
Thanks!
Quoted 5 lines
Just for my understanding: do you plan on merging this for 3.1? I have no objection to that. Together with the querycap version changes it is easy to add compatibility support to libv4l should that be necessary. I'm not convinced there won't be any fallout from this change, but at least there is a decent way of working around it if needed. And there is no doubt that
-ENOTTYis a much better return code.
Yes, that's my plan. Having both patch series merged together seemed a good idea to me, as it becomes easier for applications to benefit of that.
Quoted 2 lines
When this is merged I'll modify v4l2-compliance, v4l2-ctl (if necessary) and qv4l2.
OK.
Quoted 4 lines
Regards,
Hans
RFC PATCH v3 4/17 DocBook/media-ioc-setup-link.xml: Remove EBUSY
In reply to a message not in the archiveThe EBUSY is already described as a generic error condition, with a similar text.
Documentation/DocBook/media/v4l/media-ioc-setup-link.xml +0 -9
@@ -72,15 +72,6 @@ <variablelist> <varlistentry> - <term><errorcode>EBUSY</errorcode></term> - <listitem> - <para>The link properties can't be changed because the link is - currently busy. This can be caused, for instance, by an active media - stream (audio or video) on the link. The ioctl shouldn't be retried if - no other action is performed before to fix the problem.</para> - </listitem> - </varlistentry> - <varlistentry> <term><errorcode>EINVAL</errorcode></term> <listitem> <para>The &media-link-desc; references a non-existing link, or the
Signature · 1 line
1.7.1
RFC PATCH v3 5/17 DocBook: Remove V4L generic error description for ioctl()
In reply to a message not in the archiveV4L ioctl function descripton also has a generic error chapter. Remove it, as it is now obsoleted by a general, multi-API generic error descriptions.
Documentation/DocBook/media/v4l/func-ioctl.xml +3 -69
@@ -64,75 +64,9 @@ their respective function and parameters are specified in <xref </refsect1> <refsect1> - <title>Return Value</title> - - <para>On success the <function>ioctl()</function> function returns -<returnvalue>0</returnvalue> and does not reset the -<varname>errno</varname> variable. On failure -<returnvalue>-1</returnvalue> is returned, when the ioctl takes an -output or read/write parameter it remains unmodified, and the -<varname>errno</varname> variable is set appropriately. See below for -possible error codes. Generic errors like <errorcode>EBADF</errorcode> -or <errorcode>EFAULT</errorcode> are not listed in the sections -discussing individual ioctl requests.</para> - <para>Note ioctls may return undefined error codes. Since errors -may have side effects such as a driver reset applications should -abort on unexpected errors.</para> - - <variablelist> - <varlistentry> - <term><errorcode>EBADF</errorcode></term> - <listitem> - <para><parameter>fd</parameter> is not a valid open file -descriptor.</para> - </listitem> - </varlistentry> - <varlistentry> - <term><errorcode>EBUSY</errorcode></term> - <listitem> - <para>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.</para> - </listitem> - </varlistentry> - <varlistentry> - <term><errorcode>EFAULT</errorcode></term> - <listitem> - <para><parameter>argp</parameter> references an inaccessible -memory area.</para> - </listitem> - </varlistentry> - <varlistentry> - <term><errorcode>ENOTTY</errorcode></term> - <listitem> - <para><parameter>fd</parameter> is not associated with a -character special device.</para> - </listitem> - </varlistentry> - <varlistentry> - <term><errorcode>EINVAL</errorcode></term> - <listitem> - <para>The <parameter>request</parameter> or the data pointed -to by <parameter>argp</parameter> is not valid. This is a very common -error code, see the individual ioctl requests listed in <xref - linkend="user-func" /> for actual causes.</para> - </listitem> - </varlistentry> - <varlistentry> - <term><errorcode>ENOMEM</errorcode></term> - <listitem> - <para>Not enough physical or virtual memory was available to -complete the request.</para> - </listitem> - </varlistentry> - <varlistentry> - <term><errorcode>ERANGE</errorcode></term> - <listitem> - <para>The application attempted to set a control with the -&VIDIOC-S-CTRL; ioctl to a value which is out of bounds.</para> - </listitem> - </varlistentry> - </variablelist> + &return-value; + <para>When an ioctl that takes an output or read/write parameter fails, + the parameter remains unmodified.</para> </refsect1> </refentry>
Documentation/DocBook/media/v4l/gen-errors.xml +9 -1
@@ -31,7 +31,8 @@ <row> <entry>EINVAL or ENOTTY</entry> <entry>The ioctl is not supported by the driver, actually meaning that - the required functionality is not available.</entry> + the required functionality is not available, or the file + descriptor is not for a media device.</entry> </row> <row> <entry>ENOMEM</entry>
@@ -46,3 +47,10 @@ </tbody> </tgroup> </table> + +<para>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. +</para> + +<para>Note 2: Request-specific error codes are listed in the individual +requests descriptions.</para>
Documentation/DocBook/media/v4l/media-func-ioctl.xml +1 -0
@@ -64,6 +64,7 @@ <refsect1> &return-value; + <para>Request-specific error codes are listed in the individual requests descriptions.</para> <para>When an ioctl that takes an output or read/write parameter fails,
Signature · 1 line
1.7.1
RFC PATCH v3 6/17 DocBook: Add an error code session for LIRC interface
In reply to a message not in the archiveDocumentation/DocBook/media/v4l/lirc_device_interface.xml +4 -0
@@ -248,4 +248,8 @@ on working with the default settings initially.</para> </variablelist> </section> + +<section id="lirc_dev_errors"> + &return-value; +</section> </section>
Signature · 1 line
1.7.1
RFC PATCH v3 7/17 DocBook: Add return error codes to LIRC ioctl session
In reply to a message not in the archiveAdd a reference for the generic error code chapter to LIRC ioctl description.
Documentation/DocBook/media/v4l/lirc_device_interface.xml +2 -4
@@ -246,10 +246,8 @@ on working with the default settings initially.</para> </listitem> </varlistentry> </variablelist> - -</section> - <section id="lirc_dev_errors"> - &return-value; + &return-value; +</section> </section> </section>
Signature · 1 line
1.7.1
RFC PATCH v3 8/17 siano: bad parameter is -EINVAL and not -EFAULT
In reply to a message not in the archivedrivers/media/dvb/siano/smscoreapi.c +1 -1
@@ -1147,7 +1147,7 @@ static int smscore_validate_client(struct smscore_device_t *coredev,if (!client) {sms_err ("bad parameter." ); -return -EFAULT ; +return -EINVAL ; } registered_client =smscore_find_client (coredev, data_type, id);if (registered_client == client)
Signature · 1 line
1.7.1
RFC PATCH v3 9/17 nxt6000: i2c bus error should return -EIO
In reply to a message not in the archive-EFAULT is used to indicate that there were a problem when copying data from/to userspace. Don't mix it with I2C bus error (-EIO).
drivers/media/dvb/frontends/nxt6000.c +1 -1
@@ -50,7 +50,7 @@ static int nxt6000_writereg(struct nxt6000_state* state, u8 reg, u8 data)if ((ret =i2c_transfer (state->i2c, &msg,1 )) !=1 )dprintk ("nxt6000: nxt6000_write error (reg: 0x%02X, data: 0x%02X, ret: %d)\n" , reg, data, ret); -return (ret !=1 ) ? -EFAULT :0 ; +return (ret !=1 ) ? -EIO :0 ; }static u8 nxt6000_readreg (struct nxt6000_state * state,u8 reg)
Signature · 1 line
1.7.1
RFC PATCH v3 10/17 DVB: Point to the generic error chapter
In reply to a message not in the archiveJust like the V4L, MC and LIRC API's, point to the generic error chapter for ioctl's. This will allow moving generic error codes to just one place inside all media API's.
A latter patch will remove the generic errors from each specific ioctl.
Documentation/DocBook/media/dvb/audio.xml +21 -42
@@ -220,8 +220,7 @@ and right. <para>(blocking mode is the default)</para> </entry> </row></tbody></tgroup></informaltable> -<para>ERRORS -</para> +<para>RETURN VALUE</para> <informaltable><tgroup cols="2"><tbody><row><entry align="char"> <para>ENODEV</para>
@@ -279,8 +278,7 @@ and right. <para>File descriptor returned by a previous call to open().</para> </entry> </row></tbody></tgroup></informaltable> -<para>ERRORS -</para> +<para>RETURN VALUE</para> <informaltable><tgroup cols="2"><tbody><row><entry align="char"> <para>EBADF</para>
@@ -335,8 +333,7 @@ and right. <para>Size of buf.</para> </entry> </row></tbody></tgroup></informaltable> -<para>ERRORS -</para> +<para>RETURN VALUE</para> <informaltable><tgroup cols="2"><tbody><row><entry align="char"> <para>EPERM</para>
@@ -394,8 +391,7 @@ role="subsection"><title>AUDIO_STOP</title> <para>Equals AUDIO_STOP for this command.</para> </entry> </row></tbody></tgroup></informaltable> -<para>ERRORS -</para> +&return-value-dvb; <informaltable><tgroup cols="2"><tbody><row><entry align="char"> <para>EBADF</para>
@@ -446,8 +442,7 @@ role="subsection"><title>AUDIO_PLAY</title> <para>Equals AUDIO_PLAY for this command.</para> </entry> </row></tbody></tgroup></informaltable> -<para>ERRORS -</para> +&return-value-dvb; <informaltable><tgroup cols="2"><tbody><row><entry align="char"> <para>EBADF</para>
@@ -506,8 +501,7 @@ role="subsection"><title>AUDIO_PAUSE</title> <para>Equals AUDIO_PAUSE for this command.</para> </entry> </row></tbody></tgroup></informaltable> -<para>ERRORS -</para> +&return-value-dvb; <informaltable><tgroup cols="2"><tbody><row><entry align="char"> <para>EBADF</para>
@@ -563,8 +557,7 @@ with AUDIO_PAUSE command.</para> <para>Equals AUDIO_CONTINUE for this command.</para> </entry> </row></tbody></tgroup></informaltable> -<para>ERRORS -</para> +&return-value-dvb; <informaltable><tgroup cols="2"><tbody><row><entry align="char"> <para>EBADF</para>
@@ -627,8 +620,7 @@ role="subsection"><title>AUDIO_SELECT_SOURCE</title> stream.</para> </entry> </row></tbody></tgroup></informaltable> -<para>ERRORS -</para> +&return-value-dvb; <informaltable><tgroup cols="2"><tbody><row><entry align="char"> <para>EBADF</para>
@@ -706,8 +698,7 @@ role="subsection"><title>AUDIO_SET_MUTE</title> <para>FALSE Audio Un-mute</para> </entry> </row></tbody></tgroup></informaltable> -<para>ERRORS -</para> +&return-value-dvb; <informaltable><tgroup cols="2"><tbody><row><entry align="char"> <para>EBADF</para>
@@ -785,8 +776,7 @@ role="subsection"><title>AUDIO_SET_AV_SYNC</title> <para>FALSE AV-sync OFF</para> </entry> </row></tbody></tgroup></informaltable> -<para>ERRORS -</para> +&return-value-dvb; <informaltable><tgroup cols="2"><tbody><row><entry align="char"> <para>EBADF</para>
@@ -868,8 +858,7 @@ role="subsection"><title>AUDIO_SET_BYPASS_MODE</title> <para>FALSE Bypass is enabled</para> </entry> </row></tbody></tgroup></informaltable> -<para>ERRORS -</para> +&return-value-dvb; <informaltable><tgroup cols="2"><tbody><row><entry align="char"> <para>EBADF</para>
@@ -937,8 +926,7 @@ role="subsection"><title>AUDIO_CHANNEL_SELECT</title> stereo).</para> </entry> </row></tbody></tgroup></informaltable> -<para>ERRORS -</para> +&return-value-dvb; <informaltable><tgroup cols="2"><tbody><row><entry align="char"> <para>EBADF</para>
@@ -1005,8 +993,7 @@ role="subsection"><title>AUDIO_GET_STATUS</title> <para>Returns the current state of Audio Device.</para> </entry> </row></tbody></tgroup></informaltable> -<para>ERRORS -</para> +&return-value-dvb; <informaltable><tgroup cols="2"><tbody><row><entry align="char"> <para>EBADF</para>
@@ -1073,8 +1060,7 @@ role="subsection"><title>AUDIO_GET_CAPABILITIES</title> <para>Returns a bit array of supported sound formats.</para> </entry> </row></tbody></tgroup></informaltable> -<para>ERRORS -</para> +&return-value-dvb; <informaltable><tgroup cols="2"><tbody><row><entry align="char"> <para>EBADF</para>
@@ -1132,8 +1118,7 @@ role="subsection"><title>AUDIO_CLEAR_BUFFER</title> <para>Equals AUDIO_CLEAR_BUFFER for this command.</para> </entry> </row></tbody></tgroup></informaltable> -<para>ERRORS -</para> +&return-value-dvb; <informaltable><tgroup cols="2"><tbody><row><entry align="char"> <para>EBADF</para>
@@ -1196,8 +1181,7 @@ role="subsection"><title>AUDIO_SET_ID</title> <para>audio sub-stream id</para> </entry> </row></tbody></tgroup></informaltable> -<para>ERRORS -</para> +&return-value-dvb; <informaltable><tgroup cols="2"><tbody><row><entry align="char"> <para>EBADF</para>
@@ -1262,8 +1246,7 @@ role="subsection"><title>AUDIO_SET_MIXER</title> <para>mixer settings.</para> </entry> </row></tbody></tgroup></informaltable> -<para>ERRORS -</para> +&return-value-dvb; <informaltable><tgroup cols="2"><tbody><row><entry align="char"> <para>EBADF</para>
@@ -1330,8 +1313,7 @@ role="subsection"><title>AUDIO_SET_STREAMTYPE</title> <para>stream type</para> </entry> </row></tbody></tgroup></informaltable> -<para>ERRORS -</para> +&return-value-dvb; <informaltable><tgroup cols="2"><tbody><row><entry align="char"> <para>EBADF</para>
@@ -1390,8 +1372,7 @@ role="subsection"><title>AUDIO_SET_EXT_ID</title> <para>audio sub_stream_id</para> </entry> </row></tbody></tgroup></informaltable> -<para>ERRORS -</para> +&return-value-dvb; <informaltable><tgroup cols="2"><tbody><row><entry align="char"> <para>EBADF</para>
@@ -1451,8 +1432,7 @@ role="subsection"><title>AUDIO_SET_ATTRIBUTES</title> <para>audio attributes according to section ??</para> </entry> </row></tbody></tgroup></informaltable> -<para>ERRORS -</para> +&return-value-dvb; <informaltable><tgroup cols="2"><tbody><row><entry align="char"> <para>EBADF</para>
@@ -1512,8 +1492,7 @@ role="subsection"><title>AUDIO_SET_KARAOKE</title> <para>karaoke settings according to section ??.</para> </entry> </row></tbody></tgroup></informaltable> -<para>ERRORS -</para> +&return-value-dvb; <informaltable><tgroup cols="2"><tbody><row><entry align="char"> <para>EBADF</para>
Documentation/DocBook/media/dvb/ca.xml +2 -4
@@ -158,8 +158,7 @@ typedef struct ca_pid { <para>(blocking mode is the default)</para> </entry> </row></tbody></tgroup></informaltable> -<para>ERRORS -</para> +<para>RETURN VALUE</para> <informaltable><tgroup cols="2"><tbody><row><entry align="char"> <para>ENODEV</para>
@@ -217,8 +216,7 @@ typedef struct ca_pid { <para>File descriptor returned by a previous call to open().</para> </entry> </row></tbody></tgroup></informaltable> -<para>ERRORS -</para> +<para>RETURN VALUE</para> <informaltable><tgroup cols="2"><tbody><row><entry align="char"> <para>EBADF</para>
Documentation/DocBook/media/dvb/demux.xml +11 -22
@@ -239,8 +239,7 @@ typedef enum { <para>(blocking mode is the default)</para> </entry> </row></tbody></tgroup></informaltable> -<para>ERRORS -</para> +<para>RETURN VALUE</para> <informaltable><tgroup cols="2"><tbody><row><entry align="char"> <para>ENODEV</para>
@@ -299,8 +298,7 @@ typedef enum { <para>File descriptor returned by a previous call to open().</para> </entry> </row></tbody></tgroup></informaltable> -<para>ERRORS -</para> +<para>RETURN VALUE</para> <informaltable><tgroup cols="2"><tbody><row><entry align="char"> <para>EBADF</para>
@@ -381,8 +379,7 @@ typedef enum { <para>Size of buf.</para> </entry> </row></tbody></tgroup></informaltable> -<para>ERRORS -</para> +<para>RETURN VALUE</para> <informaltable><tgroup cols="2"><tbody><row><entry align="char"> <para>EWOULDBLOCK</para>
@@ -485,8 +482,7 @@ typedef enum { <para>Size of buf.</para> </entry> </row></tbody></tgroup></informaltable> -<para>ERRORS -</para> +<para>RETURN VALUE</para> <informaltable><tgroup cols="2"><tbody><row><entry align="char"> <para>EWOULDBLOCK</para>
@@ -553,8 +549,7 @@ typedef enum { <para>Equals DMX_START for this command.</para> </entry> </row></tbody></tgroup></informaltable> -<para>ERRORS -</para> +&return-value-dvb; <informaltable><tgroup cols="2"><tbody><row><entry align="char"> <para>EBADF</para>
@@ -619,8 +614,7 @@ typedef enum { <para>Equals DMX_STOP for this command.</para> </entry> </row></tbody></tgroup></informaltable> -<para>ERRORS -</para> +&return-value-dvb; <informaltable><tgroup cols="2"><tbody><row><entry align="char"> <para>EBADF</para>
@@ -682,8 +676,7 @@ typedef enum { <para>Pointer to structure containing filter parameters.</para> </entry> </row></tbody></tgroup></informaltable> -<para>ERRORS -</para> +&return-value-dvb; <informaltable><tgroup cols="2"><tbody><row><entry align="char"> <para>EBADF</para>
@@ -755,8 +748,7 @@ typedef enum { <para>Pointer to structure containing filter parameters.</para> </entry> </row></tbody></tgroup></informaltable> -<para>ERRORS -</para> +&return-value-dvb; <informaltable><tgroup cols="2"><tbody><row><entry align="char"> <para>EBADF</para>
@@ -827,8 +819,7 @@ typedef enum { <para>Size of circular buffer.</para> </entry> </row></tbody></tgroup></informaltable> -<para>ERRORS -</para> +&return-value-dvb; <informaltable><tgroup cols="2"><tbody><row><entry align="char"> <para>EBADF</para>
@@ -900,8 +891,7 @@ typedef enum { <para>Pointer to the location where the event is to be stored.</para> </entry> </row></tbody></tgroup></informaltable> -<para>ERRORS -</para> +&return-value-dvb; <informaltable><tgroup cols="2"><tbody><row><entry align="char"> <para>EBADF</para>
@@ -974,8 +964,7 @@ typedef enum { <para>Pointer to the location where the stc is to be stored.</para> </entry> </row></tbody></tgroup></informaltable> -<para>ERRORS -</para> +&return-value-dvb; <informaltable><tgroup cols="2"><tbody><row><entry align="char"> <para>EBADF</para>
Documentation/DocBook/media/dvb/dvbproperty.xml +2 -3
@@ -80,7 +80,7 @@ struct dtv_properties { <para>Points to the location where the front-end property commands are stored.</para> </entry> </row></tbody></tgroup></informaltable> -<para>ERRORS</para> +&return-value-dvb; <informaltable><tgroup cols="2"><tbody><row> <entry align="char"><para>EINVAL</para></entry> <entry align="char"><para>Invalid parameter(s) received or number of parameters out of the range.</para></entry>
@@ -137,8 +137,7 @@ struct dtv_properties { <para>Points to the location where the front-end property commands are stored.</para> </entry> </row></tbody></tgroup></informaltable> -<para>ERRORS -</para> +&return-value-dvb; <informaltable><tgroup cols="2"><tbody><row> <entry align="char"><para>EINVAL</para></entry> <entry align="char"><para>Invalid parameter(s) received or number of parameters out of the range.</para></entry>
Documentation/DocBook/media/dvb/frontend.xml +20 -38
178 lines not on this page · raw message
Documentation/DocBook/media/dvb/video.xml +26 -52
234 lines not on this page · raw message
Documentation/DocBook/media_api.tmpl +1 -0
@@ -9,6 +9,7 @@ <!ENTITY fd "File descriptor returned by <link linkend='func-open'><function>open()</function></link>."> <!ENTITY i2c "I<superscript>2</superscript>C"> <!ENTITY return-value "<title>Return Value</title><para>On success <returnvalue>0</returnvalue> is returned, on error <returnvalue>-1</returnvalue> and the <varname>errno</varname> variable is set appropriately. The generic error codes are described at the <link linkend='gen-errors'>Generic Error Codes</link> chapter.</para>"> +<!ENTITY return-value-dvb "<para>RETURN VALUE</para><para>On success <returnvalue>0</returnvalue> is returned, on error <returnvalue>-1</returnvalue> and the <varname>errno</varname> variable is set appropriately. The generic error codes are described at the <link linkend='gen-errors'>Generic Error Codes</link> chapter.</para>"> <!ENTITY manvol "<manvolnum>2</manvolnum>"> <!-- Table templates: structs, structs w/union, defines. -->
Signature · 1 line
1.7.1
RFC PATCH v3 11/17 DocBook/audio.xml: Remove generic errors
In reply to a message not in the archiveRemove generic errors from ioctl() descriptions. For other ioctl's, there's no generic section. So, just keep whatever is there. Also remove the EINTERNAL error code, as no DVB driver returns it, and this error code is not defined on POSIX or on Linux.
Documentation/DocBook/media/dvb/audio.xml +0 -309
@@ -230,13 +230,6 @@ and right. </entry> </row><row><entry align="char"> -<para>EINTERNAL</para> -</entry><entry - align="char"> -<para>Internal error.</para> -</entry> - </row><row><entry - align="char"> <para>EBUSY</para> </entry><entry align="char">
@@ -392,21 +385,6 @@ role="subsection"><title>AUDIO_STOP</title> </entry> </row></tbody></tgroup></informaltable> &return-value-dvb; -<informaltable><tgroup cols="2"><tbody><row><entry - align="char"> -<para>EBADF</para> -</entry><entry - align="char"> -<para>fd is not a valid open file descriptor</para> -</entry> - </row><row><entry - align="char"> -<para>EINTERNAL</para> -</entry><entry - align="char"> -<para>Internal error.</para> -</entry> - </row></tbody></tgroup></informaltable> </section><section id="AUDIO_PLAY" role="subsection"><title>AUDIO_PLAY</title>
@@ -443,21 +421,6 @@ role="subsection"><title>AUDIO_PLAY</title> </entry> </row></tbody></tgroup></informaltable> &return-value-dvb; -<informaltable><tgroup cols="2"><tbody><row><entry - align="char"> -<para>EBADF</para> -</entry><entry - align="char"> -<para>fd is not a valid open file descriptor</para> -</entry> - </row><row><entry - align="char"> -<para>EINTERNAL</para> -</entry><entry - align="char"> -<para>Internal error.</para> -</entry> - </row></tbody></tgroup></informaltable> </section><section id="AUDIO_PAUSE" role="subsection"><title>AUDIO_PAUSE</title>
@@ -502,22 +465,6 @@ role="subsection"><title>AUDIO_PAUSE</title> </entry> </row></tbody></tgroup></informaltable> &return-value-dvb; -<informaltable><tgroup cols="2"><tbody><row><entry - align="char"> -<para>EBADF</para> -</entry><entry - align="char"> -<para>fd is not a valid open file descriptor.</para> -</entry> - </row><row><entry - align="char"> -<para>EINTERNAL</para> -</entry><entry - align="char"> -<para>Internal error.</para> -</entry> - </row></tbody></tgroup></informaltable> - </section><section id="AUDIO_CONTINUE" role="subsection"><title>AUDIO_CONTINUE</title>
@@ -558,21 +505,6 @@ with AUDIO_PAUSE command.</para> </entry> </row></tbody></tgroup></informaltable> &return-value-dvb; -<informaltable><tgroup cols="2"><tbody><row><entry - align="char"> -<para>EBADF</para> -</entry><entry - align="char"> -<para>fd is not a valid open file descriptor.</para> -</entry> - </row><row><entry - align="char"> -<para>EINTERNAL</para> -</entry><entry - align="char"> -<para>Internal error.</para> -</entry> - </row></tbody></tgroup></informaltable> </section><section id="AUDIO_SELECT_SOURCE" role="subsection"><title>AUDIO_SELECT_SOURCE</title>
@@ -621,28 +553,6 @@ role="subsection"><title>AUDIO_SELECT_SOURCE</title> </entry> </row></tbody></tgroup></informaltable> &return-value-dvb; -<informaltable><tgroup cols="2"><tbody><row><entry - align="char"> -<para>EBADF</para> -</entry><entry - align="char"> -<para>fd is not a valid open file descriptor.</para> -</entry> - </row><row><entry - align="char"> -<para>EINTERNAL</para> -</entry><entry - align="char"> -<para>Internal error.</para> -</entry> - </row><row><entry - align="char"> -<para>EINVAL</para> -</entry><entry - align="char"> -<para>Illegal input parameter.</para> -</entry> - </row></tbody></tgroup></informaltable> </section><section id="AUDIO_SET_MUTE" role="subsection"><title>AUDIO_SET_MUTE</title>
@@ -699,28 +609,6 @@ role="subsection"><title>AUDIO_SET_MUTE</title> </entry> </row></tbody></tgroup></informaltable> &return-value-dvb; -<informaltable><tgroup cols="2"><tbody><row><entry - align="char"> -<para>EBADF</para> -</entry><entry - align="char"> -<para>fd is not a valid open file descriptor.</para> -</entry> - </row><row><entry - align="char"> -<para>EINTERNAL</para> -</entry><entry - align="char"> -<para>Internal error.</para> -</entry> - </row><row><entry - align="char"> -<para>EINVAL</para> -</entry><entry - align="char"> -<para>Illegal input parameter.</para> -</entry> - </row></tbody></tgroup></informaltable> </section><section id="AUDIO_SET_AV_SYNC" role="subsection"><title>AUDIO_SET_AV_SYNC</title>
@@ -777,28 +665,6 @@ role="subsection"><title>AUDIO_SET_AV_SYNC</title> </entry> </row></tbody></tgroup></informaltable> &return-value-dvb; -<informaltable><tgroup cols="2"><tbody><row><entry - align="char"> -<para>EBADF</para> -</entry><entry - align="char"> -<para>fd is not a valid open file descriptor.</para> -</entry> - </row><row><entry - align="char"> -<para>EINTERNAL</para> -</entry><entry - align="char"> -<para>Internal error.</para> -</entry> - </row><row><entry - align="char"> -<para>EINVAL</para> -</entry><entry - align="char"> -<para>Illegal input parameter.</para> -</entry> - </row></tbody></tgroup></informaltable> </section><section id="AUDIO_SET_BYPASS_MODE" role="subsection"><title>AUDIO_SET_BYPASS_MODE</title>
@@ -859,28 +725,6 @@ role="subsection"><title>AUDIO_SET_BYPASS_MODE</title> </entry> </row></tbody></tgroup></informaltable> &return-value-dvb; -<informaltable><tgroup cols="2"><tbody><row><entry - align="char"> -<para>EBADF</para> -</entry><entry - align="char"> -<para>fd is not a valid open file descriptor.</para> -</entry> - </row><row><entry - align="char"> -<para>EINTERNAL</para> -</entry><entry - align="char"> -<para>Internal error.</para> -</entry> - </row><row><entry - align="char"> -<para>EINVAL</para> -</entry><entry - align="char"> -<para>Illegal input parameter.</para> -</entry> - </row></tbody></tgroup></informaltable> </section><section id="AUDIO_CHANNEL_SELECT" role="subsection"><title>AUDIO_CHANNEL_SELECT</title>
@@ -927,28 +771,6 @@ role="subsection"><title>AUDIO_CHANNEL_SELECT</title> </entry> </row></tbody></tgroup></informaltable> &return-value-dvb; -<informaltable><tgroup cols="2"><tbody><row><entry - align="char"> -<para>EBADF</para> -</entry><entry - align="char"> -<para>fd is not a valid open file descriptor.</para> -</entry> - </row><row><entry - align="char"> -<para>EINTERNAL</para> -</entry><entry - align="char"> -<para>Internal error.</para> -</entry> - </row><row><entry - align="char"> -<para>EINVAL</para> -</entry><entry - align="char"> -<para>Illegal input parameter ch.</para> -</entry> - </row></tbody></tgroup></informaltable> </section><section id="AUDIO_GET_STATUS" role="subsection"><title>AUDIO_GET_STATUS</title>
@@ -994,28 +816,6 @@ role="subsection"><title>AUDIO_GET_STATUS</title> </entry> </row></tbody></tgroup></informaltable> &return-value-dvb; -<informaltable><tgroup cols="2"><tbody><row><entry - align="char"> -<para>EBADF</para> -</entry><entry - align="char"> -<para>fd is not a valid open file descriptor.</para> -</entry> - </row><row><entry - align="char"> -<para>EINTERNAL</para> -</entry><entry - align="char"> -<para>Internal error.</para> -</entry> - </row><row><entry - align="char"> -<para>EFAULT</para> -</entry><entry - align="char"> -<para>status points to invalid address.</para> -</entry> - </row></tbody></tgroup></informaltable> </section><section id="AUDIO_GET_CAPABILITIES" role="subsection"><title>AUDIO_GET_CAPABILITIES</title>
@@ -1061,28 +861,6 @@ role="subsection"><title>AUDIO_GET_CAPABILITIES</title> </entry> </row></tbody></tgroup></informaltable> &return-value-dvb; -<informaltable><tgroup cols="2"><tbody><row><entry - align="char"> -<para>EBADF</para> -</entry><entry - align="char"> -<para>fd is not a valid open file descriptor.</para> -</entry> - </row><row><entry - align="char"> -<para>EINTERNAL</para> -</entry><entry - align="char"> -<para>Internal error.</para> -</entry> - </row><row><entry - align="char"> -<para>EFAULT</para> -</entry><entry - align="char"> -<para>cap points to an invalid address.</para> -</entry> - </row></tbody></tgroup></informaltable> </section><section id="AUDIO_CLEAR_BUFFER" role="subsection"><title>AUDIO_CLEAR_BUFFER</title>
@@ -1119,21 +897,6 @@ role="subsection"><title>AUDIO_CLEAR_BUFFER</title> </entry> </row></tbody></tgroup></informaltable> &return-value-dvb; -<informaltable><tgroup cols="2"><tbody><row><entry - align="char"> -<para>EBADF</para> -</entry><entry - align="char"> -<para>fd is not a valid open file descriptor.</para> -</entry> - </row><row><entry - align="char"> -<para>EINTERNAL</para> -</entry><entry - align="char"> -<para>Internal error.</para> -</entry> - </row></tbody></tgroup></informaltable> </section><section id="AUDIO_SET_ID" role="subsection"><title>AUDIO_SET_ID</title>
@@ -1182,28 +945,6 @@ role="subsection"><title>AUDIO_SET_ID</title> </entry> </row></tbody></tgroup></informaltable> &return-value-dvb; -<informaltable><tgroup cols="2"><tbody><row><entry - align="char"> -<para>EBADF</para> -</entry><entry - align="char"> -<para>fd is not a valid open file descriptor.</para> -</entry> - </row><row><entry - align="char"> -<para>EINTERNAL</para> -</entry><entry - align="char"> -<para>Internal error.</para> -</entry> - </row><row><entry - align="char"> -<para>EINVAL</para> -</entry><entry - align="char"> -<para>Invalid sub-stream id.</para> -</entry> - </row></tbody></tgroup></informaltable> </section><section id="AUDIO_SET_MIXER" role="subsection"><title>AUDIO_SET_MIXER</title>
@@ -1247,28 +988,6 @@ role="subsection"><title>AUDIO_SET_MIXER</title> </entry> </row></tbody></tgroup></informaltable> &return-value-dvb; -<informaltable><tgroup cols="2"><tbody><row><entry - align="char"> -<para>EBADF</para> -</entry><entry - align="char"> -<para>fd is not a valid open file descriptor.</para> -</entry> - </row><row><entry - align="char"> -<para>EINTERNAL</para> -</entry><entry - align="char"> -<para>Internal error.</para> -</entry> - </row><row><entry - align="char"> -<para>EFAULT</para> -</entry><entry - align="char"> -<para>mix points to an invalid address.</para> -</entry> - </row></tbody></tgroup></informaltable> </section><section id="AUDIO_SET_STREAMTYPE" role="subsection"><title>AUDIO_SET_STREAMTYPE</title>
@@ -1316,13 +1035,6 @@ role="subsection"><title>AUDIO_SET_STREAMTYPE</title> &return-value-dvb; <informaltable><tgroup cols="2"><tbody><row><entry align="char"> -<para>EBADF</para> -</entry><entry - align="char"> -<para>fd is not a valid open file descriptor</para> -</entry> - </row><row><entry - align="char"> <para>EINVAL</para> </entry><entry align="char">
@@ -1375,13 +1087,6 @@ role="subsection"><title>AUDIO_SET_EXT_ID</title> &return-value-dvb; <informaltable><tgroup cols="2"><tbody><row><entry align="char"> -<para>EBADF</para> -</entry><entry - align="char"> -<para>fd is not a valid open file descriptor</para> -</entry> - </row><row><entry - align="char"> <para>EINVAL</para> </entry><entry align="char">
@@ -1435,13 +1140,6 @@ role="subsection"><title>AUDIO_SET_ATTRIBUTES</title> &return-value-dvb; <informaltable><tgroup cols="2"><tbody><row><entry align="char"> -<para>EBADF</para> -</entry><entry - align="char"> -<para>fd is not a valid open file descriptor</para> -</entry> - </row><row><entry - align="char"> <para>EINVAL</para> </entry><entry align="char">
@@ -1495,13 +1193,6 @@ role="subsection"><title>AUDIO_SET_KARAOKE</title> &return-value-dvb; <informaltable><tgroup cols="2"><tbody><row><entry align="char"> -<para>EBADF</para> -</entry><entry - align="char"> -<para>fd is not a valid open file descriptor</para> -</entry> - </row><row><entry - align="char"> <para>EINVAL</para> </entry><entry align="char">
Documentation/DocBook/media/v4l/gen-errors.xml +4 -0
@@ -35,6 +35,10 @@ descriptor is not for a media device.</entry> </row> <row> + <entry>ENODEV</entry> + <entry>Device not found or was removed.</entry> + </row> + <row> <entry>ENOMEM</entry> <entry>There's not enough memory to handle the desired operation.</entry> </row>
Signature · 1 line
1.7.1
RFC PATCH v3 12/17 DocBook/demux.xml: Remove generic errors
In reply to a message not in the archiveRemove generic errors from ioctl() descriptions. For other ioctl's, there's no generic section. So, just keep whatever is there.
Documentation/DocBook/media/dvb/demux.xml +0 -88
@@ -552,13 +552,6 @@ typedef enum { &return-value-dvb; <informaltable><tgroup cols="2"><tbody><row><entry align="char"> -<para>EBADF</para> -</entry><entry - align="char"> -<para>fd is not a valid file descriptor.</para> -</entry> - </row><row><entry - align="char"> <para>EINVAL</para> </entry><entry align="char">
@@ -615,14 +608,6 @@ typedef enum { </entry> </row></tbody></tgroup></informaltable> &return-value-dvb; -<informaltable><tgroup cols="2"><tbody><row><entry - align="char"> -<para>EBADF</para> -</entry><entry - align="char"> -<para>fd is not a valid file descriptor.</para> -</entry> - </row></tbody></tgroup></informaltable> </section> <section id="DMX_SET_FILTER">
@@ -677,21 +662,6 @@ typedef enum { </entry> </row></tbody></tgroup></informaltable> &return-value-dvb; -<informaltable><tgroup cols="2"><tbody><row><entry - align="char"> -<para>EBADF</para> -</entry><entry - align="char"> -<para>fd is not a valid file descriptor.</para> -</entry> - </row><row><entry - align="char"> -<para>EINVAL</para> -</entry><entry - align="char"> -<para>Invalid argument.</para> -</entry> - </row></tbody></tgroup></informaltable> </section> <section id="DMX_SET_PES_FILTER">
@@ -751,20 +721,6 @@ typedef enum { &return-value-dvb; <informaltable><tgroup cols="2"><tbody><row><entry align="char"> -<para>EBADF</para> -</entry><entry - align="char"> -<para>fd is not a valid file descriptor.</para> -</entry> - </row><row><entry - align="char"> -<para>EINVAL</para> -</entry><entry - align="char"> -<para>Invalid argument.</para> -</entry> - </row><row><entry - align="char"> <para>EBUSY</para> </entry><entry align="char">
@@ -820,22 +776,6 @@ typedef enum { </entry> </row></tbody></tgroup></informaltable> &return-value-dvb; -<informaltable><tgroup cols="2"><tbody><row><entry - align="char"> -<para>EBADF</para> -</entry><entry - align="char"> -<para>fd is not a valid file descriptor.</para> -</entry> - </row><row><entry - align="char"> -<para>ENOMEM</para> -</entry><entry - align="char"> -<para>The driver was not able to allocate a buffer of the - requested size.</para> -</entry> - </row></tbody></tgroup></informaltable> </section> <section id="DMX_GET_EVENT">
@@ -894,20 +834,6 @@ typedef enum { &return-value-dvb; <informaltable><tgroup cols="2"><tbody><row><entry align="char"> -<para>EBADF</para> -</entry><entry - align="char"> -<para>fd is not a valid file descriptor.</para> -</entry> - </row><row><entry - align="char"> -<para>EFAULT</para> -</entry><entry - align="char"> -<para>ev points to an invalid address.</para> -</entry> - </row><row><entry - align="char"> <para>EWOULDBLOCK</para> </entry><entry align="char">
@@ -967,20 +893,6 @@ typedef enum { &return-value-dvb; <informaltable><tgroup cols="2"><tbody><row><entry align="char"> -<para>EBADF</para> -</entry><entry - align="char"> -<para>fd is not a valid file descriptor.</para> -</entry> - </row><row><entry - align="char"> -<para>EFAULT</para> -</entry><entry - align="char"> -<para>stc points to an invalid address.</para> -</entry> - </row><row><entry - align="char"> <para>EINVAL</para> </entry><entry align="char">
Documentation/DocBook/media/v4l/gen-errors.xml +5 -0
@@ -48,6 +48,11 @@ that this request would overcommit the usb bandwidth reserved for periodic transfers (up to 80% of the USB bandwidth).</entry> </row> + <row> + <entry>EWOULDBLOCK</entry> + <entry>Operation would block. Used when the ioctl would need to wait + for an event, but the device was opened in non-blocking mode.</entry> + </row> </tbody> </tgroup> </table>
Signature · 1 line
1.7.1
RFC PATCH v3 13/17 dvb-bt8xx: Don't return -EFAULT when a device is not found
In reply to a message not in the archiveWhen a device (or their PCI structs) are not found, the error should be -ENODEV. -EFAULT is reserved for errors while copying arguments from/to userspace.
drivers/media/dvb/bt8xx/dvb-bt8xx.c +2 -2
@@ -892,7 +892,7 @@ static int __devinit dvb_bt8xx_probe(struct bttv_sub_device *sub)if (!(bttv_pci_dev =bttv_get_pcidev (card->bttv_nr))) {printk ("dvb_bt8xx: no pci device for card %d\n" , card->bttv_nr);kfree (card); -return -EFAULT ; +return -ENODEV ; }if (!(card->bt =dvb_bt8xx_878_match (card->bttv_nr, bttv_pci_dev))) {
@@ -902,7 +902,7 @@ static int __devinit dvb_bt8xx_probe(struct bttv_sub_device *sub) "installed, try removing it.\n");kfree (card); -return -EFAULT ; +return -ENODEV ; }mutex_init (&card->bt->gpio_lock);
Signature · 1 line
1.7.1
RFC PATCH v3 14/17 DocBook/dvb: Use generic descriptions for the frontend API
In reply to a message not in the archiveMove generic stuff into gen-errors.xml, and remove them from DVB API. While here, removes two bogus error codes that aren't supported or used on Linux: EINTERNAL and ENOSIGNAL.
Documentation/DocBook/media/dvb/dvbproperty.xml +0 -18
@@ -82,15 +82,6 @@ struct dtv_properties { </row></tbody></tgroup></informaltable> &return-value-dvb; <informaltable><tgroup cols="2"><tbody><row> - <entry align="char"><para>EINVAL</para></entry> - <entry align="char"><para>Invalid parameter(s) received or number of parameters out of the range.</para></entry> - </row><row> - <entry align="char"><para>ENOMEM</para></entry> - <entry align="char"><para>Out of memory.</para></entry> - </row><row> - <entry align="char"><para>EFAULT</para></entry> - <entry align="char"><para>Failure while copying data from/to userspace.</para></entry> - </row><row> <entry align="char"><para>EOPNOTSUPP</para></entry> <entry align="char"><para>Property type not supported.</para></entry> </row></tbody></tgroup></informaltable>
@@ -139,15 +130,6 @@ struct dtv_properties { </row></tbody></tgroup></informaltable> &return-value-dvb; <informaltable><tgroup cols="2"><tbody><row> - <entry align="char"><para>EINVAL</para></entry> - <entry align="char"><para>Invalid parameter(s) received or number of parameters out of the range.</para></entry> - </row><row> - <entry align="char"><para>ENOMEM</para></entry> - <entry align="char"><para>Out of memory.</para></entry> - </row><row> - <entry align="char"><para>EFAULT</para></entry> - <entry align="char"><para>Failure while copying data from/to userspace.</para></entry> - </row><row> <entry align="char"><para>EOPNOTSUPP</para></entry> <entry align="char"><para>Property type not supported.</para></entry> </row></tbody></tgroup></informaltable>
Documentation/DocBook/media/dvb/frontend.xml +5 -426
553 lines not on this page · raw message
Documentation/DocBook/media/v4l/gen-errors.xml +18 -5
@@ -8,7 +8,7 @@ <!-- Keep it ordered alphabetically --> <row> <entry>EBADF</entry> - <entry><parameter>fd</parameter> is not a valid open file descriptor.</entry> + <entry>The file descriptor is not a valid.</entry> </row> <row> <entry>EBUSY</entry>
@@ -21,18 +21,20 @@ </row> <row> <entry>EFAULT</entry> - <entry><parameter>fd</parameter> is not a valid open file descriptor.</entry> + <entry>There was a failure while copying data from/to userspace.</entry> </row> <row> <entry>EINVAL</entry> - <entry>One or more of the ioctl parameters are invalid. This is a widely - error code. see the individual ioctl requests for actual causes.</entry> + <entry>One or more of the ioctl parameters are invalid or out of the + allowed range. This is a widely 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.</entry> + 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>
@@ -49,6 +51,17 @@ for periodic transfers (up to 80% of the USB bandwidth).</entry> </row> <row> + <entry>ENOSYS or EOPNOTSUPP</entry> + <entry>Function not available for this device (dvb API only. Will likely + be replaced anytime soon by ENOTTY).</entry> + </row> + <row> + <entry>EPERM</entry> + <entry>Permission denied. Can be returned if the device needs write + permission, or some special capabilities is needed + (e. g. root)</entry> + </row> + <row> <entry>EWOULDBLOCK</entry> <entry>Operation would block. Used when the ioctl would need to wait for an event, but the device was opened in non-blocking mode.</entry>
Signature · 1 line
1.7.1
RFC PATCH v3 15/17 DocBook/dvb: Use generic descriptions for the video API
In reply to a message not in the archiveWhile here, removes the bogus EINTERNAL error codes.
Documentation/DocBook/media/dvb/video.xml +0 -340
@@ -593,22 +593,6 @@ role="subsection"><title>VIDEO_STOP</title> </entry> </row></tbody></tgroup></informaltable> &return-value-dvb; -<informaltable><tgroup cols="2"><tbody><row><entry - align="char"> -<para>EBADF</para> -</entry><entry - align="char"> -<para>fd is not a valid open file descriptor</para> -</entry> - </row><row><entry - align="char"> -<para>EINTERNAL</para> -</entry><entry - align="char"> -<para>Internal error, possibly in the communication with the - DVB subsystem.</para> -</entry> - </row></tbody></tgroup></informaltable> </section><section id="VIDEO_PLAY" role="subsection"><title>VIDEO_PLAY</title>
@@ -645,22 +629,6 @@ role="subsection"><title>VIDEO_PLAY</title> </entry> </row></tbody></tgroup></informaltable> &return-value-dvb; -<informaltable><tgroup cols="2"><tbody><row><entry - align="char"> -<para>EBADF</para> -</entry><entry - align="char"> -<para>fd is not a valid open file descriptor</para> -</entry> - </row><row><entry - align="char"> -<para>EINTERNAL</para> -</entry><entry - align="char"> -<para>Internal error, possibly in the communication with the - DVB subsystem.</para> -</entry> - </row></tbody></tgroup></informaltable> </section><section id="VIDEO_FREEZE" role="subsection"><title>VIDEO_FREEZE</title>
@@ -701,22 +669,6 @@ role="subsection"><title>VIDEO_FREEZE</title> </entry> </row></tbody></tgroup></informaltable> &return-value-dvb; -<informaltable><tgroup cols="2"><tbody><row><entry - align="char"> -<para>EBADF</para> -</entry><entry - align="char"> -<para>fd is not a valid open file descriptor</para> -</entry> - </row><row><entry - align="char"> -<para>EINTERNAL</para> -</entry><entry - align="char"> -<para>Internal error, possibly in the communication with the - DVB subsystem.</para> -</entry> - </row></tbody></tgroup></informaltable> </section><section id="VIDEO_CONTINUE" role="subsection"><title>VIDEO_CONTINUE</title>
@@ -753,22 +705,6 @@ role="subsection"><title>VIDEO_CONTINUE</title> </entry> </row></tbody></tgroup></informaltable> &return-value-dvb; -<informaltable><tgroup cols="2"><tbody><row><entry - align="char"> -<para>EBADF</para> -</entry><entry - align="char"> -<para>fd is not a valid open file descriptor</para> -</entry> - </row><row><entry - align="char"> -<para>EINTERNAL</para> -</entry><entry - align="char"> -<para>Internal error, possibly in the communication with the - DVB subsystem.</para> -</entry> - </row></tbody></tgroup></informaltable> </section><section id="VIDEO_SELECT_SOURCE" role="subsection"><title>VIDEO_SELECT_SOURCE</title>
@@ -815,22 +751,6 @@ role="subsection"><title>VIDEO_SELECT_SOURCE</title> </entry> </row></tbody></tgroup></informaltable> &return-value-dvb; -<informaltable><tgroup cols="2"><tbody><row><entry - align="char"> -<para>EBADF</para> -</entry><entry - align="char"> -<para>fd is not a valid open file descriptor</para> -</entry> - </row><row><entry - align="char"> -<para>EINTERNAL</para> -</entry><entry - align="char"> -<para>Internal error, possibly in the communication with the - DVB subsystem.</para> -</entry> - </row></tbody></tgroup></informaltable> </section><section id="VIDEO_SET_BLANK" role="subsection"><title>VIDEO_SET_BLANK</title>
@@ -880,29 +800,6 @@ role="subsection"><title>VIDEO_SET_BLANK</title> </entry> </row></tbody></tgroup></informaltable> &return-value-dvb; -<informaltable><tgroup cols="2"><tbody><row><entry - align="char"> -<para>EBADF</para> -</entry><entry - align="char"> -<para>fd is not a valid open file descriptor</para> -</entry> - </row><row><entry - align="char"> -<para>EINTERNAL</para> -</entry><entry - align="char"> -<para>Internal error, possibly in the communication with the - DVB subsystem.</para> -</entry> - </row><row><entry - align="char"> -<para>EINVAL</para> -</entry><entry - align="char"> -<para>Illegal input parameter</para> -</entry> - </row></tbody></tgroup></informaltable> </section><section id="VIDEO_GET_STATUS" role="subsection"><title>VIDEO_GET_STATUS</title>
@@ -947,29 +844,6 @@ role="subsection"><title>VIDEO_GET_STATUS</title> </entry> </row></tbody></tgroup></informaltable> &return-value-dvb; -<informaltable><tgroup cols="2"><tbody><row><entry - align="char"> -<para>EBADF</para> -</entry><entry - align="char"> -<para>fd is not a valid open file descriptor</para> -</entry> - </row><row><entry - align="char"> -<para>EINTERNAL</para> -</entry><entry - align="char"> -<para>Internal error, possibly in the communication with the - DVB subsystem.</para> -</entry> - </row><row><entry - align="char"> -<para>EFAULT</para> -</entry><entry - align="char"> -<para>status points to invalid address</para> -</entry> - </row></tbody></tgroup></informaltable> </section><section id="VIDEO_GET_EVENT" role="subsection"><title>VIDEO_GET_EVENT</title>
@@ -1025,20 +899,6 @@ role="subsection"><title>VIDEO_GET_EVENT</title> &return-value-dvb; <informaltable><tgroup cols="2"><tbody><row><entry align="char"> -<para>EBADF</para> -</entry><entry - align="char"> -<para>fd is not a valid open file descriptor</para> -</entry> - </row><row><entry - align="char"> -<para>EFAULT</para> -</entry><entry - align="char"> -<para>ev points to invalid address</para> -</entry> - </row><row><entry - align="char"> <para>EWOULDBLOCK</para> </entry><entry align="char">
@@ -1050,11 +910,6 @@ role="subsection"><title>VIDEO_GET_EVENT</title> <para>EOVERFLOW</para> </entry><entry align="char"> -</entry> - </row><row><entry - align="char"> -</entry><entry - align="char"> <para>Overflow in event queue - one or more events were lost.</para> </entry> </row></tbody></tgroup></informaltable>
@@ -1105,28 +960,6 @@ role="subsection"><title>VIDEO_SET_DISPLAY_FORMAT</title> </entry> </row></tbody></tgroup></informaltable> &return-value-dvb; -<informaltable><tgroup cols="2"><tbody><row><entry - align="char"> -<para>EBADF</para> -</entry><entry - align="char"> -<para>fd is not a valid open file descriptor</para> -</entry> - </row><row><entry - align="char"> -<para>EINTERNAL</para> -</entry><entry - align="char"> -<para>Internal error.</para> -</entry> - </row><row><entry - align="char"> -<para>EINVAL</para> -</entry><entry - align="char"> -<para>Illegal parameter format.</para> -</entry> - </row></tbody></tgroup></informaltable> </section><section id="VIDEO_STILLPICTURE" role="subsection"><title>VIDEO_STILLPICTURE</title>
@@ -1174,28 +1007,6 @@ role="subsection"><title>VIDEO_STILLPICTURE</title> </entry> </row></tbody></tgroup></informaltable> &return-value-dvb; -<informaltable><tgroup cols="2"><tbody><row><entry - align="char"> -<para>EBADF</para> -</entry><entry - align="char"> -<para>fd is not a valid open file descriptor</para> -</entry> - </row><row><entry - align="char"> -<para>EINTERNAL</para> -</entry><entry - align="char"> -<para>Internal error.</para> -</entry> - </row><row><entry - align="char"> -<para>EFAULT</para> -</entry><entry - align="char"> -<para>sp points to an invalid iframe.</para> -</entry> - </row></tbody></tgroup></informaltable> </section><section id="VIDEO_FAST_FORWARD" role="subsection"><title>VIDEO_FAST_FORWARD</title>
@@ -1242,32 +1053,11 @@ role="subsection"><title>VIDEO_FAST_FORWARD</title> &return-value-dvb; <informaltable><tgroup cols="2"><tbody><row><entry align="char"> -<para>EBADF</para> -</entry><entry - align="char"> -<para>fd is not a valid open file descriptor</para> -</entry> - </row><row><entry - align="char"> -<para>EINTERNAL</para> -</entry><entry - align="char"> -<para>Internal error.</para> -</entry> - </row><row><entry - align="char"> <para>EPERM</para> </entry><entry align="char"> <para>Mode VIDEO_SOURCE_MEMORY not selected.</para> </entry> - </row><row><entry - align="char"> -<para>EINVAL</para> -</entry><entry - align="char"> -<para>Illegal parameter format.</para> -</entry> </row></tbody></tgroup></informaltable> </section><section id="VIDEO_SLOWMOTION"
@@ -1315,32 +1105,11 @@ role="subsection"><title>VIDEO_SLOWMOTION</title> &return-value-dvb; <informaltable><tgroup cols="2"><tbody><row><entry align="char"> -<para>EBADF</para> -</entry><entry - align="char"> -<para>fd is not a valid open file descriptor</para> -</entry> - </row><row><entry - align="char"> -<para>EINTERNAL</para> -</entry><entry - align="char"> -<para>Internal error.</para> -</entry> - </row><row><entry - align="char"> <para>EPERM</para> </entry><entry align="char"> <para>Mode VIDEO_SOURCE_MEMORY not selected.</para> </entry> - </row><row><entry - align="char"> -<para>EINVAL</para> -</entry><entry - align="char"> -<para>Illegal parameter format.</para> -</entry> </row></tbody></tgroup></informaltable> </section><section id="VIDEO_GET_CAPABILITIES"
@@ -1388,21 +1157,6 @@ role="subsection"><title>VIDEO_GET_CAPABILITIES</title> </entry> </row></tbody></tgroup></informaltable> &return-value-dvb; -<informaltable><tgroup cols="2"><tbody><row><entry - align="char"> -<para>EBADF</para> -</entry><entry - align="char"> -<para>fd is not a valid open file descriptor</para> -</entry> - </row><row><entry - align="char"> -<para>EFAULT</para> -</entry><entry - align="char"> -<para>cap points to an invalid iframe.</para> -</entry> - </row></tbody></tgroup></informaltable> </section><section id="VIDEO_SET_ID" role="subsection"><title>VIDEO_SET_ID</title>
@@ -1449,20 +1203,6 @@ role="subsection"><title>VIDEO_SET_ID</title> &return-value-dvb; <informaltable><tgroup cols="2"><tbody><row><entry align="char"> -<para>EBADF</para> -</entry><entry - align="char"> -<para>fd is not a valid open file descriptor.</para> -</entry> - </row><row><entry - align="char"> -<para>EINTERNAL</para> -</entry><entry - align="char"> -<para>Internal error.</para> -</entry> - </row><row><entry - align="char"> <para>EINVAL</para> </entry><entry align="char">
@@ -1504,14 +1244,6 @@ role="subsection"><title>VIDEO_CLEAR_BUFFER</title> </entry> </row></tbody></tgroup></informaltable> &return-value-dvb; -<informaltable><tgroup cols="2"><tbody><row><entry - align="char"> -<para>EBADF</para> -</entry><entry - align="char"> -<para>fd is not a valid open file descriptor</para> -</entry> - </row></tbody></tgroup></informaltable> </section><section id="VIDEO_SET_STREAMTYPE" role="subsection"><title>VIDEO_SET_STREAMTYPE</title>
@@ -1557,21 +1289,6 @@ role="subsection"><title>VIDEO_SET_STREAMTYPE</title> </entry> </row></tbody></tgroup></informaltable> &return-value-dvb; -<informaltable><tgroup cols="2"><tbody><row><entry - align="char"> -<para>EBADF</para> -</entry><entry - align="char"> -<para>fd is not a valid open file descriptor</para> -</entry> - </row><row><entry - align="char"> -<para>EINVAL</para> -</entry><entry - align="char"> -<para>type is not a valid or supported stream type.</para> -</entry> - </row></tbody></tgroup></informaltable> </section><section id="VIDEO_SET_FORMAT" role="subsection"><title>VIDEO_SET_FORMAT</title>
@@ -1619,13 +1336,6 @@ role="subsection"><title>VIDEO_SET_FORMAT</title> &return-value-dvb; <informaltable><tgroup cols="2"><tbody><row><entry align="char"> -<para>EBADF</para> -</entry><entry - align="char"> -<para>fd is not a valid open file descriptor</para> -</entry> - </row><row><entry - align="char"> <para>EINVAL</para> </entry><entry align="char">
@@ -1680,13 +1390,6 @@ role="subsection"><title>VIDEO_SET_SYSTEM</title> &return-value-dvb; <informaltable><tgroup cols="2"><tbody><row><entry align="char"> -<para>EBADF</para> -</entry><entry - align="char"> -<para>fd is not a valid open file descriptor</para> -</entry> - </row><row><entry - align="char"> <para>EINVAL</para> </entry><entry align="char">
@@ -1737,21 +1440,6 @@ role="subsection"><title>VIDEO_SET_HIGHLIGHT</title> </entry> </row></tbody></tgroup></informaltable> &return-value-dvb; -<informaltable><tgroup cols="2"><tbody><row><entry - align="char"> -<para>EBADF</para> -</entry><entry - align="char"> -<para>fd is not a valid open file descriptor.</para> -</entry> - </row><row><entry - align="char"> -<para>EINVAL</para> -</entry><entry - align="char"> -<para>input is not a valid highlight setting.</para> -</entry> - </row></tbody></tgroup></informaltable> </section><section id="VIDEO_SET_SPU" role="subsection"><title>VIDEO_SET_SPU</title>
@@ -1799,13 +1487,6 @@ role="subsection"><title>VIDEO_SET_SPU</title> &return-value-dvb; <informaltable><tgroup cols="2"><tbody><row><entry align="char"> -<para>EBADF</para> -</entry><entry - align="char"> -<para>fd is not a valid open file descriptor</para> -</entry> - </row><row><entry - align="char"> <para>EINVAL</para> </entry><entry align="char">
@@ -1859,13 +1540,6 @@ role="subsection"><title>VIDEO_SET_SPU_PALETTE</title> &return-value-dvb; <informaltable><tgroup cols="2"><tbody><row><entry align="char"> -<para>EBADF</para> -</entry><entry - align="char"> -<para>fd is not a valid open file descriptor</para> -</entry> - </row><row><entry - align="char"> <para>EINVAL</para> </entry><entry align="char">
@@ -1920,13 +1594,6 @@ role="subsection"><title>VIDEO_GET_NAVI</title> &return-value-dvb; <informaltable><tgroup cols="2"><tbody><row><entry align="char"> -<para>EBADF</para> -</entry><entry - align="char"> -<para>fd is not a valid open file descriptor</para> -</entry> - </row><row><entry - align="char"> <para>EFAULT</para> </entry><entry align="char">
@@ -1981,13 +1648,6 @@ role="subsection"><title>VIDEO_SET_ATTRIBUTES</title> &return-value-dvb; <informaltable><tgroup cols="2"><tbody><row><entry align="char"> -<para>EBADF</para> -</entry><entry - align="char"> -<para>fd is not a valid open file descriptor</para> -</entry> - </row><row><entry - align="char"> <para>EINVAL</para> </entry><entry align="char">
Signature · 1 line
1.7.1
RFC PATCH v3 16/17 v4l2 core: return -ENOTTY if an ioctl doesn't exist
In reply to a message not in the archiveCurrently, -EINVAL is used to return either when an IOCTL is not implemented, or if the ioctl was not implemented.
Note: Drivers that don't use video_ioctl2, will need extra patches.
Documentation/DocBook/media/v4l/gen-errors.xml +6 -7
@@ -30,13 +30,6 @@ 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> </row>
@@ -45,6 +38,12 @@ <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 that this request would overcommit the usb bandwidth reserved
Documentation/DocBook/media/v4l/v4l2.xml +2 -0
@@ -132,7 +132,9 @@ applications. --> <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>
drivers/media/video/v4l2-ioctl.c +2 -2
@@ -543,12 +543,12 @@ static long __video_do_ioctl(struct file *file,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) &&
Signature · 1 line
1.7.1
RFC PATCH v3 17/17 return -ENOTTY for unsupported ioctl's at legacy drivers
In reply to a message not in the archiveThose drivers are not relying at the V4L2 core to handle the ioctl's. So, we need to manually patch them every time a change goes to the core.
drivers/media/video/et61x251/et61x251_core.c +1 -9
@@ -2480,16 +2480,8 @@ static long et61x251_ioctl_v4l2(struct file *filp,case VIDIOC_S_PARM :return et61x251_vidioc_s_parm (cam, arg); -case VIDIOC_G_STD : -case VIDIOC_S_STD : -case VIDIOC_QUERYSTD : -case VIDIOC_ENUMSTD : -case VIDIOC_QUERYMENU : -case VIDIOC_ENUM_FRAMEINTERVALS : -return -EINVAL ; -default : -return -EINVAL ; +return -ENOTTY ; } }
drivers/media/video/pvrusb2/pvrusb2-v4l2.c +1 -6
@@ -369,11 +369,6 @@ static long pvr2_v4l2_do_ioctl(struct file *file, unsigned int cmd, void *arg)break ; } -case VIDIOC_S_AUDIO : - { - ret = -EINVAL ; -break ; - }case VIDIOC_G_TUNER : {struct v4l2_tuner *vt = (struct v4l2_tuner *)arg;
@@ -850,7 +845,7 @@ static long pvr2_v4l2_do_ioctl(struct file *file, unsigned int cmd, void *arg)#endif default : - ret = -EINVAL ; + ret = -ENOTTY ;break ; }
drivers/media/video/sn9c102/sn9c102_core.c +1 -9
@@ -3187,16 +3187,8 @@ static long sn9c102_ioctl_v4l2(struct file *filp,case VIDIOC_S_AUDIO :return sn9c102_vidioc_s_audio (cam, arg); -case VIDIOC_G_STD : -case VIDIOC_S_STD : -case VIDIOC_QUERYSTD : -case VIDIOC_ENUMSTD : -case VIDIOC_QUERYMENU : -case VIDIOC_ENUM_FRAMEINTERVALS : -return -EINVAL ; -default : -return -EINVAL ; +return -ENOTTY ; } }
drivers/media/video/uvc/uvc_v4l2.c +1 -1
@@ -83,7 +83,7 @@ static int uvc_ioctl_ctrl_map(struct uvc_video_chain *chain,default :uvc_trace (UVC_TRACE_CONTROL ,"Unsupported V4L2 control type " "%u.\n" , xmap->v4l2_type); - ret = -EINVAL ; + ret = -ENOTTY ; goto done; }
Signature · 1 line
1.7.1
Re: [PATCH RFCv3 17/17] [media] return -ENOTTY for unsupported ioctl's at legacy drivers
For the pvrusb2 portion of this patch:
-Mike
Quoted 89 lines · Mauro Carvalho Chehab
Those drivers are not relying at the V4L2 core to handle the ioctl's. So, we need to manually patch them every time a change goes to the core.
Signed-off-by Mauro Carvalho Chehab <[email protected]>drivers/media/video/et61x251/et61x251_core.c +1
-9@@ -2480,16 +2480,8 @@ static long et61x251_ioctl_v4l2(struct file *filp,case VIDIOC_S_PARM :return et61x251_vidioc_s_parm (cam, arg); -case VIDIOC_G_STD : -case VIDIOC_S_STD : -case VIDIOC_QUERYSTD : -case VIDIOC_ENUMSTD : -case VIDIOC_QUERYMENU : -case VIDIOC_ENUM_FRAMEINTERVALS : -return -EINVAL ; -default : -return -EINVAL ; +return -ENOTTY ; } }drivers/media/video/pvrusb2/pvrusb2-v4l2.c +1
-6@@ -369,11 +369,6 @@ static long pvr2_v4l2_do_ioctl(struct file *file, unsigned int cmd, void *arg)break ; } -case VIDIOC_S_AUDIO : - { - ret = -EINVAL ; -break ; - }case VIDIOC_G_TUNER : {struct v4l2_tuner *vt = (struct v4l2_tuner *)arg;@@ -850,7 +845,7 @@ static long pvr2_v4l2_do_ioctl(struct file *file, unsigned int cmd, void *arg)#endif default : - ret = -EINVAL ; + ret = -ENOTTY ;break ; }drivers/media/video/sn9c102/sn9c102_core.c +1
-9@@ -3187,16 +3187,8 @@ static long sn9c102_ioctl_v4l2(struct file *filp,case VIDIOC_S_AUDIO :return sn9c102_vidioc_s_audio (cam, arg); -case VIDIOC_G_STD : -case VIDIOC_S_STD : -case VIDIOC_QUERYSTD : -case VIDIOC_ENUMSTD : -case VIDIOC_QUERYMENU : -case VIDIOC_ENUM_FRAMEINTERVALS : -return -EINVAL ; -default : -return -EINVAL ; +return -ENOTTY ; } }drivers/media/video/uvc/uvc_v4l2.c +1
-1@@ -83,7 +83,7 @@ static int uvc_ioctl_ctrl_map(struct uvc_video_chain *chain,default :uvc_trace (UVC_TRACE_CONTROL ,"Unsupported V4L2 control type " "%u.\n" , xmap->v4l2_type); - ret = -EINVAL ; + ret = -ENOTTY ; goto done; }
Signature · 3 lines
Mike Isely isely @ isely (dot) net PGP: 03 54 43 4D 75 E5 CC 92 71 16 01 E2 B5 F5 C1 E8
Re: [PATCH RFCv3 17/17] [media] return -ENOTTY for unsupported ioctl's at legacy drivers
In reply to Mauro Carvalho ChehabQuoted 5 lines · On Wednesday 06 July 2011 20:03:49 Mauro Carvalho Chehab wrote:
Those drivers are not relying at the V4L2 core to handle the ioctl's. So, we need to manually patch them every time a change goes to the core.
Signed-off-by Mauro Carvalho Chehab <[email protected]>
For the uvcvide portion of this patch:
Quoted 83 lines
(quoted diff) +0
-0
b/drivers/media/video/et61x251/et61x251_core.cindex d7efb33..9a1e80a 100644drivers/media/video/et61x251/et61x251_core.c +1
-9@@ -2480,16 +2480,8 @@ static long et61x251_ioctl_v4l2(struct file *filp,case VIDIOC_S_PARM :return et61x251_vidioc_s_parm (cam, arg); -case VIDIOC_G_STD : -case VIDIOC_S_STD : -case VIDIOC_QUERYSTD : -case VIDIOC_ENUMSTD : -case VIDIOC_QUERYMENU : -case VIDIOC_ENUM_FRAMEINTERVALS : -return -EINVAL ; -default : -return -EINVAL ; +return -ENOTTY ; } }(quoted diff) +0
-0
b/drivers/media/video/pvrusb2/pvrusb2-v4l2.cindex 573749a..e27f8ab 100644drivers/media/video/pvrusb2/pvrusb2-v4l2.c +0
-5@@ -369,11 +369,6 @@ static long pvr2_v4l2_do_ioctl(struct file *file, unsigned int cmd, void *arg) break; } -case VIDIOC_S_AUDIO : - { - ret = -EINVAL ; -break ; - }case VIDIOC_G_TUNER : {struct v4l2_tuner *vt = (struct v4l2_tuner *)arg;@@ -850,7 +845,7 @@ static long pvr2_v4l2_do_ioctl(struct file *file,unsigned int cmd, void *arg) #endif
drivers/media/video/pvrusb2/pvrusb2-v4l2.c +1
-1default : - ret = -EINVAL ; + ret = -ENOTTY ;break ; }(quoted diff) +0
-0
b/drivers/media/video/sn9c102/sn9c102_core.cindex d8eece8..16cb07c 100644drivers/media/video/sn9c102/sn9c102_core.c +1
-9@@ -3187,16 +3187,8 @@ static long sn9c102_ioctl_v4l2(struct file *filp,case VIDIOC_S_AUDIO :return sn9c102_vidioc_s_audio (cam, arg); -case VIDIOC_G_STD : -case VIDIOC_S_STD : -case VIDIOC_QUERYSTD : -case VIDIOC_ENUMSTD : -case VIDIOC_QUERYMENU : -case VIDIOC_ENUM_FRAMEINTERVALS : -return -EINVAL ; -default : -return -EINVAL ; +return -ENOTTY ; } }(quoted diff) +0
-0
b/drivers/media/video/uvc/uvc_v4l2.cindex cdd967b..7afb97b 100644drivers/media/video/uvc/uvc_v4l2.c +1
-1@@ -83,7 +83,7 @@ static int uvc_ioctl_ctrl_map(struct uvc_video_chain *chain, default:uvc_trace (UVC_TRACE_CONTROL ,"Unsupported V4L2 control type " "%u.\n" , xmap->v4l2_type); - ret = -EINVAL ; + ret = -ENOTTY ; goto done; }
Signature · 3 lines
Regards, Laurent Pinchart