yanglint BUGFIX more output files are forbidden
diff --git a/tools/lint/cmd_print.c b/tools/lint/cmd_print.c
index 2f46c51..a6b815a 100644
--- a/tools/lint/cmd_print.c
+++ b/tools/lint/cmd_print.c
@@ -81,13 +81,11 @@
switch (opt) {
case 'o': /* --output */
if (yo->out) {
- if (ly_out_filepath(yo->out, optarg) != NULL) {
- YLMSG_E("Unable to use output file %s for printing output.\n", optarg);
- return 1;
- }
+ YLMSG_E("Only a single output can be specified.\n");
+ return 1;
} else {
if (ly_out_new_filepath(optarg, &yo->out)) {
- YLMSG_E("Unable to use output file %s for printing output.\n", optarg);
+ YLMSG_E("Unable open output file %s (%s)\n", optarg, strerror(errno));
return 1;
}
}