btrfs-progs: btrfsck: Print which filesystem to be checked to stdout

This patch makes btrfsck print the filesystem, which is to be checked,
to stdout, as well as the UUID of the corresponding partition.
This should be helpful when analyzing (copied and pasted) output of
btrfsck.

Signed-off-by: Dieter Ries <mail@dieterries.net>
This commit is contained in:
Dieter Ries 2012-10-14 17:17:19 +02:00 committed by David Sterba
parent 641e688375
commit 629dfb8fa8

View File

@ -26,6 +26,7 @@
#include <sys/stat.h>
#include <unistd.h>
#include <getopt.h>
#include <uuid/uuid.h>
#include "kerncompat.h"
#include "ctree.h"
#include "volumes.h"
@ -3543,6 +3544,7 @@ int main(int ac, char **av)
struct btrfs_fs_info *info;
struct btrfs_trans_handle *trans = NULL;
u64 bytenr = 0;
char uuidbuf[37];
int ret;
int num;
int repair = 0;
@ -3595,6 +3597,8 @@ int main(int ac, char **av)
}
info = open_ctree_fs_info(av[optind], bytenr, rw, 1);
uuid_unparse(info->super_copy.fsid, uuidbuf);
printf("Checking filesystem on %s\nUUID: %s\n", av[optind], uuidbuf);
if (info == NULL)
return 1;