Lines Matching defs:root_dir
85 static int get_config_path(UnitFileScope scope, bool runtime, const char *root_dir, char **ret) {
101 p = path_join(root_dir, "/run/systemd/system", NULL);
103 p = path_join(root_dir, SYSTEM_CONFIG_UNIT_PATH, NULL);
108 if (root_dir)
119 if (root_dir)
189 static int verify_root_dir(UnitFileScope scope, const char **root_dir) {
192 assert(root_dir);
198 if (isempty(*root_dir) || path_equal(*root_dir, "/")) {
199 *root_dir = NULL;
206 r = is_dir(*root_dir, true);
501 const char *root_dir,
549 q = find_symlinks_fd(root_dir, name, nfd, p, config_path, same_name_link);
579 x = prefix_root(root_dir, dest);
624 const char *root_dir,
643 return find_symlinks_fd(root_dir, name, fd, config_path, config_path, same_name_link);
648 const char *root_dir,
661 r = get_config_path(scope, false, root_dir, &normal_path);
665 r = find_symlinks(root_dir, name, normal_path, &same_name_link);
674 r = get_config_path(scope, true, root_dir, &runtime_path);
678 r = find_symlinks(root_dir, name, runtime_path, &same_name_link_runtime);
903 const char *root_dir,
924 path = prefix_roota(root_dir, path);
983 const char *root_dir,
989 r = unit_file_load(c, info, path, root_dir, flags);
995 r = readlink_and_make_absolute_root(root_dir, path, &np);
1044 const char *root_dir,
1059 return unit_file_load_or_readlink(c, info, info->path, root_dir, flags);
1070 r = unit_file_load_or_readlink(c, info, path, root_dir, flags);
1100 r = unit_file_load_or_readlink(c, info, path, root_dir, flags);
1118 const char *root_dir,
1140 return unit_file_load_or_readlink(c, i, i->path, root_dir, flags);
1146 const char *root_dir,
1160 r = unit_file_search(c, start, paths, root_dir, flags);
1174 r = install_info_follow(c, i, root_dir, flags);
1208 r = unit_file_search(c, i, paths, root_dir, flags);
1225 const char *root_dir,
1242 return install_info_traverse(scope, c, root_dir, paths, i, flags, ret);
1338 const char *root_dir,
1366 const char *root_dir,
1390 q = install_info_symlink_link(i, paths, config_path, root_dir, force, changes, n_changes);
1402 const char *root_dir,
1430 r = install_info_traverse(scope, c, root_dir, paths, i, flags, NULL);
1437 q = install_info_apply(i, paths, config_path, root_dir, force, changes, n_changes);
1455 const char *root_dir) {
1479 r = install_info_traverse(scope, c, root_dir, paths, i, SEARCH_LOAD|SEARCH_FOLLOW_CONFIG_SYMLINKS, NULL);
1497 const char *root_dir,
1510 r = verify_root_dir(scope, &root_dir);
1514 r = get_config_path(scope, runtime, root_dir, &prefix);
1543 const char *root_dir,
1558 r = verify_root_dir(scope, &root_dir);
1562 r = get_config_path(scope, runtime, root_dir, &config_path);
1622 const char *root_dir,
1638 r = verify_root_dir(scope, &root_dir);
1642 r = lookup_paths_init_from_scope(&paths, scope, root_dir);
1646 r = get_config_path(scope, runtime, root_dir, &config_path);
1662 full = prefix_root(root_dir, *i);
1708 const char *root_dir,
1733 r = verify_root_dir(scope, &root_dir);
1737 r = lookup_paths_init_from_scope(&paths, scope, root_dir);
1741 r = get_config_path(scope, runtime, root_dir, &config_path);
1745 r = install_info_discover(scope, &c, root_dir, &paths, target, SEARCH_FOLLOW_CONFIG_SYMLINKS, &target_info);
1756 r = install_info_discover(scope, &c, root_dir, &paths, *f, SEARCH_FOLLOW_CONFIG_SYMLINKS, &i);
1779 return install_context_apply(scope, &c, &paths, config_path, root_dir, force, SEARCH_FOLLOW_CONFIG_SYMLINKS, changes, n_changes);
1785 const char *root_dir,
1801 r = verify_root_dir(scope, &root_dir);
1805 r = lookup_paths_init_from_scope(&paths, scope, root_dir);
1809 r = get_config_path(scope, runtime, root_dir, &config_path);
1814 r = install_info_discover(scope, &c, root_dir, &paths, *f, SEARCH_LOAD, &i);
1828 return install_context_apply(scope, &c, &paths, config_path, root_dir, force, SEARCH_LOAD, changes, n_changes);
1834 const char *root_dir,
1849 r = verify_root_dir(scope, &root_dir);
1853 r = lookup_paths_init_from_scope(&paths, scope, root_dir);
1857 r = get_config_path(scope, runtime, root_dir, &config_path);
1870 r = install_context_mark_for_removal(scope, &c, &paths, &remove_symlinks_to, config_path, root_dir);
1880 const char *root_dir,
1897 r = unit_file_disable(scope, runtime, root_dir, n, changes, n_changes);
1902 return unit_file_enable(scope, runtime, root_dir, files, force, changes, n_changes);
1907 const char *root_dir,
1929 r = verify_root_dir(scope, &root_dir);
1933 r = lookup_paths_init_from_scope(&paths, scope, root_dir);
1937 r = get_config_path(scope, false, root_dir, &config_path);
1941 r = install_info_discover(scope, &c, root_dir, &paths, name, 0, &i);
1954 const char *root_dir,
1967 r = verify_root_dir(scope, &root_dir);
1971 r = lookup_paths_init_from_scope(&paths, scope, root_dir);
1975 r = install_info_discover(scope, &c, root_dir, &paths, SPECIAL_DEFAULT_TARGET, SEARCH_FOLLOW_CONFIG_SYMLINKS, &i);
1991 const char *root_dir,
2007 r = verify_root_dir(scope, &root_dir);
2011 r = install_info_discover(scope, &c, root_dir, paths, name, SEARCH_LOAD|SEARCH_FOLLOW_CONFIG_SYMLINKS, &i);
2026 r = find_symlinks_in_scope(scope, root_dir, i->name, &state);
2050 const char *root_dir,
2061 r = verify_root_dir(scope, &root_dir);
2065 r = lookup_paths_init_from_scope(&paths, scope, root_dir);
2069 return unit_file_lookup_state(scope, root_dir, &paths, name, ret);
2072 int unit_file_query_preset(UnitFileScope scope, const char *root_dir, const char *name) {
2081 r = verify_root_dir(scope, &root_dir);
2089 r = conf_files_list(&files, ".preset", root_dir,
2098 r = conf_files_list(&files, ".preset", root_dir,
2167 const char *root_dir,
2184 r = install_context_mark_for_removal(scope, minus, paths, &remove_symlinks_to, config_path, root_dir);
2196 q = install_context_apply(scope, plus, paths, config_path, root_dir, force, SEARCH_LOAD, changes, n_changes);
2213 const char *root_dir,
2224 r = unit_file_query_preset(scope, root_dir, name);
2229 r = install_info_discover(scope, plus, root_dir, paths, name, SEARCH_LOAD|SEARCH_FOLLOW_CONFIG_SYMLINKS, &i);
2236 r = install_info_discover(scope, minus, root_dir, paths, name, SEARCH_FOLLOW_CONFIG_SYMLINKS, &i);
2244 const char *root_dir,
2261 r = verify_root_dir(scope, &root_dir);
2265 r = lookup_paths_init_from_scope(&paths, scope, root_dir);
2269 r = get_config_path(scope, runtime, root_dir, &config_path);
2277 r = preset_prepare_one(scope, &plus, &minus, &paths, root_dir, mode, *i);
2282 return execute_preset(scope, &plus, &minus, &paths, config_path, root_dir, files, mode, force, changes, n_changes);
2288 const char *root_dir,
2304 r = verify_root_dir(scope, &root_dir);
2308 r = lookup_paths_init_from_scope(&paths, scope, root_dir);
2312 r = get_config_path(scope, runtime, root_dir, &config_path);
2321 units_dir = path_join(root_dir, *i, NULL);
2343 r = preset_prepare_one(scope, &plus, &minus, &paths, root_dir, mode, de->d_name);
2349 return execute_preset(scope, &plus, &minus, &paths, config_path, root_dir, NULL, mode, force, changes, n_changes);
2373 const char *root_dir,
2384 r = verify_root_dir(scope, &root_dir);
2388 r = lookup_paths_init_from_scope(&paths, scope, root_dir);
2397 units_dir = path_join(root_dir, *i, NULL);
2431 r = unit_file_lookup_state(scope, root_dir, &paths, basename(f->path), &f->state);