Package: file Version: 1:5.41-4 Severity: normal X-Debbugs-Cc: msl0000023...@gmail.com
Hello. While HFS Plus version 4 can be detected by file(1), the extended version 5, aka. HFSX, couldn't be detected at all, reporting only 'data'. According to Apple's HFS Volume Format (TN1150), HFSX is an extension to HFS Plus, which enables additional previously incompatible features to be added to HFS Plus. One offical feature under this extension is the case-sensitive names. mkfs.hfsplus(8) from hfsprogs currently uses HFSX only if a case-sensitive file system is requested by user (via option '-s'). The following commands reproduces the issue. Create a case-insensitive file system: # truncate --size 1GiB test.disk # mkfs.hfsplus test.disk Initialized test.disk as a 1024 MB HFS Plus volume # file test.disk test.disk: Macintosh HFS Extended version 4 data last mounted by: '10.0', created: Tue Nov 22 22:38:37 2022, last modified: Tue Nov 22 14:38:37 2022, last checked: Tue Nov 22 14:38:37 2022, block size: 4096, number of blocks: 262144, free blocks: 259062 Here's another imperfection that file(1) incorrectly reported this file system as 'HFS Extended' where it should be 'HFS Plus'. Now create a case-sensitive file system and feed it to file(1): # unlink test.disk # truncate --size 1GiB test.disk # mkfs.hfsplus -s test.disk Initialized test.disk as a 1024 MB HFS Plus volume # file test.disk test.disk: data Of course this file system is nicely supported by Linux: # mount test.disk -o loop /mnt/1/ # losetup -l NAME SIZELIMIT OFFSET AUTOCLEAR RO BACK-FILE DIO LOG-SEC /dev/loop0 0 0 1 0 /root/test.disk 0 512 # grep ^/dev/loop0\ /proc/mounts /dev/loop0 /mnt/1 hfsplus rw,relatime,umask=22,uid=0,gid=0,nls=utf8 0 0 # df -h /mnt/1/ 檔案系統 容量 已用 可用 已用% 掛載點 /dev/loop0 1.0G 13M 1012M 2% /mnt/1 Additional information about HFSX: * It has a different signature 'HX' (0x4858) than 'H+' (0x482B) in HFS Plus version 4. * It has a version 5. * It didn't have to be case-sensitive. I will probably submit a patch to address this once I get used to the magic file format. -- System Information: Debian Release: bookworm/sid APT prefers unstable APT policy: (500, 'unstable') merged-usr: no Architecture: ppc64 Foreign Architectures: powerpc Kernel: Linux 4.1.42-rivoreo-powerpc64-largepage (SMP w/4 CPU threads) Kernel taint flags: TAINT_DIE Locale: LANG=zh_TW.UTF-8, LC_CTYPE=zh_TW.UTF-8 (charmap=UTF-8), LANGUAGE=zh_TW:zh_CN:zh:en_GB:en Shell: /bin/sh linked to /bin/dash Init: systemd (via /run/systemd/system) Versions of packages file depends on: ii libc6 2.36-4 ii libmagic1 1:5.41-4 file recommends no packages. file suggests no packages. -- no debconf information