summaryrefslogtreecommitdiff
path: root/cmds-subvolume.c
diff options
context:
space:
mode:
authorDavid Sterba <dsterba@suse.cz>2013-02-01 17:19:49 +0100
committerDavid Sterba <dsterba@suse.cz>2013-02-01 17:19:49 +0100
commit58cc1ef8dfa5604faa8745310d9a59a903832017 (patch)
tree0531be242abca93fbebc35a0823c0a9c6df8750c /cmds-subvolume.c
parentf7fef0d2422e5da13409b13e65ed1a1e6aa0ef97 (diff)
btrfs-progs: add option c to show ogeneration
This will also pair the 'C' filter. Signed-off-by: David Sterba <dsterba@suse.cz>
Diffstat (limited to 'cmds-subvolume.c')
-rw-r--r--cmds-subvolume.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/cmds-subvolume.c b/cmds-subvolume.c
index f2744e83..f8ed2ffd 100644
--- a/cmds-subvolume.c
+++ b/cmds-subvolume.c
@@ -287,6 +287,7 @@ static const char * const cmd_subvol_list_usage[] = {
"-a print all the subvolumes in the filesystem and",
" distinguish absolute and relative path with respect",
" to the given <path>",
+ "-c print the ogeneration of the subvolume",
"-g print the generation of the subvolume",
"-o print only subvolumes bellow specified path",
"-u print the uuid of subvolumes (and snapshots)",
@@ -331,7 +332,7 @@ static int cmd_subvol_list(int argc, char **argv)
optind = 1;
while(1) {
c = getopt_long(argc, argv,
- "agopqsurG:C:t", long_options, NULL);
+ "acgopqsurG:C:t", long_options, NULL);
if (c < 0)
break;
@@ -342,6 +343,9 @@ static int cmd_subvol_list(int argc, char **argv)
case 'a':
is_list_all = 1;
break;
+ case 'c':
+ btrfs_list_setup_print_column(BTRFS_LIST_OGENERATION);
+ break;
case 'g':
btrfs_list_setup_print_column(BTRFS_LIST_GENERATION);
break;