All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mauro Carvalho Chehab <mchehab@redhat.com>
To: Antti Palosaari <crope@iki.fi>
Cc: linux-media@vger.kernel.org, Hin-Tak Leung <htl10@users.sourceforge.net>
Subject: Re: [PATCH 4/5] DocBook: update ioctl error codes
Date: Mon, 10 Sep 2012 11:31:10 -0300	[thread overview]
Message-ID: <504DF9AE.6020908@redhat.com> (raw)
In-Reply-To: <1345076921-9773-5-git-send-email-crope@iki.fi>

Em 15-08-2012 21:28, Antti Palosaari escreveu:
> ENOTTY is now returned for unimplemented ioctl by dvb-frontend.
> Old EOPNOTSUPP & ENOSYS could be still returned by some drivers
> as well as other "non standard" error codes.
> 
> EAGAIN is returned in case of device is in state where it cannot
> perform requested operation. This is for example sleep and statistics
> are queried. Quick check for few demodulator drivers reveals there is
> a lot of different error codes used in such case currently, few to
> mention still: EOPNOTSUPP, ENOSYS, EAGAIN ... Lets try harmonize.
> 
> Signed-off-by: Antti Palosaari <crope@iki.fi>
> ---
>  Documentation/DocBook/media/v4l/gen-errors.xml | 12 +++++++-----
>  1 file changed, 7 insertions(+), 5 deletions(-)
> 
> diff --git a/Documentation/DocBook/media/v4l/gen-errors.xml b/Documentation/DocBook/media/v4l/gen-errors.xml
> index 5bbf3ce..737ecaa 100644
> --- a/Documentation/DocBook/media/v4l/gen-errors.xml
> +++ b/Documentation/DocBook/media/v4l/gen-errors.xml
> @@ -7,6 +7,13 @@
>      <tbody valign="top">
>  	<!-- Keep it ordered alphabetically -->
>        <row>
> +	<entry>EAGAIN</entry>
> +	<entry>The ioctl can't be handled because the device is in state where
> +	       it can't perform it. This could happen for example in case where
> +	       device is sleeping and ioctl is performed to query statistics.

While the comments here actually depend on your new version of patch 3/5, 
returning -EAGAIN is a valid return code, already used (there are 155 
occurrences of it right now).

So, I'll apply it.


> +	</entry>
> +      </row>
> +      <row>
>  	<entry>EBADF</entry>
>  	<entry>The file descriptor is not a valid.</entry>
>        </row>
> @@ -51,11 +58,6 @@
>  	       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
> 

Regards,
Mauro

  reply	other threads:[~2012-09-10 14:31 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-16  0:28 [PATCH 0/5] dvb-frontend statistic IOCTL validation Antti Palosaari
2012-08-16  0:28 ` [PATCH 1/5] dvb_frontend: use Kernel dev_* logging Antti Palosaari
2012-08-16  0:28 ` [PATCH 2/5] dvb_frontend: return -ENOTTY for unimplement IOCTL Antti Palosaari
2012-08-16  0:28 ` [PATCH 3/5] dvb_frontend: do not allow statistic IOCTLs when sleeping Antti Palosaari
2012-09-10 14:27   ` Mauro Carvalho Chehab
2012-09-10 14:39     ` Antti Palosaari
2012-08-16  0:28 ` [PATCH 4/5] DocBook: update ioctl error codes Antti Palosaari
2012-09-10 14:31   ` Mauro Carvalho Chehab [this message]
2012-08-16  0:28 ` [PATCH 5/5] rtl2832: remove dummy callback implementations Antti Palosaari
2012-08-16  0:45 ` [PATCH 0/5] dvb-frontend statistic IOCTL validation Antti Palosaari

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=504DF9AE.6020908@redhat.com \
    --to=mchehab@redhat.com \
    --cc=crope@iki.fi \
    --cc=htl10@users.sourceforge.net \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.