Hello Mauro, Patch from Mauro Carvalho Chehab wrote: > The patch number 13472 was added via Mauro Carvalho Chehab <mchehab@xxxxxxxxxx> > 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@xxxxxxxxxxxxxxx> > > ------ > > From: Mauro Carvalho Chehab <mchehab@xxxxxxxxxx> > 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@xxxxxxxxx: minor additional cleanup in doioctl()] > [mchehab@xxxxxxxxxx: As I've already applied the original version, apply the diff version now] > Signed-off-by: Marton Nemeth <nm127@xxxxxxxxxxx> > Signed-off-by: Hans Verkuil <hverkuil@xxxxxxxxx> > Signed-off-by: Mauro Carvalho Chehab <mchehab@xxxxxxxxxx> > > > --- > > 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 -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html