Home
last modified time | relevance | path

Searched refs:stat (Results 1 – 25 of 221) sorted by relevance

123456789

/systemd-251/src/basic/ !
Dstat-util.c28 struct stat info; in is_symlink()
39 struct stat st; in is_dir()
45 r = stat(path, &st); in is_dir()
55 struct stat st; in is_dir_fd()
64 struct stat info; in is_device_node()
127 bool null_or_empty(struct stat *st) { in null_or_empty()
143 struct stat st; in null_or_empty_path_with_root()
163 struct stat st; in null_or_empty_fd()
194 struct stat a, b; in files_same()
277 int stat_verify_regular(const struct stat *st) { in stat_verify_regular()
[all …]
Dstat-util.h25 bool null_or_empty(struct stat *st) _pure_;
60 int stat_verify_regular(const struct stat *st);
63 int stat_verify_directory(const struct stat *st);
68 bool stat_inode_same(const struct stat *a, const struct stat *b);
69 bool stat_inode_unmodified(const struct stat *a, const struct stat *b);
Dmemfd-util.c97 struct stat stat; in memfd_get_size() local
102 if (fstat(fd, &stat) < 0) in memfd_get_size()
105 *sz = stat.st_size; in memfd_get_size()
Dchase-symlinks.h21 bool unsafe_transition(const struct stat *a, const struct stat *b);
30 …const char *root, ChaseSymlinksFlags chase_flags, char **ret_path, struct stat *ret_stat, int *ret…
Dchase-symlinks.c16 bool unsafe_transition(const struct stat *a, const struct stat *b) { in unsafe_transition()
29 struct stat st; in log_unsafe_transition()
71 struct stat previous_stat; in chase_symlinks()
212 struct stat st; in chase_symlinks()
495 struct stat *ret_stat, in chase_symlinks_and_stat()
510 if (stat(path, ret_stat) < 0) in chase_symlinks_and_stat()
Defivars.c42 struct stat st; in efi_get_variable()
418 static inline int compare_stat_mtime(const struct stat *a, const struct stat *b) { in compare_stat_mtime()
423 struct stat a = {}, b; in systemd_efi_options_efivarfs_if_newer()
426 if (stat(EFIVAR_PATH(EFI_SYSTEMD_VARIABLE(SystemdOptions)), &a) < 0 && errno != ENOENT) in systemd_efi_options_efivarfs_if_newer()
429 if (stat(EFIVAR_CACHE_PATH(EFI_SYSTEMD_VARIABLE(SystemdOptions)), &b) < 0) { in systemd_efi_options_efivarfs_if_newer()
/systemd-251/src/resolve/ !
Dresolved-resolv-conf.c25 struct stat st, own; in manager_check_resolv_conf()
35 if (stat("/etc/resolv.conf", &st) < 0) { in manager_check_resolv_conf()
43 if (stat(PRIVATE_STATIC_RESOLV_CONF, &own) >= 0 && in manager_check_resolv_conf()
52 static bool file_is_our_own(const struct stat *st) { in file_is_our_own()
60 struct stat own; in file_is_our_own()
63 if (stat(path, &own) >= 0 && in file_is_our_own()
73 struct stat st; in manager_read_resolv_conf()
85 r = stat("/etc/resolv.conf", &st); in manager_read_resolv_conf()
394 struct stat system_st; in resolv_conf_mode()
396 if (stat("/etc/resolv.conf", &system_st) < 0) { in resolv_conf_mode()
[all …]
/systemd-251/test/ !
Dcreate-sys-script.py18 import stat
92 if stat.S_ISLNK(os.lstat(path).st_mode):
97 if stat.S_ISLNK(mode):
99 elif stat.S_ISREG(mode):
107 if not stat.S_ISDIR(mode_b):
115 if not stat.S_ISLNK(os.lstat(path_b).st_mode):
125 if not stat.S_ISREG(mode_b):
142 if stat.S_ISLNK(os.lstat(path).st_mode):
147 if stat.S_ISLNK(mode):
149 elif stat.S_ISREG(mode):
/systemd-251/src/test/ !
Dtest-dev-setup.c14 struct stat st; in main()
27 assert_se(stat(f, &st) >= 0); in main()
32 assert_se(stat(f, &st) >= 0); in main()
37 assert_se(stat(f, &st) >= 0); in main()
42 assert_se(stat(f, &st) >= 0); in main()
47 if (stat(f, &st) < 0) in main()
55 if (stat(f, &st) < 0) in main()
Dtest-copy.c86 struct stat st; in TEST()
167 struct stat a, b; in TEST()
180 assert_se(stat(unixsockp, &st) >= 0); in TEST()
231 struct stat buf, buf2, buf3; in test_copy_bytes_regular_file_one()
328 struct stat stat; in TEST_RET() local
344 assert_se(fstat(fd, &stat) >= 0); in TEST_RET()
345 blksz = stat.st_blksize; in TEST_RET()
369 assert_se(fstat(fd_copy, &stat) >= 0); in TEST_RET()
370 assert_se(stat.st_size == 3 * blksz); in TEST_RET()
Dtest-mount-util.c217 struct stat st; in TEST()
233 assert_se(stat(dst_dir, &st) == 0); in TEST()
235 assert_se(stat(dst_file, &st) == 0); in TEST()
244 assert_se(stat(src_file, &st) == 0); in TEST()
246 assert_se(stat(src_dir, &st) == 0); in TEST()
249 assert_se(stat(dst_dir, &st) == 0); in TEST()
251 assert_se(stat(dst_file, &st) == 0); in TEST()
Dtest-namespace.c32 struct stat x, y; in test_tmpdir_one()
37 assert_se(stat(a, &x) >= 0); in test_tmpdir_one()
38 assert_se(stat(b, &y) >= 0); in test_tmpdir_one()
47 assert_se(stat(c, &x) >= 0); in test_tmpdir_one()
58 assert_se(stat(d, &y) >= 0); in test_tmpdir_one()
Dtest-install-file.c14 struct stat stat1, stat2; in TEST()
33 assert_se(stat(b, &stat2) >= 0); in TEST()
40 assert_se(stat(a, &stat2) >= 0); in TEST()
/systemd-251/src/shared/ !
Defi-loader.c192 static struct stat cache_stat = {}; in efi_loader_get_config_timeout_one_shot()
193 struct stat new_stat; in efi_loader_get_config_timeout_one_shot()
201 if (stat(EFIVAR_PATH(EFI_LOADER_VARIABLE(LoaderConfigTimeoutOneShot)), &new_stat) < 0) in efi_loader_get_config_timeout_one_shot()
224 int efi_loader_update_entry_one_shot_cache(char **cache, struct stat *cache_stat) { in efi_loader_update_entry_one_shot_cache()
226 struct stat new_stat; in efi_loader_update_entry_one_shot_cache()
233 if (stat(EFIVAR_PATH(EFI_LOADER_VARIABLE(LoaderEntryOneShot)), &new_stat) < 0) in efi_loader_update_entry_one_shot_cache()
Dchown-recursive.c19 const struct stat *st, in chown_one()
47 const struct stat *st, in chown_recursive_internal()
67 struct stat fst; in chown_recursive_internal()
117 struct stat st; in path_chown_recursive()
146 struct stat st; in fd_chown_recursive()
Dcopy.c75 struct stat st; in fd_is_nonblock_pipe()
466 const struct stat *st, in fd_copy_symlink()
618 const struct stat *st, in try_hardlink()
649 const struct stat *st, in memorize_hardlink()
682 const struct stat *st, in fd_copy_regular()
759 const struct stat *st, in fd_copy_fifo()
807 const struct stat *st, in fd_copy_node()
855 const struct stat *st, in fd_copy_directory()
939 struct stat buf; in fd_copy_directory()
1049 struct stat st; in copy_tree_at_full()
[all …]
Dfind-esp.c231 struct stat st, st2; in verify_fsroot_dir()
244 if (stat(path, &st) < 0) in verify_fsroot_dir()
265 if (stat(t2, &st2) < 0) { in verify_fsroot_dir()
279 r = RET_NERRNO(stat(parent, &st2)); in verify_fsroot_dir()
410 struct stat st; in find_esp_and_warn()
421 if (stat(path, &st) < 0) in find_esp_and_warn()
670 struct stat st; in find_xbootldr_and_warn()
677 if (stat(path, &st) < 0) in find_xbootldr_and_warn()
Drm-rf.c33 struct stat st; in patch_dirfd_mode()
88 struct stat *ret, in fstatat_harder()
123 const struct stat *root_dev, in rm_rf_inner_child()
126 struct stat st; in rm_rf_inner_child()
208 const struct stat *root_dev) { in rm_rf_children()
Defi-loader.h21 int efi_loader_update_entry_one_shot_cache(char **cache, struct stat *cache_stat);
45 static inline int efi_loader_update_entry_one_shot_cache(char **cache, struct stat *cache_stat) { in efi_loader_update_entry_one_shot_cache()
/systemd-251/src/udev/ !
Dudev-node.c70 struct stat stats; in node_symlink()
267 static int update_timestamp(sd_device *dev, const char *path, struct stat *prev) { in update_timestamp()
296 struct stat st; in update_timestamp()
298 if (stat(path, &st) < 0) in update_timestamp()
320 struct stat st = {}; in update_stack_directory()
337 if (stat(dirname, &st) < 0) { in update_stack_directory()
394 if (stat(dirname, &st) < 0) { in update_stack_directory()
451 struct stat st1 = {}, st2 = {}; in link_update()
461 if (stat(dirname, &st1) < 0 && errno != ENOENT) in link_update()
481 if (stat(dirname, &st2) < 0 && errno != ENOENT) in link_update()
[all …]
/systemd-251/src/locale/ !
Dkeymap-util.c92 struct stat st; in locale_read_data()
104 r = stat("/etc/locale.conf", &st); in locale_read_data()
158 struct stat st; in vconsole_read_data()
170 if (stat("/etc/vconsole.conf", &st) < 0) { in vconsole_read_data()
195 struct stat st; in x11_read_data()
208 if (stat("/etc/X11/xorg.conf.d/00-keyboard.conf", &st) < 0) { in x11_read_data()
285 struct stat st; in locale_write_data()
311 if (stat("/etc/locale.conf", &st) >= 0) in locale_write_data()
319 struct stat st; in vconsole_write_data()
346 if (stat("/etc/vconsole.conf", &st) >= 0) in vconsole_write_data()
[all …]
/systemd-251/src/libsystemd/sd-daemon/ !
Dsd-daemon.c133 struct stat st_fd; in sd_is_fifo()
144 struct stat st_path; in sd_is_fifo()
146 if (stat(path, &st_path) < 0) { in sd_is_fifo()
161 struct stat st_fd; in sd_is_special()
172 struct stat st_path; in sd_is_special()
174 if (stat(path, &st_path) < 0) { in sd_is_special()
194 struct stat st_fd; in sd_is_socket_internal()
416 struct stat a, b; in sd_is_mq()
427 if (stat(fpath, &b) < 0) in sd_is_mq()
/systemd-251/src/hostname/ !
Dhostnamed.c72 struct stat etc_hostname_stat;
73 struct stat etc_os_release_stat;
74 struct stat etc_machine_info_stat;
98 struct stat current_stat = {}; in context_read_etc_hostname()
103 if (stat("/etc/hostname", &current_stat) >= 0 && in context_read_etc_hostname()
117 struct stat current_stat = {}; in context_read_machine_info()
122 if (stat("/etc/machine-info", &current_stat) >= 0 && in context_read_machine_info()
150 struct stat current_stat = {}; in context_read_os_release()
155 if ((stat("/etc/os-release", &current_stat) >= 0 || in context_read_os_release()
156 stat("/usr/lib/os-release", &current_stat) >= 0) && in context_read_os_release()
[all …]
/systemd-251/src/nspawn/ !
Dnspawn-patch-uid.c153 static int patch_acls(int fd, const char *name, const struct stat *st, uid_t shift) { in patch_acls()
209 static int patch_acls(int fd, const char *name, const struct stat *st, uid_t shift) { in patch_acls()
215 static int patch_fd(int fd, const char *name, const struct stat *st, uid_t shift) { in patch_fd()
287 static int recurse_fd(int fd, bool donate_fd, const struct stat *st, uid_t shift, bool is_toplevel)… in recurse_fd()
336 struct stat fst; in recurse_fd()
402 struct stat st; in fd_patch_uid_internal()
/systemd-251/src/hibernate-resume/ !
Dhibernate-resume.c14 struct stat st; in main()
33 if (stat(device, &st) < 0) { in main()

123456789