From 7fc31bd5fffcc4c386e8d5a30e79d6a8484902e1 Mon Sep 17 00:00:00 2001 From: Martin Mares Date: Fri, 5 Jul 2002 03:24:25 +0000 Subject: [PATCH] Due to a bug, the "fsck" mode was unable to fix broken trailers. --- lib/buckettool.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/lib/buckettool.c b/lib/buckettool.c index eaf376c7..45410f00 100644 --- a/lib/buckettool.c +++ b/lib/buckettool.c @@ -186,9 +186,12 @@ fsck(int fix) printf("%08x missing trailer\n", oid); else if (chk != OBUCK_TRAILER) printf("%08x mismatched trailer\n", oid); - /* OK */ - pos = end; - continue; + else + { + /* OK */ + pos = end; + continue; + } } errors++; end = pos; @@ -227,6 +230,8 @@ fsck(int fix) sh_pwrite(fd, &chk, 4, end-4); printf("*** replaced the invalid chunk by a DELETED bucket of size %d\n", (uns)(end - pos)); } + else + printf("*** would mark %d bytes as DELETED\n", (uns)(end - pos)); pos = end; } finish: -- 2.39.2