main: Be clear about what we failed to open
Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
Change-Id: I5884b83716f73da8f055a7267b3efab36c856ea8
diff --git a/main.c b/main.c
index d63d74c..a1b4953 100644
--- a/main.c
+++ b/main.c
@@ -548,7 +548,7 @@
devnode[PATH_MAX - 1] = '\0';
if ((sourcefd = open(devnode, O_RDONLY)) == -1)
- err(EXIT_FAILURE, "Failed to open %s", devnode);
+ err(EXIT_FAILURE, "Failed to open source %s", devnode);
optind++;
}
@@ -565,7 +565,7 @@
* then we patch this bit when we know what we need.
*/
if ((sinkfd = open(argv[optind], O_WRONLY)) == -1)
- err(EXIT_FAILURE, "Failed to open %s", argv[optind]);
+ err(EXIT_FAILURE, "Failed to open sink %s", argv[optind]);
optind++;
}