From patchwork Wed Jul 6 18:03:52 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: 950642 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.4) with ESMTP id p66I6aJN009640 for ; Wed, 6 Jul 2011 18:06:36 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755518Ab1GFSE5 (ORCPT ); Wed, 6 Jul 2011 14:04:57 -0400 Received: from mx1.redhat.com ([209.132.183.28]:34373 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755503Ab1GFSE4 (ORCPT ); Wed, 6 Jul 2011 14:04:56 -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 p66I4umK026447 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Wed, 6 Jul 2011 14:04:56 -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 p66I4D6b027326; Wed, 6 Jul 2011 14:04:54 -0400 Date: Wed, 6 Jul 2011 15:03:52 -0300 From: Mauro Carvalho Chehab Cc: Linux Media Mailing List , Linux Kernel Mailing List Subject: [PATCH RFCv3 03/17] [media] DocBook: Use the generic error code page also for MC API Message-ID: <20110706150352.436f7a2a@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 (demeter1.kernel.org [140.211.167.41]); Wed, 06 Jul 2011 18:06:48 +0000 (UTC) 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 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 @@ &cs-str; + + + EBADF + fd is not a valid open file descriptor. + EBUSY 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). + EFAULT + fd is not a valid open file descriptor. + + EINVAL + One or more of the ioctl parameters are invalid. This is a widely + error code. see the individual ioctl requests for actual causes. + + + EINVAL or ENOTTY The ioctl is not supported by the driver, actually meaning that the required functionality is not available. @@ -25,7 +39,7 @@ ENOSPC - On USB devices, the stream ioctl's can return this error meaning + 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). 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 @@ - Return Value - - ioctl() returns 0 on - success. On failure, -1 is returned, and the - errno variable is set appropriately. Generic error codes - are listed below, and request-specific error codes are listed in the + &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, the parameter remains unmodified. - - - - EBADF - - fd is not a valid open file descriptor. - - - - - EFAULT - - argp references an inaccessible memory - area. - - - - 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 - - Insufficient kernel memory was available to complete the - request. - - - - ENOTTY - - fd is not associated with a character - special device. - - - 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 @@ - Return value - This function doesn't return specific error codes. + &return-value;