summaryrefslogtreecommitdiff
path: root/qgroup.c
diff options
context:
space:
mode:
authorDavid Sterba <dsterba@suse.com>2017-01-20 17:52:12 +0100
committerDavid Sterba <dsterba@suse.com>2017-01-25 09:47:58 +0100
commit7610cbf729003952f76fddf67439fc0499139ff6 (patch)
treed28c069c62fecb61fb79ad0fc01fc8420e2b45ec /qgroup.c
parent4415ff6bcc3fbbe6f9c043fadc19989d772da835 (diff)
btrfs-progs: qgroup show: refine error messages
When qgroup show is called on a filesystem that does not have quotas enabled, the error message is very unclear: ERROR: can't perform the search - No such file or directory ERROR: can't list qgroups: No such file or director Remove the error from low level helper and let the command handler decide what to print. Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'qgroup.c')
-rw-r--r--qgroup.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/qgroup.c b/qgroup.c
index 21526cec..fffdbb12 100644
--- a/qgroup.c
+++ b/qgroup.c
@@ -1064,11 +1064,9 @@ static int __qgroups_search(int fd, struct qgroup_lookup *qgroup_lookup)
while (1) {
ret = ioctl(fd, BTRFS_IOC_TREE_SEARCH, &args);
- if (ret < 0) {
- error("cannot perform the search: %s",
- strerror(errno));
+ if (ret < 0)
return -errno;
- }
+
/* the ioctl returns the number of item it found in nr_items */
if (sk->nr_items == 0)
break;