The current --target <path> implementation check the <path> elements in
reverse order to get the mountpoint. The feature may be inwanted in
some cases when we really want to check for mountpoint specified by
the <path>. The new option "--mountpoint <path>" allows to be strict.
Signed-off-by: Karel Zak <kzak@redhat.com>
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>
Transform some of them into copyright lines.
Also fix three header lines and snip some trailing whitespace.
Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
As per the convention shown in Documentation/howto-man-page.txt.
Also make a few other tiny adjustments along the way.
Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
* in some cases is realpath() overkill
* sometimes you want to search for explicitly specified paths (e.g.
"findmnt --fstab /mnt/symlink") rather than for real paths
* you want to avoid readlink() and stat() on NFS
Signed-off-by: Karel Zak <kzak@redhat.com>
Provide display of filesystem attributes from statvfs(3). These are all
displayed in human readable format.
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
If you really need to store your configuration to a alternative files
then you have to explicitly specify the files or directories on
mount(8) command line by --fstab option.
Signed-off-by: Karel Zak <kzak@redhat.com>
The optional argument for -s, --fstab options (--fstab=file) is not
backwardly compatible, because command line with short options (e.g.
findmnt -snr) will be interpreted incorrectly.
This patch removes support for the optional --fstab argument and
introduces a new option --tab-file, for example:
findmnt --fstab --tab-file=/etc/fstab.foo
Reported-by: Juergen Daubert <jue@jue.li>
Signed-off-by: Karel Zak <kzak@redhat.com>
Examples:
* findmnt --fstab -O noauto
Returns all entries where is not "auto" option (including entries
with "noauto" option.
* findmnt --fstab -O +noauto
Returns all entries where is literally "noauto" option.
Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=758457
Signed-off-by: Karel Zak <kzak@redhat.com>
Use dates without the day, use the full month name, put "util-linux" in
the lower left corner, and "User Commands" or "System Administration"
at the top center.
Also improve here and there the one-line program description.
Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
This patch modifies the default output for SOURCE column. All btrfs
subvolume mountpoints and all bind-mount (where source is not root of
FS) will be printed as:
SOURCE TARGET
/dev/sda1[/aaa] /mnt/test
where /aaa is subvolume name or fs root for bind mounts, it means:
# mount -t btrfs /dev/sda1 /mnt/test -o subvol=aaa
or:
# mount --bind /aaa /mnt/test
The info about fs-root is 4th column in /proc/self/mountinfo.
Signed-off-by: Karel Zak <kzak@redhat.com>