Home
last modified time | relevance | path

Searched refs:inname (Results 1 – 3 of 3) sorted by relevance

/PHP-7.3/ext/fileinfo/libmagic/
H A Dmagic.c209 magic_file(struct magic_set *ms, const char *inname) in magic_file() argument
213 return file_or_stream(ms, inname, NULL); in magic_file()
225 file_or_stream(struct magic_set *ms, const char *inname, php_stream *stream) in file_or_stream() argument
236 if (!inname && !stream) { in file_or_stream()
248 switch (file_fsmagic(ms, inname, &sb, stream)) { in file_or_stream()
260 if (!stream && inname) { in file_or_stream()
262 stream = php_stream_open_wrapper((char *)inname, "rb", REPORT_ERRORS, NULL); in file_or_stream()
266 if (unreadable_info(ms, sb.st_mode, inname) == -1) in file_or_stream()
280 file_error(ms, errno, "cannot read `%s'", inname); in file_or_stream()
285 if (file_buffer(ms, stream, inname, buf, (size_t)nbytes) == -1) in file_or_stream()
H A Dfuncs.c174 file_buffer(struct magic_set *ms, php_stream *stream, const char *inname, const void *buf, in file_buffer() argument
203 if ((ms->flags & MAGIC_NO_CHECK_APPTYPE) == 0 && inname) { in file_buffer()
204 m = file_os2_apptype(ms, inname, &b); in file_buffer()
220 m = file_zmagic(ms, &b, inname); in file_buffer()
/PHP-7.3/ext/fileinfo/
H A Dlibmagic.patch2974 m = file_zmagic(ms, &b, inname);
3483 + return file_or_stream(ms, inname, NULL);
3510 + if (!inname && !stream) {
3523 - switch (file_fsmagic(ms, inname, &sb)) {
3538 - if (inname == NULL) {
3545 - int okstat = stat(inname, &sb) == 0;
3554 + if (!stream && inname) {
3560 - if ((fd = open(inname, flags)) < 0) {
3606 - if (nbytes == 0 && inname) {
3626 - inname == NULL ? "/dev/stdin" : inname);
[all …]

Completed in 14 milliseconds