Lines Matching refs:ms

68 toomany(struct magic_set *ms, const char *name, uint16_t num)
70 if (file_printf(ms, ", too many %s (%u)", name, num
307 dophn_core(struct magic_set *ms, int clazz, int swap, int fd, off_t off,
317 if (file_printf(ms, ", corrupted program header size") == -1)
327 file_badread(ms);
346 file_badread(ms);
353 offset = donote(ms, nbuf, offset, (size_t)bufsize,
365 do_note_netbsd_version(struct magic_set *ms, int swap, void *v)
371 if (file_printf(ms, ", for NetBSD") == -1)
391 if (file_printf(ms, " %u.%u", ver_maj, ver_min) == -1)
394 if (file_printf(ms, ".%u", ver_patch) == -1)
398 if (file_printf(ms, "Z") == -1)
402 if (file_printf(ms, "%c", 'A' + ver_rel - 1)
410 do_note_freebsd_version(struct magic_set *ms, int swap, void *v)
416 if (file_printf(ms, ", for FreeBSD") == -1)
446 if (file_printf(ms, " 4.6.2") == -1)
449 if (file_printf(ms, " %d.%d", desc / 100000,
453 if (file_printf(ms, ".%d", desc / 1000 % 10) == -1)
456 if (file_printf(ms, " (%d)", desc) == -1)
459 if (file_printf(ms, " %d.%d", desc / 100000,
463 if (file_printf(ms, " (%d)", desc) == -1)
466 if (file_printf(ms, ".%d", desc / 10 % 10) == -1)
470 if (file_printf(ms, " %d.%d", desc / 100000,
475 if (file_printf(ms, " (%d)", desc) == -1)
478 if (file_printf(ms, ".%d", desc / 10 % 10) == -1)
485 do_bid_note(struct magic_set *ms, unsigned char *nbuf, uint32_t type,
494 if (file_printf(ms, ", BuildID[%s]=", descsz == 16 ? "md5/uuid" :
499 if (file_printf(ms, "%02x", desc[i]) == -1)
507 do_os_note(struct magic_set *ms, unsigned char *nbuf, uint32_t type,
514 file_printf(ms, ", for SuSE %d.%d", nbuf[doff], nbuf[doff + 1]);
524 if (file_printf(ms, ", for GNU/") == -1)
528 if (file_printf(ms, "Linux") == -1)
532 if (file_printf(ms, "Hurd") == -1)
536 if (file_printf(ms, "Solaris") == -1)
540 if (file_printf(ms, "kFreeBSD") == -1)
544 if (file_printf(ms, "kNetBSD") == -1)
548 if (file_printf(ms, "<unknown>") == -1)
551 if (file_printf(ms, " %d.%d.%d", elf_getu32(swap, desc[1]),
560 do_note_netbsd_version(ms, swap, &nbuf[doff]);
568 do_note_freebsd_version(ms, swap, &nbuf[doff]);
576 if (file_printf(ms, ", for OpenBSD") == -1)
586 if (file_printf(ms, ", for DragonFly") == -1)
590 if (file_printf(ms, " %d.%d.%d", desc / 100000,
599 do_pax_note(struct magic_set *ms, unsigned char *nbuf, uint32_t type,
621 if (desc && file_printf(ms, ", PaX: ") == -1)
627 if (file_printf(ms, "%s%s", did++ ? "," : "",
637 do_core_note(struct magic_set *ms, unsigned char *nbuf, uint32_t type,
672 if (file_printf(ms, ", %s-style", os_style_names[os_style])
688 if (file_printf(ms, ", from '%.31s'",
699 if (file_printf(ms, " (signal %u)",
799 if (file_printf(ms, ", from '%.*s'",
816 donote(struct magic_set *ms, void *vbuf, size_t offset, size_t size,
849 (void)file_printf(ms, ", bad note name size 0x%lx",
855 (void)file_printf(ms, ", bad note description size 0x%lx",
879 if (do_os_note(ms, nbuf, xnh_type, swap,
885 if (do_bid_note(ms, nbuf, xnh_type, swap,
891 if (do_pax_note(ms, nbuf, xnh_type, swap,
897 if (do_core_note(ms, nbuf, xnh_type, swap,
912 if (file_printf(ms, ", compiled for: %.*s",
920 if (file_printf(ms, ", compiler model: %.*s",
928 if (file_printf(ms, ", note=%u", xnh_type) == -1)
989 doshn(struct magic_set *ms, int clazz, int swap, int fd, off_t off, int num,
1005 if (file_printf(ms, ", corrupted section header size") == -1)
1012 file_badread(ms);
1020 file_badread(ms);
1028 file_badread(ms);
1053 file_error(ms, errno, "Cannot allocate memory"
1058 file_badread(ms);
1067 noff = donote(ms, nbuf, (size_t)noff,
1089 file_badseek(ms);
1102 file_badread(ms);
1113 if (file_printf(ms,
1125 if (file_printf(ms, ", unknown gnu"
1146 if (file_printf(ms,
1165 if (file_printf(ms, ", %sstripped", stripped ? "" : "not ") == -1)
1184 if (file_printf(ms, ", uses") == -1)
1189 if (file_printf(ms,
1197 if (file_printf(ms,
1203 if (file_printf(ms,
1211 if (file_printf(ms,
1219 if (file_printf(ms,
1234 dophn_exec(struct magic_set *ms, int clazz, int swap, int fd, off_t off,
1248 if (file_printf(ms, ", corrupted program header size") == -1)
1255 file_badread(ms);
1273 if (file_printf(ms,
1285 file_badread(ms);
1315 offset = donote(ms, nbuf, offset,
1326 if (file_printf(ms, ", %s linked", linking_style)
1330 if (file_printf(ms, ", interpreter %s",
1338 file_tryelf(struct magic_set *ms, int fd, const unsigned char *buf,
1354 if (ms->flags & (MAGIC_MIME|MAGIC_APPLE))
1372 fd = file_pipe2file(ms, fd, buf, nbytes);
1375 file_badread(ms);
1399 if (file_printf(ms, ", unknown class %d", clazz) == -1)