[PATCH 3/4] btrfs-progs: add option c to show ogeneration

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This will also pair the 'C' filter.

Signed-off-by: David Sterba <dsterba@xxxxxxx>
---
 cmds-subvolume.c |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/cmds-subvolume.c b/cmds-subvolume.c
index a2dece6..7a0b49f 100644
--- a/cmds-subvolume.c
+++ b/cmds-subvolume.c
@@ -277,12 +277,13 @@ out:
  * - lowercase for enabling specific items in the output
  */
 static const char * const cmd_subvol_list_usage[] = {
-	"btrfs subvolume list [-agpurts] [-G [+|-]value] [-C [+|-]value] "
+	"btrfs subvolume list [-acgpurts] [-G [+|-]value] [-C [+|-]value] "
 	"[--sort=gen,ogen,rootid,path] <path>",
 	"List subvolumes (and snapshots)",
 	"",
 	"-p           print parent ID",
 	"-a           print all the subvolumes in the filesystem.",
+	"-c           print the ogeneration of the subvolume",
 	"-u           print the uuid of subvolumes (and snapshots)",
 	"-t           print the result as a table",
 	"-g           print the generation of the subvolume",
@@ -324,7 +325,7 @@ static int cmd_subvol_list(int argc, char **argv)
 	optind = 1;
 	while(1) {
 		c = getopt_long(argc, argv,
-				    "agpsurG:C:t", long_options, NULL);
+				    "acgpsurG:C:t", long_options, NULL);
 		if (c < 0)
 			break;
 
@@ -335,6 +336,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;
-- 
1.7.6.233.gd79bc

--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Filesystem Development]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux