diff options
author | David Sterba <dsterba@suse.com> | 2016-10-31 12:53:35 +0100 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2016-11-09 13:47:29 +0100 |
commit | eb28e2fcaebb304db06c9d6c873b722f3324cdef (patch) | |
tree | e2aebd069c7dec04073ffe720664fd705be6f6ff /btrfs-list.c | |
parent | fc82ce45dc09b46c32af439c7d0f4ad2ecca0f1a (diff) |
btrfs-progs: subvol list: better error message if subvol insertion fails
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'btrfs-list.c')
-rw-r--r-- | btrfs-list.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/btrfs-list.c b/btrfs-list.c index f793d285..8f207b6f 100644 --- a/btrfs-list.c +++ b/btrfs-list.c @@ -504,9 +504,9 @@ static int add_root(struct root_lookup *root_lookup, memcpy(&ri->ruuid, ruuid, BTRFS_UUID_SIZE); ret = root_tree_insert(root_lookup, ri); - if (ret) { - error("failed to insert tree %llu", - (unsigned long long)root_id); + if (ret < 0) { + error("failed to insert subvolume %llu to tree: %s", + (unsigned long long)root_id, strerror(-ret)); exit(1); } return 0; |