Lines Matching defs:vcb
45 static OSErr DeleteExtents( ExtendedVCB *vcb, u_int32_t fileNumber, Boolean isHFSPlus );
46 static OSErr MoveExtents( ExtendedVCB *vcb, u_int32_t srcFileID, u_int32_t destFileID, Boolean isHFSPlus );
53 OSErr ExchangeFileIDs( ExtendedVCB *vcb, ConstUTF8Param srcName, ConstUTF8Param destName, HFSCatalogNodeID srcID, HFSCatalogNodeID destID, u_int32_t srcHint, u_int32_t destHint )
63 Boolean isHFSPlus = ( vcb->vcbSigWord == kHFSPlusSigWord );
65 err = BuildCatalogKeyUTF8(vcb, srcID, srcName, kUndefinedStrLen, &srcKey, NULL);
68 err = BuildCatalogKeyUTF8(vcb, destID, destName, kUndefinedStrLen, &destKey, NULL);
76 err = LocateCatalogNodeByKey( vcb, srcHint, &srcKey, &srcData, &srcHint );
89 err = LocateCatalogNodeByKey( vcb, destHint, &destKey, &destData, &destHint );
102 err = DeleteExtents( vcb, kHFSBogusExtentFileID, isHFSPlus );
108 err = MoveExtents( vcb, srcData.hfsPlusFile.fileID, kHFSBogusExtentFileID, isHFSPlus );
118 err = MoveExtents( vcb, destData.hfsPlusFile.fileID, srcData.hfsPlusFile.fileID, isHFSPlus );
124 ExUndo2aPlus: err = DeleteExtents( vcb, srcData.hfsPlusFile.fileID, isHFSPlus );
127 err = MoveExtents( vcb, kHFSBogusExtentFileID, srcData.hfsPlusFile.fileID, isHFSPlus ); // Move the extents back
134 err = MoveExtents( vcb, kHFSBogusExtentFileID, destData.hfsPlusFile.fileID, isHFSPlus );
140 err = DeleteExtents( vcb, destData.hfsPlusFile.fileID, isHFSPlus );
143 err = MoveExtents( vcb, srcData.hfsPlusFile.fileID, destData.hfsPlusFile.fileID, isHFSPlus ); // Move the extents back
152 err = MoveExtents( vcb, srcData.hfsPlusFile.fileID, destData.hfsPlusFile.fileID, isHFSPlus );
158 err = DeleteExtents( vcb, srcData.hfsPlusFile.fileID, isHFSPlus );
166 err = MoveExtents( vcb, destData.hfsPlusFile.fileID, srcData.hfsPlusFile.fileID, isHFSPlus );
172 err = DeleteExtents( vcb, destData.hfsPlusFile.fileID, isHFSPlus );
182 err = LocateCatalogNodeByKey( vcb, srcHint, &srcKey, &srcData, &srcHint );
189 err = ReplaceBTreeRecord( vcb->catalogRefNum, &srcKey, srcHint, &srcData, sizeof(HFSPlusCatalogFile), &srcHint );
193 err = LocateCatalogNodeByKey( vcb, destHint, &destKey, &destData, &destHint );
198 err = ReplaceBTreeRecord( vcb->catalogRefNum, &destKey, destHint, &destData, sizeof(HFSPlusCatalogFile), &destHint );
206 err = LocateCatalogNodeByKey( vcb, srcHint, &srcKey, &srcData, &srcHint );
213 numSrcExtentBlocks = CheckExtents( srcData.hfsFile.dataExtents, srcData.hfsFile.dataPhysicalSize / vcb->blockSize, isHFSPlus );
215 numSrcExtentBlocks = CheckExtents( srcData.hfsFile.rsrcExtents, srcData.hfsFile.rsrcPhysicalSize / vcb->blockSize, isHFSPlus );
222 err = LocateCatalogNodeByKey( vcb, destHint, &destKey, &destData, &destHint );
228 numDestExtentBlocks = CheckExtents( destData.hfsFile.dataExtents, destData.hfsFile.dataPhysicalSize / vcb->blockSize, isHFSPlus );
230 numDestExtentBlocks = CheckExtents( destData.hfsFile.rsrcExtents, destData.hfsFile.rsrcPhysicalSize / vcb->blockSize, isHFSPlus );
238 err = DeleteExtents( vcb, kHFSBogusExtentFileID, isHFSPlus );
244 err = MoveExtents( vcb, srcData.hfsFile.fileID, kHFSBogusExtentFileID, isHFSPlus );
250 ExUndo1a: err = DeleteExtents( vcb, kHFSBogusExtentFileID, isHFSPlus );
253 err = FlushCatalog( vcb ); // flush the catalog
254 err = FlushExtentFile( vcb ); // flush the extent file (unneeded for common case, but it's cheap)
259 err = MoveExtents( vcb, destData.hfsFile.fileID, srcData.hfsFile.fileID, isHFSPlus );
265 ExUndo2a: err = DeleteExtents( vcb, srcData.hfsFile.fileID, isHFSPlus );
268 err = MoveExtents( vcb, kHFSBogusExtentFileID, srcData.hfsFile.fileID, isHFSPlus ); // Move the extents back
275 err = MoveExtents( vcb, kHFSBogusExtentFileID, destData.hfsFile.fileID, isHFSPlus );
281 err = DeleteExtents( vcb, destData.hfsFile.fileID, isHFSPlus );
284 err = MoveExtents( vcb, srcData.hfsFile.fileID, destData.hfsFile.fileID, isHFSPlus ); // Move the extents back
293 err = MoveExtents( vcb, srcData.hfsFile.fileID, destData.hfsFile.fileID, isHFSPlus );
299 err = DeleteExtents( vcb, srcData.hfsFile.fileID, isHFSPlus );
307 err = MoveExtents( vcb, destData.hfsFile.fileID, srcData.hfsFile.fileID, isHFSPlus );
313 err = DeleteExtents( vcb, destData.hfsFile.fileID, isHFSPlus );
323 err = LocateCatalogNodeByKey( vcb, srcHint, &srcKey, &srcData, &srcHint );
331 err = ReplaceBTreeRecord( vcb->catalogRefNum, &srcKey, srcHint, &srcData, sizeof(HFSCatalogFile), &srcHint );
336 err = LocateCatalogNodeByKey( vcb, destHint, &destKey, &destData, &destHint );
341 err = ReplaceBTreeRecord( vcb->catalogRefNum, &destKey, destHint, &destData, sizeof(HFSCatalogFile), &destHint );
351 err = FlushCatalog( vcb ); // flush the catalog
352 err = FlushExtentFile( vcb ); // flush the extent file (unneeded for common case, but it's cheap)
376 static OSErr MoveExtents( ExtendedVCB *vcb, u_int32_t srcFileID, u_int32_t destFileID, Boolean isHFSPlus )
390 fcb = GetFileControlBlock(vcb->extentsRefNum);
523 err = DeleteExtents( vcb, srcFileID, isHFSPlus ); // Now delete all the extent entries with the sourceID
542 static OSErr DeleteExtents( ExtendedVCB *vcb, u_int32_t fileID, Boolean isHFSPlus )
552 fcb = GetFileControlBlock(vcb->extentsRefNum);