UInt32 blockRef;
UInt32 wordsPerBlock;
+ if (!useMetaZone) {
+ struct hfsmount *hfsmp = VCBTOHFS(vcb);
+
+
+ if ((hfsmp->hfs_flags & HFS_METADATA_ZONE) &&
+ (startingBlock <= hfsmp->hfs_metazone_end))
+ startingBlock = hfsmp->hfs_metazone_end + 1;
+ }
+
if ((endingBlock - startingBlock) < minBlocks)
{
// The set of blocks we're checking is smaller than the minimum number
*/
if (!useMetaZone) {
currentBlock = NextBitmapBlock(vcb, currentBlock);
- if (currentBlock >= stopBlock)
- break;
+ if (currentBlock >= stopBlock) {
+ goto LoopExit;
+ }
}
err = ReadBitmapBlock(vcb, currentBlock, &buffer, &blockRef);
nextBlock = NextBitmapBlock(vcb, currentBlock);
if (nextBlock != currentBlock) {
- break; /* allocation gap, so stop */
+ goto LoopExit; /* allocation gap, so stop */
}
}
++vcb->vcbFreeExtCnt;
}
} while (currentBlock < stopBlock);
-
+LoopExit:
// Return the outputs.
if (foundBlocks < minBlocks)