summaryrefslogtreecommitdiff
path: root/usr.bin/mandoc/main.c
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@cvs.openbsd.org>2019-01-11 17:03:44 +0000
committerIngo Schwarze <schwarze@cvs.openbsd.org>2019-01-11 17:03:44 +0000
commit6def58114babea5238ca229c5830006063b60c0d (patch)
tree160a001a7147672bcfbe0992597f8a69431407b3 /usr.bin/mandoc/main.c
parent1d6b9d6594d61aaaff29ff6536e01cf9ace53875 (diff)
Improve error reporting when a file given on the command line
cannot be opened: * Mention the filename. * Report the errno for the file itself, not the one with .gz appended.
Diffstat (limited to 'usr.bin/mandoc/main.c')
-rw-r--r--usr.bin/mandoc/main.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.bin/mandoc/main.c b/usr.bin/mandoc/main.c
index 187496aaf84..11b9ea1702d 100644
--- a/usr.bin/mandoc/main.c
+++ b/usr.bin/mandoc/main.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: main.c,v 1.220 2019/01/10 06:27:23 schwarze Exp $ */
+/* $OpenBSD: main.c,v 1.221 2019/01/11 17:03:43 schwarze Exp $ */
/*
* Copyright (c) 2008-2012 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2010-2012, 2014-2019 Ingo Schwarze <schwarze@openbsd.org>
@@ -531,7 +531,7 @@ main(int argc, char *argv[])
}
} else
mandoc_msg(MANDOCERR_FILE, 0, 0,
- "%s", strerror(errno));
+ "%s: %s", thisarg, strerror(errno));
if (curp.wstop && mandoc_msg_getrc() != MANDOCLEVEL_OK)
break;