]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
findmnt: add docs for --kernel
authorKarel Zak <kzak@redhat.com>
Thu, 10 Oct 2024 12:22:39 +0000 (14:22 +0200)
committerKarel Zak <kzak@redhat.com>
Wed, 8 Jan 2025 12:57:43 +0000 (13:57 +0100)
Signed-off-by: Karel Zak <kzak@redhat.com>
misc-utils/findmnt.8.adoc
misc-utils/findmnt.c

index 23fb14da56a48e948418fe006e1a624e57a2a0e8..88c33c8c6051fde35d0ba380e6f678cdef1630f8 100644 (file)
@@ -78,8 +78,14 @@ Invert the sense of matching.
 *-J*, *--json*::
 Use JSON output format.
 
-*-k*, *--kernel*::
-Search in _/proc/self/mountinfo_. The output is in the tree-like format. This is the default. The output contains only mount options maintained by kernel (see also *--mtab*).
+*-k*, *--kernel*[_=method_]::
+Reads information about filesystems from the kernel. This is the default output. The format is tree-like and only includes mount options managed by the kernel (see also *--mtab*).
++
+The optional argument _method_ can be either:
++
+* *mountinfo* - this is the default method and it reads data from the _/proc/self/mountinfo_ file.
++
+* *listmount* - This is an EXPERIMENTAL method that uses the listmount() and statmount() syscalls to generate the mount table. The output may not contain all details about mount nodes (for example, SOURCE is currently missing).
 
 *-l*, *--list*::
 Use the list output format. This output format is automatically enabled if the output is restricted by the *-t*, *-O*, *-S* or *-T* option and the option *--submounts* is not used or if more that one source file (the option *-F*) is specified.
index 7e60a903c9bfcc179574dc3c3af5fb1845966ff1..c32d7352b271c1c2d60d0512773e303ee3e53ddb 100644 (file)
@@ -1505,8 +1505,8 @@ static void __attribute__((__noreturn__)) usage(void)
        fputs(_(" -s, --fstab            search in static table of filesystems\n"), out);
        fputs(_(" -m, --mtab             search in table of mounted filesystems\n"
                "                          (includes user space mount options)\n"), out);
-       fputs(_(" -k, --kernel           search in kernel table of mounted\n"
-               "                          filesystems (default)\n"), out);
+       fputs(_(" -k, --kernel[=<method>] search in kernel mount table (default)\n"
+               "                          <method> is mountinfo or listmount\n"), out);
        fputc('\n', out);
        fputs(_(" -p, --poll[=<list>]    monitor changes in table of mounted filesystems\n"), out);
        fputs(_(" -w, --timeout <num>    upper limit in milliseconds that --poll will block\n"), out);