From 4088b770e12597cb400b4fc30360f679b35d3c78 Mon Sep 17 00:00:00 2001 From: David Sterba Date: Thu, 10 Mar 2016 15:02:18 +0100 Subject: [PATCH] btrfs-progs: dump-tree: print version information earlier The version information could be useful addition to the dump, print it before we attempt to open the filesystem. Signed-off-by: David Sterba --- cmds-inspect-dump-tree.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cmds-inspect-dump-tree.c b/cmds-inspect-dump-tree.c index d55bff50..159888c5 100644 --- a/cmds-inspect-dump-tree.c +++ b/cmds-inspect-dump-tree.c @@ -194,6 +194,8 @@ int cmd_inspect_dump_tree(int argc, char **argv) goto out; } + printf("%s\n", PACKAGE_STRING); + info = open_ctree_fs_info(argv[optind], 0, 0, 0, OPEN_CTREE_PARTIAL); if (!info) { error("unable to open %s", argv[optind]); @@ -455,7 +457,6 @@ no_node: uuidbuf[BTRFS_UUID_UNPARSED_SIZE - 1] = '\0'; uuid_unparse(info->super_copy->fsid, uuidbuf); printf("uuid %s\n", uuidbuf); - printf("%s\n", PACKAGE_STRING); close_root: ret = close_ctree(root); out: