mirror of
https://github.com/kdave/btrfs-progs
synced 2025-02-06 04:41:58 +00:00
btrfs-progs: qgroup show: report errors while parsing sort string
Print a better message when there are unknown problems while parsing the sort string. This currently is -ENOMEM and -1 on uknown format. This will be changed. Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
parent
6927db8ad9
commit
88ab0824a2
@ -341,8 +341,11 @@ static int cmd_qgroup_show(int argc, char **argv)
|
||||
case GETOPT_VAL_SORT:
|
||||
ret = btrfs_qgroup_parse_sort_string(optarg,
|
||||
&comparer_set);
|
||||
if (ret)
|
||||
usage(cmd_qgroup_show_usage);
|
||||
if (ret < 0) {
|
||||
errno = -ret;
|
||||
error("cannot parse sort string: %m");
|
||||
return 1;
|
||||
}
|
||||
break;
|
||||
case GETOPT_VAL_SYNC:
|
||||
sync = 1;
|
||||
|
Loading…
Reference in New Issue
Block a user