diff options
-rw-r--r-- | cmds-qgroup.c | 4 | ||||
-rw-r--r-- | qgroup.c | 2 |
2 files changed, 2 insertions, 4 deletions
diff --git a/cmds-qgroup.c b/cmds-qgroup.c index bc150772..59a5926b 100644 --- a/cmds-qgroup.c +++ b/cmds-qgroup.c @@ -296,7 +296,6 @@ static int cmd_qgroup_show(int argc, char **argv) char *path; int ret = 0; int fd; - int e; DIR *dirstream = NULL; u64 qgroupid; int filter_flag = 0; @@ -383,10 +382,9 @@ static int cmd_qgroup_show(int argc, char **argv) qgroupid); } ret = btrfs_show_qgroups(fd, filter_set, comparer_set); - e = errno; close_file_or_dir(fd, dirstream); if (ret < 0) - error("can't list qgroups: %s", strerror(e)); + error("can't list qgroups: %s", strerror(-ret)); out: return !!ret; @@ -1067,7 +1067,7 @@ static int __qgroups_search(int fd, struct qgroup_lookup *qgroup_lookup) if (ret < 0) { error("cannot perform the search: %s", strerror(errno)); - return ret; + return -errno; } /* the ioctl returns the number of item it found in nr_items */ if (sk->nr_items == 0) |