]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
findmnt: don't use tree-like output if more -F options specified
authorKarel Zak <kzak@redhat.com>
Thu, 28 Jun 2012 11:20:31 +0000 (13:20 +0200)
committerKarel Zak <kzak@redhat.com>
Thu, 28 Jun 2012 11:20:31 +0000 (13:20 +0200)
Signed-off-by: Karel Zak <kzak@redhat.com>
misc-utils/findmnt.8
misc-utils/findmnt.c

index a31a967e4ae1fb2feec5259dfda6d92bd99ae1ef..69bae954f49d6c389eca67988553c633147da677 100644 (file)
@@ -47,7 +47,7 @@ The output is in the list format (see --list).
 .IP "\fB\-m, \-\-mtab\fP"
 Search in
 .IR /etc/mtab .
-The output is in the list format (see --list).
+The output is in the list format (see \fB\-\-list\fP).
 .IP "\fB\-k, \-\-kernel\fP"
 Search in
 .IR /proc/self/mountinfo .
@@ -72,7 +72,8 @@ or
 Convert all tags (LABEL, UUID, PARTUUID or PARTLABEL) to the device names.
 .IP "\fB\-F, \-\-tab\-file \fIpath\fP"
 Search in an alternative file, if used with \fB\-\-fstab\fP, \fB\-\-mtab\fP
-or \fB\-\-kernel\fP then overwrites the default paths.
+or \fB\-\-kernel\fP then overwrites the default paths, if specified more than
+once than tree-like output is disabled (see the \fB\-\-list\fP option).
 .IP "\fB\-f, \-\-first\-only\fP"
 Print the first matching filesystem only.
 .IP "\fB\-i, \-\-invert\fP"
@@ -80,7 +81,8 @@ Invert the sense of matching.
 .IP "\fB\-l, \-\-list\fP"
 Use the list output format. This output format is automatically enabled if the
 output is restricted by \fB\-t\fP, \fB\-O\fP, \fB\-S\fP or \fB\-T\fP
-option and the option \fB\-\-submounts\fP is not used.
+option and the option \fB\-\-submounts\fP is not used or if more that one
+source file (the option \fB\-F\fP) is specified.
 .IP "\fB\-v, \-\-nofsroot\fP"
 Do not print a [/dir] in the SOURCE column for bind-mounts or btrfs subvolumes.
 .IP "\fB\-n, \-\-noheadings\fP"
index d7b252a8b85a0e1deefcfa45cfaaf635627e9f61..75f7eb76175e7cd44b5634b5f6f3b8fcfbd01d21 100644 (file)
@@ -1280,7 +1280,7 @@ int main(int argc, char *argv[])
        if (!tb)
                goto leave;
 
-       if ((tt_flags & TT_FL_TREE) && !tab_is_tree(tb))
+       if ((tt_flags & TT_FL_TREE) && (ntabfiles > 1 || !tab_is_tree(tb)))
                tt_flags &= ~TT_FL_TREE;
 
        cache = mnt_new_cache();