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

Subject: ir-ctl: print error message if file cannot be opened
Author:  Sean Young <s...@mess.org>
Date:    Sat Sep 7 21:40:23 2019 +0100

ir-ctl -k foo -K FOO says nothing if foo is not found.

Signed-off-by: Sean Young <s...@mess.org>

 utils/common/keymap.c | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

---

http://git.linuxtv.org/cgit.cgi/v4l-utils.git/commit/?id=b972d2d6cea558c6fc304938b56518281c953185
diff --git a/utils/common/keymap.c b/utils/common/keymap.c
index 20026cc4dc0b..1252646186e2 100644
--- a/utils/common/keymap.c
+++ b/utils/common/keymap.c
@@ -88,7 +88,8 @@ static error_t parse_plain_keymap(char *fname, struct keymap 
**keymap, bool verb
 
        fin = fopen(fname, "r");
        if (!fin) {
-               return errno;
+               fprintf(stderr, _("%s: error: cannot open: %m\n"), fname);
+               return EINVAL;
        }
 
        while (fgets(s, sizeof(s), fin)) {
@@ -457,8 +458,10 @@ static error_t parse_toml_keymap(char *fname, struct 
keymap **keymap, bool verbo
                fprintf(stderr, _("Parsing %s keycode file as toml\n"), fname);
 
        fin = fopen(fname, "r");
-       if (!fin)
-               return errno;
+       if (!fin) {
+               fprintf(stderr, _("%s: error: cannot open: %m\n"), fname);
+               return EINVAL;
+       }
 
        root = toml_parse_file(fin, buf, sizeof(buf));
        fclose(fin);

_______________________________________________
linuxtv-commits mailing list
linuxtv-commits@linuxtv.org
https://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits

Reply via email to