#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
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,
COL_PIDFD_PID,
COL_PING_ID,
COL_POS,
+ COL_PTMX_TTY_INDEX,
COL_RAW_PROTOCOL,
COL_RDEV,
COL_SIGNALFD_MASK,
COL_SOCK_LISTENING,
COL_SOCK_NETNS,
COL_SOCK_PROTONAME,
+ COL_SOCK_SHUTDOWN,
COL_SOCK_STATE,
COL_SOCK_TYPE,
COL_SOURCE,
struct list_head procs;
struct list_head files;
unsigned int kthread: 1;
+ struct list_head eventpolls;
};
struct proc *get_proc(pid_t pid);
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)
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
*/
/* 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 */