From patchwork Thu Nov 12 08:16:11 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?b?TsODwqltZXRoIE3Dg8KhcnRvbg==?= X-Patchwork-Id: 59533 Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id nAC8GH9T006269 for ; Thu, 12 Nov 2009 08:16:17 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751918AbZKLIQK (ORCPT ); Thu, 12 Nov 2009 03:16:10 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751703AbZKLIQJ (ORCPT ); Thu, 12 Nov 2009 03:16:09 -0500 Received: from mail02a.mail.t-online.hu ([84.2.40.7]:55989 "EHLO mail02a.mail.t-online.hu" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751647AbZKLIQJ (ORCPT ); Thu, 12 Nov 2009 03:16:09 -0500 Received: from [192.168.1.64] (dsl5402C46E.pool.t-online.hu [84.2.196.110]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail02a.mail.t-online.hu (Postfix) with ESMTPSA id 48E7F256C4E; Thu, 12 Nov 2009 09:15:48 +0100 (CET) Message-ID: <4AFBC44B.1060900@freemail.hu> Date: Thu, 12 Nov 2009 09:16:11 +0100 From: =?UTF-8?B?TsOpbWV0aCBNw6FydG9u?= User-Agent: Mozilla/5.0 (X11; U; Linux i686; hu-HU; rv:1.8.1.21) Gecko/20090402 SeaMonkey/1.1.16 MIME-Version: 1.0 To: Hans Verkuil CC: Hans de Goede , Jean-Francois Moine , V4L Mailing List Subject: Re: [PATCH] v4l2-dbg: report fail reason to the user References: <4AF6BA72.4070809@freemail.hu> <4AF8F8EB.8090705@freemail.hu> <4AFBB7FD.5090607@freemail.hu> <200911120829.40193.hverkuil@xs4all.nl> In-Reply-To: <200911120829.40193.hverkuil@xs4all.nl> X-DCC-mail.t-online.hu-Metrics: mail02a.mail.t-online.hu 32711; Body=4 Fuz1=4 Fuz2=4 Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org diff -r 60f784aa071d v4l2-apps/util/v4l2-dbg.cpp --- a/v4l2-apps/util/v4l2-dbg.cpp Wed Nov 11 18:28:53 2009 +0100 +++ b/v4l2-apps/util/v4l2-dbg.cpp Thu Nov 12 09:15:17 2009 +0100 @@ -354,13 +354,14 @@ { int retVal; - if (!options[OptVerbose]) return ioctl(fd, request, parm); retVal = ioctl(fd, request, parm); - printf("%s: ", name); - if (retVal < 0) - printf("failed: %s\n", strerror(errno)); - else - printf("ok\n"); + if (options[OptVerbose]) { + printf("%s: ", name); + if (retVal < 0) + printf("failed: %s\n", strerror(errno)); + else + printf("ok\n"); + } return retVal; } @@ -586,8 +587,8 @@ printf(" set to 0x%llx\n", set_reg.val); } else { - printf("Failed to set register 0x%08llx value 0x%llx\n", - set_reg.reg, set_reg.val); + printf("Failed to set register 0x%08llx value 0x%llx: %s\n", + set_reg.reg, set_reg.val, strerror(errno)); } set_reg.reg++; }