/*
- * Copyright (c) 2000-2002 Apple Computer, Inc. All rights reserved.
+ * Copyright (c) 2000-2004 Apple Computer, Inc. All rights reserved.
*
* @APPLE_LICENSE_HEADER_START@
*
typedef struct ExtentsRecBuffer ExtentsRecBuffer;
-UInt32 CheckExtents( void *extents, UInt32 blocks, Boolean isHFSPlus );
-OSErr DeleteExtents( ExtendedVCB *vcb, UInt32 fileNumber, Boolean isHFSPlus );
-OSErr MoveExtents( ExtendedVCB *vcb, UInt32 srcFileID, UInt32 destFileID, Boolean isHFSPlus );
-void CopyCatalogNodeInfo( CatalogRecord *src, CatalogRecord *dest );
-void CopyBigCatalogNodeInfo( CatalogRecord *src, CatalogRecord *dest );
-void CopyExtentInfo( ExtentKey *key, ExtentRecord *data, ExtentsRecBuffer *buffer, UInt16 bufferCount );
+static UInt32 CheckExtents( void *extents, UInt32 blocks, Boolean isHFSPlus );
+static OSErr DeleteExtents( ExtendedVCB *vcb, UInt32 fileNumber, Boolean isHFSPlus );
+static OSErr MoveExtents( ExtendedVCB *vcb, UInt32 srcFileID, UInt32 destFileID, Boolean isHFSPlus );
+static void CopyCatalogNodeInfo( CatalogRecord *src, CatalogRecord *dest );
+static void CopyBigCatalogNodeInfo( CatalogRecord *src, CatalogRecord *dest );
+static void CopyExtentInfo( ExtentKey *key, ExtentRecord *data, ExtentsRecBuffer *buffer, UInt16 bufferCount );
OSErr err;
Boolean isHFSPlus = ( vcb->vcbSigWord == kHFSPlusSigWord );
- TrashCatalogIterator(vcb, srcID); // invalidate any iterators for this parentID
- TrashCatalogIterator(vcb, destID); // invalidate any iterators for this parentID
-
err = BuildCatalogKeyUTF8(vcb, srcID, srcName, kUndefinedStrLen, &srcKey, NULL);
ReturnIfError(err);
err = BuildCatalogKeyUTF8(vcb, destID, destName, kUndefinedStrLen, &destKey, NULL);
ReturnIfError(err);
- err = BTCheckFreeSpace(GetFileControlBlock(vcb->extentsRefNum));
- ReturnIfError(err);
-
if ( isHFSPlus )
{
//-- Step 1: Check the catalog nodes for extents
}
-void CopyCatalogNodeInfo( CatalogRecord *src, CatalogRecord *dest )
+static void CopyCatalogNodeInfo( CatalogRecord *src, CatalogRecord *dest )
{
dest->hfsFile.dataLogicalSize = src->hfsFile.dataLogicalSize;
dest->hfsFile.dataPhysicalSize = src->hfsFile.dataPhysicalSize;
BlockMoveData( src->hfsFile.rsrcExtents, dest->hfsFile.rsrcExtents, sizeof(HFSExtentRecord) );
}
-void CopyBigCatalogNodeInfo( CatalogRecord *src, CatalogRecord *dest )
+static void CopyBigCatalogNodeInfo( CatalogRecord *src, CatalogRecord *dest )
{
BlockMoveData( &src->hfsPlusFile.dataFork, &dest->hfsPlusFile.dataFork, sizeof(HFSPlusForkData) );
BlockMoveData( &src->hfsPlusFile.resourceFork, &dest->hfsPlusFile.resourceFork, sizeof(HFSPlusForkData) );
}
-OSErr MoveExtents( ExtendedVCB *vcb, UInt32 srcFileID, UInt32 destFileID, Boolean isHFSPlus )
+static OSErr MoveExtents( ExtendedVCB *vcb, UInt32 srcFileID, UInt32 destFileID, Boolean isHFSPlus )
{
FCB * fcb;
ExtentsRecBuffer extentsBuffer[kNumExtentsToCache];
}
-void CopyExtentInfo( ExtentKey *key, ExtentRecord *data, ExtentsRecBuffer *buffer, UInt16 bufferCount )
+static void CopyExtentInfo( ExtentKey *key, ExtentRecord *data, ExtentsRecBuffer *buffer, UInt16 bufferCount )
{
BlockMoveData( key, &(buffer[bufferCount].extentKey), sizeof( ExtentKey ) );
BlockMoveData( data, &(buffer[bufferCount].extentData), sizeof( ExtentRecord ) );
//-- Delete all extents in extent file that have the ID given.
-OSErr DeleteExtents( ExtendedVCB *vcb, UInt32 fileID, Boolean isHFSPlus )
+static OSErr DeleteExtents( ExtendedVCB *vcb, UInt32 fileID, Boolean isHFSPlus )
{
FCB * fcb;
ExtentKey * extentKeyPtr;
// Check if there are extents represented in the extents overflow file.
-UInt32 CheckExtents( void *extents, UInt32 totalBlocks, Boolean isHFSPlus )
+static UInt32 CheckExtents( void *extents, UInt32 totalBlocks, Boolean isHFSPlus )
{
UInt32 extentAllocationBlocks;
UInt16 i;