Thomas-Tsai / partclone

Partclone provides utilities to backup a partition smartly and it is designed for higher compatibility of the file system by using existing library.
GNU General Public License v2.0
323 stars 107 forks source link

Support HFS+ wrapper volumes #172

Closed vasi closed 2 years ago

vasi commented 2 years ago

HFS+ volumes can be embedded inside an HFS (non-plus) wrapper volume. There's some explanation of this on Wikipedia and in the HFS+ specification technote. Basically all HFS+ volumes back in the Mac OS 9 through 10.3/10.4 days were of this type, and can't be cloned with partclone.

This patch-series enables support for these volumes. It reaches inside the wrapper volume, finds the real HFS+ volume, and applies an offset to all read operations and bitmap entries. It's complicated a bit by the fact that HFS wrappers aren't necessarily an even multiple of the HFS+ block size, so we have to support tiny blocks when there's a wrapper.

These patches also clean up the HFS+ code a bit:

Thomas-Tsai commented 2 years ago

Hi,

Thanks for your contribution. We will give a test and release recently.