]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
losetup: improve backing-file column 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 column by no-extreme libsmartcols flag. It makes
output more compact if there is too long mount path.

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

index 29bb785ab0780ac6d4b894cf8b2837983cbc6555..82ecee75fab544cf29967385365598df514f0a2a 100644 (file)
@@ -70,7 +70,7 @@ struct colinfo {
 
 static struct colinfo infos[] = {
        [COL_AUTOCLR]     = { "AUTOCLEAR",    1, SCOLS_FL_RIGHT, N_("autoclear flag set"), SCOLS_JSON_BOOLEAN},
-       [COL_BACK_FILE]   = { "BACK-FILE",  0.3, 0, N_("device backing file")},
+       [COL_BACK_FILE]   = { "BACK-FILE",  0.3, SCOLS_FL_NOEXTREMES, N_("device backing file")},
        [COL_BACK_INO]    = { "BACK-INO",     4, SCOLS_FL_RIGHT, N_("backing file inode number"), SCOLS_JSON_NUMBER},
        [COL_BACK_MAJMIN] = { "BACK-MAJ:MIN", 6, 0, N_("backing file major:minor device number")},
        [COL_NAME]        = { "NAME",      0.25, 0, N_("loop device name")},