This is an automatic generated email to let you know that the following patch 
were queued at the 
http://git.linuxtv.org/v4l-utils.git tree:

Subject: ir-keytable: Show device repeat rate without any arguments
Author:  Mauro Carvalho Chehab <[email protected]>
Date:    Wed Jan 26 17:01:00 2011 -0200

If it has read permission for /dev/input/event?, it will display
extra capabilities. In general, this requires root access.

Otherwise, it will print a warning message saying that the access
were denied.

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

 utils/keytable/keytable.c |   18 +++++++++++++++++-
 1 files changed, 17 insertions(+), 1 deletions(-)

---

http://git.linuxtv.org/v4l-utils.git?a=commitdiff;h=b4350f52a7e26b9285c5974c769981574e4e8207

diff --git a/utils/keytable/keytable.c b/utils/keytable/keytable.c
index 4d3489a..0224492 100644
--- a/utils/keytable/keytable.c
+++ b/utils/keytable/keytable.c
@@ -1342,9 +1342,19 @@ static int get_rate(int fd, unsigned int *delay, 
unsigned int *period)
        return 0;
 }
 
+static void show_evdev_attribs(int fd)
+{
+       unsigned int delay, period;
+
+       printf("\t");
+       get_rate(fd, &delay, &period);
+}
+
 static int show_sysfs_attribs(struct rc_device *rc_dev)
 {
        static struct sysfs_names *names, *cur;
+       int fd;
+
        names = find_device(NULL);
        if (!names)
                return -1;
@@ -1362,7 +1372,13 @@ static int show_sysfs_attribs(struct rc_device *rc_dev)
                        show_proto(rc_dev->supported);
                        fprintf(stderr, "\n\t");
                        display_proto(rc_dev);
-                       fprintf(stderr, "\n");
+                       fd = open(rc_dev->input_name, O_RDONLY);
+                       if (fd > 0) {
+                               show_evdev_attribs(fd);
+                               close(fd);
+                       } else {
+                               printf("\tExtra capabilities: <access 
denied>\n");
+                       }
                }
        }
        return 0;

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

Reply via email to