X-Git-Url: http://git.tuebingen.mpg.de/?p=osl.git;a=blobdiff_plain;f=fsck.c;h=bc77424e30db1f7939ec6b084d707b283b0693ed;hp=246a0b6f3c5f38a881227958d7769eb12d18cc39;hb=edb632b26c12a94fb7d8a7bfcb787a8df8b77a1c;hpb=884d9b3ac360755d8dd8e28e3d049cb6b0e2b1e8 diff --git a/fsck.c b/fsck.c index 246a0b6..bc77424 100644 --- a/fsck.c +++ b/fsck.c @@ -577,7 +577,8 @@ static int prune_objects(struct osl_table *t, uint32_t *lost_bytes) NOTICE_LOG("removing unreferenced objects from data files\n"); /* first make a copy of the index */ - ret = osl_open(old_idx_filename, O_WRONLY | O_CREAT | O_EXCL, 0644); + DEBUG_LOG("opening %s\n", old_idx_filename); + ret = osl_open(old_idx_filename, O_WRONLY | O_CREAT | O_TRUNC, 0644); if (ret < 0) goto out_free; fd = ret; @@ -1169,7 +1170,8 @@ static int check_table(char *db_dir, char *table_name) ret = dump_table(conf.dump_dir_arg, &desc); out: if (ret < 0) - ERROR_LOG("failed to check table %s\n", table_name); + ERROR_LOG("failed to check table %s: %s\n", table_name, + fsck_strerror(-ret)); else NOTICE_LOG("successfully checked table %s\n", table_name); return ret;