Searched refs:st_mode (Results 1 - 25 of 54) sorted by relevance

123

/systemd/src/basic/
H A Ddirent-util.c40 S_ISREG(st.st_mode) ? DT_REG :
41 S_ISDIR(st.st_mode) ? DT_DIR :
42 S_ISLNK(st.st_mode) ? DT_LNK :
43 S_ISFIFO(st.st_mode) ? DT_FIFO :
44 S_ISSOCK(st.st_mode) ? DT_SOCK :
45 S_ISCHR(st.st_mode) ? DT_CHR :
46 S_ISBLK(st.st_mode) ? DT_BLK :
H A Dchattr-util.c45 if (!S_ISDIR(st.st_mode) && !S_ISREG(st.st_mode))
87 if (!S_ISDIR(st.st_mode) && !S_ISREG(st.st_mode))
H A Dcopy.c174 fdt = openat(dt, to, O_WRONLY|O_CREAT|O_EXCL|O_CLOEXEC|O_NOCTTY|O_NOFOLLOW, st->st_mode & 07777);
187 if (fchmod(fdt, st->st_mode & 07777) < 0)
214 r = mkfifoat(dt, to, st->st_mode & 07777);
221 if (fchmodat(dt, to, st->st_mode & 07777, 0) < 0)
234 r = mknodat(dt, to, st->st_mode, st->st_rdev);
241 if (fchmodat(dt, to, st->st_mode & 07777, 0) < 0)
275 r = mkdirat(dt, to, st->st_mode & 07777);
298 if (fchmod(fdt, st->st_mode & 07777) < 0)
320 if (S_ISREG(buf.st_mode))
322 else if (S_ISDIR(buf.st_mode))
[all...]
H A Dstat-util.c44 return !!S_ISLNK(info.st_mode);
60 return !!S_ISDIR(st.st_mode);
71 return !!(S_ISBLK(info.st_mode) || S_ISCHR(info.st_mode));
91 if (S_ISREG(st->st_mode) && st->st_size <= 0)
97 if (S_ISCHR(st->st_mode) || S_ISBLK(st->st_mode))
H A Dmkdir.c42 if ((st.st_mode & 0007) > (mode & 0007) ||
43 (st.st_mode & 0070) > (mode & 0070) ||
44 (st.st_mode & 0700) > (mode & 0700) ||
47 !S_ISDIR(st.st_mode))
H A Dsmack-util.c161 if (S_ISDIR(st.st_mode))
163 else if (S_ISLNK(st.st_mode))
165 else if (S_ISCHR(st.st_mode))
H A Dfd-util.c295 if ((sta.st_mode & S_IFMT) != (stb.st_mode & S_IFMT))
302 if (S_ISCHR(sta.st_mode) || S_ISBLK(sta.st_mode))
H A Dfs-util.c124 if (ret >= 0 && S_ISDIR(buf.st_mode)) {
321 if (st.st_mode & 0111)
324 if (st.st_mode & 0002)
327 if (getpid() == 1 && (st.st_mode & 0044) != 0044)
H A Drm-rf.c99 is_dir = S_ISDIR(st.st_mode);
/systemd/src/udev/
H A Dudevadm-util.c38 if (S_ISBLK(statbuf.st_mode))
40 else if (S_ISCHR(statbuf.st_mode))
H A Dudev-node.c68 if (S_ISBLK(stats.st_mode) || S_ISCHR(stats.st_mode)) {
71 } else if (S_ISLNK(stats.st_mode)) {
271 if (((stats.st_mode & S_IFMT) != (mode & S_IFMT)) || (stats.st_rdev != devnum)) {
282 if ((stats.st_mode & 0777) != (mode & 0777) || stats.st_uid != uid || stats.st_gid != gid) {
H A Dudevadm-info.c207 if ((stats.st_mode & mask) != 0)
209 if (S_ISDIR(stats.st_mode)) {
/systemd/src/test/
H A Dtest-namespace.c41 assert_se(S_ISDIR(x.st_mode));
42 assert_se(S_ISDIR(y.st_mode));
44 assert_se((x.st_mode & 01777) == 0700);
45 assert_se((y.st_mode & 01777) == 0700);
53 assert_se(S_ISDIR(x.st_mode));
54 assert_se(S_ISDIR(y.st_mode));
56 assert_se((x.st_mode & 01777) == 01777);
57 assert_se((y.st_mode & 01777) == 01777);
H A Dtest-path.c237 assert_se((s.st_mode & S_IRWXU) == 0700);
238 assert_se((s.st_mode & S_IRWXG) == 0040);
239 assert_se((s.st_mode & S_IRWXO) == 0004);
/systemd/src/hibernate-resume/
H A Dhibernate-resume.c57 if (!S_ISBLK(st.st_mode)) {
/systemd/src/libsystemd/sd-daemon/
H A Dsd-daemon.c156 if (!S_ISFIFO(st_fd.st_mode))
186 if (!S_ISREG(st_fd.st_mode) && !S_ISCHR(st_fd.st_mode))
200 if (S_ISREG(st_fd.st_mode) && S_ISREG(st_path.st_mode))
204 else if (S_ISCHR(st_fd.st_mode) && S_ISCHR(st_path.st_mode))
222 if (!S_ISSOCK(st_fd.st_mode))
/systemd/src/tmpfiles/
H A Dtmpfiles.c410 if (S_ISDIR(s.st_mode) && dir_is_mount_point(d, dent->d_name) > 0) {
417 if (s.st_uid == 0 && !(s.st_mode & S_IWUSR)) {
439 if (S_ISDIR(s.st_mode)) {
511 if (s.st_mode & S_ISVTX) {
516 if (mountpoint && S_ISREG(s.st_mode))
526 if (S_ISSOCK(s.st_mode) && unix_socket_alive(sub_path)) {
532 if (S_ISCHR(s.st_mode) || S_ISBLK(s.st_mode)) {
623 if (S_ISLNK(st.st_mode))
634 if (!(st.st_mode
[all...]
/systemd/src/core/
H A Ddevice.c420 if ((!S_ISBLK(st.st_mode) && !S_ISCHR(st.st_mode)) ||
815 if (!S_ISBLK(st.st_mode) && !S_ISCHR(st.st_mode))
818 dev = udev_device_new_from_devnum(m->udev, S_ISBLK(st.st_mode) ? 'b' : 'c', st.st_rdev);
H A Dnamespace.c208 if (!S_ISBLK(st.st_mode) &&
209 !S_ISCHR(st.st_mode)) {
223 mac_selinux_create_file_prepare(d, st.st_mode);
224 r = mknod(dn, st.st_mode, st.st_rdev);
302 if (mknod(busnode, (st.st_mode & ~07777) | 0600, st.st_rdev) < 0) {
/systemd/src/import/
H A Dimport-raw.c156 if (!S_ISREG(i->st.st_mode))
240 if (S_ISREG(i->st.st_mode)) {
304 if (!S_ISREG(i->st.st_mode))
H A Dimport-common.c52 if (fchmod(fd, st.st_mode & 07555) < 0)
/systemd/src/shared/
H A Dcondition.c396 S_ISREG(st.st_mode) &&
408 S_ISREG(st.st_mode) &&
409 (st.st_mode & 0111));
H A Dmachine-image.c173 if (S_ISDIR(st.st_mode)) {
249 } else if (S_ISREG(st.st_mode) && endswith(filename, ".raw")) {
266 !(st.st_mode & 0222) || read_only,
687 if (chmod(i->path, (st.st_mode & 0444) | (b ? 0000 : 0200)) < 0)
/systemd/src/cryptsetup/
H A Dcryptsetup.c252 if (!S_ISBLK(st.st_mode))
279 if (!S_ISBLK(st.st_mode))
675 if (stat(key_file, &st) >= 0 && S_ISREG(st.st_mode) && (st.st_mode & 0005))
/systemd/src/libsystemd/sd-device/
H A Dsd-device.c1580 if (!(statbuf.st_mode & S_IRUSR))
1741 } else if (S_ISLNK(statbuf.st_mode)) {
1750 } else if (S_ISDIR(statbuf.st_mode)) {
1753 } else if (!(statbuf.st_mode & S_IRUSR)) {
1830 if (S_ISLNK(statbuf.st_mode))
1834 if (S_ISDIR(statbuf.st_mode))
1838 if ((statbuf.st_mode & S_IRUSR) == 0)

Completed in 150 milliseconds

123