Searched refs:dir (Results 1 - 25 of 38) sorted by relevance

12

/systemd/src/shared/
H A Dgenerator.h26 const char *dir,
32 const char *dir,
H A Ddropin.h27 int drop_in_file(const char *dir, const char *unit, unsigned level,
30 int write_drop_in(const char *dir, const char *unit, unsigned level,
33 int write_drop_in_format(const char *dir, const char *unit, unsigned level,
H A Dbase-filesystem.c39 const char *dir; member in struct:BaseFilesystem
70 if (faccessat(fd, table[i].dir, F_OK, AT_SYMLINK_NOFOLLOW) >= 0)
100 r = symlinkat(target, fd, table[i].dir);
102 return log_error_errno(errno, "Failed to create symlink at %s/%s: %m", root, table[i].dir);
105 if (fchownat(fd, table[i].dir, uid, gid, AT_SYMLINK_NOFOLLOW) < 0)
106 return log_error_errno(errno, "Failed to chown symlink at %s/%s: %m", root, table[i].dir);
113 r = mkdirat(fd, table[i].dir, table[i].mode);
116 "Failed to create directory at %s/%s: %m", root, table[i].dir);
123 if (fchownat(fd, table[i].dir, uid, gid, AT_SYMLINK_NOFOLLOW) < 0)
124 return log_error_errno(errno, "Failed to chown directory at %s/%s: %m", root, table[i].dir);
[all...]
H A Dgenerator.c40 static int write_fsck_sysroot_service(const char *dir, const char *what) { argument
50 unit = strjoina(dir, "/systemd-fsck-root.service");
90 const char *dir,
98 assert(dir);
121 lnk = strjoina(dir, "/" SPECIAL_LOCAL_FS_TARGET ".wants/systemd-fsck-root.service");
132 r = write_fsck_sysroot_service(dir, what);
155 const char *dir,
189 return write_drop_in_format(dir, unit, 50, "device-timeout",
88 generator_write_fsck_deps( FILE *f, const char *dir, const char *what, const char *where, const char *fstype) argument
154 generator_write_timeouts( const char *dir, const char *what, const char *where, const char *opts, char **filtered) argument
H A Dclean-ipc.c204 static int clean_posix_shm_internal(DIR *dir, uid_t uid) { argument
208 assert(dir);
210 FOREACH_DIRENT(de, dir, goto fail) {
216 if (fstatat(dirfd(dir), de->d_name, &st, AT_SYMLINK_NOFOLLOW) < 0) {
231 kid = xopendirat(dirfd(dir), de->d_name, O_NOFOLLOW|O_NOATIME);
243 if (unlinkat(dirfd(dir), de->d_name, AT_REMOVEDIR) < 0) {
253 if (unlinkat(dirfd(dir), de->d_name, 0) < 0) {
272 _cleanup_closedir_ DIR *dir = NULL; local
274 dir = opendir("/dev/shm");
275 if (!dir) {
286 _cleanup_closedir_ DIR *dir = NULL; local
[all...]
H A Ddropin.c42 int drop_in_file(const char *dir, const char *unit, unsigned level, argument
64 p = strjoin(dir, "/", unit, ".d", NULL);
79 int write_drop_in(const char *dir, const char *unit, unsigned level, argument
85 assert(dir);
90 r = drop_in_file(dir, unit, level, name, &p, &q);
98 int write_drop_in_format(const char *dir, const char *unit, unsigned level, argument
104 assert(dir);
116 return write_drop_in(dir, unit, level, name, p);
204 /* Also try the template dir */
/systemd/src/basic/
H A Dconf-files.h23 int conf_files_list(char ***ret, const char *suffix, const char *root, const char *dir, ...);
H A Dconf-files.c40 _cleanup_closedir_ DIR *dir = NULL; local
50 dir = opendir(dirpath);
51 if (!dir) {
57 FOREACH_DIRENT(de, dir, return -errno) {
138 int conf_files_list(char ***strv, const char *suffix, const char *root, const char *dir, ...) { argument
145 va_start(ap, dir);
146 dirs = strv_new_ap(dir, ap);
H A Dvirt.c119 _cleanup_closedir_ DIR *dir = NULL; local
122 dir = opendir("/proc/device-tree");
123 if (!dir) {
129 FOREACH_DIRENT(dent, dir, return -errno)
H A Dlocale-util.c145 _cleanup_closedir_ DIR *dir = NULL; local
149 dir = opendir("/usr/lib/locale");
150 if (!dir)
153 FOREACH_DIRENT(entry, dir, return -errno) {
H A Dpath-util.c669 char *d, *dir, *dir2; local
677 dir = dirname(d);
678 assert(dir);
680 if (dir == d)
683 dir2 = strdup(dir);
/systemd/src/boot/efi/
H A Dpefile.h18 EFI_STATUS pefile_locate_sections(EFI_FILE *dir, CHAR16 *path,
H A Dpefile.c69 EFI_STATUS pefile_locate_sections(EFI_FILE *dir, CHAR16 *path, CHAR8 **sections, UINTN *addrs, UINTN *offsets, UINTN *sizes) { argument
78 err = uefi_call_wrapper(dir->Open, 5, dir, &handle, path, EFI_FILE_MODE_READ, 0ULL);
H A Dutil.h47 INTN file_read(EFI_FILE_HANDLE dir, CHAR16 *name, UINTN off, UINTN size, CHAR8 **content);
/systemd/src/udev/
H A Dudevadm-info.c194 static void cleanup_dir(DIR *dir, mode_t mask, int depth) { argument
200 for (dent = readdir(dir); dent != NULL; dent = readdir(dir)) {
205 if (fstatat(dirfd(dir), dent->d_name, &stats, AT_SYMLINK_NOFOLLOW) != 0)
212 dir2 = fdopendir(openat(dirfd(dir), dent->d_name, O_RDONLY|O_NONBLOCK|O_DIRECTORY|O_CLOEXEC));
216 (void) unlinkat(dirfd(dir), dent->d_name, AT_REMOVEDIR);
218 (void) unlinkat(dirfd(dir), dent->d_name, 0);
223 DIR *dir; local
227 dir = opendir("/run/udev/data");
228 if (dir !
[all...]
H A Dudev-watch.c51 DIR *dir; local
54 dir = opendir("/run/udev/watch.old");
55 if (dir == NULL) {
56 log_error_errno(errno, "unable to open old watches dir /run/udev/watch.old; old watches will not be restored: %m");
60 for (ent = readdir(dir); ent != NULL; ent = readdir(dir)) {
68 len = readlinkat(dirfd(dir), ent->d_name, device, sizeof(device));
81 unlinkat(dirfd(dir), ent->d_name, 0);
84 closedir(dir);
88 log_error_errno(errno, "unable to move watches dir /ru
[all...]
H A Dudev-node.c131 DIR *dir; local
141 dir = opendir(stackdir);
142 if (dir == NULL)
148 dent = readdir(dir);
177 closedir(dir);
H A Dudev-builtin-net_id.c208 _cleanup_closedir_ DIR *dir = NULL; local
240 dir = opendir(slots);
241 if (!dir) {
246 for (dent = readdir(dir); dent != NULL; dent = readdir(dir)) {
H A Dudev-builtin-path_id.c361 DIR *dir; local
403 dir = opendir(base);
404 if (dir == NULL) {
408 for (dent = readdir(dir); dent != NULL; dent = readdir(dir)) {
429 closedir(dir);
/systemd/src/core/
H A Dsmack-setup.c43 _cleanup_closedir_ DIR *dir = NULL; local
64 dir = opendir(srcdir);
65 if (!dir) {
71 dfd = dirfd(dir);
74 FOREACH_DIRENT(entry, dir, return 0) {
129 _cleanup_closedir_ DIR *dir = NULL; local
143 dir = opendir(srcdir);
144 if (!dir) {
150 dfd = dirfd(dir);
153 FOREACH_DIRENT(entry, dir, retur
200 _cleanup_closedir_ DIR *dir = NULL; local
[all...]
H A Dkillall.c169 _cleanup_closedir_ DIR *dir = NULL; local
172 dir = opendir("/proc");
173 if (!dir)
176 while ((d = readdir(dir))) {
/systemd/src/test/
H A Dtest-path-lookup.c59 char **dir; local
64 STRV_FOREACH(dir, paths)
65 log_info(" %s", *dir);
/systemd/src/libsystemd/sd-device/
H A Ddevice-enumerator.c469 _cleanup_closedir_ DIR *dir = NULL; local
485 dir = opendir(path);
486 if (!dir)
489 FOREACH_DIRENT_ALL(dent, dir, return -errno) {
589 _cleanup_closedir_ DIR *dir = NULL; local
596 dir = opendir(path);
597 if (!dir)
602 FOREACH_DIRENT_ALL(dent, dir, return -errno) {
620 _cleanup_closedir_ DIR *dir = NULL; local
630 dir
754 _cleanup_closedir_ DIR *dir = NULL; local
[all...]
/systemd/src/analyze/
H A Danalyze-verify.c37 _cleanup_free_ char *dir = NULL; local
58 dir = dirname_malloc(abspath);
59 if (!dir)
63 c = path_join(NULL, dir, with_instance);
65 c = path_join(NULL, dir, name);
/systemd/src/login/
H A Dlogind-acl.c186 _cleanup_closedir_ DIR *dir = NULL; local
255 dir = opendir("/run/udev/static_node-tags/uaccess");
256 if (dir) {
257 FOREACH_DIRENT(dent, dir, return -errno) {

Completed in 91 milliseconds

12