head 1.1; branch 1.1.1; access; symbols netbsd-11-0-RELEASE:1.1.1.1 netbsd-11-0-RC7:1.1.1.1 netbsd-11-0-RC6:1.1.1.1 netbsd-11-0-RC5:1.1.1.1 FILE5_48:1.1.1.1 netbsd-11-0-RC4:1.1.1.1 netbsd-11-0-RC3:1.1.1.1 netbsd-11-0-RC2:1.1.1.1 netbsd-11-0-RC1:1.1.1.1 perseant-exfatfs-base-20250801:1.1.1.1 netbsd-11:1.1.1.1.0.4 netbsd-11-base:1.1.1.1 perseant-exfatfs-base-20240630:1.1.1.1 perseant-exfatfs:1.1.1.1.0.2 perseant-exfatfs-base:1.1.1.1 FILE5_45:1.1.1.1 CHRISTOS:1.1.1; locks; strict; comment @# @; 1.1 date 2023.08.18.18.36.50; author christos; state Exp; branches 1.1.1.1; next ; commitid IX26ghc1E2S0AiBE; 1.1.1.1 date 2023.08.18.18.36.50; author christos; state Exp; branches; next ; commitid IX26ghc1E2S0AiBE; desc @@ 1.1 log @Initial revision @ text @ #------------------------------------------------------------------------------ # $File: dwarfs,v 1.2 2023/05/23 13:37:32 christos Exp $ # dwarfs: file(1) magic for DwarFS File System Image files # URL: https://github.com/mhx/dwarfs for details about DwarFS # From: Marcus Holland-Moritz #### DwarFS Version Macro 0 name dwarfsversion >&0 byte x \b, version %d >&1 byte x \b.%d #### DwarFS Compression Macro 0 name dwarfscompression >&0 leshort =0 \b, uncompressed >&0 leshort =1 \b, LZMA compression >&0 leshort =2 \b, ZSTD compression >&0 leshort =3 \b, LZ4 compression >&0 leshort =4 \b, LZ4HC compression >&0 leshort =5 \b, BROTLI compression #### DwarFS files without header ## We first check against a DWARFS magic at the start of the file, then ## validate by checking the block count / section type to be all zeros ## for the first block. Finally, we check that the *next* block also ## has the correct DWARFS magic. 0 string DWARFS >&0x2A string/b \0\0\0\0\0\0 >>&(&0x02.q+0x0A) string DWARFS DwarFS File System Image >>>&0 use dwarfsversion >>&0 use dwarfscompression #### DwarFS files with header ## We search for a DWARFS magic in the first 64k of the file (images with ## headers longer than 64k won't be recognized), then validate by checking ## the block count / section type to be all zeros for the first block. ## Finally, we check that the *next* block also has the correct DWARFS magic. ## If we find a DWARFS magic that doesn't pass validation, we continue with ## an indirect match recursively. 1 search/65536/b DWARFS >&0x2A string/b \0\0\0\0\0\0 >>&(&0x02.q+0x0A) string DWARFS DwarFS File System Image (with header) >>>&0 use dwarfsversion >>&0 use dwarfscompression >&-1 indirect x @ 1.1.1.1 log @Update to file-5.45 (Last was file-5.44) 2023-07-27 15:45 Christos Zoulas * release 5.45 2023-07-17 11:53 Christos Zoulas * PR/465: psrok1: Avoid muslc asctime_r crash 2023-05-21 13:05 Christos Zoulas * add SIMH tape format support 2023-02-09 12:50 Christos Zoulas * bump the max size of the elf section notes to be read to 128K and make it configurable 2023-01-08 1:08 Christos Zoulas * PR/415: Fix decompression with program returning empty 2022-12-26 1:47 Christos Zoulas * PR/408: fix -p with seccomp * PR/412: fix MinGW compilation @ text @@