diff options
author | David Sterba <dsterba@suse.cz> | 2012-10-09 18:27:52 +0200 |
---|---|---|
committer | David Sterba <dsterba@suse.cz> | 2013-02-01 17:02:27 +0100 |
commit | bd82f40c7343ff6b2df06b8a36aea97b76352d69 (patch) | |
tree | 025a4a4cd1c6fe5845c02cd8eba1be17e263b070 | |
parent | d9a085ba83b5a0cad19f915cf4f9d6d9840136d8 (diff) |
btrfs-progs: upcase filter options
Rename filter options in 'subvol list' subcommand, that way we can
distinguish them from the options that just show some option in the
output and can have a matching uppercase filter.
Signed-off-by: David Sterba <dsterba@suse.cz>
-rw-r--r-- | cmds-subvolume.c | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/cmds-subvolume.c b/cmds-subvolume.c index 9f78c0e7..0a01cbef 100644 --- a/cmds-subvolume.c +++ b/cmds-subvolume.c @@ -273,8 +273,13 @@ out: return ret; } +/* + * Naming of options: + * - uppercase for filters and sort options + * - lowercase for enabling specific items in the output + */ static const char * const cmd_subvol_list_usage[] = { - "btrfs subvolume list [-aopurts] [-g [+|-]value] [-c [+|-]value] " + "btrfs subvolume list [-aopurts] [-G [+|-]value] [-C [+|-]value] " "[--sort=gen,ogen,rootid,path] <path>", "List subvolumes (and snapshots)", "", @@ -288,10 +293,10 @@ static const char * const cmd_subvol_list_usage[] = { "-t print the result as a table", "-s list snapshots only in the filesystem", "-r list readonly subvolumes (including snapshots)", - "-g [+|-]value", + "-G [+|-]value", " filter the subvolumes by generation", " (+value: >= value; -value: <= value; value: = value)", - "-c [+|-]value", + "-C [+|-]value", " filter the subvolumes by ogeneration", " (+value: >= value; -value: <= value; value: = value)", "--sort=gen,ogen,rootid,path", @@ -325,7 +330,7 @@ static int cmd_subvol_list(int argc, char **argv) optind = 1; while(1) { c = getopt_long(argc, argv, - "aopqsurg:c:t", long_options, NULL); + "aopqsurG:C:t", long_options, NULL); if (c < 0) break; @@ -358,7 +363,7 @@ static int cmd_subvol_list(int argc, char **argv) case 'r': flags |= BTRFS_ROOT_SUBVOL_RDONLY; break; - case 'g': + case 'G': btrfs_list_setup_print_column(BTRFS_LIST_GENERATION); ret = btrfs_list_parse_filter_string(optarg, &filter_set, @@ -369,7 +374,7 @@ static int cmd_subvol_list(int argc, char **argv) } break; - case 'c': + case 'C': btrfs_list_setup_print_column(BTRFS_LIST_OGENERATION); ret = btrfs_list_parse_filter_string(optarg, &filter_set, |