Home
last modified time | relevance | path

Searched refs:sb (Results 1 – 25 of 51) sorted by relevance

123

/php-src/ext/fileinfo/libmagic/
H A Dfsmagic.c100 ret = php_sys_stat(fn, sb); in file_fsmagic()
116 if (sb->st_mode & S_ISUID) in file_fsmagic()
121 if (sb->st_mode & S_ISGID) in file_fsmagic()
126 if (sb->st_mode & S_ISVTX) in file_fsmagic()
132 switch (sb->st_mode & S_IFMT) { in file_fsmagic()
152 COMMA, major(sb->st_rdev), dv_unit(sb->st_rdev), in file_fsmagic()
153 dv_subunit(sb->st_rdev)) == -1) in file_fsmagic()
157 COMMA, (long)major(sb->st_rdev), in file_fsmagic()
158 (long)minor(sb->st_rdev)) == -1) in file_fsmagic()
227 if ((ms->flags & MAGIC_DEVICES) == 0 && sb->st_size == 0) { in file_fsmagic()
[all …]
H A Dmagic.c200 zend_stat_t sb = {0}; in file_or_stream() local
215 switch (file_fsmagic(ms, inname, &sb)) { in file_or_stream()
231 if (unreadable_info(ms, sb.st_mode, inname) == -1) in file_or_stream()
246 memcpy(&sb, &ssb.sb, sizeof(zend_stat_t)); in file_or_stream()
257 if (file_buffer(ms, stream, &sb, inname, buf, CAST(size_t, nbytes)) == -1) in file_or_stream()
H A Dapprentice.c1082 size_t sb = file_magic_strength(mb->mp, mb->cont_count); in apprentice_sort() local
1083 if (sa == sb) in apprentice_sort()
1085 else if (sa > sb) in apprentice_sort()
3233 if (st.sb.st_mode & S_IFDIR) { in apprentice_map()
3255 if (st.sb.st_size < 8 || st.sb.st_size > maxoff_t()) { in apprentice_map()
3257 st.sb.st_size < 8 ? "small" : "large"); in apprentice_map()
3262 map->len = CAST(size_t, st.sb.st_size); in apprentice_map()
3265 if (php_stream_read(stream, map->p, (size_t)st.sb.st_size) != (size_t)st.sb.st_size) { in apprentice_map()
3303 nentries = (uint32_t)(st.sb.st_size / sizeof(struct magic)); in apprentice_map()
3304 entries = (uint32_t)(st.sb.st_size / sizeof(struct magic)); in apprentice_map()
[all …]
/php-src/ext/zip/
H A Dzip_stream.c123 struct zip_stat sb; in php_zip_ops_stat() local
175 ssb->sb.st_size = sb.size; in php_zip_ops_stat()
178 ssb->sb.st_size = 0; in php_zip_ops_stat()
182 ssb->sb.st_mtime = sb.mtime; in php_zip_ops_stat()
183 ssb->sb.st_atime = sb.mtime; in php_zip_ops_stat()
184 ssb->sb.st_ctime = sb.mtime; in php_zip_ops_stat()
185 ssb->sb.st_nlink = 1; in php_zip_ops_stat()
186 ssb->sb.st_rdev = -1; in php_zip_ops_stat()
188 ssb->sb.st_blksize = -1; in php_zip_ops_stat()
189 ssb->sb.st_blocks = -1; in php_zip_ops_stat()
[all …]
H A Dphp_zip.c128 struct zip_stat sb; in php_zip_extract_file() local
1980 struct zip_stat sb; local
1991 RETURN_SB(&sb);
2002 struct zip_stat sb; local
2014 RETURN_SB(&sb);
2198 struct zip_stat sb; local
2261 struct zip_stat sb; local
2326 struct zip_stat sb; local
2450 struct zip_stat sb; local
2912 if (sb.size < 1) {
[all …]
H A Dphp_zip.h62 struct zip_stat sb; member
92 php_stream *php_stream_zip_open(struct zip *arch, struct zip_stat *sb, const char *mode, zip_flags_…
/php-src/ext/zip/tests/
H A Doo_delete.phpt57 $sb = $zip->statIndex(0);
58 var_dump($sb);
59 $sb = $zip->statIndex(1);
60 var_dump($sb);
61 $sb = $zip->statIndex(2);
62 var_dump($sb);
H A Doo_addglob2.phpt49 $sb = $zip->statIndex($i);
50 echo "$i: " . $sb['name'] .
51 ", comp=" . $sb['comp_method'] .
52 ", enc=" . $sb['encryption_method'] . "\n";
H A Dutils.inc4 $sb = $z->statIndex($i);
5 echo $i . ' ' . $sb['name'] . "\n";
H A Dbug7658.phpt41 $sb = $zip->statIndex($i);
42 $found[] = $sb['name'];
/php-src/ext/phar/
H A Dfunc_interceptors.c491 zend_stat_t sb = {0}; in phar_file_stat() local
542 sb.st_size = 0; in phar_file_stat()
543 sb.st_mode = 0777; in phar_file_stat()
582 sb.st_size = 0; in phar_file_stat()
615 sb.st_size = 0; in phar_file_stat()
629 sb.st_mode = (sb.st_mode & 0555) | (sb.st_mode & ~0777); in phar_file_stat()
632 sb.st_nlink = 1; in phar_file_stat()
633 sb.st_rdev = -1; in phar_file_stat()
635 sb.st_dev = 0xc; in phar_file_stat()
641 sb.st_blksize = -1; in phar_file_stat()
[all …]
H A Dstream.c500 ssb->sb.st_mtime = data->timestamp; in phar_dostat()
504 ssb->sb.st_size = 0; in phar_dostat()
512 ssb->sb.st_size = 0; in phar_dostat()
513 ssb->sb.st_mode = 0777; in phar_dostat()
520 ssb->sb.st_mode = (ssb->sb.st_mode & 0555) | (ssb->sb.st_mode & ~0777); in phar_dostat()
523 ssb->sb.st_nlink = 1; in phar_dostat()
524 ssb->sb.st_rdev = -1; in phar_dostat()
526 ssb->sb.st_dev = 0xc; in phar_dostat()
529 ssb->sb.st_ino = data->inode; in phar_dostat()
532 ssb->sb.st_blksize = -1; in phar_dostat()
[all …]
/php-src/ext/dom/tests/
H A DDOMXPath_quote.phpt33 $sb = [];
39 $sb[] = $quoteMethod . \substr($string, 0, $bytesUntilQuote) . $quoteMethod;
42 $sb = \implode(',', $sb);
43 return 'concat(' . $sb . ')';
/php-src/ext/standard/
H A Dftp_fopen_wrapper.c792 ssb->sb.st_mode |= S_IFREG; in php_stream_ftp_url_stat()
812 ssb->sb.st_size = 0; in php_stream_ftp_url_stat()
861 ssb->sb.st_mtime = -1; in php_stream_ftp_url_stat()
865 ssb->sb.st_dev = 0; in php_stream_ftp_url_stat()
866 ssb->sb.st_uid = 0; in php_stream_ftp_url_stat()
867 ssb->sb.st_gid = 0; in php_stream_ftp_url_stat()
868 ssb->sb.st_atime = -1; in php_stream_ftp_url_stat()
869 ssb->sb.st_ctime = -1; in php_stream_ftp_url_stat()
871 ssb->sb.st_nlink = 1; in php_stream_ftp_url_stat()
872 ssb->sb.st_rdev = -1; in php_stream_ftp_url_stat()
[all …]
H A Dlink.c95 zend_stat_t sb = {0}; in PHP_FUNCTION() local
111 ret = VCWD_LSTAT(link, &sb); in PHP_FUNCTION()
119 RETURN_LONG((zend_long) sb.st_dev); in PHP_FUNCTION()
H A Diptc.c181 zend_stat_t sb = {0}; in PHP_FUNCTION() local
206 if (zend_fstat(fileno(fp), &sb) != 0) { in PHP_FUNCTION()
210 spoolbuf = zend_string_safe_alloc(1, iptcdata_len + sizeof(psheader) + 1024 + 1, sb.st_size, 0); in PHP_FUNCTION()
212 memset(poi, 0, iptcdata_len + sizeof(psheader) + sb.st_size + 1024 + 1); in PHP_FUNCTION()
H A Dfile.c1385 ZVAL_LONG(&stat_dev, stat_ssb.sb.st_dev); in php_fstat()
1386 ZVAL_LONG(&stat_ino, stat_ssb.sb.st_ino); in php_fstat()
1387 ZVAL_LONG(&stat_mode, stat_ssb.sb.st_mode); in php_fstat()
1389 ZVAL_LONG(&stat_uid, stat_ssb.sb.st_uid); in php_fstat()
1390 ZVAL_LONG(&stat_gid, stat_ssb.sb.st_gid); in php_fstat()
1392 ZVAL_LONG(&stat_rdev, stat_ssb.sb.st_rdev); in php_fstat()
1396 ZVAL_LONG(&stat_size, stat_ssb.sb.st_size); in php_fstat()
1514 if (S_ISDIR(src_s.sb.st_mode)) { in php_copy_file_ctx()
1529 if (S_ISDIR(dest_s.sb.st_mode)) { in php_copy_file_ctx()
1533 if (!src_s.sb.st_ino || !dest_s.sb.st_ino) { in php_copy_file_ctx()
[all …]
/php-src/win32/
H A Dglob.c531 zend_stat_t sb = {0}; in glob2() local
542 if (g_lstat(pathbuf, &sb, pglob)) in glob2()
546 !IS_SLASH(pathend[-1])) && (S_ISDIR(sb.st_mode) || in glob2()
547 (S_ISLNK(sb.st_mode) && in glob2()
548 (g_stat(pathbuf, &sb, pglob) == 0) && in glob2()
549 S_ISDIR(sb.st_mode)))) { in glob2()
816 return((*pglob->gl_lstat)(buf, sb)); in g_lstat()
817 return(php_sys_lstat(buf, sb)); in g_lstat()
820 static int g_stat(Char *fn, zend_stat_t *sb, glob_t *pglob) in g_stat() argument
827 return((*pglob->gl_stat)(buf, sb)); in g_stat()
[all …]
/php-src/main/streams/
H A Dplain_wrapper.c158 zend_stat_t sb; member
169 r = zend_fstat(fd, &d->sb); in do_fstat()
258 self->is_seekable = !(S_ISFIFO(self->sb.st_mode) || S_ISCHR(self->sb.st_mode)); in detect_is_seekable()
664 memcpy(&ssb->sb, &data->sb, sizeof(ssb->sb)); in php_stdiop_stat()
1231 return VCWD_LSTAT(url, &ssb->sb); in php_plain_files_url_stater()
1236 return VCWD_LSTAT(url, &ssb->sb); in php_plain_files_url_stater()
1240 return VCWD_STAT(url, &ssb->sb); in php_plain_files_url_stater()
1306 zend_stat_t sb; in php_plain_files_rename() local
1323 if (VCWD_CHOWN(url_to, sb.st_uid, sb.st_gid)) { in php_plain_files_rename()
1402 zend_stat_t sb; in php_plain_files_mkdir() local
[all …]
H A Dmemory.c199 ssb->sb.st_size = ZSTR_LEN(ms->data); in php_stream_memory_stat()
200 ssb->sb.st_mode |= S_IFREG; /* regular file */ in php_stream_memory_stat()
201 ssb->sb.st_mtime = timestamp; in php_stream_memory_stat()
202 ssb->sb.st_atime = timestamp; in php_stream_memory_stat()
203 ssb->sb.st_ctime = timestamp; in php_stream_memory_stat()
204 ssb->sb.st_nlink = 1; in php_stream_memory_stat()
205 ssb->sb.st_rdev = -1; in php_stream_memory_stat()
207 ssb->sb.st_dev = 0xC; in php_stream_memory_stat()
209 ssb->sb.st_ino = 0; in php_stream_memory_stat()
212 ssb->sb.st_blksize = -1; in php_stream_memory_stat()
[all …]
/php-src/ext/fileinfo/
H A Dlibmagic.patch624 + if (st.sb.st_size < 8 || st.sb.st_size > maxoff_t()) {
661 + if (php_stream_read(stream, map->p, (size_t)st.sb.st_size) != (size_t)st.sb.st_size) {
1644 - ret = lstat(fn, sb);
1660 - sb->st_mode = S_IFBLK;
1730 COMMA, major(sb->st_rdev), dv_unit(sb->st_rdev),
1758 - COMMA, major(sb->st_rdev), dv_unit(sb->st_rdev),
2483 - const struct stat *sb)
2548 - struct stat sb;
2549 + zend_stat_t sb = {0};
2589 - sb.st_mode = S_IFBLK;
[all …]
H A Dfileinfo.c395 if (ssb.sb.st_mode & S_IFDIR) { in _php_finfo_get_type()
410 if (ssb.sb.st_mode & S_IFDIR) { in _php_finfo_get_type()
/php-src/main/
H A Dphp_ini.c635 zend_stat_t sb = {0}; in php_init_config() local
676 if (VCWD_STAT(ini_file, &sb) == 0) { in php_init_config()
677 if (S_ISREG(sb.st_mode)) { in php_init_config()
761 zend_stat_t sb = {0}; in php_parse_user_ini_file() local
766 if (VCWD_STAT(ini_file, &sb) == 0) { in php_parse_user_ini_file()
767 if (S_ISREG(sb.st_mode)) { in php_parse_user_ini_file()
/php-src/ext/mysqli/tests/bind_insert/
H A Dsend_long_data.phpt22 mysqli_stmt_bind_param($stmt, "sb", $c1, $c2);
/php-src/ext/standard/tests/strings/
H A Dstrval_variation2.phpt18 $sb = "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf";
46 echo bin2hex(strval($sb));

Completed in 74 milliseconds

123