From: Dieter Ries <mail@dieterries.net>
To: chris.mason@fusionio.com, linux-btrfs@vger.kernel.org
Cc: Dieter Ries <mail@dieterries.net>
Subject: [PATCH 4/4] btrfs-progs: btrfsck: Remove binary error code output
Date: Mon, 8 Oct 2012 21:07:50 +0200 [thread overview]
Message-ID: <1349723270-12773-5-git-send-email-mail@dieterries.net> (raw)
In-Reply-To: <1349723270-12773-1-git-send-email-mail@dieterries.net>
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(-)
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
prev parent reply other threads:[~2012-10-08 19:08 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-10-08 19:07 [PATCH 0/4] Resend: btrfs-progs: Some cosmetic changes (mainly) to btrfsck Dieter Ries
2012-10-08 19:07 ` [PATCH 1/4] btrfs-progs: Remove redundant "Btrfs" string from version string Dieter Ries
2012-10-08 19:07 ` [PATCH 2/4] btrfs-progs: btrfsck: Print which filesystem to be checked to stdout Dieter Ries
2012-10-09 15:08 ` David Sterba
2012-10-14 15:15 ` [PATCH 3/4] btrfs-progs: btrfsck: Print feedback about fscking " Dieter Ries
2012-10-14 15:18 ` Dieter Ries
2012-10-14 15:17 ` [PATCH 2/4] btrfs-progs: btrfsck: Print which filesystem to be checked " Dieter Ries
2012-10-08 19:07 ` [PATCH 3/4] btrfs-progs: btrfsck: Print feedback about fscking " Dieter Ries
2012-10-09 15:21 ` David Sterba
2012-10-11 20:50 ` mail
2012-10-08 19:07 ` Dieter Ries [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1349723270-12773-5-git-send-email-mail@dieterries.net \
--to=mail@dieterries.net \
--cc=chris.mason@fusionio.com \
--cc=linux-btrfs@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).