diff options
| author | Karel Zak <kzak@redhat.com> | 2019-11-12 13:55:55 +0100 |
|---|---|---|
| committer | Karel Zak <kzak@redhat.com> | 2019-11-12 13:55:55 +0100 |
| commit | 9cca1ef2d5283a461c3a6d9aa1a036bb4ada6e70 (patch) | |
| tree | 96c89ef4dd35cc9f1cfdffa73f8e8fc303b94f61 /misc-utils/lsblk.c | |
| parent | 4e666fcedaa6a4e5916af75a9e892dfb0cc757f7 (diff) | |
| download | util-linux-9cca1ef2d5283a461c3a6d9aa1a036bb4ada6e70.tar.gz | |
lsblk: add FSVER (filesystem version) column
Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=1764523
Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'misc-utils/lsblk.c')
| -rw-r--r-- | misc-utils/lsblk.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/misc-utils/lsblk.c b/misc-utils/lsblk.c index 1693b9af73..1ae0e28183 100644 --- a/misc-utils/lsblk.c +++ b/misc-utils/lsblk.c @@ -72,6 +72,7 @@ enum { COL_FSTYPE, COL_FSUSED, COL_FSUSEPERC, + COL_FSVERSION, COL_TARGET, COL_LABEL, COL_UUID, @@ -158,6 +159,7 @@ static struct colinfo infos[] = { [COL_FSTYPE] = { "FSTYPE", 0.1, SCOLS_FL_TRUNC, N_("filesystem type") }, [COL_FSUSED] = { "FSUSED", 5, SCOLS_FL_RIGHT, N_("filesystem size used") }, [COL_FSUSEPERC] = { "FSUSE%", 3, SCOLS_FL_RIGHT, N_("filesystem use percentage") }, + [COL_FSVERSION] = { "FSVER", 0.1, SCOLS_FL_TRUNC, N_("filesystem version") }, [COL_TARGET] = { "MOUNTPOINT", 0.10, SCOLS_FL_TRUNC, N_("where the device is mounted") }, [COL_LABEL] = { "LABEL", 0.1, 0, N_("filesystem LABEL") }, @@ -785,6 +787,11 @@ static char *device_get_data( case COL_FSUSEPERC: str = get_vfs_attribute(dev, id); break; + case COL_FSVERSION: + prop = lsblk_device_get_properties(dev); + if (prop && prop->fsversion) + str = xstrdup(prop->fsversion); + break; case COL_TARGET: { char *s = lsblk_device_get_mountpoint(dev); |
