summaryrefslogtreecommitdiffstats
path: root/misc-utils/findmnt.8
diff options
context:
space:
mode:
authorKarel Zak2015-03-10 12:51:44 +0100
committerKarel Zak2015-03-10 12:51:44 +0100
commitcd41b385a06dde70bb45c3143d3459157bda58f8 (patch)
tree5c5d6bbdf9d16353dea99a06cd090f3f94cce622 /misc-utils/findmnt.8
parentlogger: check for ntp_gettime() rather than for timex.h (diff)
downloadkernel-qcow2-util-linux-cd41b385a06dde70bb45c3143d3459157bda58f8.tar.gz
kernel-qcow2-util-linux-cd41b385a06dde70bb45c3143d3459157bda58f8.tar.xz
kernel-qcow2-util-linux-cd41b385a06dde70bb45c3143d3459157bda58f8.zip
findmnt: don't rely on st_dev for --target
The overlay filesystem does not provide usable st_dev (in traditional UNIX way). It's necessary to search in /proc/self/mountinfo to detect which path element is mountpoint. $ findmnt --target /mnt/merged/dir-a/foo TARGET SOURCE FSTYPE OPTIONS /mnt/merged overlay overlay rw,relatime,lowerdir=/mnt/low,upperdir=/mnt/high/data,workdir=/mnt/high/work Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'misc-utils/findmnt.8')
-rw-r--r--misc-utils/findmnt.88
1 files changed, 6 insertions, 2 deletions
diff --git a/misc-utils/findmnt.8 b/misc-utils/findmnt.8
index 45cb49b4a..31c614ae1 100644
--- a/misc-utils/findmnt.8
+++ b/misc-utils/findmnt.8
@@ -185,8 +185,12 @@ Search in
.IR /etc/fstab .
The output is in the list format (see \fB--list\fR).
.TP
-.BR \-T , " \-\-target \fIdir\fP"
-Explicitly define the mount target (mountpoint directory).
+.BR \-T , " \-\-target \fIpath\fP"
+Explicitly define the mount target (mountpoint directory). If the \fIpath\fR
+is not a mountpoint file or directory than
+.B findmnt
+checks \fIpath\fR elements in reverse order for get the mountpoint (this feature is
+supported only if search in kernel files and unsupported for \fB\-\-fstab\fP).
.TP
.BR \-t , " \-\-types \fIlist\fP"
Limit the set of printed filesystems. More than one type may be