r23975: Enhance some debug output.
authorMichael Adam <obnox@samba.org>
Thu, 19 Jul 2007 14:22:24 +0000 (14:22 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 17:28:51 +0000 (12:28 -0500)
source/lib/util_tdb.c

index c0933ba415d9fb31db2b4cc841e174d66e704c7e..cc10e4c9adde9147974060507c2828fe8e1f8c8e 100644 (file)
@@ -1145,7 +1145,8 @@ static int traverse_copy_fn(struct tdb_context *tdb, TDB_DATA key,
        struct tdb_copy_data *data = (struct tdb_copy_data *)private_data;
 
        if (tdb_store(data->dst, key, dbuf, TDB_INSERT) != 0) {
-               DEBUG(4, ("Failed to insert into %s\n", tdb_name(data->dst)));
+               DEBUG(4, ("Failed to insert into %s: %s\n", tdb_name(data->dst),
+                         strerror(errno)));
                data->success = False;
                return 1;
        }
@@ -1217,7 +1218,8 @@ static int tdb_backup(TALLOC_CTX *ctx, const char *src_path,
 
        count1 = tdb_copy(src_tdb, dst_tdb);
        if (count1 < 0) {
-               DEBUG(3, ("Failed to copy tdb '%s'\n", src_path));
+               DEBUG(3, ("Failed to copy tdb '%s': %s\n", src_path,
+                         strerror(errno)));
                tdb_close(dst_tdb);
                goto done;
        }