Lines Matching refs:sb
599 + if (st.sb.st_mode & S_IFDIR) {
624 + if (st.sb.st_size < 8 || st.sb.st_size > maxoff_t()) {
627 + st.sb.st_size < 8 ? "small" : "large");
652 + map->len = CAST(size_t, st.sb.st_size);
661 + if (php_stream_read(stream, map->p, (size_t)st.sb.st_size) != (size_t)st.sb.st_size) {
727 + nentries = (uint32_t)(st.sb.st_size / sizeof(struct magic));
728 + entries = (uint32_t)(st.sb.st_size / sizeof(struct magic));
729 + if ((zend_off_t)(entries * sizeof(struct magic)) != st.sb.st_size) {
731 + dbname, (unsigned long long)st.sb.st_size,
1622 -file_fsmagic(struct magic_set *ms, const char *fn, struct stat *sb)
1623 +file_fsmagic(struct magic_set *ms, const char *fn, zend_stat_t *sb)
1644 - ret = lstat(fn, sb);
1647 - ret = stat(fn, sb); /* don't merge into if; see "ret =" above */
1660 - sb->st_mode = S_IFBLK;
1665 - sb->st_mode |= S_IFCHR;
1666 - sb->st_mode &= ~S_IFREG;
1669 - sb->st_mode |= S_IFIFO;
1670 - sb->st_mode &= ~S_IFREG;
1677 + ret = php_sys_stat(fn, sb);
1684 switch (sb->st_mode & S_IFMT) {
1730 COMMA, major(sb->st_rdev), dv_unit(sb->st_rdev),
1731 dv_subunit(sb->st_rdev)) == -1)
1758 - COMMA, major(sb->st_rdev), dv_unit(sb->st_rdev),
1759 - dv_subunit(sb->st_rdev)) == -1)
1763 - COMMA, (long)major(sb->st_rdev),
1764 - (long)minor(sb->st_rdev)) == -1)
2483 - const struct stat *sb)
2499 - utsbuf[0].tv_sec = sb->st_atime;
2500 - utsbuf[1].tv_sec = sb->st_mtime;
2507 - utbuf.actime = sb->st_atime;
2508 - utbuf.modtime = sb->st_mtime;
2548 - struct stat sb;
2549 + zend_stat_t sb = {0};
2566 switch (file_fsmagic(ms, inname, &sb)) {
2580 - okstat = stat(inname, &sb) == 0;
2589 - sb.st_mode = S_IFBLK;
2594 - unreadable_info(ms, sb.st_mode, inname) == -1)
2601 + if (unreadable_info(ms, sb.st_mode, inname) == -1)
2613 - okstat = fstat(fd, &sb) == 0;
2614 - if (okstat && S_ISFIFO(sb.st_mode))
2626 + memcpy(&sb, &ssb.sb, sizeof(zend_stat_t));
2644 - if (unreadable_info(ms, sb.st_mode, inname) == -1)
2671 - if (file_buffer(ms, fd, okstat ? &sb : NULL, inname, buf, CAST(size_t, nbytes)) == -1)
2672 + if (file_buffer(ms, stream, &sb, inname, buf, CAST(size_t, nbytes)) == -1)
2680 - close_and_restore(ms, inname, fd, &sb);