linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Sterba <dsterba@suse.cz>
To: linux-btrfs@vger.kernel.org
Cc: David Sterba <dsterba@suse.cz>
Subject: [PATCH 3/4] btrfs-progs: add option c to show ogeneration
Date: Tue,  9 Oct 2012 18:27:54 +0200	[thread overview]
Message-ID: <1349800075-4888-3-git-send-email-dsterba@suse.cz> (raw)
In-Reply-To: <1349800075-4888-1-git-send-email-dsterba@suse.cz>

This will also pair the 'C' filter.

Signed-off-by: David Sterba <dsterba@suse.cz>
---
 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


  parent reply	other threads:[~2012-10-09 16:27 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-10-09 16:27 [PATCH 1/4] btrfs-progs: upcase filter options David Sterba
2012-10-09 16:27 ` [PATCH 2/4] btrfs-progs: add option g to show generation, do not show it by default David Sterba
2012-10-09 16:27 ` David Sterba [this message]
2012-10-09 16:27 ` [PATCH 4/4] btrfs-progs: update man pages of subvol list David Sterba

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1349800075-4888-3-git-send-email-dsterba@suse.cz \
    --to=dsterba@suse.cz \
    --cc=linux-btrfs@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).