]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
lsns: support cgroup namespaces
authorMichał Bartoszkiewicz <mbartoszkiewicz@gmail.com>
Mon, 15 Aug 2016 10:22:30 +0000 (12:22 +0200)
committerKarel Zak <kzak@redhat.com>
Tue, 16 Aug 2016 11:36:12 +0000 (13:36 +0200)
Signed-off-by: Michał Bartoszkiewicz <mbartoszkiewicz@gmail.com>
sys-utils/lsns.8
sys-utils/lsns.c

index 9fe22f18966bf09821f54ad186ec9eee3198608d..7ea1cb357133d18a781eb0626552248a06236ec0 100644 (file)
@@ -54,8 +54,8 @@ Use the raw output format.
 .TP
 .BR \-t , " \-\-type " \fItype\fP
 Display the specified \fItype\fP of namespaces only.  The supported types are
-\fBmnt\fP, \fBnet\fP, \fBipc\fP, \fBuser\fP, \fBpid\fP and \fButs\fP.  This
-option may be given more than once.
+\fBmnt\fP, \fBnet\fP, \fBipc\fP, \fBuser\fP, \fBpid\fP, \fButs\fP and
+\fBcgroup\fP.  This option may be given more than once.
 .TP
 .BR \-u , " \-\-notruncate"
 Do not truncate text in columns.
index 75c04f8f8e110d794a1315d1236f381312c9c076..278598af4252ae0635ec71d87bf82858add6391e 100644 (file)
@@ -100,7 +100,8 @@ enum {
        LSNS_ID_PID,
        LSNS_ID_UTS,
        LSNS_ID_IPC,
-       LSNS_ID_USER
+       LSNS_ID_USER,
+       LSNS_ID_CGROUP
 };
 
 static char *ns_names[] = {
@@ -109,7 +110,8 @@ static char *ns_names[] = {
        [LSNS_ID_PID] = "pid",
        [LSNS_ID_UTS] = "uts",
        [LSNS_ID_IPC] = "ipc",
-       [LSNS_ID_USER] = "user"
+       [LSNS_ID_USER] = "user",
+       [LSNS_ID_CGROUP] = "cgroup"
 };
 
 struct lsns_namespace {
@@ -599,7 +601,7 @@ static void __attribute__ ((__noreturn__)) usage(FILE * out)
        fputs(_(" -p, --task <pid>       print process namespaces\n"), out);
        fputs(_(" -r, --raw              use the raw output format\n"), out);
        fputs(_(" -u, --notruncate       don't truncate text in columns\n"), out);
-       fputs(_(" -t, --type <name>      namespace type (mnt, net, ipc, user, pid, uts)\n"), out);
+       fputs(_(" -t, --type <name>      namespace type (mnt, net, ipc, user, pid, uts, cgroup)\n"), out);
 
        fputs(USAGE_SEPARATOR, out);
        fputs(USAGE_HELP, out);