btrfs-progs: subvol list: better error message if subvol insertion fails

Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
David Sterba 2016-10-31 12:53:35 +01:00
parent fc82ce45dc
commit eb28e2fcae

View File

@ -504,9 +504,9 @@ static int add_root(struct root_lookup *root_lookup,
memcpy(&ri->ruuid, ruuid, BTRFS_UUID_SIZE); memcpy(&ri->ruuid, ruuid, BTRFS_UUID_SIZE);
ret = root_tree_insert(root_lookup, ri); ret = root_tree_insert(root_lookup, ri);
if (ret) { if (ret < 0) {
error("failed to insert tree %llu", error("failed to insert subvolume %llu to tree: %s",
(unsigned long long)root_id); (unsigned long long)root_id, strerror(-ret));
exit(1); exit(1);
} }
return 0; return 0;