From 14d593bd884fc1ddd3592d658df705f791286737 Mon Sep 17 00:00:00 2001 From: Art Cancro Date: Mon, 17 Jul 2023 18:17:50 -0900 Subject: [PATCH] remove extra msgs --- citadel/utils/ctdldump.c | 20 +++++--------------- citadel/utils/ctdlload.c | 2 +- 2 files changed, 6 insertions(+), 16 deletions(-) diff --git a/citadel/utils/ctdldump.c b/citadel/utils/ctdldump.c index e78be28fb..9bfe93c59 100644 --- a/citadel/utils/ctdldump.c +++ b/citadel/utils/ctdldump.c @@ -66,27 +66,18 @@ DB_ENV *open_dbenv(char *dirname) { u_int32_t flags = 0; int dbversion_major, dbversion_minor, dbversion_patch; - fprintf(stderr, - "ctdldump: open_dbenv() starting\n" - "ctdldump: Linked zlib: %s\n" - "ctdldump: Compiled libdb: %s\n" - "ctdldump: Linked libdb: %s\n", - zlibVersion(), - DB_VERSION_STRING, - db_version(&dbversion_major, &dbversion_minor, &dbversion_patch) - ); + db_version(&dbversion_major, &dbversion_minor, &dbversion_patch); // Create synthetic integer version numbers and compare them. - // Never run with a libdb older than the one with which it was compiled. + // Never run with a libdb other than the one with which it was compiled. int compiled_db_version = ( (DB_VERSION_MAJOR * 1000000) + (DB_VERSION_MINOR * 1000) + (DB_VERSION_PATCH) ); int linked_db_version = ( (dbversion_major * 1000000) + (dbversion_minor * 1000) + (dbversion_patch) ); - if (compiled_db_version > linked_db_version) { - fprintf(stderr, "ctdldump: ctdldump is running with a version of libdb older than the one with which it was compiled.\n" + if (compiled_db_version != linked_db_version) { + fprintf(stderr, "ctdldump: ctdldump is running with a version of libdb other than the one with which it was compiled.\n" "ctdldump: This is an invalid configuration. ctdldump will now exit to prevent data loss."); exit(CTDLEXIT_DB); } - fprintf(stderr, "ctdldump: Setting up DB environment\n"); ret = db_env_create(&dbenv, 0); if (ret) { fprintf(stderr, "ctdldump: db_env_create: %s\n", db_strerror(ret)); @@ -111,7 +102,6 @@ DB_ENV *open_dbenv(char *dirname) { } flags = DB_CREATE | DB_INIT_MPOOL | DB_PRIVATE | DB_INIT_LOG; - fprintf(stderr, "ctdldump: dbenv open(dir=%s, flags=%d)\n", dirname, flags); ret = dbenv->open(dbenv, dirname, flags, 0); if (ret) { fprintf(stderr, "ctdldump: dbenv->open: %s\n", db_strerror(ret)); @@ -497,7 +487,7 @@ int main(int argc, char **argv) { fprintf(stderr, "ctdldump: You have specified the [-y] flag, so processing will continue.\n"); } else { - fprintf(stderr, "ctdldump: Please read [ https://www.citadel.org/ctdldump.html ] to learn how to proceed.\n"); + fprintf(stderr, "ctdldump: Please read [ https://www.citadel.org/dump-and-load.html ] to learn how to proceed.\n"); exit(0); } diff --git a/citadel/utils/ctdlload.c b/citadel/utils/ctdlload.c index b8845af14..80f00bd98 100644 --- a/citadel/utils/ctdlload.c +++ b/citadel/utils/ctdlload.c @@ -666,7 +666,7 @@ int main(int argc, char **argv) { fprintf(stderr, "ctdlload: You have specified the [-y] flag, so processing will continue.\n"); } else { - fprintf(stderr, "ctdlload: Please read [ https://www.citadel.org/ctdlload.html ] to learn how to proceed.\n"); + fprintf(stderr, "ctdlload: Please read [ https://www.citadel.org/dump-and-load.html ] to learn how to proceed.\n"); exit(0); } -- 2.39.2