Lines Matching refs:sb
76 struct stat sb;
81 if (stat(path, &sb) == 0) {
82 if (S_ISDIR(sb.st_mode)) {
115 struct stat sb;
117 if (stat(path, &sb) != 0 || ! S_ISDIR(sb.st_mode))
191 struct stat sb;
192 if (fstatat(dirfd(dir), dir_ent->d_name, &sb, 0) == 0) {
197 if (!entry|| sb.st_atime < entry->lru_atime) {
199 if (!predicate(dir_path, &sb, dir_ent->d_name, len))
219 if (sb.st_atime < entry->lru_atime) {
236 entry->lru_atime = sb.st_atime;
237 entry->lru_file_size = sb.st_blocks * 512;
268 is_regular_non_tmp_file(const char *path, const struct stat *sb,
271 if (!S_ISREG(sb->st_mode))
306 is_two_character_sub_directory(const char *path, const struct stat *sb,
309 if (!S_ISDIR(sb->st_mode))
444 struct stat sb;
445 if (stat(filename, &sb) == -1) {
453 if (sb.st_blocks)
454 p_atomic_add(cache->size, - (uint64_t)sb.st_blocks * 512);
539 struct stat sb;
540 if (fstat(fd, &sb) == -1)
543 data = malloc(sb.st_size);
548 int ret = read_all(fd, data, sb.st_size);
553 parse_and_validate_cache_item(cache, data, sb.st_size, size);
746 struct stat sb;
747 if (stat(filename, &sb) == -1) {
753 p_atomic_add(dc_job->cache->size, sb.st_blocks * 512);
925 struct stat sb;
926 if (fstat(fd, &sb) == -1)
931 if (sb.st_size != size) {