[1/4] btrfs-progs: add -A option for subvolume list (print all available information)
diff mbox

Message ID 1443804083-876-2-git-send-email-axel@tty0.ch
State New
Headers show

Commit Message

Axel Burri Oct. 2, 2015, 4:41 p.m. UTC
Signed-off-by: Axel Burri <axel@tty0.ch>
---
 Documentation/btrfs-subvolume.asciidoc | 2 ++
 cmds-subvolume.c                       | 6 +++++-
 2 files changed, 7 insertions(+), 1 deletion(-)

Patch
diff mbox

diff --git a/Documentation/btrfs-subvolume.asciidoc b/Documentation/btrfs-subvolume.asciidoc
index c187fd8..afbec83 100644
--- a/Documentation/btrfs-subvolume.asciidoc
+++ b/Documentation/btrfs-subvolume.asciidoc
@@ -114,6 +114,8 @@  print the UUID of the subvolume.
 print the parent uuid of subvolumes (and snapshots).
 -R::::
 print the UUID of the sent subvolume, where the subvolume is the result of a receive operation
+-A::::
+print all available subvolume information.
 -t::::
 print the result as a table.
 -s::::
diff --git a/cmds-subvolume.c b/cmds-subvolume.c
index 82173c0..26a08f1 100644
--- a/cmds-subvolume.c
+++ b/cmds-subvolume.c
@@ -428,6 +428,7 @@  static const char * const cmd_subvol_list_usage[] = {
 	"-u           print the uuid of subvolumes (and snapshots)",
 	"-q           print the parent uuid of the snapshots",
 	"-R           print the uuid of the received snapshots",
+	"-A           print all available subvolume information",
 	"-t           print the result as a table",
 	"-s           list snapshots only in the filesystem",
 	"-r           list readonly subvolumes (including snapshots)",
@@ -471,7 +472,7 @@  static int cmd_subvol_list(int argc, char **argv)
 		};
 
 		c = getopt_long(argc, argv,
-				    "acdgopqsurRG:C:t", long_options, NULL);
+				    "acdgopqsurRAG:C:t", long_options, NULL);
 		if (c < 0)
 			break;
 
@@ -515,6 +516,9 @@  static int cmd_subvol_list(int argc, char **argv)
 		case 'R':
 			btrfs_list_setup_print_column(BTRFS_LIST_RUUID);
 			break;
+		case 'A':
+			btrfs_list_setup_print_column(BTRFS_LIST_ALL);
+			break;
 		case 'r':
 			flags |= BTRFS_ROOT_SUBVOL_RDONLY;
 			break;