Thread (16 messages) flat view 16 messages, 4 authors, 2020-08-25
STALE2183d

[RFC PATCH 3/5] fs/proc: Introduce /proc/all/status

From: Eugene Lubarsky <hidden>
Date: 2020-08-10 14:59:40
Also in: linux-fsdevel, lkml
Subsystem: filesystems (vfs and infrastructure), proc filesystem, the rest · Maintainers: Alexander Viro, Christian Brauner, Linus Torvalds

Returns status lines for all visible processes in the existing format.

Signed-off-by: Eugene Lubarsky <redacted>
---
 fs/proc/base.c | 10 ++++++++++
 1 file changed, 10 insertions(+)
diff --git a/fs/proc/base.c b/fs/proc/base.c
index 8396a38ba7d2..5982fd43dd21 100644
--- a/fs/proc/base.c
+++ b/fs/proc/base.c
@@ -3897,6 +3897,14 @@ static int proc_all_statm(struct seq_file *m, void *v)
 }
 
 
+
+static int proc_all_status(struct seq_file *m, void *v)
+{
+	struct all_iter *iter = (struct all_iter *) v;
+
+	return proc_pid_status(m, iter->ns, iter->tgid_iter.task->thread_pid, iter->tgid_iter.task);
+}
+
 #define PROC_ALL_OPS(NAME) static const struct seq_operations proc_all_##NAME##_ops = { \
 	.start	= proc_all_start, \
 	.next	= proc_all_next, \
@@ -3906,6 +3914,7 @@ static int proc_all_statm(struct seq_file *m, void *v)
 
 PROC_ALL_OPS(stat);
 PROC_ALL_OPS(statm);
+PROC_ALL_OPS(status);
 
 #define PROC_ALL_CREATE(NAME) \
 	do { \
@@ -3922,4 +3931,5 @@ void __init proc_all_init(void)
 
 	PROC_ALL_CREATE(stat);
 	PROC_ALL_CREATE(statm);
+	PROC_ALL_CREATE(status);
 }
-- 
2.25.1
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help