btrfs-progs: tests:mkfs/010: Output minimal device size
[platform/upstream/btrfs-progs.git] / cmds-qgroup.c
index 9b245b0..d07bb0c 100644 (file)
@@ -26,6 +26,7 @@
 #include "commands.h"
 #include "qgroup.h"
 #include "utils.h"
+#include "help.h"
 
 static const char * const qgroup_cmd_group_usage[] = {
        "btrfs qgroup <command> [options] <path>",
@@ -375,12 +376,9 @@ static int cmd_qgroup_show(int argc, char **argv)
 
        if (sync) {
                ret = ioctl(fd, BTRFS_IOC_SYNC);
-               if (ret < 0) {
-                       error("sync ioctl failed on '%s': %s", path,
+               if (ret < 0)
+                       warning("sync ioctl failed on '%s': %s", path,
                              strerror(errno));
-                       close_file_or_dir(fd, dirstream);
-                       goto out;
-               }
        }
 
        if (filter_flag) {
@@ -401,10 +399,6 @@ static int cmd_qgroup_show(int argc, char **argv)
                                        qgroupid);
        }
        ret = btrfs_show_qgroups(fd, filter_set, comparer_set);
-       if (ret == -ENOENT)
-               error("can't list qgroups: quotas not enabled");
-       else if (ret < 0)
-               error("can't list qgroups: %s", strerror(-ret));
        close_file_or_dir(fd, dirstream);
 
 out: