]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
lsfd: give column widths
authorMasatake YAMATO <yamato@redhat.com>
Mon, 3 May 2021 06:47:02 +0000 (15:47 +0900)
committerKarel Zak <kzak@redhat.com>
Wed, 6 Oct 2021 09:01:53 +0000 (11:01 +0200)
Signed-off-by: Masatake YAMATO <yamato@redhat.com>
misc-utils/lsfd.c

index 3bae21f7d5d86e9157ffe393a1d68e85337613c9..b245113cd38cd078cd01c82af699985565fd1658 100644 (file)
@@ -78,7 +78,7 @@ struct colinfo {
 static struct colinfo infos[] = {
        [COL_ASSOC]   = { "ASSOC",    0, SCOLS_FL_RIGHT, SCOLS_JSON_STRING,
                N_("association between file and process") },
-       [COL_COMMAND] = { "COMMAND",  0, 0,              SCOLS_JSON_STRING,
+       [COL_COMMAND] = { "COMMAND", 15, 0,              SCOLS_JSON_STRING,
                N_("command of the process opening the file") },
        [COL_DEV]     = { "DEV",      0, SCOLS_FL_RIGHT, SCOLS_JSON_STRING,
                N_("ID of device containing file") },
@@ -88,9 +88,9 @@ static struct colinfo infos[] = {
                N_("file descriptor for the file") },
        [COL_INODE]   = { "INODE",    0, SCOLS_FL_RIGHT, SCOLS_JSON_NUMBER,
                N_("inode number") },
-       [COL_NAME]    = { "NAME",     0, 0,              SCOLS_JSON_STRING,
+       [COL_NAME]    = { "NAME",    45, 0,              SCOLS_JSON_STRING,
                N_("name of the file") },
-       [COL_PID]     = { "PID",      0, SCOLS_FL_RIGHT, SCOLS_JSON_NUMBER,
+       [COL_PID]     = { "PID",      5, SCOLS_FL_RIGHT, SCOLS_JSON_NUMBER,
                N_("PID of the process opening the file") },
        [COL_RDEV]    = { "RDEV",     0, SCOLS_FL_RIGHT, SCOLS_JSON_STRING,
                N_("device ID (if special file)") },