*--exclude-subtree* _regex_::
A regular expression that excludes entire directories from being compared and linked. This option can also be used multiple times.
+*--mount*::
+Do not traverse directories on different filesystems (remain within the same filesystem).
+
*-X*, *--respect-xattrs*::
Only try to link files with the same extended attributes.
unsigned int keep_oldest:1;
unsigned int prio_trees:1;
unsigned int dry_run:1;
+ unsigned int within_mount:1;
uintmax_t min_size;
uintmax_t max_size;
size_t io_size;
#ifdef USE_SKIP_SUBTREE
fputs(_(" --exclude-subtree <regex> regular expression to exclude directories\n"), out);
#endif
+ fputs(_(" --mount stay within the same filesystem\n"), out);
#ifdef USE_XATTR
fputs(_(" -X, --respect-xattrs respect extended attributes\n"), out);
#endif
enum {
OPT_REFLINK = CHAR_MAX + 1,
OPT_SKIP_RELINKS,
- OPT_EXCLUDE_SUBTREE
+ OPT_EXCLUDE_SUBTREE,
+ OPT_MOUNT
};
static const char optstr[] = "VhvndfpotXcmMFOx:y:i:r:S:s:b:q";
static const struct option long_options[] = {
#ifdef USE_SKIP_SUBTREE
{"exclude-subtree", required_argument, NULL, OPT_EXCLUDE_SUBTREE},
#endif
+ {"mount", no_argument, NULL, OPT_MOUNT},
{"method", required_argument, NULL, 'y' },
{"minimum-size", required_argument, NULL, 's'},
{"maximum-size", required_argument, NULL, 'S'},
reflinks_skip = 1;
break;
#endif
+ case OPT_MOUNT:
+ opts.within_mount = 1;
+ break;
case 'h':
usage();
case 'V':
stats.started = TRUE;
ftw_flags = FTW_PHYS;
+
+ if (opts.within_mount)
+ ftw_flags |= FTW_MOUNT;
+
#ifdef USE_SKIP_SUBTREE
if (opts.exclude_subtree)
ftw_flags |= FTW_ACTIONRETVAL;
#endif
-
jlog(JLOG_VERBOSE2, _("Scanning [device/inode/links]:"));
for (; optind < argc; optind++) {
char *path = realpath(argv[optind], NULL);