]> git.ipfire.org Git - thirdparty/util-linux.git/blobdiff - misc-utils/lsfd.c
Merge branch 'lsfd--xmode' of https://github.com/masatake/util-linux
[thirdparty/util-linux.git] / misc-utils / lsfd.c
index 2a88c5ec6d6761cc0049e6923b29bf7494af43ad..f423fbbddf67d384266c48ded40f065e2512d634 100644 (file)
@@ -145,13 +145,13 @@ static const struct colinfo infos[] = {
                                   0,   SCOLS_FL_RIGHT, SCOLS_JSON_STRING,
                                   N_("device type (blk, char, or nodev)") },
        [COL_ENDPOINTS]        = { "ENDPOINTS",
-                                  0,   SCOLS_FL_WRAP,  SCOLS_JSON_STRING,
+                                  0,   SCOLS_FL_WRAP,  SCOLS_JSON_ARRAY_STRING,
                                   N_("IPC endpoints information communicated with the fd") },
        [COL_EVENTFD_ID]       = {"EVENTFD.ID",
                                   0,   SCOLS_FL_RIGHT, SCOLS_JSON_NUMBER,
                                   N_("eventfd ID") },
        [COL_EVENTPOLL_TFDS]   = {"EVENTPOLL.TFDS",
-                                  0,   SCOLS_FL_WRAP,  SCOLS_JSON_STRING,
+                                  0,   SCOLS_FL_WRAP,  SCOLS_JSON_ARRAY_NUMBER,
                                   N_("file descriptors targeted by the eventpoll file") },
        [COL_FD]               = { "FD",
                                   0,   SCOLS_FL_RIGHT, SCOLS_JSON_NUMBER,
@@ -178,10 +178,10 @@ static const struct colinfo infos[] = {
                                   0,   SCOLS_FL_RIGHT, SCOLS_JSON_NUMBER,
                                   N_("inode number") },
        [COL_INOTIFY_INODES]   = { "INOTIFY.INODES",
-                                  0,   SCOLS_FL_WRAP,  SCOLS_JSON_STRING,
+                                  0,   SCOLS_FL_WRAP,  SCOLS_JSON_ARRAY_STRING,
                                   N_("list of monitoring inodes (cooked)") },
        [COL_INOTIFY_INODES_RAW]={ "INOTIFY.INODES.RAW",
-                                  0,   SCOLS_FL_WRAP,  SCOLS_JSON_STRING,
+                                  0,   SCOLS_FL_WRAP,  SCOLS_JSON_ARRAY_STRING,
                                   N_("list of monitoring inodes (raw, don't decode devices)") },
        [COL_KNAME]            = { "KNAME",
                                   0.4, SCOLS_FL_TRUNC, SCOLS_JSON_STRING,
@@ -312,6 +312,9 @@ static const struct colinfo infos[] = {
        [COL_TIMERFD_REMAINING]= { "TIMERFD.REMAINING",
                                   0,   SCOLS_FL_RIGHT, SCOLS_JSON_NUMBER,
                                   N_("remaining time") },
+       [COL_TUN_IFACE]        = { "TUN.IFACE",
+                                  0,   SCOLS_FL_RIGHT, SCOLS_JSON_STRING,
+                                  N_("network interface behind the tun device") },
        [COL_TYPE]             = { "TYPE",
                                   0,   SCOLS_FL_RIGHT, SCOLS_JSON_STRING,
                                   N_("file type (cooked)") },
@@ -1606,6 +1609,8 @@ static void __attribute__((__noreturn__)) usage(void)
        for (i = 0; i < ARRAY_SIZE(infos); i++)
                fprintf(out, " %16s  %-10s%s\n", infos[i].name,
                        infos[i].json_type == SCOLS_JSON_STRING?  "<string>":
+                       infos[i].json_type == SCOLS_JSON_ARRAY_STRING?  "<string>":
+                       infos[i].json_type == SCOLS_JSON_ARRAY_NUMBER?  "<string>":
                        infos[i].json_type == SCOLS_JSON_NUMBER?  "<number>":
                        "<boolean>",
                        _(infos[i].help));