Home
last modified time | relevance | path

Searched refs:dir (Results 1 – 25 of 93) sorted by relevance

1234

/systemd-251/src/shared/
Dgenerator.c57 int generator_add_symlink(const char *dir, const char *dst, const char *dep_type, const char *src) { in generator_add_symlink() argument
64 to = strjoina(dir, "/", dst, ".", dep_type, "/", basename(src)); in generator_add_symlink()
76 const char *dir, in write_fsck_sysroot_service() argument
98 fn = strjoina(dir, "/", unit); in write_fsck_sysroot_service()
142 const char *dir, in generator_write_fsck_deps() argument
150 assert(dir); in generator_write_fsck_deps()
185 … lnk = strjoina(dir, "/" SPECIAL_LOCAL_FS_TARGET ".wants/" SPECIAL_FSCK_ROOT_SERVICE); in generator_write_fsck_deps()
196 …r = write_fsck_sysroot_service(SPECIAL_FSCK_ROOT_SERVICE, dir, what, SPECIAL_INITRD_ROOT_DEVICE_TA… in generator_write_fsck_deps()
204 r = write_fsck_sysroot_service(SPECIAL_FSCK_USR_SERVICE, dir, what, NULL); in generator_write_fsck_deps()
235 const char *dir, in generator_write_timeouts() argument
[all …]
Dgenerator.h14 int generator_add_symlink(const char *dir, const char *dst, const char *dep_type, const char *src);
18 const char *dir,
24 const char *dir,
58 const char *dir,
64 const char *dir,
68 const char *dir,
71 const char *dir,
76 const char *dir,
80 int generator_enable_remount_fs_service(const char *dir);
Dclean-ipc.c221 static int clean_posix_shm_internal(const char *dirname, DIR *dir, uid_t uid, gid_t gid, bool rm) { in clean_posix_shm_internal() argument
224 assert(dir); in clean_posix_shm_internal()
226 FOREACH_DIRENT_ALL(de, dir, goto fail) { in clean_posix_shm_internal()
232 if (fstatat(dirfd(dir), de->d_name, &st, AT_SYMLINK_NOFOLLOW) < 0) { in clean_posix_shm_internal()
244 kid = xopendirat(dirfd(dir), de->d_name, O_NOFOLLOW|O_NOATIME); in clean_posix_shm_internal()
261 if (unlinkat(dirfd(dir), de->d_name, AT_REMOVEDIR) < 0) { in clean_posix_shm_internal()
281 if (unlinkat(dirfd(dir), de->d_name, 0) < 0) { in clean_posix_shm_internal()
302 _cleanup_closedir_ DIR *dir = NULL; in clean_posix_shm() local
304 dir = opendir("/dev/shm"); in clean_posix_shm()
305 if (!dir) { in clean_posix_shm()
[all …]
Dkbd-util.c74 const char *dir; in get_keymaps() local
75 NULSTR_FOREACH(dir, KBD_KEYMAP_DIRS) { in get_keymaps()
78 dir, in get_keymaps()
90 … return log_warning_errno(r, "Failed to read keymap list from %s: %m", dir); in get_keymaps()
92 log_debug_errno(r, "Failed to read keymap list from %s, ignoring: %m", dir); in get_keymaps()
138 const char *dir; in keymap_exists() local
139 NULSTR_FOREACH(dir, KBD_KEYMAP_DIRS) { in keymap_exists()
142 dir, in keymap_exists()
155 log_debug_errno(r, "Failed to read keymap list from %s, ignoring: %m", dir); in keymap_exists()
Dbase-filesystem.c24 const char *dir; /* directory or symlink to create */ member
134 if (faccessat(fd, table[i].dir, F_OK, AT_SYMLINK_NOFOLLOW) >= 0) in base_filesystem_create()
164 if (symlinkat(target, fd, table[i].dir) < 0) { in base_filesystem_create()
166 … "Failed to create symlink at %s/%s: %m", root, table[i].dir); in base_filesystem_create()
175 if (fchownat(fd, table[i].dir, uid, gid, AT_SYMLINK_NOFOLLOW) < 0) in base_filesystem_create()
176 … return log_error_errno(errno, "Failed to chown symlink at %s/%s: %m", root, table[i].dir); in base_filesystem_create()
182 r = mkdirat(fd, table[i].dir, table[i].mode); in base_filesystem_create()
185 … "Failed to create directory at %s/%s: %m", root, table[i].dir); in base_filesystem_create()
194 if (fchownat(fd, table[i].dir, uid, gid, AT_SYMLINK_NOFOLLOW) < 0) in base_filesystem_create()
195 … return log_error_errno(errno, "Failed to chown directory at %s/%s: %m", root, table[i].dir); in base_filesystem_create()
Ddropin.c26 int drop_in_file(const char *dir, const char *unit, unsigned level, in drop_in_file() argument
46 p = strjoin(dir, "/", unit, ".d"); in drop_in_file()
56 int write_drop_in(const char *dir, const char *unit, unsigned level, in write_drop_in() argument
62 assert(dir); in write_drop_in()
67 r = drop_in_file(dir, unit, level, name, &p, &q); in write_drop_in()
75 int write_drop_in_format(const char *dir, const char *unit, unsigned level, in write_drop_in_format() argument
81 assert(dir); in write_drop_in_format()
93 return write_drop_in(dir, unit, level, name, p); in write_drop_in_format()
Dtests.c74 const char *dir; in get_testdata_dir() local
80 dir = getenv("SYSTEMD_TEST_DATA"); in get_testdata_dir()
81 if (!dir) in get_testdata_dir()
82 dir = SYSTEMD_TEST_DATA; in get_testdata_dir()
83 if (access(dir, F_OK) < 0) in get_testdata_dir()
84 … return log_error_errno(errno, "ERROR: $SYSTEMD_TEST_DATA directory [%s] not accessible: %m", dir); in get_testdata_dir()
86 p = path_join(dir, suffix); in get_testdata_dir()
Dbootspec.c59 const char *dir, in boot_entry_load_type1() argument
73 assert(dir); in boot_entry_load_type1()
94 tmp.path = path_join(dir, id); in boot_entry_load_type1()
182 const char *dir, in boot_config_load_type1() argument
189 assert(dir); in boot_config_load_type1()
195 r = boot_entry_load_type1(f, root, dir, id, config->entries + config->n_entries); in boot_config_load_type1()
388 const char *dir) { in boot_entries_find_type1() argument
396 assert(dir); in boot_entries_find_type1()
398 dir_fd = open(dir, O_DIRECTORY|O_CLOEXEC); in boot_entries_find_type1()
403 return log_error_errno(errno, "Failed to open '%s': %m", dir); in boot_entries_find_type1()
[all …]
Djournal-util.c31 const char* dir; in access_check_var_log_journal() local
34 dir = "/run/log/journal"; in access_check_var_log_journal()
36 dir = "/var/log/journal"; in access_check_var_log_journal()
42 r = acl_search_groups(dir, &g); in access_check_var_log_journal()
Ddevnode-acl.c145 _cleanup_closedir_ DIR *dir = NULL; in devnode_acl_all() local
195 dir = opendir("/run/udev/static_node-tags/uaccess"); in devnode_acl_all()
196 if (dir) { in devnode_acl_all()
197 FOREACH_DIRENT(de, dir, return -errno) { in devnode_acl_all()
198 r = readlinkat_malloc(dirfd(dir), de->d_name, &n); in devnode_acl_all()
Ddropin.h9 int drop_in_file(const char *dir, const char *unit, unsigned level,
12 int write_drop_in(const char *dir, const char *unit, unsigned level,
15 int write_drop_in_format(const char *dir, const char *unit, unsigned level,
/systemd-251/src/core/
Dsmack-setup.c26 static int fdopen_unlocked_at(int dfd, const char *dir, const char *name, int *status, FILE **ret_f… in fdopen_unlocked_at() argument
35 return log_warning_errno(errno, "Failed to open \"%s/%s\": %m", dir, name); in fdopen_unlocked_at()
44 return log_error_errno(r, "Failed to open \"%s/%s\": %m", dir, name); in fdopen_unlocked_at()
53 _cleanup_closedir_ DIR *dir = NULL; in write_access2_rules() local
71 dir = opendir(srcdir); in write_access2_rules()
72 if (!dir) { in write_access2_rules()
78 dfd = dirfd(dir); in write_access2_rules()
81 FOREACH_DIRENT(entry, dir, return 0) { in write_access2_rules()
125 _cleanup_closedir_ DIR *dir = NULL; in write_cipso2_rules() local
136 dir = opendir(srcdir); in write_cipso2_rules()
[all …]
/systemd-251/src/basic/
Dunit-file.c218 STRV_FOREACH(dir, lp->search_path) { in lookup_paths_timestamp_hash_same()
221 if (lookup_paths_mtime_exclude(lp, *dir)) in lookup_paths_timestamp_hash_same()
225 if (stat(*dir, &st) < 0) { in lookup_paths_timestamp_hash_same()
229 log_debug_errno(errno, "Failed to stat %s, ignoring: %m", *dir); in lookup_paths_timestamp_hash_same()
271 const char *dir, in unit_file_resolve_symlink() argument
291 assert(dir || path_is_absolute(filename)); in unit_file_resolve_symlink()
297 dir, dir ? "/" : "", filename); in unit_file_resolve_symlink()
299 if (!dir) { in unit_file_resolve_symlink()
303 dir = _dir; in unit_file_resolve_symlink()
316 char *target_abs = path_join(is_abs ? root_dir : dir, target); in unit_file_resolve_symlink()
[all …]
Dconf-files.c31 _cleanup_closedir_ DIR *dir = NULL; in files_add() local
41 dir = opendir(dirpath); in files_add()
42 if (!dir) { in files_add()
49 FOREACH_DIRENT(de, dir, return -errno) { in files_add()
71 if (fstatat(dirfd(dir), de->d_name, &st, 0) < 0) { in files_add()
207 STRV_FOREACH(dir, dirs) { in conf_files_insert()
211 rdir = path_join(root, *dir); in conf_files_insert()
221 p2 = path_startswith(path, *dir); in conf_files_insert()
265 …nf_files_list(char ***ret, const char *suffix, const char *root, unsigned flags, const char *dir) { in conf_files_list() argument
270 dirs = strv_new(dir); in conf_files_list()
/systemd-251/tools/
Dcoverity.sh68 To provide custom archive or results directory, see --result-dir
76 -o,--out-dir Specify Coverity intermediate directory (defaults to 'cov-int')
81 -d, --result-dir Specify result directory if different from default ('cov-int')
106 …COVERITY_UNSUPPORTED=1 cov-build --dir $RESULTS_DIR $_cov_build_options sh -c "$COVERITY_SCAN_BUIL…
107 cov-import-scm --dir $RESULTS_DIR --scm git --log $RESULTS_DIR/scm_log.txt
163 TEMP=`getopt -o ho:t --long help,out-dir:,tar -n '$0' -- "$@"`
170 TEMP=`getopt -o hd:t: --long help,result-dir:tar: -n '$0' -- "$@"`
193 -o|--out-dir)
213 -d|--result-dir)
/systemd-251/src/test/
Dtest-path-lookup.c91 STRV_FOREACH(dir, gp_without_env) in test_generator_binary_paths_one()
92 log_info(" %s", *dir); in test_generator_binary_paths_one()
95 STRV_FOREACH(dir, env_gp_without_env) in test_generator_binary_paths_one()
96 log_info(" %s", *dir); in test_generator_binary_paths_one()
110 STRV_FOREACH(dir, gp_with_env) in test_generator_binary_paths_one()
111 log_info(" %s", *dir); in test_generator_binary_paths_one()
114 STRV_FOREACH(dir, env_gp_with_env) in test_generator_binary_paths_one()
115 log_info(" %s", *dir); in test_generator_binary_paths_one()
Dnss-test-util.c28 void* nss_open_handle(const char *dir, const char *module, int flags) { in nss_open_handle() argument
32 if (dir) in nss_open_handle()
33 path = strjoina(dir, "/libnss_", module, ".so.2"); in nss_open_handle()
Dtest-namespace.c19 _cleanup_(namespace_cleanup_tmpdirp) char *dir; in TEST()
20 assert_se(dir = strdup(RUN_SYSTEMD_EMPTY)); in TEST()
24 _cleanup_(namespace_cleanup_tmpdirp) char *dir; in TEST()
25 assert_se(dir = strdup("/tmp/systemd-test-namespace.XXXXXX")); in TEST()
26 assert_se(mkdtemp(dir)); in TEST()
Dtest-nss-users.c163 static int test_one_module(const char *dir, in test_one_module() argument
169 _cleanup_(dlclosep) void *handle = nss_open_handle(dir, module, RTLD_LAZY|RTLD_NODELETE); in test_one_module()
235 _cleanup_free_ char *dir = NULL; in run() local
245 assert_se(path_extract_directory(argv[0], &dir) >= 0); in run()
248 r = test_one_module(dir, *module, names); in run()
/systemd-251/src/udev/
Dudev-watch.c23 DIR *dir; in udev_watch_restore() local
38 dir = opendir("/run/udev/watch.old"); in udev_watch_restore()
39 if (!dir) in udev_watch_restore()
43 FOREACH_DIRENT_ALL(ent, dir, break) { in udev_watch_restore()
56 r = device_new_from_watch_handle_at(&dev, dirfd(dir), wd); in udev_watch_restore()
67 (void) unlinkat(dirfd(dir), ent->d_name, 0); in udev_watch_restore()
70 (void) closedir(dir); in udev_watch_restore()
Dudevadm-info.c303 static void cleanup_dir(DIR *dir, mode_t mask, int depth) { in cleanup_dir() argument
304 assert(dir); in cleanup_dir()
309 FOREACH_DIRENT_ALL(dent, dir, break) { in cleanup_dir()
314 if (fstatat(dirfd(dir), dent->d_name, &stats, AT_SYMLINK_NOFOLLOW) < 0) in cleanup_dir()
321 subdir = xopendirat(dirfd(dir), dent->d_name, O_NOFOLLOW); in cleanup_dir()
327 (void) unlinkat(dirfd(dir), dent->d_name, AT_REMOVEDIR); in cleanup_dir()
329 (void) unlinkat(dirfd(dir), dent->d_name, 0); in cleanup_dir()
339 static void cleanup_dir_after_db_cleanup(DIR *dir, DIR *datadir) { in cleanup_dir_after_db_cleanup() argument
340 assert(dir); in cleanup_dir_after_db_cleanup()
343 FOREACH_DIRENT_ALL(dent, dir, break) { in cleanup_dir_after_db_cleanup()
[all …]
/systemd-251/units/
Dmeson-add-wants.sh20 dir="${DESTDIR:-}${target}"
23 dir="${DESTDIR:-}${unitdir}/${target}"
31 mkdir -${VERBOSE}p -m 0755 "$dir"
34 mkdir -${VERBOSE}p -m 0755 "$(dirname "$dir")"
38 ln -${VERBOSE}fs --relative "$unitpath" "$dir"
/systemd-251/src/libsystemd/sd-device/
Ddevice-enumerator.c674 _cleanup_closedir_ DIR *dir = NULL; in enumerator_scan_dir_and_add_devices() local
689 dir = opendir(path); in enumerator_scan_dir_and_add_devices()
690 if (!dir) in enumerator_scan_dir_and_add_devices()
694 FOREACH_DIRENT_ALL(de, dir, return -errno) { in enumerator_scan_dir_and_add_devices()
743 _cleanup_closedir_ DIR *dir = NULL; in enumerator_scan_dir() local
749 dir = opendir(path); in enumerator_scan_dir()
750 if (!dir) in enumerator_scan_dir()
755 FOREACH_DIRENT_ALL(de, dir, return -errno) { in enumerator_scan_dir()
773 _cleanup_closedir_ DIR *dir = NULL; in enumerator_scan_devices_tag() local
782 dir = opendir(path); in enumerator_scan_devices_tag()
[all …]
/systemd-251/src/analyze/
Danalyze-cat-config.c26 const char *dir; in verb_cat_config() local
28 NULSTR_FOREACH(dir, CONF_PATHS_NULSTR("")) { in verb_cat_config()
29 t = path_startswith(*arg, dir); in verb_cat_config()
/systemd-251/test/units/
Dtestsuite-72.sh67 MatchPattern=dir-@v
73 MatchPattern=dir-@v
92 ( cd /var/tmp/72-source/ && sha256sum part* dir-*.tar.gz >SHA256SUMS )
152 MatchPattern=dir-@v.tar.gz
158 MatchPattern=dir-@v

1234