diff options
author | Wang Shilong <wangsl-fnst@cn.fujistu.com> | 2012-09-28 01:33:01 +0800 |
---|---|---|
committer | root <root@localhost.localdomain> | 2012-10-04 16:26:33 -0400 |
commit | e86f7198d97a85d3b56ea4053e8fb275f620a8ec (patch) | |
tree | abd172f288be40a92e609f862183813f79c4eec7 /cmds-subvolume.c | |
parent | 8e8e019e910f20947fea7eff5da40753639d8870 (diff) |
Btrfs-Progs: update '-s' option without a argument.
Since '--sort' options was given ,and we can list snapshots in generation
order by --sort=+/-gen to replace '-s [0|1]' totally.
Signed-off-by: Wang Shilong <wangsl-fnst@cn.fujistsu.com>
Diffstat (limited to 'cmds-subvolume.c')
-rw-r--r-- | cmds-subvolume.c | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/cmds-subvolume.c b/cmds-subvolume.c index 3b4edb63..58e89830 100644 --- a/cmds-subvolume.c +++ b/cmds-subvolume.c @@ -260,7 +260,7 @@ static int cmd_subvol_delete(int argc, char **argv) } static const char * const cmd_subvol_list_usage[] = { - "btrfs subvolume list [-apurt] [-s 0|1] [-g [+|-]value] [-c [+|-]value] " + "btrfs subvolume list [-apurts] [-g [+|-]value] [-c [+|-]value] " "[--sort=gen,ogen,rootid,path] <path>", "List subvolumes (and snapshots)", "", @@ -268,8 +268,7 @@ static const char * const cmd_subvol_list_usage[] = { "-a print all the subvolumes in the filesystem.", "-u print the uuid of subvolumes (and snapshots)", "-t print the result as a table", - "-s value list snapshots with generation in ascending/descending order", - " (1: ascending, 0: descending)", + "-s list snapshots only in the filesystem", "-r list readonly subvolumes (including snapshots)", "-g [+|-]value", " filter the subvolumes by generation", @@ -292,7 +291,6 @@ static int cmd_subvol_list(int argc, char **argv) int fd; u64 top_id; int ret; - int order; int c; char *subvol; int is_tab_result = 0; @@ -308,7 +306,7 @@ static int cmd_subvol_list(int argc, char **argv) optind = 1; while(1) { c = getopt_long(argc, argv, - "aps:urg:c:t", long_options, NULL); + "apsurg:c:t", long_options, NULL); if (c < 0) break; @@ -323,13 +321,9 @@ static int cmd_subvol_list(int argc, char **argv) is_tab_result = 1; break; case 's': - order = atoi(optarg); btrfs_list_setup_filter(&filter_set, BTRFS_LIST_FILTER_SNAPSHOT_ONLY, 0); - btrfs_list_setup_comparer(&comparer_set, - BTRFS_LIST_COMP_OGEN, - !order); btrfs_list_setup_print_column(BTRFS_LIST_OGENERATION); btrfs_list_setup_print_column(BTRFS_LIST_OTIME); |