This is an automatic generated email to let you know that the following patch 
were queued at the tree:

Subject: ir-ctl: give proper error message if transmitter does not exist
Author:  Sean Young <>
Date:    Mon Sep 19 19:21:24 2016 -0300

If a transmitter does not exist when setting using -e, you get the error:

warning: /dev/lirc0: failed to set send transmitters: Success

Signed-off-by: Sean Young <>

 utils/ir-ctl/ir-ctl.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/utils/ir-ctl/ir-ctl.c b/utils/ir-ctl/ir-ctl.c
index 6b9ea491e0b4..2f85e6d00e28 100644
--- a/utils/ir-ctl/ir-ctl.c
+++ b/utils/ir-ctl/ir-ctl.c
@@ -516,7 +516,9 @@ static int lirc_options(struct arguments *args, int fd, 
unsigned features)
        if (args->emitters) {
                if (features & LIRC_CAN_SET_TRANSMITTER_MASK) {
                        rc = ioctl(fd, LIRC_SET_TRANSMITTER_MASK, 
-                       if (rc)
+                       if (rc > 0)
+                               fprintf(stderr, _("warning: %s: failed to set 
send transmitters: only %d available\n"), dev, rc);
+                       else if (rc < 0)
                                fprintf(stderr, _("warning: %s: failed to set 
send transmitters: %m\n"), dev);
                } else
                        fprintf(stderr, _("warning: %s: does not support 
setting send transmitters\n"), dev);

linuxtv-commits mailing list

Reply via email to