]> git.ipfire.org Git - thirdparty/util-linux.git/blobdiff - misc-utils/lsfd.h
autotools: add missing dist_noinst_DATA
[thirdparty/util-linux.git] / misc-utils / lsfd.h
index 123134559a9f02a98b2ddcc7e09ef7d23e18149e..1859dc746ffdd888ef3c1597946af5582cdcde3e 100644 (file)
 #include <dirent.h>
 #include <inttypes.h>
 
+#include "libsmartcols.h"
 #include "list.h"
+#include "nls.h"
 #include "path.h"
 #include "strutils.h"
+#include "xalloc.h"
 
 /*
  * column IDs
@@ -40,6 +43,13 @@ enum {
        COL_AINODECLASS,
        COL_ASSOC,
        COL_BLKDRV,
+       COL_BPF_MAP_ID,
+       COL_BPF_MAP_TYPE,
+       COL_BPF_MAP_TYPE_RAW,
+       COL_BPF_NAME,
+       COL_BPF_PROG_ID,
+       COL_BPF_PROG_TYPE,
+       COL_BPF_PROG_TYPE_RAW,
        COL_CHRDRV,
        COL_COMMAND,
        COL_DELETED,
@@ -82,6 +92,7 @@ enum {
        COL_PIDFD_PID,
        COL_PING_ID,
        COL_POS,
+       COL_PTMX_TTY_INDEX,
        COL_RAW_PROTOCOL,
        COL_RDEV,
        COL_SIGNALFD_MASK,
@@ -89,6 +100,7 @@ enum {
        COL_SOCK_LISTENING,
        COL_SOCK_NETNS,
        COL_SOCK_PROTONAME,
+       COL_SOCK_SHUTDOWN,
        COL_SOCK_STATE,
        COL_SOCK_TYPE,
        COL_SOURCE,
@@ -149,6 +161,7 @@ struct proc {
        struct list_head procs;
        struct list_head files;
        unsigned int kthread: 1;
+       struct list_head eventpolls;
 };
 
 struct proc *get_proc(pid_t pid);
@@ -171,6 +184,11 @@ struct file {
 
        unsigned int sys_flags;
        unsigned int mnt_id;
+
+       struct {
+               uint8_t read:1, write:1;
+       } locked;
+       uint8_t multiplexed;
 };
 
 #define is_opened_file(_f) ((_f)->association >= 0)
@@ -257,18 +275,6 @@ const char *get_miscdev(unsigned long minor);
 const char *get_nodev_filesystem(unsigned long minor);
 void add_nodev(unsigned long minor, const char *filesystem);
 
-static inline void xstrappend(char **a, const char *b)
-{
-       if (strappend(a, b) < 0)
-               err(XALLOC_EXIT_CODE, _("failed to allocate memory for string"));
-}
-
-static inline void xstrputc(char **a, char c)
-{
-       char b[] = {c, '\0'};
-       xstrappend(a, b);
-}
-
 /*
  * Net namespace
  */
@@ -281,4 +287,9 @@ bool is_nsfs_dev(dev_t dev);
 /* 0 is assumed as the major dev for DEV. */
 bool is_mqueue_dev(dev_t dev);
 
+/*
+ * Eventpoll
+ */
+bool is_multiplexed_by_eventpoll(int fd, struct list_head *eventpolls);
+
 #endif /* UTIL_LINUX_LSFD_H */