]> git.ipfire.org Git - thirdparty/util-linux.git/commit
lsns: add nsfs column
authorMasatake YAMATO <yamato@redhat.com>
Fri, 24 Nov 2017 10:31:06 +0000 (19:31 +0900)
committerKarel Zak <kzak@redhat.com>
Mon, 27 Nov 2017 14:54:55 +0000 (15:54 +0100)
commit74d2056ae85f256ed35cbc55771887f5e28a6060
treeb7f5ec18a190ad70fce43af7a8a98aad54741592
parent5d075a7828f6be1bd4d186b4cdc51aaffd9d59a6
lsns: add nsfs column

nsfs provides kernel level interface for assigning
logical name to a namespace. Following message is quoted
from git log of linux kernel:

    commit 0226f4923f6c9b40cfa1c1c1b19a6ac6b3924ead
    Author: Al Viro <viro@zeniv.linux.org.uk>
    Date:   Tue Dec 6 12:21:54 2011 -0500

vfs: take /proc/*/mounts and friends to fs/proc_namespace.c

rationale: that stuff is far tighter bound to fs/namespace.c than to
the guts of procfs proper.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
/proc/self/mountinfo lists the logical names for namespaces:
  ...
  652 81 0:3 net:[4026532579] /tmp/XYZ rw shared:192 - nsfs nsfs rw,seclabel
  ...

In the lines /tmp/XYZ is a logical name for 4026532579 of net
namespace.

This patch adds nsfs column. It seems that the logical name is
used only in "ip netns" now. So the column is disabled by default.
Use '--type=net' or '-o NSFS' options to enable it.

This feature and the way to implementation using multi lines in a column
is Suggested by Karel Zak.

Signed-off-by: Masatake YAMATO <yamato@redhat.com>
sys-utils/Makemodule.am
sys-utils/lsns.c