summaryrefslogtreecommitdiff
path: root/cmds-qgroup.c
diff options
context:
space:
mode:
authorOmar Sandoval <osandov@fb.com>2018-01-21 00:24:50 -0800
committerDavid Sterba <dsterba@suse.com>2018-03-06 11:28:38 +0100
commitf0a376df4733dc6f0f0cdc529f4e7df64806f3f6 (patch)
tree6645ab539231cdda40e772d5b14ada360fed278d /cmds-qgroup.c
parentbbf7acbef09c6f35ab276e5c7a9e20a212a02308 (diff)
btrfs-progs: replace test_issubvolume() with btrfs_util_is_subvolume()
This gets the remaining occurrences that weren't covered by previous conversions. Signed-off-by: Omar Sandoval <osandov@fb.com> [ fixup test_issubvolume due to removed dependency patch ] Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'cmds-qgroup.c')
-rw-r--r--cmds-qgroup.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/cmds-qgroup.c b/cmds-qgroup.c
index 2499a280..93206900 100644
--- a/cmds-qgroup.c
+++ b/cmds-qgroup.c
@@ -427,6 +427,7 @@ static int cmd_qgroup_limit(int argc, char **argv)
int compressed = 0;
int exclusive = 0;
DIR *dirstream = NULL;
+ enum btrfs_util_error err;
while (1) {
int c = getopt(argc, argv, "ce");
@@ -467,13 +468,9 @@ static int cmd_qgroup_limit(int argc, char **argv)
if (argc - optind == 2) {
args.qgroupid = 0;
path = argv[optind + 1];
- ret = test_issubvolume(path);
- if (ret < 0) {
- error("cannot access '%s': %s", path, strerror(-ret));
- return 1;
- }
- if (!ret) {
- error("'%s' is not a subvolume", path);
+ err = btrfs_util_is_subvolume(path);
+ if (err) {
+ error_btrfs_util(err);
return 1;
}
/*