diff options
Diffstat (limited to 'lib/tdb2/tools')
-rw-r--r-- | lib/tdb2/tools/growtdb-bench.c | 4 | ||||
-rw-r--r-- | lib/tdb2/tools/speed.c | 11 | ||||
-rw-r--r-- | lib/tdb2/tools/tdb2tool.c | 10 | ||||
-rw-r--r-- | lib/tdb2/tools/tdb2torture.c | 10 |
4 files changed, 24 insertions, 11 deletions
diff --git a/lib/tdb2/tools/growtdb-bench.c b/lib/tdb2/tools/growtdb-bench.c index f7f6845a8a..ec81268bec 100644 --- a/lib/tdb2/tools/growtdb-bench.c +++ b/lib/tdb2/tools/growtdb-bench.c @@ -10,10 +10,12 @@ static void logfn(struct tdb_context *tdb, enum tdb_log_level level, + enum TDB_ERROR ecode, const char *message, void *data) { - fprintf(stderr, "tdb:%s:%s\n", tdb_name(tdb), message); + fprintf(stderr, "tdb:%s:%s:%s\n", + tdb_name(tdb), tdb_errorstr(ecode), message); } int main(int argc, char *argv[]) diff --git a/lib/tdb2/tools/speed.c b/lib/tdb2/tools/speed.c index 3222465a71..ccb5ae349d 100644 --- a/lib/tdb2/tools/speed.c +++ b/lib/tdb2/tools/speed.c @@ -126,11 +126,14 @@ static void dump_and_clear_stats(struct tdb_context **tdb, *tdb = tdb_open("/tmp/speed.tdb", flags, O_RDWR, 0, attr); } -static void tdb_log(struct tdb_context *tdb, enum tdb_log_level level, - const char *message, void *data) +static void tdb_log(struct tdb_context *tdb, + enum tdb_log_level level, + enum TDB_ERROR ecode, + const char *message, + void *data) { - fputs(message, stderr); - putc('\n', stderr); + fprintf(stderr, "tdb:%s:%s:%s\n", + tdb_name(tdb), tdb_errorstr(ecode), message); } int main(int argc, char *argv[]) diff --git a/lib/tdb2/tools/tdb2tool.c b/lib/tdb2/tools/tdb2tool.c index cd301c80b7..9b3554de6c 100644 --- a/lib/tdb2/tools/tdb2tool.c +++ b/lib/tdb2/tools/tdb2tool.c @@ -126,10 +126,14 @@ static double _end_timer(void) (tp2.tv_usec - tp1.tv_usec)*1.0e-6); } -static void tdb_log(struct tdb_context *tdb, enum tdb_log_level level, - const char *message, void *priv) +static void tdb_log(struct tdb_context *tdb, + enum tdb_log_level level, + enum TDB_ERROR ecode, + const char *message, + void *data) { - fputs(message, stderr); + fprintf(stderr, "tdb:%s:%s:%s\n", + tdb_name(tdb), tdb_errorstr(ecode), message); } /* a tdb tool for manipulating a tdb database */ diff --git a/lib/tdb2/tools/tdb2torture.c b/lib/tdb2/tools/tdb2torture.c index f6a7a5064a..c2a4eaa0fb 100644 --- a/lib/tdb2/tools/tdb2torture.c +++ b/lib/tdb2/tools/tdb2torture.c @@ -42,10 +42,14 @@ static int count_pipe; static union tdb_attribute log_attr; static union tdb_attribute seed_attr; -static void tdb_log(struct tdb_context *tdb, enum tdb_log_level level, - const char *message, void *data) +static void tdb_log(struct tdb_context *tdb, + enum tdb_log_level level, + enum TDB_ERROR ecode, + const char *message, + void *data) { - fputs(message, stdout); + printf("tdb:%s:%s:%s\n", + tdb_name(tdb), tdb_errorstr(ecode), message); fflush(stdout); #if 0 { |