The patch number 9950 was added via Mauro Carvalho Chehab <[email protected]>
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:
        [email protected]

------

From: Mauro Carvalho Chehab  <[email protected]>
v4l2-dbg: print register name and fix doioctl check


Priority: normal

Signed-off-by: Mauro Carvalho Chehab <[email protected]>


---

 v4l2-apps/util/v4l2-dbg.cpp |   17 +++++++++++++++--
 1 file changed, 15 insertions(+), 2 deletions(-)

diff -r 8383791267d3 -r c38488ae8568 v4l2-apps/util/v4l2-dbg.cpp
--- a/v4l2-apps/util/v4l2-dbg.cpp       Mon Dec 22 09:53:53 2008 -0200
+++ b/v4l2-apps/util/v4l2-dbg.cpp       Mon Dec 22 10:17:16 2008 -0200
@@ -549,8 +549,21 @@ int main(int argc, char **argv)
                while (optind < argc) {
                        set_reg.val = strtoull(argv[optind++], NULL, 0);
                        if (doioctl(fd, VIDIOC_DBG_S_REGISTER, &set_reg,
-                                               "VIDIOC_DBG_S_REGISTER") == 0)
-                               printf("register 0x%llx set to 0x%llx\n", 
set_reg.reg, set_reg.val);
+                                               "VIDIOC_DBG_S_REGISTER") >= 0) {
+                               const char *name = reg_name(curr_bd, 
set_reg.reg);
+
+                               printf("Register ");
+
+                               if (name)
+                                       printf("%s", name);
+                               else
+                                       printf("0x%08llx", set_reg.reg);
+
+                               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);
+                       }
                        set_reg.reg++;
                }
        }


---

Patch is available at: 
http://linuxtv.org/hg/v4l-dvb/rev/c38488ae85683f789933c6ee314721e03572bf4f

_______________________________________________
linuxtv-commits mailing list
[email protected]
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits

Reply via email to