diff options
author | Hugo Mills <hugo@carfax.org.uk> | 2014-08-13 22:18:17 +0100 |
---|---|---|
committer | David Sterba <dsterba@suse.cz> | 2014-09-14 13:09:52 +0200 |
commit | 90a379a876192ad0aca1ee81332f055886f8a5e8 (patch) | |
tree | 5252cb658192642a4f260e5d97b12a4660be1be5 /cmds-subvolume.c | |
parent | 80d81228966f4b4ba4886f42f66818e198f454ab (diff) |
btrfs-progs: Add -R to list UUIDs of original received subvolume
When using send/receive, it it useful to be able to match up source
subvols on the send side (as, say, for -p or -c clone sources) with their
corresponding copies on the receive side. This patch adds a -R option to
btrfs sub list to show the received subvolume UUID on the receive side,
allowing the user to perform that matching correctly.
Signed-off-by: Hugo Mills <hugo@carfax.org.uk>
Signed-off-by: David Sterba <dsterba@suse.cz>
Diffstat (limited to 'cmds-subvolume.c')
-rw-r--r-- | cmds-subvolume.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/cmds-subvolume.c b/cmds-subvolume.c index dc41b843..45712ac0 100644 --- a/cmds-subvolume.c +++ b/cmds-subvolume.c @@ -372,6 +372,7 @@ static const char * const cmd_subvol_list_usage[] = { "-o print only subvolumes below specified path", "-u print the uuid of subvolumes (and snapshots)", "-q print the parent uuid of the snapshots", + "-R print the uuid of the received snapshots", "-t print the result as a table", "-s list snapshots only in the filesystem", "-r list readonly subvolumes (including snapshots)", @@ -414,7 +415,7 @@ static int cmd_subvol_list(int argc, char **argv) optind = 1; while(1) { c = getopt_long(argc, argv, - "acdgopqsurG:C:t", long_options, NULL); + "acdgopqsurRG:C:t", long_options, NULL); if (c < 0) break; @@ -455,6 +456,9 @@ static int cmd_subvol_list(int argc, char **argv) case 'q': btrfs_list_setup_print_column(BTRFS_LIST_PUUID); break; + case 'R': + btrfs_list_setup_print_column(BTRFS_LIST_RUUID); + break; case 'r': flags |= BTRFS_ROOT_SUBVOL_RDONLY; break; |