From de1bf37862037b4c4f116831a9c1aaf11e12d977 Mon Sep 17 00:00:00 2001 From: schwarze Date: Mon, 22 Aug 2016 16:12:52 +0000 Subject: [PATCH] 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@. --- usr.bin/mandoc/mandocdb.c | 10 +++++----- 1 file 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 * Copyright (c) 2011-2016 Ingo Schwarze @@ -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()) -- 2.20.1