From: Mauro Carvalho Chehab <mchehab@redhat.com>
To: unlisted-recipients:; (no To-header on input)@casper.infradead.org
Cc: Linux Media Mailing List <linux-media@vger.kernel.org>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: [PATCH RFCv3 03/17] [media] DocBook: Use the generic error code page also for MC API
Date: Wed, 6 Jul 2011 15:03:52 -0300 [thread overview]
Message-ID: <20110706150352.436f7a2a@pedra> (raw)
In-Reply-To: <cover.1309974026.git.mchehab@redhat.com>
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 <mchehab@redhat.com>
diff --git a/Documentation/DocBook/media/v4l/gen-errors.xml b/Documentation/DocBook/media/v4l/gen-errors.xml
index 6ef476a..a7f73c9 100644
--- a/Documentation/DocBook/media/v4l/gen-errors.xml
+++ b/Documentation/DocBook/media/v4l/gen-errors.xml
@@ -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>
diff --git a/Documentation/DocBook/media/v4l/media-func-ioctl.xml b/Documentation/DocBook/media/v4l/media-func-ioctl.xml
index bda8604..e0ee285 100644
--- a/Documentation/DocBook/media/v4l/media-func-ioctl.xml
+++ b/Documentation/DocBook/media/v4l/media-func-ioctl.xml
@@ -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>
diff --git a/Documentation/DocBook/media/v4l/media-ioc-device-info.xml b/Documentation/DocBook/media/v4l/media-ioc-device-info.xml
index 1f32373..2ce5214 100644
--- a/Documentation/DocBook/media/v4l/media-ioc-device-info.xml
+++ b/Documentation/DocBook/media/v4l/media-ioc-device-info.xml
@@ -127,7 +127,6 @@
</refsect1>
<refsect1>
- <title>Return value</title>
- <para>This function doesn't return specific error codes.</para>
+ &return-value;
</refsect1>
</refentry>
--
1.7.1
next prev parent reply other threads:[~2011-07-06 18:04 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <cover.1309974026.git.mchehab@redhat.com>
2011-07-06 18:03 ` [PATCH RFCv3 17/17] [media] return -ENOTTY for unsupported ioctl's at legacy drivers Mauro Carvalho Chehab
2011-07-07 16:44 ` Mike Isely
2011-07-06 18:03 ` [PATCH RFCv3 01/17] [media] DocBook: Add a chapter to describe media errors Mauro Carvalho Chehab
2011-07-06 18:03 ` [PATCH RFCv3 02/17] [media] DocBook: Use the generic ioctl error codes for all V4L ioctl's Mauro Carvalho Chehab
2011-07-06 18:03 ` [PATCH RFCv3 04/17] [media] DocBook/media-ioc-setup-link.xml: Remove EBUSY Mauro Carvalho Chehab
2011-07-06 18:03 ` Mauro Carvalho Chehab [this message]
2011-07-07 15:29 ` [PATCH RFCv3 03/17] [media] DocBook: Use the generic error code page also for MC API Hans Verkuil
2011-07-07 17:15 ` Mauro Carvalho Chehab
2011-07-07 17:28 ` Hans Verkuil
2011-07-07 17:46 ` Mauro Carvalho Chehab
2011-07-06 18:03 ` [PATCH RFCv3 05/17] [media] DocBook: Remove V4L generic error description for ioctl() Mauro Carvalho Chehab
2011-07-06 18:03 ` [PATCH RFCv3 06/17] [media] DocBook: Add an error code session for LIRC interface Mauro Carvalho Chehab
2011-07-06 18:03 ` [PATCH RFCv3 07/17] [media] DocBook: Add return error codes to LIRC ioctl session Mauro Carvalho Chehab
2011-07-06 18:03 ` [PATCH RFCv3 10/17] [media] DVB: Point to the generic error chapter Mauro Carvalho Chehab
2011-07-06 18:03 ` [PATCH RFCv3 11/17] [media] DocBook/audio.xml: Remove generic errors Mauro Carvalho Chehab
2011-07-06 18:03 ` [PATCH RFCv3 12/17] [media] DocBook/demux.xml: " Mauro Carvalho Chehab
2011-07-06 18:03 ` [PATCH RFCv3 13/17] [media] dvb-bt8xx: Don't return -EFAULT when a device is not found Mauro Carvalho Chehab
2011-07-06 18:03 ` [PATCH RFCv3 09/17] [media] nxt6000: i2c bus error should return -EIO Mauro Carvalho Chehab
2011-07-06 18:04 ` [PATCH RFCv3 08/17] [media] siano: bad parameter is -EINVAL and not -EFAULT Mauro Carvalho Chehab
2011-07-06 18:04 ` [PATCH RFCv3 14/17] [media] DocBook/dvb: Use generic descriptions for the frontend API Mauro Carvalho Chehab
2011-07-06 18:04 ` [PATCH RFCv3 15/17] [media] DocBook/dvb: Use generic descriptions for the video API Mauro Carvalho Chehab
2011-07-06 18:04 ` [PATCH RFCv3 16/17] [media] v4l2 core: return -ENOTTY if an ioctl doesn't exist Mauro Carvalho Chehab
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20110706150352.436f7a2a@pedra \
--to=mchehab@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox