summaryrefslogtreecommitdiff
path: root/cmds-inspect-dump-tree.c
diff options
context:
space:
mode:
authorDavid Sterba <dsterba@suse.com>2016-03-10 15:02:18 +0100
committerDavid Sterba <dsterba@suse.com>2016-03-14 13:42:47 +0100
commit4088b770e12597cb400b4fc30360f679b35d3c78 (patch)
tree0af8d2c0a1526b6e8589ee39a221425165a9a6b3 /cmds-inspect-dump-tree.c
parent078b4746ccb01dee3c8a54a5bf294c7dbedd323a (diff)
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 <dsterba@suse.com>
Diffstat (limited to 'cmds-inspect-dump-tree.c')
-rw-r--r--cmds-inspect-dump-tree.c3
1 files changed, 2 insertions, 1 deletions
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: