-
- kHFSVolumeHardwareLockMask = 1 << kHFSVolumeHardwareLockBit,
- kHFSVolumeUnmountedMask = 1 << kHFSVolumeUnmountedBit,
- kHFSVolumeSparedBlocksMask = 1 << kHFSVolumeSparedBlocksBit,
- kHFSVolumeNoCacheRequiredMask = 1 << kHFSVolumeNoCacheRequiredBit,
- kHFSBootVolumeInconsistentMask = 1 << kHFSBootVolumeInconsistentBit,
- kHFSCatalogNodeIDsReusedMask = 1 << kHFSCatalogNodeIDsReusedBit,
- kHFSVolumeJournaledMask = 1 << kHFSVolumeJournaledBit,
- kHFSVolumeInconsistentMask = 1 << kHFSVolumeInconsistentBit,
- kHFSVolumeSoftwareLockMask = 1 << kHFSVolumeSoftwareLockBit,
- kHFSMDBAttributesMask = 0x8380
+ /*
+ * HFS only has 16 bits of attributes in the MDB, but HFS Plus has 32 bits.
+ * Therefore, bits 16-31 can only be used on HFS Plus.
+ */
+ kHFSUnusedNodeFixBit = 31, /* Unused nodes in the Catalog B-tree have been zero-filled. See Radar #6947811. */
+ kHFSContentProtectionBit = 30, /* Volume has per-file content protection */
+
+ /*** Keep these in sync with the bits above ! ****/
+ kHFSVolumeHardwareLockMask = 0x00000080,
+ kHFSVolumeUnmountedMask = 0x00000100,
+ kHFSVolumeSparedBlocksMask = 0x00000200,
+ kHFSVolumeNoCacheRequiredMask = 0x00000400,
+ kHFSBootVolumeInconsistentMask = 0x00000800,
+ kHFSCatalogNodeIDsReusedMask = 0x00001000,
+ kHFSVolumeJournaledMask = 0x00002000,
+ kHFSVolumeInconsistentMask = 0x00004000,
+ kHFSVolumeSoftwareLockMask = 0x00008000,
+
+ /* Bits 16-31 are allocated from high to low */
+
+ kHFSContentProtectionMask = 0x40000000,
+ kHFSUnusedNodeFixMask = 0x80000000,
+
+ kHFSMDBAttributesMask = 0x8380