Lines Matching defs:ms

68 toomany(struct magic_set *ms, const char *name, uint16_t num)
70 if (file_printf(ms, ", too many %s (%u)", name, num
325 dophn_core(struct magic_set *ms, int clazz, int swap, int fd, off_t off,
337 if (file_printf(ms, ", corrupted program header size") == -1)
347 file_badread(ms);
366 file_badread(ms);
373 offset = donote(ms, nbuf, offset, (size_t)bufsize,
386 do_note_netbsd_version(struct magic_set *ms, int swap, void *v)
392 if (file_printf(ms, ", for NetBSD") == -1)
412 if (file_printf(ms, " %u.%u", ver_maj, ver_min) == -1)
415 if (file_printf(ms, ".%u", ver_patch) == -1)
419 if (file_printf(ms, "Z") == -1)
423 if (file_printf(ms, "%c", 'A' + ver_rel - 1)
431 do_note_freebsd_version(struct magic_set *ms, int swap, void *v)
437 if (file_printf(ms, ", for FreeBSD") == -1)
467 if (file_printf(ms, " 4.6.2") == -1)
470 if (file_printf(ms, " %d.%d", desc / 100000,
474 if (file_printf(ms, ".%d", desc / 1000 % 10) == -1)
477 if (file_printf(ms, " (%d)", desc) == -1)
480 if (file_printf(ms, " %d.%d", desc / 100000,
484 if (file_printf(ms, " (%d)", desc) == -1)
487 if (file_printf(ms, ".%d", desc / 10 % 10) == -1)
491 if (file_printf(ms, " %d.%d", desc / 100000,
496 if (file_printf(ms, " (%d)", desc) == -1)
499 if (file_printf(ms, ".%d", desc / 10 % 10) == -1)
507 do_bid_note(struct magic_set *ms, unsigned char *nbuf, uint32_t type,
516 if (file_printf(ms, ", BuildID[%s]=", descsz == 16 ? "md5/uuid" :
521 if (file_printf(ms, "%02x", desc[i]) == -1)
529 do_os_note(struct magic_set *ms, unsigned char *nbuf, uint32_t type,
536 file_printf(ms, ", for SuSE %d.%d", nbuf[doff], nbuf[doff + 1]);
546 if (file_printf(ms, ", for GNU/") == -1)
550 if (file_printf(ms, "Linux") == -1)
554 if (file_printf(ms, "Hurd") == -1)
558 if (file_printf(ms, "Solaris") == -1)
562 if (file_printf(ms, "kFreeBSD") == -1)
566 if (file_printf(ms, "kNetBSD") == -1)
570 if (file_printf(ms, "<unknown>") == -1)
573 if (file_printf(ms, " %d.%d.%d", elf_getu32(swap, desc[1]),
582 do_note_netbsd_version(ms, swap, &nbuf[doff]);
590 do_note_freebsd_version(ms, swap, &nbuf[doff]);
598 if (file_printf(ms, ", for OpenBSD") == -1)
608 if (file_printf(ms, ", for DragonFly") == -1)
612 if (file_printf(ms, " %d.%d.%d", desc / 100000,
621 do_pax_note(struct magic_set *ms, unsigned char *nbuf, uint32_t type,
643 if (desc && file_printf(ms, ", PaX: ") == -1)
649 if (file_printf(ms, "%s%s", did++ ? "," : "",
659 do_core_note(struct magic_set *ms, unsigned char *nbuf, uint32_t type,
694 if (file_printf(ms, ", %s-style", os_style_names[os_style])
710 if (file_printf(ms, ", from '%.31s'",
721 if (file_printf(ms, " (signal %u)",
821 if (file_printf(ms, ", from '%.*s'",
838 get_offset_from_virtaddr(struct magic_set *ms, int swap, int clazz, int fd,
850 file_badread(ms);
867 get_string_on_virtaddr(struct magic_set *ms,
877 offset = get_offset_from_virtaddr(ms, swap, clazz, fd, ph_off, ph_num,
880 file_badread(ms);
898 do_auxv_note(struct magic_set *ms, unsigned char *nbuf, uint32_t type,
923 file_error(ms, 0, "Too many ELF Auxv elements");
964 buflen = get_string_on_virtaddr(ms, swap, clazz, fd,
970 if (file_printf(ms, ", %s: '%s'", tag, buf) == -1)
973 if (file_printf(ms, ", %s: %d", tag, (int) xauxv_val)
985 donote(struct magic_set *ms, void *vbuf, size_t offset, size_t size,
1020 (void)file_printf(ms, ", bad note name size 0x%lx",
1026 (void)file_printf(ms, ", bad note description size 0x%lx",
1051 if (do_os_note(ms, nbuf, xnh_type, swap,
1057 if (do_bid_note(ms, nbuf, xnh_type, swap,
1063 if (do_pax_note(ms, nbuf, xnh_type, swap,
1069 if (do_core_note(ms, nbuf, xnh_type, swap,
1075 if (do_auxv_note(ms, nbuf, xnh_type, swap,
1091 if (file_printf(ms, ", compiled for: %.*s",
1099 if (file_printf(ms, ", compiler model: %.*s",
1107 if (file_printf(ms, ", note=%u", xnh_type) == -1)
1168 doshn(struct magic_set *ms, int clazz, int swap, int fd, off_t off, int num,
1184 if (file_printf(ms, ", corrupted section header size") == -1)
1192 file_badread(ms);
1200 file_badread(ms);
1208 file_badread(ms);
1235 if (file_printf(ms,
1245 file_error(ms, errno, "Cannot allocate memory"
1251 file_badread(ms);
1260 noff = donote(ms, nbuf, (size_t)noff,
1283 file_badseek(ms);
1296 file_badread(ms);
1307 if (file_printf(ms,
1319 if (file_printf(ms, ", unknown gnu"
1340 if (file_printf(ms,
1359 if (file_printf(ms, ", %sstripped", stripped ? "" : "not ") == -1)
1378 if (file_printf(ms, ", uses") == -1)
1383 if (file_printf(ms,
1391 if (file_printf(ms,
1397 if (file_printf(ms,
1405 if (file_printf(ms,
1413 if (file_printf(ms,
1428 dophn_exec(struct magic_set *ms, int clazz, int swap, int fd, off_t off,
1442 if (file_printf(ms, ", corrupted program header size") == -1)
1449 file_badread(ms);
1467 if (file_printf(ms,
1479 file_badread(ms);
1509 offset = donote(ms, nbuf, offset,
1520 if (file_printf(ms, ", %s linked", linking_style)
1524 if (file_printf(ms, ", interpreter %s",
1532 file_tryelf(struct magic_set *ms, int fd, const unsigned char *buf,
1548 if (ms->flags & (MAGIC_MIME|MAGIC_APPLE|MAGIC_EXTENSION))
1566 fd = file_pipe2file(ms, fd, buf, nbytes);
1569 file_badread(ms);
1593 if (file_printf(ms, ", unknown class %d", clazz) == -1)