diff mbox

[2/4] btrfs-progs: btrfsck: Print which filesystem to be checked to stdout

Message ID 1349723270-12773-3-git-send-email-mail@dieterries.net (mailing list archive)
State Superseded, archived
Headers show

Commit Message

Dieter Ries Oct. 8, 2012, 7:07 p.m. UTC
This patch makes btrfsck print the filesystem, which is to be checked,
to stdout. This should be helpful when analyzing (copied and pasted)
output of btrfsck.

Signed-off-by: Dieter Ries <mail@dieterries.net>
---
 btrfsck.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

Comments

David Sterba Oct. 9, 2012, 3:08 p.m. UTC | #1
On Mon, Oct 08, 2012 at 09:07:48PM +0200, Dieter Ries wrote:
> --- a/btrfsck.c
> +++ b/btrfsck.c
> @@ -3540,6 +3540,8 @@ int main(int ac, char **av)
>  	} else if(ret) {
>  		fprintf(stderr, "%s is currently mounted. Aborting.\n", av[optind]);
>  		return -EBUSY;
> +	} else {
> +		printf("Checking filesystem on %s\n",av[optind]);

This could be extended to print the UUID of the filesystem as well.
Otherwise ok.

david
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/btrfsck.c b/btrfsck.c
index 67f4a9d..516bcdf 100644
--- a/btrfsck.c
+++ b/btrfsck.c
@@ -3540,6 +3540,8 @@  int main(int ac, char **av)
 	} else if(ret) {
 		fprintf(stderr, "%s is currently mounted. Aborting.\n", av[optind]);
 		return -EBUSY;
+	} else {
+		printf("Checking filesystem on %s\n",av[optind]);
 	}
 
 	info = open_ctree_fs_info(av[optind], bytenr, rw, 1);