This patch changes the output after checking a filesystem. Before, the
default output was "found x bytes used err is 0", where the last integer
corresponds to the return value of check_root_refs(), which is either 1
or 0. Now this value is evaluated, and a message saying if errors were
found or not is printed.
Signed-off-by: Dieter Ries <mail@xxxxxxxxxxxxxx>
---
btrfsck.c | 7 +++++--
1 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/btrfsck.c b/btrfsck.c
index 83275cd..45ce681 100644
--- a/btrfsck.c
+++ b/btrfsck.c
@@ -3613,8 +3613,11 @@ out:
"backup data and re-format the FS. *\n\n");
ret = 1;
}
- printf("found %llu bytes used err is %d\n",
- (unsigned long long)bytes_used, ret);
+ if (ret)
+ printf("Filesystem is damaged! One or more errors found.\n");
+ else
+ printf("Filesystem is clean! No errors found.\n");
+ printf("%llu bytes used\n",(unsigned long long)bytes_used);
printf("total csum bytes: %llu\n",(unsigned long long)total_csum_bytes);
printf("total tree bytes: %llu\n",
(unsigned long long)total_btree_bytes);
--
1.7.3.GIT
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html