--- file-4.10/magic/Magdir/macintosh.orig 2004-04-07 04:21:57 +0400 +++ file-4.10/magic/Magdir/macintosh 2004-10-17 01:24:22 +0400 @@ -254,107 +254,5 @@ 0 string $FL2 SPSS System File >24 string x %s -# Macintosh filesystem data -# From "Tom N Harris" -# Fixed HFS+ and Partition map magic: Ethan Benson -# The MacOS epoch begins on 1 Jan 1904 instead of 1 Jan 1970, so these -# entries depend on the data arithmetic added after v.35 -# There's also some Pascal strings in here, ditto... - -# The boot block signature, according to IM:Files, is -# "for HFS volumes, this field always contains the value 0x4C4B." -# But if this is true for MFS or HFS+ volumes, I don't know. -# Alternatively, the boot block is supposed to be zeroed if it's -# unused, so a simply >0 should suffice. - -0x400 beshort 0xD2D7 Macintosh MFS data ->0 beshort 0x4C4B (bootable) ->0x40a beshort &0x8000 (locked) ->0x402 beldate-0x7C25B080 x created: %s, ->0x406 beldate-0x7C25B080 >0 last backup: %s, ->0x414 belong x block size: %d, ->0x412 beshort x number of blocks: %d, ->0x424 pstring x volume name: %s - -# "BD" is has many false positives -#0x400 beshort 0x4244 Macintosh HFS data -#>0 beshort 0x4C4B (bootable) -#>0x40a beshort &0x8000 (locked) -#>0x40a beshort ^0x0100 (mounted) -#>0x40a beshort &0x0200 (spared blocks) -#>0x40a beshort &0x0800 (unclean) -#>0x47C beshort 0x482B (Embedded HFS+ Volume) -#>0x402 beldate-0x7C25B080 x created: %s, -#>0x406 beldate-0x7C25B080 x last modified: %s, -#>0x440 beldate-0x7C25B080 >0 last backup: %s, -#>0x414 belong x block size: %d, -#>0x412 beshort x number of blocks: %d, -#>0x424 pstring x volume name: %s - -0x400 beshort 0x482B Macintosh HFS Extended ->&0 beshort x version %d data ->0 beshort 0x4C4B (bootable) ->0x404 belong ^0x00000100 (mounted) ->&2 belong &0x00000200 (spared blocks) ->&2 belong &0x00000800 (unclean) ->&2 belong &0x00008000 (locked) ->&6 string x last mounted by: '%.4s', -# really, that should be treated as a belong and we print a string -# based on the value. TN1150 only mentions '8.10' for "MacOS 8.1" ->&14 beldate-0x7C25B080 x created: %s, -# only the creation date is local time, all other timestamps in HFS+ are UTC. ->&18 bedate-0x7C25B080 x last modified: %s, ->&22 bedate-0x7C25B080 >0 last backup: %s, ->&26 bedate-0x7C25B080 >0 last checked: %s, ->&38 belong x block size: %d, ->&42 belong x number of blocks: %d, ->&46 belong x free blocks: %d - -# I don't think this is really necessary since it doesn't do much and -# anything with a valid driver descriptor will also have a valid -# partition map -#0 beshort 0x4552 Apple Device Driver data -#>&24 beshort =1 \b, MacOS - -# Is that the partition type a cstring or a pstring? Well, IM says "strings -# shorter than 32 bytes must be terminated with NULL" so I'll treat it as a -# cstring. Of course, partitions can contain more than four entries, but -# what're you gonna do? -0x200 beshort 0x504D Apple Partition data ->0x2 beshort x block size: %d, ->0x230 string x first type: %s, ->0x210 string x name: %s, ->0x254 belong x number of blocks: %d, ->0x400 beshort 0x504D ->>0x430 string x second type: %s, ->>0x410 string x name: %s, ->>0x454 belong x number of blocks: %d, ->>0x800 beshort 0x504D ->>>0x830 string x third type: %s, ->>>0x810 string x name: %s, ->>>0x854 belong x number of blocks: %d, ->>>0xa00 beshort 0x504D ->>>>0xa30 string x fourth type: %s, ->>>>0xa10 string x name: %s, ->>>>0xa54 belong x number of blocks: %d -# AFAIK, only the signature is different -0x200 beshort 0x5453 Apple Old Partition data ->0x2 beshort x block size: %d, ->0x230 string x first type: %s, ->0x210 string x name: %s, ->0x254 belong x number of blocks: %d, ->0x400 beshort 0x504D ->>0x430 string x second type: %s, ->>0x410 string x name: %s, ->>0x454 belong x number of blocks: %d, ->>0x800 beshort 0x504D ->>>0x830 string x third type: %s, ->>>0x810 string x name: %s, ->>>0x854 belong x number of blocks: %d, ->>>0xa00 beshort 0x504D ->>>>0xa30 string x fourth type: %s, ->>>>0xa10 string x name: %s, ->>>>0xa54 belong x number of blocks: %d - # From: Remi Mommsen 0 string BOMStore Mac OS X bill of materials (BOM) fil