diff options
author | Pavel Polacek <xpolish@gmail.com> | 2020-10-31 00:14:00 +0100 |
---|---|---|
committer | Andreas Gruenbacher <agruenba@redhat.com> | 2020-11-14 20:45:37 +0100 |
commit | a966a2b55bb13e22d9b1e6da8182655948d209ae (patch) | |
tree | 932893cdf22457d3c6f69f7dfafe78e3feedefcb /tools/getfacl.c | |
parent | 33564fd260d5b1c01dff3d2a26cba09c714eb4f7 (diff) | |
download | acl-next.tar.gz |
getfacl: Add --one-file-system optionnext
Add a --one-filesystem option to getfacl. With this option, getfacl will not
cross mount points, similar to "tar --one-file-system".
(Patch modified by Andreas Gruenbacher.)
Diffstat (limited to 'tools/getfacl.c')
-rw-r--r-- | tools/getfacl.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/tools/getfacl.c b/tools/getfacl.c index e3df09c..aec08d8 100644 --- a/tools/getfacl.c +++ b/tools/getfacl.c @@ -59,6 +59,7 @@ struct option long_options[] = { { "tabular", 0, 0, 't' }, { "absolute-names", 0, 0, 'p' }, { "numeric", 0, 0, 'n' }, + { "one-file-system", 0, 0, 1 }, #endif { "default", 0, 0, 'd' }, { "version", 0, 0, 'v' }, @@ -588,6 +589,7 @@ void help(void) " -P, --physical physical walk, do not follow symbolic links\n" " -t, --tabular use tabular output format\n" " -n, --numeric print numeric user/group identifiers\n" +" --one-file-system skip files on different filesystems\n" " -p, --absolute-names don't strip leading '/' in pathnames\n")); } #endif @@ -699,6 +701,10 @@ int main(int argc, char *argv[]) print_options |= TEXT_NUMERIC_IDS; break; + case 1: /* one filesystem */ + walk_flags |= WALK_TREE_ONE_FILESYSTEM; + break; + case 'v': /* print version */ printf("%s " VERSION "\n", progname); return 0; |