]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
lsblk: improve mountpoint columns formatting
authorKarel Zak <kzak@redhat.com>
Wed, 12 Oct 2022 07:43:17 +0000 (09:43 +0200)
committerKarel Zak <kzak@redhat.com>
Tue, 25 Oct 2022 09:11:06 +0000 (11:11 +0200)
Let's mark the columns by no-extreme libsmartcols flag. It makes
output more compact if there are too long mount paths.

Signed-off-by: Karel Zak <kzak@redhat.com>
misc-utils/lsblk.c

index 655463e41878c94d698fd74a6d8315f59d862f3c..ea06afcd1092940e67b10ba29a708e053d94589b 100644 (file)
@@ -221,8 +221,8 @@ static struct colinfo infos[] = {
        [COL_START] = { "START", 5, SCOLS_FL_RIGHT, N_("partition start offset"), COLTYPE_NUM },
        [COL_STATE] = { "STATE", 7, SCOLS_FL_TRUNC, N_("state of the device") },
        [COL_SUBSYS] = { "SUBSYSTEMS", 0.1, SCOLS_FL_NOEXTREMES, N_("de-duplicated chain of subsystems") },
-       [COL_TARGETS] = { "MOUNTPOINTS", 0.10, SCOLS_FL_WRAP,  N_("all locations where device is mounted") },
-       [COL_TARGET] = { "MOUNTPOINT", 0.10, SCOLS_FL_TRUNC, N_("where the device is mounted") },
+       [COL_TARGETS] = { "MOUNTPOINTS", 0.10, SCOLS_FL_WRAP | SCOLS_FL_NOEXTREMES,  N_("all locations where device is mounted") },
+       [COL_TARGET] = { "MOUNTPOINT", 0.10, SCOLS_FL_TRUNC | SCOLS_FL_NOEXTREMES, N_("where the device is mounted") },
        [COL_TRANSPORT] = { "TRAN", 6, 0, N_("device transport type") },
        [COL_TYPE] = { "TYPE", 4, 0, N_("device type") },
        [COL_UUID] = { "UUID", 36,  0, N_("filesystem UUID") },