aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/mandocdb.c
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2016-08-22 16:15:26 +0000
committerIngo Schwarze <schwarze@openbsd.org>2016-08-22 16:15:26 +0000
commit7ff737e216d9a73815b24bc6c7c226f686817eed (patch)
tree617f8b16e3f31c535dccf21385d3e26ad9fdbd1c /mandocdb.c
parent9430ba5b3692e61b8f841adb1754b2c327c2fd85 (diff)
downloadmandoc-7ff737e216d9a73815b24bc6c7c226f686817eed.tar.gz
mandoc-7ff737e216d9a73815b24bc6c7c226f686817eed.tar.zst
mandoc-7ff737e216d9a73815b24bc6c7c226f686817eed.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@.
Diffstat (limited to 'mandocdb.c')
-rw-r--r--mandocdb.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/mandocdb.c b/mandocdb.c
index f16652d5..7ae91753 100644
--- a/mandocdb.c
+++ b/mandocdb.c
@@ -1,4 +1,4 @@
-/* $Id: mandocdb.c,v 1.227 2016/08/17 20:46:56 schwarze Exp $ */
+/* $Id: mandocdb.c,v 1.228 2016/08/22 16:15:26 schwarze Exp $ */
/*
* Copyright (c) 2011, 2012 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2011-2016 Ingo Schwarze <schwarze@openbsd.org>
@@ -448,10 +448,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())