From patchwork Wed Jul 6 18:03:53 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mauro Carvalho Chehab X-Patchwork-Id: 950552 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter2.kernel.org (8.14.4/8.14.4) with ESMTP id p66I5s6q009203 for ; Wed, 6 Jul 2011 18:05:55 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755631Ab1GFSFk (ORCPT ); Wed, 6 Jul 2011 14:05:40 -0400 Received: from mx1.redhat.com ([209.132.183.28]:50677 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755554Ab1GFSFC (ORCPT ); Wed, 6 Jul 2011 14:05:02 -0400 Received: from int-mx02.intmail.prod.int.phx2.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id p66I52h0013886 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Wed, 6 Jul 2011 14:05:02 -0400 Received: from pedra (vpn1-4-139.ams2.redhat.com [10.36.4.139]) by int-mx02.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id p66I4D6d027326; Wed, 6 Jul 2011 14:05:00 -0400 Date: Wed, 6 Jul 2011 15:03:53 -0300 From: Mauro Carvalho Chehab Cc: Linux Media Mailing List , Linux Kernel Mailing List Subject: [PATCH RFCv3 05/17] [media] DocBook: Remove V4L generic error description for ioctl() Message-ID: <20110706150353.36224550@pedra> In-Reply-To: References: Mime-Version: 1.0 X-Scanned-By: MIMEDefang 2.67 on 10.5.11.12 To: unlisted-recipients:; (no To-header on input) Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter2.kernel.org [140.211.167.43]); Wed, 06 Jul 2011 18:05:55 +0000 (UTC) V4L ioctl function descripton also has a generic error chapter. Remove it, as it is now obsoleted by a general, multi-API generic error descriptions. Signed-off-by: Mauro Carvalho Chehab diff --git a/Documentation/DocBook/media/v4l/func-ioctl.xml b/Documentation/DocBook/media/v4l/func-ioctl.xml index b60fd37..2de64be 100644 --- a/Documentation/DocBook/media/v4l/func-ioctl.xml +++ b/Documentation/DocBook/media/v4l/func-ioctl.xml @@ -64,75 +64,9 @@ their respective function and parameters are specified in - Return Value - - On success the ioctl() function returns -0 and does not reset the -errno variable. On failure --1 is returned, when the ioctl takes an -output or read/write parameter it remains unmodified, and the -errno variable is set appropriately. See below for -possible error codes. Generic errors like EBADF -or EFAULT are not listed in the sections -discussing individual ioctl requests. - Note ioctls may return undefined error codes. Since errors -may have side effects such as a driver reset applications should -abort on unexpected errors. - - - - EBADF - - fd is not a valid open file -descriptor. - - - - EBUSY - - The property cannot be changed right now. Typically -this error code is returned when I/O is in progress or the driver -supports multiple opens and another process locked the property. - - - - EFAULT - - argp references an inaccessible -memory area. - - - - ENOTTY - - fd is not associated with a -character special device. - - - - EINVAL - - The request or the data pointed -to by argp is not valid. This is a very common -error code, see the individual ioctl requests listed in for actual causes. - - - - ENOMEM - - Not enough physical or virtual memory was available to -complete the request. - - - - ERANGE - - The application attempted to set a control with the -&VIDIOC-S-CTRL; ioctl to a value which is out of bounds. - - - + &return-value; + When an ioctl that takes an output or read/write parameter fails, + the parameter remains unmodified. diff --git a/Documentation/DocBook/media/v4l/gen-errors.xml b/Documentation/DocBook/media/v4l/gen-errors.xml index a7f73c9..2b50b63 100644 --- a/Documentation/DocBook/media/v4l/gen-errors.xml +++ b/Documentation/DocBook/media/v4l/gen-errors.xml @@ -31,7 +31,8 @@ EINVAL or ENOTTY The ioctl is not supported by the driver, actually meaning that - the required functionality is not available. + the required functionality is not available, or the file + descriptor is not for a media device. ENOMEM @@ -46,3 +47,10 @@ + +Note 1: ioctls may return other error codes. Since errors may have side +effects such as a driver reset, applications should abort on unexpected errors. + + +Note 2: Request-specific error codes are listed in the individual +requests descriptions. diff --git a/Documentation/DocBook/media/v4l/media-func-ioctl.xml b/Documentation/DocBook/media/v4l/media-func-ioctl.xml index e0ee285..39478d0 100644 --- a/Documentation/DocBook/media/v4l/media-func-ioctl.xml +++ b/Documentation/DocBook/media/v4l/media-func-ioctl.xml @@ -64,6 +64,7 @@ &return-value; + Request-specific error codes are listed in the individual requests descriptions. When an ioctl that takes an output or read/write parameter fails,