diff options
author | Aaron Burgemeister <dajoker@gmail.com> | 2010-07-15 19:54:49 -0600 |
---|---|---|
committer | Pádraig Brady <P@draigBrady.com> | 2010-08-27 22:16:10 +0100 |
commit | ddf6fb8686b1ed6a26d5f1c76a642d0fb5fe7ba7 (patch) | |
tree | 27c8712c7d87a57181506c24f2b2ebb58769646c /src/find-mount-point.h | |
parent | 872f6bb2ba11c61271bf34057a2e950abb3e952e (diff) | |
download | coreutils-ddf6fb8686b1ed6a26d5f1c76a642d0fb5fe7ba7.tar.xz |
stat: add %m to output the mount point for a file
* src/find-mount-point.c: A new file refactoring
find_mount_point() out from df.c
* src/find-mount-point.h: Likewise.
* src/df.c: Use the new find-mount-point module.
* src/stat.c (print_stat): Handle the new %m format.
(find_bind_mount): A new function to
return the bind mount for a file if any.
(out_mount_mount): Print the bind mount for a file, or else
the standard mount point given by the find-mount-point module.
(usage): Document the %m format directive.
* src/Makefile.am: Reference the refactored find-mount-point.c
* po/POTFILES.in: Add find_mount_point.c to the translation list
* doc/coreutils.texi (stat invocation): Document %m,
and how it may differ from the mount point that df outputs.
* test/misc/stat-mount: A new test to correlate mount points
output from df and stat.
* tests/Makefile.am: Reference the new test.
* NEWS: Mention the new feature
* THANKS: Add the author
Signed-off-by: Pádraig Brady <P@draigBrady.com>
Diffstat (limited to 'src/find-mount-point.h')
-rw-r--r-- | src/find-mount-point.h | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/find-mount-point.h b/src/find-mount-point.h new file mode 100644 index 000000000..49be9bab8 --- /dev/null +++ b/src/find-mount-point.h @@ -0,0 +1,17 @@ +/* find-mount-point.h -- find the root mount point for a file. + Copyright (C) 2010 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see <http://www.gnu.org/licenses/>. */ + +extern char* find_mount_point (const char *, const struct stat *); |