@@ -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);
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@dieterries.net> --- btrfsck.c | 7 +++++-- 1 files changed, 5 insertions(+), 2 deletions(-)