Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f6931b82 authored by Neeraj Upadhyay's avatar Neeraj Upadhyay
Browse files

procfs: Update order of Ngid in /proc/PID/status



Addition of Ngid breaks some third party applications, which
are dependent on a particular order of fields. This change
moves the field to the end, to fix this issue.

Change-Id: Ifdc781aca49dcb535d5fa5005b85dc87604560dc
Signed-off-by: default avatarNeeraj Upadhyay <neeraju@codeaurora.org>
parent d3068532
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -174,15 +174,14 @@ static inline void task_state(struct seq_file *m, struct pid_namespace *ns,
	seq_printf(m,
		"State:\t%s\n"
		"Tgid:\t%d\n"
		"Ngid:\t%d\n"
		"Pid:\t%d\n"
		"PPid:\t%d\n"
		"TracerPid:\t%d\n"
		"Uid:\t%d\t%d\t%d\t%d\n"
		"Gid:\t%d\t%d\t%d\t%d\n",
		"Gid:\t%d\t%d\t%d\t%d\n"
		"Ngid:\t%d\n",
		get_task_state(p),
		task_tgid_nr_ns(p, ns),
		task_numa_group_id(p),
		pid_nr_ns(pid, ns),
		ppid, tpid,
		from_kuid_munged(user_ns, cred->uid),
@@ -192,7 +191,8 @@ static inline void task_state(struct seq_file *m, struct pid_namespace *ns,
		from_kgid_munged(user_ns, cred->gid),
		from_kgid_munged(user_ns, cred->egid),
		from_kgid_munged(user_ns, cred->sgid),
		from_kgid_munged(user_ns, cred->fsgid));
		from_kgid_munged(user_ns, cred->fsgid),
		task_numa_group_id(p));

	task_lock(p);
	if (p->files)