/systemd/src/basic/ |
H A D | dirent-util.c | 28 struct stat st; local 36 if (fstatat(dirfd(d), de->d_name, &st, AT_SYMLINK_NOFOLLOW) < 0) 40 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 D | chattr-util.c | 32 struct stat st; local 36 if (fstat(fd, &st) < 0) 45 if (!S_ISDIR(st.st_mode) && !S_ISREG(st.st_mode)) 80 struct stat st; local 84 if (fstat(fd, &st) < 0) 87 if (!S_ISDIR(st.st_mode) && !S_ISREG(st.st_mode))
|
H A D | copy.c | 140 static int fd_copy_symlink(int df, const char *from, const struct stat *st, int dt, const char *to) { argument 145 assert(st); 155 if (fchownat(dt, to, st->st_uid, st->st_gid, AT_SYMLINK_NOFOLLOW) < 0) 161 static int fd_copy_regular(int df, const char *from, const struct stat *st, int dt, const char *to) { argument 167 assert(st); 174 fdt = openat(dt, to, O_WRONLY|O_CREAT|O_EXCL|O_CLOEXEC|O_NOCTTY|O_NOFOLLOW, st->st_mode & 07777); 184 if (fchown(fdt, st->st_uid, st->st_gid) < 0) 187 if (fchmod(fdt, st 207 fd_copy_fifo(int df, const char *from, const struct stat *st, int dt, const char *to) argument 227 fd_copy_node(int df, const char *from, const struct stat *st, int dt, const char *to) argument 247 fd_copy_directory( int df, const char *from, const struct stat *st, int dt, const char *to, dev_t original_device, bool merge) argument 344 struct stat st; local 372 struct stat st; local 466 struct stat st; local [all...] |
H A D | stat-util.c | 48 struct stat st; local 54 r = stat(path, &st); 56 r = lstat(path, &st); 60 return !!S_ISDIR(st.st_mode); 88 bool null_or_empty(struct stat *st) { argument 89 assert(st); 91 if (S_ISREG(st->st_mode) && st->st_size <= 0) 97 if (S_ISCHR(st->st_mode) || S_ISBLK(st 104 struct stat st; local 115 struct stat st; local 126 struct statvfs st; local [all...] |
H A D | mkdir.c | 33 struct stat st; local 39 if (lstat(path, &st) < 0) 42 if ((st.st_mode & 0007) > (mode & 0007) || 43 (st.st_mode & 0070) > (mode & 0070) || 44 (st.st_mode & 0700) > (mode & 0700) || 45 (uid != UID_INVALID && st.st_uid != uid) || 46 (gid != GID_INVALID && st.st_gid != gid) || 47 !S_ISDIR(st.st_mode))
|
H A D | locale-util.c | 83 struct stat st; local 91 if (fstat(fd, &st) < 0) 94 if (!S_ISREG(st.st_mode)) 97 if (st.st_size < (off_t) sizeof(struct locarhead)) 100 p = mmap(NULL, st.st_size, PROT_READ, MAP_SHARED, fd, 0); 106 h->namehash_offset + h->namehash_size > st.st_size || 107 h->string_offset + h->string_size > st.st_size || 108 h->locrectab_offset + h->locrectab_size > st.st_size || 109 h->sumhash_offset + h->sumhash_size > st.st_size) {
|
H A D | rm-rf.c | 78 struct stat st; local 93 if (fstatat(fd, de->d_name, &st, AT_SYMLINK_NOFOLLOW) < 0) { 99 is_dir = S_ISDIR(st.st_mode); 107 if (root_dev && st.st_dev != root_dev->st_dev) 131 if ((flags & REMOVE_SUBVOLUME) && st.st_ino == 256) {
|
H A D | smack-util.c | 137 struct stat st; local 151 r = lstat(path, &st); 161 if (S_ISDIR(st.st_mode)) 163 else if (S_ISLNK(st.st_mode)) 165 else if (S_ISCHR(st.st_mode))
|
H A D | lockfile-util.c | 59 struct stat st; local 82 r = fstat(fd, &st); 85 if (st.st_nlink > 0)
|
/systemd/src/hibernate-resume/ |
H A D | hibernate-resume.c | 30 struct stat st; local 52 if (stat(device, &st) < 0) { 57 if (!S_ISBLK(st.st_mode)) { 62 if (asprintf(&major_minor, "%d:%d", major(st.st_rdev), minor(st.st_rdev)) < 0) {
|
/systemd/src/update-done/ |
H A D | update-done.c | 35 struct stat st; local 40 if (stat(path, &st) >= 0) { 49 if (st.st_mtim.tv_sec > ts->tv_sec) 92 struct stat st; local 99 if (stat("/usr", &st) < 0) { 110 r = apply_timestamp("/etc/.updated", &st.st_mtim); 111 q = apply_timestamp("/var/.updated", &st.st_mtim);
|
/systemd/src/journal/ |
H A D | journal-vacuum.c | 77 const struct stat *st, 88 assert(st); 91 x = timespec_load(&st->st_ctim); 95 x = timespec_load(&st->st_atim); 99 x = timespec_load(&st->st_mtim); 116 struct stat st; local 128 if (fstat(fd, &st) < 0) 132 if (st.st_size < (off_t) sizeof(Header)) 187 struct stat st; local 190 if (fstatat(dirfd(d), de->d_name, &st, AT_SYMLINK_NOFOLLO 74 patch_realtime( int fd, const char *fn, const struct stat *st, unsigned long long *realtime) argument 292 patch_realtime(dirfd(d), p, &st, &realtime); local [all...] |
H A D | mmap-cache.h | 42 struct stat *st,
|
H A D | test-journal-verify.c | 77 struct stat st; local 131 assert_se(stat("test.journal", &st) >= 0); 133 for (p = 38448*8+0; p < ((uint64_t) st.st_size * 8); p ++) {
|
H A D | catalog.c | 547 struct stat st; local 557 if (fstat(fd, &st) < 0) { 562 if (st.st_size < (off_t) sizeof(CatalogHeader)) { 567 p = mmap(NULL, PAGE_ALIGN(st.st_size), PROT_READ, MAP_SHARED, fd, 0); 579 st.st_size < (off_t) (le64toh(h->header_size) + le64toh(h->catalog_item_size) * le64toh(h->n_items))) { 581 munmap(p, st.st_size); 586 *_st = st; 634 struct stat st = {}; local 641 r = open_mmap(database, &fd, &st, &p); 662 munmap(p, st 702 struct stat st; local [all...] |
H A D | journald-native.c | 317 struct stat st; local 366 if (fstat(fd, &st) < 0) { 371 if (!S_ISREG(st.st_mode)) { 376 if (st.st_size <= 0) 379 if (st.st_size > ENTRY_SIZE_MAX) { 390 ps = PAGE_ALIGN(st.st_size); 397 server_process_native_message(s, p, st.st_size, ucred, tv, label, label_len); 436 p = malloc(st.st_size); 442 n = pread(fd, p, st.st_size, 0);
|
/systemd/src/resolve/ |
H A D | resolved-resolv-conf.c | 35 struct stat st, own; local 48 r = stat("/etc/resolv.conf", &st); 58 t = timespec_load(&st.st_mtim); 64 st.st_dev == own.st_dev && 65 st.st_ino == own.st_ino) 77 if (fstat(fileno(f), &st) < 0) {
|
/systemd/src/coredump/ |
H A D | coredump-vacuum.c | 171 struct stat st; local 179 if (fstatat(dirfd(d), de->d_name, &st, AT_NO_AUTOMOUNT|AT_SYMLINK_NOFOLLOW) < 0) { 187 if (!S_ISREG(st.st_mode)) 191 exclude_st.st_dev == st.st_dev && 192 exclude_st.st_ino == st.st_ino) 199 t = timespec_load(&st.st_mtim); 244 sum += st.st_blocks * 512;
|
/systemd/src/shared/ |
H A D | clean-ipc.c | 211 struct stat st; local 216 if (fstatat(dirfd(dir), de->d_name, &st, AT_SYMLINK_NOFOLLOW) < 0) { 225 if (st.st_uid != uid) 228 if (S_ISDIR(st.st_mode)) { 299 struct stat st; local 305 if (fstatat(dirfd(dir), de->d_name, &st, AT_SYMLINK_NOFOLLOW) < 0) { 315 if (st.st_uid != uid)
|
H A D | machine-image.c | 156 struct stat st; local 166 if (fstatat(dfd, filename, &st, 0) < 0) 173 if (S_ISDIR(st.st_mode)) { 188 if (st.st_ino == 256) { 249 } else if (S_ISREG(st.st_mode) && endswith(filename, ".raw")) { 266 !(st.st_mode & 0222) || read_only, 268 timespec_load(&st.st_mtim), 273 (*ret)->usage = (*ret)->usage_exclusive = st.st_blocks * 512; 274 (*ret)->limit = (*ret)->limit_exclusive = st.st_size; 682 struct stat st; local 708 struct stat st; local [all...] |
/systemd/src/fsck/ |
H A D | fsck.c | 281 struct stat st; local 310 if (stat(device, &st) < 0) { 315 if (!S_ISBLK(st.st_mode)) { 321 r = sd_device_new_from_devnum(&dev, 'b', st.st_rdev); 333 if (stat("/", &st) < 0) { 339 if (major(st.st_dev) == 0) { 346 times[0] = st.st_atim; 347 times[1] = st.st_mtim; 355 r = sd_device_new_from_devnum(&dev, 'b', st.st_dev);
|
/systemd/src/timesync/ |
H A D | timesyncd.c | 48 struct stat st; local 52 r = fstat(fd, &st); 54 stamp = timespec_load(&st.st_mtim);
|
/systemd/src/libsystemd/sd-hwdb/ |
H A D | sd-hwdb.c | 45 struct stat st; member in struct:sd_hwdb 310 if (fstat(fileno(hwdb->f), &hwdb->st) < 0 || 311 (size_t)hwdb->st.st_size < offsetof(struct trie_header_f, strings_len) + 8) 314 hwdb->map = mmap(0, hwdb->st.st_size, PROT_READ, MAP_SHARED, fileno(hwdb->f), 0); 319 (size_t)hwdb->st.st_size != le64toh(hwdb->head->file_size)) { 326 log_debug("file size: %8"PRIi64" bytes", hwdb->st.st_size); 348 munmap((void *)hwdb->map, hwdb->st.st_size); 361 struct stat st; local 370 if (stat(p, &st) >= 0) { 378 if (timespec_load(&hwdb->st [all...] |
/systemd/src/core/ |
H A D | device.c | 403 struct stat st; local 419 if (stat(p, &st) >= 0) 420 if ((!S_ISBLK(st.st_mode) && !S_ISCHR(st.st_mode)) || 421 st.st_rdev != udev_device_get_devnum(dev)) 785 struct stat st; local 814 if (stat(node, &st) >= 0) { 815 if (!S_ISBLK(st.st_mode) && !S_ISCHR(st.st_mode)) 818 dev = udev_device_new_from_devnum(m->udev, S_ISBLK(st [all...] |
/systemd/src/cryptsetup/ |
H A D | cryptsetup.c | 245 struct stat st; local 249 if (stat(path, &st) < 0) 252 if (!S_ISBLK(st.st_mode)) 255 if (asprintf(ret, "/dev/block/%d:%d", major(st.st_rdev), minor(st.st_rdev)) < 0) 270 struct stat st; local 276 if (stat(path, &st) < 0) 279 if (!S_ISBLK(st.st_mode)) 282 r = sd_device_new_from_devnum(&device, 'b', st.st_rdev); 671 struct stat st; local [all...] |