bool filesystem_is_excluded(const char *path)
{
if (conf_debug_pruning) {
- /* This is debugging output, don't mark anything for translation */
fprintf(stderr, "Checking whether filesystem `%s' is excluded:\n", path);
}
FILE *f = setmntent("/proc/mounts", "r");
struct mntent *me;
while ((me = getmntent(f)) != nullptr) {
if (conf_debug_pruning) {
- /* This is debugging output, don't mark anything for translation */
fprintf(stderr, " `%s', type `%s'\n", me->mnt_dir, me->mnt_type);
}
string type(me->mnt_type);
if the filesystem is unavailable hard-mounted NFS. */
char *dir = me->mnt_dir;
if (conf_debug_pruning) {
- /* This is debugging output, don't mark anything for translation */
fprintf(stderr, " => type matches, dir `%s'\n", dir);
}
bool res = (strcmp(path, dir) == 0);
}
}
if (conf_debug_pruning) {
- /* This is debugging output, don't mark anything for translation */
fprintf(stderr, "...done\n");
}
endmntent(f);
{
if (conf_prune_bind_mounts && is_bind_mount(path.c_str())) {
if (conf_debug_pruning) {
- /* This is debugging output, don't mark anything for translation */
fprintf(stderr, "Skipping `%s': bind mount\n", path.c_str());
}
close(fd);
if (find(conf_prunenames.begin(), conf_prunenames.end(), e.name) != conf_prunenames.end()) {
if (conf_debug_pruning) {
- /* This is debugging output, don't mark anything for translation */
fprintf(stderr, "Skipping `%s': in prunenames\n", e.name.c_str());
}
continue;
}
if (string_list_contains_dir_path(&conf_prunepaths, &conf_prunepaths_index, (path_plus_slash + e.name).c_str())) {
if (conf_debug_pruning) {
- /* This is debugging output, don't mark anything for translation */
fprintf(stderr, "Skipping `%s/%s': in prunepaths\n", path.c_str(), e.name.c_str());
}
continue;