diff options
author | Stuart Henderson <sthen@cvs.openbsd.org> | 2014-06-18 19:17:38 +0000 |
---|---|---|
committer | Stuart Henderson <sthen@cvs.openbsd.org> | 2014-06-18 19:17:38 +0000 |
commit | f7927612f3f9942b68b4c1ed6aef7418454f68a4 (patch) | |
tree | 5f8c3ba4a63773de8d7c8e6a5698e950f2671bdd /usr.bin/mandoc/mandocdb.c | |
parent | 1ea5faee69d15efa7428d174eb8fc54619c69bc8 (diff) |
Don't display "unable to open mandoc.db" error messages (SQLITE_CANTOPEN)
in the code which opens mandocdb's sqlite database when updating/deleting
individual files (as used and only really useful for pkg_add/pkg_delete).
ok schwarze@
Diffstat (limited to 'usr.bin/mandoc/mandocdb.c')
-rw-r--r-- | usr.bin/mandoc/mandocdb.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/usr.bin/mandoc/mandocdb.c b/usr.bin/mandoc/mandocdb.c index 67d12270ac0..ce402104310 100644 --- a/usr.bin/mandoc/mandocdb.c +++ b/usr.bin/mandoc/mandocdb.c @@ -1,4 +1,4 @@ -/* $Id: mandocdb.c,v 1.107 2014/06/05 07:13:53 espie Exp $ */ +/* $Id: mandocdb.c,v 1.108 2014/06/18 19:17:37 sthen Exp $ */ /* * Copyright (c) 2011, 2012 Kristaps Dzonsons <kristaps@bsd.lv> * Copyright (c) 2011, 2012, 2013, 2014 Ingo Schwarze <schwarze@openbsd.org> @@ -2223,7 +2223,8 @@ dbopen(int real) rc = sqlite3_open_v2(MANDOC_DB, &db, ofl, NULL); if (SQLITE_OK != rc) { exitcode = (int)MANDOCLEVEL_SYSERR; - say(MANDOC_DB, "%s", sqlite3_errstr(rc)); + if (SQLITE_CANTOPEN != rc) + say(MANDOC_DB, "%s", sqlite3_errstr(rc)); return(0); } goto prepare_statements; |