summaryrefslogtreecommitdiff
path: root/lib/db2.c
diff options
context:
space:
mode:
authorjbj <devnull@localhost>2001-01-03 20:19:27 +0000
committerjbj <devnull@localhost>2001-01-03 20:19:27 +0000
commit23fcf67cb51b54c4c1f23188ee355dbcbfba0a28 (patch)
treef8d1a8a5a523fd6f60760b2930f99f1f18349091 /lib/db2.c
parentfd2c1d927f4a13e0507ab929a009decdbb90c01e (diff)
downloadrpm-23fcf67cb51b54c4c1f23188ee355dbcbfba0a28.tar.gz
rpm-23fcf67cb51b54c4c1f23188ee355dbcbfba0a28.tar.bz2
rpm-23fcf67cb51b54c4c1f23188ee355dbcbfba0a28.zip
- fix: avoid locale issues with strcasecmp/strncasecmp (#23199).
- remove almost all explicit uses of stderr in rpmlib using rpmError(). CVS patchset: 4406 CVS date: 2001/01/03 20:19:27
Diffstat (limited to 'lib/db2.c')
-rw-r--r--lib/db2.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/db2.c b/lib/db2.c
index f397d2d9f..bc28671ce 100644
--- a/lib/db2.c
+++ b/lib/db2.c
@@ -108,8 +108,12 @@ static int cvtdberr(dbiIndex dbi, const char * msg, int error, int printit) {
rc = -1;
if (printit && rc) {
- fprintf(stderr, "*** db%d %s rc %d %s\n", dbi->dbi_api, msg,
- rc, db_strerror(error));
+ if (msg)
+ rpmError(RPMERR_DBERR, _("db%d error(%d) from %s: %s\n"),
+ dbi->dbi_api, rc, msg, db_strerror(error));
+ else
+ rpmError(RPMERR_DBERR, _("db%d error(%d): %s\n"),
+ dbi->dbi_api, rc, db_strerror(error));
}
return rc;