Control: tags 1024639 + patch

$ truncate --size 1GiB /tmp/test-hfs+
$ mkfs.hfsplus /tmp/test-hfs+
Initialized /tmp/test-hfs+ as a 1024 MB HFS Plus volume
$ file --magic-file magic/Magdir/ /tmp/test-hfs+
/tmp/test-hfs+: Apple HFS Plus version 4 data (mounted) last mounted
by: '10.0', created: Sun Dec  4 01:56:42 2022, last modified: Sat Dec
3 17:56:42 2022, last checked: Sat Dec  3 17:56:42 2022, block size:
4096, number of blocks: 262144, free blocks: 259062
$ truncate --size 1GiB /tmp/test-hfsx
$ mkfs.hfsplus -s /tmp/test-hfsx
Initialized /tmp/test-hfsx as a 1024 MB HFS Plus volume
$ file --magic-file magic/Magdir/ /tmp/test-hfsx
/tmp/test-hfsx: Apple HFS Plus Extended version 5 data (mounted) last
mounted by: '10.0', created: Sun Dec  4 01:56:54 2022, last modified:
Sat Dec  3 17:56:54 2022, last checked: Sat Dec  3 17:56:54 2022,
block size: 4096, number of blocks: 262144, free blocks: 259062
--- magic/Magdir/macintosh.orig 2021-05-13 00:30:24.000000000 +0800
+++ magic/Magdir/macintosh      2022-12-04 01:46:25.546650030 +0800
@@ -447,7 +447,7 @@
 >>>0x412       beshort                 x       number of blocks: %d,
 >>>0x424       pstring                 x       volume name: %s
 
-0x400  beshort                 0x482B          Macintosh HFS Extended
+0      name                    hfsplus
 >&0    beshort                 x               version %d data
 >0     beshort                 0x4C4B          (bootable)
 >0x404 belong                  ^0x00000100     (mounted)
@@ -466,6 +466,11 @@
 >&42   belong                  x               number of blocks: %d,
 >&46   belong                  x               free blocks: %d
 
+0x400  beshort                 0x482B          Apple HFS Plus
+>&0    use                     hfsplus
+0x400  beshort                 0x4858          Apple HFS Plus Extended
+>&0    use                     hfsplus
+
 ## AFAIK, only the signature is different
 # same as Apple Partition Map
 # GRR: This magic is too weak, it is just "TS"

Reply via email to