diff options
-rw-r--r-- | doc/coreutils.texi | 7 | ||||
-rwxr-xr-x | tests/misc/stat-mount | 10 |
2 files changed, 6 insertions, 11 deletions
diff --git a/doc/coreutils.texi b/doc/coreutils.texi index 72ee450d3..170ce0c37 100644 --- a/doc/coreutils.texi +++ b/doc/coreutils.texi @@ -10715,9 +10715,10 @@ stat does not search for specified device nodes in the file system list, instead operating on them directly @item @cindex bind mount -stat outputs the alias for a bind mounted file, -rather than its backing device. One can recursively call stat -until there is no change in output, to get the base mount point +stat outputs the alias for a bind mounted file, rather than +the initial mount point of its backing device. +One can recursively call stat until there is no change in output, +to get the current base mount point @end itemize When listing file system information (@option{--file-system} (@option{-f})), diff --git a/tests/misc/stat-mount b/tests/misc/stat-mount index c1c43d49c..a99291f6d 100755 --- a/tests/misc/stat-mount +++ b/tests/misc/stat-mount @@ -18,14 +18,8 @@ . "${srcdir=.}/init.sh"; path_prepend_ ../src -# Note we assume that the current directory is not bind mounted -# (as then, stat and df may have different results). -# This should be the case given the directory is temporary -# for the duration of the test. - df_mnt=$(df -P . | sed -n '2s/.* \([^ ]*$\)/\1/p') -stat_mnt=$(stat -c%m .) - -test "$df_mnt" = "$stat_mnt" || fail=1 +stat_mnt=$(stat -c%m .) || fail=1 +test "$stat_mnt" || fail=1 Exit $fail |