From: "Németh Márton" <nm127@freemail.hu>
To: Mauro Carvalho Chehab via Mercurial <mchehab@redhat.com>
Cc: Linux Media Mailing List <linux-media@vger.kernel.org>
Subject: Re: [hg:v4l-dvb] v4l2-dbg: report fail reason to the user
Date: Wed, 25 Nov 2009 06:32:14 +0100 [thread overview]
Message-ID: <4B0CC15E.8070605@freemail.hu> (raw)
In-Reply-To: <E1NCz3Z-0003qs-Qe@mail.linuxtv.org>
Hello Mauro,
Patch from Mauro Carvalho Chehab wrote:
> The patch number 13472 was added via Mauro Carvalho Chehab <mchehab@redhat.com>
> to http://linuxtv.org/hg/v4l-dvb master development tree.
>
> Kernel patches in this development tree may be modified to be backward
> compatible with older kernels. Compatibility modifications will be
> removed before inclusion into the mainstream Kernel
>
> If anyone has any objections, please let us know by sending a message to:
> Linux Media Mailing List <linux-media@vger.kernel.org>
>
> ------
>
> From: Mauro Carvalho Chehab <mchehab@redhat.com>
> v4l2-dbg: report fail reason to the user
>
>
> Report the fail reason to the user when writing a register even if
> the verbose mode is switched off.
>
> Remove duplicated code ioctl() call which may cause different ioctl()
> function call in case of verbose and non verbose if not handled carefully.
>
> Priority: normal
>
> [hverkuil@xs4all.nl: minor additional cleanup in doioctl()]
> [mchehab@redhat.com: As I've already applied the original version, apply the diff version now]
> Signed-off-by: Marton Nemeth <nm127@freemail.hu>
> Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
>
>
> ---
>
> v4l2-apps/util/v4l2-dbg.cpp | 17 ++++++++---------
> 1 file changed, 8 insertions(+), 9 deletions(-)
>
> diff -r c1b0ff440683 -r 98a8e3a2b8b3 v4l2-apps/util/v4l2-dbg.cpp
> --- a/v4l2-apps/util/v4l2-dbg.cpp Tue Nov 10 17:14:51 2009 +0100
> +++ b/v4l2-apps/util/v4l2-dbg.cpp Tue Nov 24 15:18:02 2009 -0200
> @@ -354,14 +354,13 @@
> {
> int retVal;
>
> + if (!options[OptVerbose]) return ioctl(fd, request, parm);
> retVal = ioctl(fd, request, parm);
> - if (options[OptVerbose]) {
> - printf("%s: ", name);
> - if (retVal < 0)
> - printf("failed: %s\n", strerror(errno));
> - else
> - printf("ok\n");
> - }
> + printf("%s: ", name);
> + if (retVal < 0)
> + printf("failed: %s\n", strerror(errno));
> + else
> + printf("ok\n");
>
> return retVal;
> }
> @@ -587,8 +586,8 @@
>
> printf(" set to 0x%llx\n", set_reg.val);
> } else {
> - printf("Failed to set register 0x%08llx value 0x%llx: %s\n",
> - set_reg.reg, set_reg.val, strerror(errno));
> + printf("Failed to set register 0x%08llx value 0x%llx\n",
> + set_reg.reg, set_reg.val);
> }
> set_reg.reg++;
> }
>
>
> ---
>
> Patch is available at: http://linuxtv.org/hg/v4l-dvb/rev/98a8e3a2b8b39732055f03533acf9aa8d0c896c2
>
>
Do you really want this patch? It does the opposite what the comment says: when
the verbose mode is switched off, strerror(errno) is not printed at all.
Actually this reverts changeset 13405:65a25dd73390 as far as I can see:
http://linuxtv.org/hg/v4l-dvb/log/98a8e3a2b8b3/v4l2-apps/util/v4l2-dbg.cpp
Regards,
Márton Németh
parent reply other threads:[~2009-11-25 5:32 UTC|newest]
Thread overview: expand[flat|nested] mbox.gz Atom feed
[parent not found: <E1NCz3Z-0003qs-Qe@mail.linuxtv.org>]
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=4B0CC15E.8070605@freemail.hu \
--to=nm127@freemail.hu \
--cc=linux-media@vger.kernel.org \
--cc=mchehab@redhat.com \
/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