Btrfs-progs: add subvol flags to print
authorAnand Jain <anand.jain@oracle.com>
Fri, 1 Feb 2013 07:56:32 +0000 (15:56 +0800)
committerDavid Sterba <dsterba@suse.cz>
Fri, 1 Feb 2013 15:55:06 +0000 (16:55 +0100)
This patch adds the flags row which as of now will show if the
subvol/snapshot is readonly.

Signed-off-by: Anand Jain <anand.jain@oracle.com>
cmds-subvolume.c

index c1ccc7a..9f78c0e 100644 (file)
@@ -874,6 +874,11 @@ static int cmd_subvol_show(int argc, char **argv)
        printf("\tParent: \t\t%llu\n", get_ri.ref_tree);
        printf("\tTop Level: \t\t%llu\n", get_ri.top_id);
 
+       if (get_ri.flags & BTRFS_ROOT_SUBVOL_RDONLY)
+               printf("\tFlags: \t\t\treadonly\n");
+       else
+               printf("\tFlags: \t\t\t-\n");
+
        /* print the snapshots of the given subvol if any*/
        printf("\tSnapshot(s):\n");
        filter_set = btrfs_list_alloc_filter_set();