]> git.saurik.com Git - apple/xnu.git/blobdiff - bsd/hfs/hfscommon/BTree/BTree.c
xnu-792.tar.gz
[apple/xnu.git] / bsd / hfs / hfscommon / BTree / BTree.c
index d61c73936cb373c2c87ab40b9b943159074a493d..f11af332afca5e58f0b6370b45c36881c771476c 100644 (file)
@@ -1,24 +1,21 @@
 /*
- * Copyright (c) 2000-2003 Apple Computer, Inc. All rights reserved.
+ * Copyright (c) 2000-2004 Apple Computer, Inc. All rights reserved.
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
@@ -1123,7 +1120,7 @@ ProcessData:
        }
        
        while (err == 0) {
-               if (callBackProc(keyPtr, recordPtr, len, callBackState) == 0)
+               if (callBackProc(keyPtr, recordPtr, callBackState) == 0)
                        break;
                
                if ((index+1) < ((NodeDescPtr)node.buffer)->numRecords) {
@@ -1551,7 +1548,7 @@ BTUpdateRecord(FCB *filePtr, BTreeIterator *iterator,
 
        btreePtr = (BTreeControlBlockPtr) filePtr->fcbBTCBPtr;
 
-       REQUIRE_FILE_LOCK(btreePtr->fileRefNum, false);
+       REQUIRE_FILE_LOCK(btreePtr->fileRefNum, true);
 
        ////////////////////////////// Take A Hint //////////////////////////////////
 
@@ -1574,7 +1571,7 @@ BTUpdateRecord(FCB *filePtr, BTreeIterator *iterator,
                                // XXXdbg
                                ModifyBlockStart(btreePtr->fileRefNum, &nodeRec);
                                                                
-                               err = callBackProc(keyPtr, recordPtr, recordLen, callBackState);
+                               err = callBackProc(keyPtr, recordPtr, callBackState);
                                M_ExitOnError (err);
 
                                err = UpdateNode (btreePtr, &nodeRec, 0, 0);
@@ -1609,7 +1606,7 @@ BTUpdateRecord(FCB *filePtr, BTreeIterator *iterator,
        // XXXdbg
        ModifyBlockStart(btreePtr->fileRefNum, &nodeRec);
                                                                
-       err = callBackProc(keyPtr, recordPtr, recordLen, callBackState);
+       err = callBackProc(keyPtr, recordPtr, callBackState);
        M_ExitOnError (err);
 
        err = UpdateNode (btreePtr, &nodeRec, 0, 0);
@@ -1789,7 +1786,7 @@ OSStatus  BTFlushPath                             (FCB                                    *filePtr)
 
        M_ReturnErrorIf (btreePtr == nil,       fsBTInvalidFileErr);
 
-       REQUIRE_FILE_LOCK(btreePtr->fileRefNum, false);
+       REQUIRE_FILE_LOCK(btreePtr->fileRefNum, true);
 
        err = UpdateHeader (btreePtr, false);