]> git.saurik.com Git - apple/bootx.git/blobdiff - bootx.tproj/fs.subproj/ufs.c
BootX-81.tar.gz
[apple/bootx.git] / bootx.tproj / fs.subproj / ufs.c
index f6aa107ddad24c8f220fb381c8f7effad8642134..0f6aa7178d6a11478641d5bdac3792c0c93b0f46 100644 (file)
@@ -1,24 +1,31 @@
 /*
- * Copyright (c) 2000 Apple Computer, Inc. All rights reserved.
+ * Copyright (c) 2000-2007 Apple Inc. All rights reserved.
  *
- * @APPLE_LICENSE_HEADER_START@
+ * @APPLE_OSREFERENCE_LICENSE_HEADER_START@
  * 
- * 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. The rights granted to you under the License
+ * may not be used to create, or enable the creation or redistribution of,
+ * unlawful or unlicensed copies of an Apple operating system, or to
+ * circumvent, violate, or enable the circumvention or violation of, any
+ * terms of an Apple operating system software license agreement.
  * 
- * This Original Code and all software distributed under the License are
- * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * 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
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
- * License for the specific language governing rights and limitations
- * under the License.
+ * 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.
  * 
- * @APPLE_LICENSE_HEADER_END@
+ * @APPLE_OSREFERENCE_LICENSE_HEADER_END@
  */
+
 /*
  *  ufs.c - File System Module for UFS.
  *
@@ -43,7 +50,7 @@ static long ReadInode(long inodeNum, InodePtr inode, long *flags, long *time);
 static long ResolvePathToInode(char *filePath, long *flags,
                               InodePtr fileInode, InodePtr dirInode);
 static long ReadDirEntry(InodePtr dirInode, long *fileInodeNum,
-                        long *dirIndex, char **name);
+                        unsigned long *dirIndex, char **name);
 static long FindFileInDir(char *fileName, long *flags,
                          InodePtr fileInode, InodePtr dirInode);
 static char *ReadFileBlock(InodePtr fileInode, long fragNum, long blockOffset,
@@ -167,7 +174,7 @@ long UFSReadFile(CICell ih, char *filePath, void *base,
 }
 
 
-long UFSGetDirEntry(CICell ih, char *dirPath, long *dirIndex,
+long UFSGetDirEntry(CICell ih, char *dirPath, unsigned long *dirIndex,
                    char **name, long *flags, long *time)
 {
   long  ret, fileInodeNum, dirFlags;
@@ -284,7 +291,7 @@ static long ResolvePathToInode(char *filePath, long *flags,
 
 
 static long ReadDirEntry(InodePtr dirInode, long *fileInodeNum,
-                        long *dirIndex, char **name)
+                        unsigned long *dirIndex, char **name)
 {
   struct direct *dir;
   char          *buffer;
@@ -318,7 +325,8 @@ static long ReadDirEntry(InodePtr dirInode, long *fileInodeNum,
 static long FindFileInDir(char *fileName, long *flags,
                          InodePtr fileInode, InodePtr dirInode)
 {
-  long ret, inodeNum, index = 0;
+  long ret, inodeNum;
+  unsigned long index = 0;
   char *name;
   
   while (1) {