return false;
}
-static int unit_file_is_generated(const LookupPaths *p, const char *path) {
+static int path_is_generator(const LookupPaths *p, const char *path) {
_cleanup_free_ char *parent = NULL;
assert(p);
return r;
if (target_info->type == UNIT_FILE_TYPE_MASKED)
return -ESHUTDOWN;
- if (unit_file_is_generated(&paths, target_info->path))
+ if (path_is_generator(&paths, target_info->path))
return -EADDRNOTAVAIL;
assert(target_info->type == UNIT_FILE_TYPE_REGULAR);
return r;
if (i->type == UNIT_FILE_TYPE_MASKED)
return -ESHUTDOWN;
- if (unit_file_is_generated(&paths, i->path))
+ if (path_is_generator(&paths, i->path))
return -EADDRNOTAVAIL;
assert(i->type == UNIT_FILE_TYPE_REGULAR);
return r;
if (i->type == UNIT_FILE_TYPE_MASKED)
return -ESHUTDOWN;
- if (unit_file_is_generated(&paths, i->path))
+ if (path_is_generator(&paths, i->path))
return -EADDRNOTAVAIL;
assert(i->type == UNIT_FILE_TYPE_REGULAR);
return r;
if (i->type == UNIT_FILE_TYPE_MASKED)
return -ESHUTDOWN;
- if (unit_file_is_generated(&paths, i->path))
+ if (path_is_generator(&paths, i->path))
return -EADDRNOTAVAIL;
path = strjoina(paths.persistent_config, "/" SPECIAL_DEFAULT_TARGET);
break;
case UNIT_FILE_TYPE_REGULAR:
- r = unit_file_is_generated(paths, i->path);
+ r = path_is_generator(paths, i->path);
if (r < 0)
return r;
if (r > 0) {
if (i->type == UNIT_FILE_TYPE_MASKED)
return -ESHUTDOWN;
- if (unit_file_is_generated(paths, i->path))
+ if (path_is_generator(paths, i->path))
return -EADDRNOTAVAIL;
} else
r = install_info_discover(scope, minus, root_dir, paths, name, SEARCH_FOLLOW_CONFIG_SYMLINKS, &i);