summaryrefslogtreecommitdiff
path: root/btrfs-list.c
diff options
context:
space:
mode:
authorDavid Sterba <dsterba@suse.com>2016-10-31 10:59:08 +0100
committerDavid Sterba <dsterba@suse.com>2016-11-09 13:47:29 +0100
commitbcdb7058aad46c6e476d72991839065b2fcaa54d (patch)
tree1499448f760d16e544e9a783bb41d3828ff6de42 /btrfs-list.c
parent1fa9cc4991baf58422b3dc45a2c2d3303ea35af1 (diff)
btrfs-progs: use symbolic tree name when searching
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'btrfs-list.c')
-rw-r--r--btrfs-list.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/btrfs-list.c b/btrfs-list.c
index eb65110a..89769bc1 100644
--- a/btrfs-list.c
+++ b/btrfs-list.c
@@ -698,7 +698,7 @@ static u64 find_root_gen(int fd)
memset(&args, 0, sizeof(args));
- sk->tree_id = 1;
+ sk->tree_id = BTRFS_ROOT_TREE_OBJECTID;
/*
* there may be more than one ROOT_ITEM key if there are
@@ -916,7 +916,7 @@ int btrfs_list_get_default_subvolume(int fd, u64 *default_id)
* search for a dir item with a name 'default' in the tree of
* tree roots, it should point us to a default root
*/
- sk->tree_id = 1;
+ sk->tree_id = BTRFS_ROOT_TREE_OBJECTID;
/* don't worry about ancient format and request only one item */
sk->nr_items = 1;
@@ -980,8 +980,7 @@ static int list_subvol_search(int fd, struct root_lookup *root_lookup)
root_lookup_init(root_lookup);
memset(&args, 0, sizeof(args));
- /* search in the tree of tree roots */
- sk->tree_id = 1;
+ sk->tree_id = BTRFS_ROOT_TREE_OBJECTID;
/*
* set the min and max to backref keys. The search will