]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
findmnt: add OPT-FIELDS column
authorKarel Zak <kzak@redhat.com>
Thu, 10 Jan 2013 13:58:05 +0000 (14:58 +0100)
committerKarel Zak <kzak@redhat.com>
Thu, 10 Jan 2013 13:58:05 +0000 (14:58 +0100)
Signed-off-by: Karel Zak <kzak@redhat.com>
misc-utils/findmnt.c

index adb213c244ab296b66ea979c1fabf76fe3651334..96f01778645ba7b1aad1ab0583b3fac81e720c8f 100644 (file)
@@ -80,6 +80,7 @@ enum {
        COL_USEPERC,
        COL_FSROOT,
        COL_TID,
+       COL_OPT_FIELDS,
 
        FINDMNT_NCOLUMNS
 };
@@ -122,6 +123,7 @@ static struct colinfo infos[FINDMNT_NCOLUMNS] = {
        [COL_USEPERC]      = { "USE%",            3, TT_FL_RIGHT, N_("filesystem use percentage") },
        [COL_FSROOT]       = { "FSROOT",       0.25, TT_FL_NOEXTREMES, N_("filesystem root") },
        [COL_TID]          = { "TID",             4, TT_FL_RIGHT, N_("task ID") },
+       [COL_OPT_FIELDS]   = { "OPT-FIELDS",   0.10, TT_FL_TRUNC, N_("optional mount fields") },
 };
 
 /* global flags */
@@ -438,6 +440,9 @@ static const char *get_data(struct libmnt_fs *fs, int num)
        case COL_FS_OPTIONS:
                str = mnt_fs_get_fs_options(fs);
                break;
+       case COL_OPT_FIELDS:
+               str = mnt_fs_get_optional_fields(fs);
+               break;
        case COL_UUID:
                str = get_tag(fs, "UUID");
                break;