summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorschwarze <schwarze@openbsd.org>2016-08-22 16:12:52 +0000
committerschwarze <schwarze@openbsd.org>2016-08-22 16:12:52 +0000
commitde1bf37862037b4c4f116831a9c1aaf11e12d977 (patch)
treeded67ca10d35ac711534aadd30b60904350079f4
parentWhen running into a mandoc.db(5) file still using the obsolete (diff)
downloadwireguard-openbsd-de1bf37862037b4c4f116831a9c1aaf11e12d977.tar.xz
wireguard-openbsd-de1bf37862037b4c4f116831a9c1aaf11e12d977.zip
When trying to edit an existing database with makewhatis(8) -d or -u
but reading the database fails, report the full path to the database on standard error, and mention that the database is automatically recreated from scratch. Suggested by espie@.
-rw-r--r--usr.bin/mandoc/mandocdb.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/usr.bin/mandoc/mandocdb.c b/usr.bin/mandoc/mandocdb.c
index 1e8274b3ed5..83c10d0c171 100644
--- a/usr.bin/mandoc/mandocdb.c
+++ b/usr.bin/mandoc/mandocdb.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: mandocdb.c,v 1.176 2016/08/17 20:46:06 schwarze Exp $ */
+/* $OpenBSD: mandocdb.c,v 1.177 2016/08/22 16:12:52 schwarze Exp $ */
/*
* Copyright (c) 2011, 2012 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2011-2016 Ingo Schwarze <schwarze@openbsd.org>
@@ -424,10 +424,10 @@ mandocdb(int argc, char *argv[])
if (nodb == 0)
dbprune(dba);
} else {
- /*
- * Database missing or corrupt.
- * Recreate from scratch.
- */
+ /* Database missing or corrupt. */
+ say(MANDOC_DB,
+ "%s: Automatically recreating from scratch",
+ strerror(errno));
exitcode = (int)MANDOCLEVEL_OK;
op = OP_DEFAULT;
if (0 == treescan())