From: Jeff Smith Date: Wed, 22 Mar 2017 15:26:35 +0000 (-0500) Subject: pstree: add 'cgroup' to namespaces X-Git-Tag: v23.0~9^2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=4ad783865d72a7091965929cf7c55f0260bbae75;p=psmisc pstree: add 'cgroup' to namespaces The namespace 'cgroup' was added in Linux kernel 4.6 --- diff --git a/src/pstree.c b/src/pstree.c index 7574bd8..ad446e2 100644 --- a/src/pstree.c +++ b/src/pstree.c @@ -84,7 +84,8 @@ extern const char *__progname; #define THREAD_FORMAT "{%.*s}" /* Format for thread names */ enum ns_type { - IPCNS = 0, + CGROUPNS = 0, + IPCNS, MNTNS, NETNS, PIDNS, @@ -94,6 +95,7 @@ enum ns_type { }; static const char *ns_names[] = { + [CGROUPNS] = "cgroup", [IPCNS] = "ipc", [MNTNS] = "mnt", [NETNS] = "net", @@ -1096,7 +1098,8 @@ static void usage(void) " -l, --long don't truncate long lines\n" " -n, --numeric-sort sort output by PID\n" " -N type,\n" - " --ns-sort=type sort by namespace type (ipc, mnt, net, pid, user, uts)\n" + " --ns-sort=type sort by namespace type (cgroup, ipc, mnt, net, pid,\n" + " user, uts)\n" " -p, --show-pids show PIDs; implies -c\n" " -s, --show-parents show parents of the selected process\n" " -S, --ns-changes show namespace transitions\n"