Annotation of kernel/bsd/hfs/hfscommon/headers/HFSBtreesPriv.h, revision 1.1

1.1     ! root        1: /*
        !             2:  * Copyright (c) 1999 Apple Computer, Inc. All rights reserved.
        !             3:  *
        !             4:  * @APPLE_LICENSE_HEADER_START@
        !             5:  * 
        !             6:  * Portions Copyright (c) 1999 Apple Computer, Inc.  All Rights
        !             7:  * Reserved.  This file contains Original Code and/or Modifications of
        !             8:  * Original Code as defined in and that are subject to the Apple Public
        !             9:  * Source License Version 1.1 (the "License").  You may not use this file
        !            10:  * except in compliance with the License.  Please obtain a copy of the
        !            11:  * License at http://www.apple.com/publicsource and read it before using
        !            12:  * this file.
        !            13:  * 
        !            14:  * The Original Code and all software distributed under the License are
        !            15:  * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
        !            16:  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
        !            17:  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
        !            18:  * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
        !            19:  * License for the specific language governing rights and limitations
        !            20:  * under the License.
        !            21:  * 
        !            22:  * @APPLE_LICENSE_HEADER_END@
        !            23:  */
        !            24: 
        !            25: /*
        !            26:        File:           HFSBtreesPriv.h
        !            27: 
        !            28:        Contains:       On disk B-tree structures for HFS and HFS Plus volumes.
        !            29: 
        !            30:        Version:        HFS Plus 1.0
        !            31: 
        !            32:        Copyright:      � 1997 by Apple Computer, Inc., all rights reserved.
        !            33: 
        !            34:        File Ownership:
        !            35: 
        !            36:                DRI:                            Don Brady
        !            37: 
        !            38:                Other Contact:          Mark Day
        !            39: 
        !            40:                Technology:                     File Systems
        !            41: 
        !            42:        Writers:
        !            43: 
        !            44:                (djb)   Don Brady
        !            45: 
        !            46:        Change History (most recent first):
        !            47: 
        !            48:           <CS1>         4/28/97        djb             first checked in
        !            49:          <HFS2>          3/3/97        djb             Added kBTreeHeaderUserBytes constant.
        !            50:          <HFS1>         2/19/97        djb             first checked in
        !            51: */
        !            52: 
        !            53: #ifndef        __HFSBTREESPRIV__
        !            54: #define __HFSBTREESPRIV__
        !            55: 
        !            56: #if TARGET_OS_MAC
        !            57: #include       <Types.h>
        !            58: #else
        !            59: #include "system/MacOSTypes.h"
        !            60: #endif         /* TARGET_OS_MAC */
        !            61: 
        !            62: //// Node Descriptor - at beginning of each node
        !            63: 
        !            64: #if PRAGMA_STRUCT_ALIGN
        !            65:        #pragma options align=mac68k
        !            66: #elif PRAGMA_STRUCT_PACKPUSH
        !            67:        #pragma pack(push, 2)
        !            68: #elif PRAGMA_STRUCT_PACK
        !            69:        #pragma pack(2)
        !            70: #endif
        !            71: 
        !            72: struct BTNodeDescriptor {
        !            73:        UInt32                                          fLink;                          // forward link
        !            74:        UInt32                                          bLink;                          // backward link
        !            75:        SInt8                                           type;                           // node type
        !            76:        UInt8                                           height;                         // node height
        !            77:        UInt16                                          numRecords;                     // number of records
        !            78:        UInt16                                          reserved;                       // reserved
        !            79: };
        !            80: 
        !            81: typedef struct BTNodeDescriptor BTNodeDescriptor;
        !            82: 
        !            83: //#if defined(powerpc) || defined (__powerpc)
        !            84: #pragma options align=reset
        !            85: //#endif
        !            86: 
        !            87: 
        !            88: //// Node Types
        !            89: 
        !            90: typedef enum {
        !            91:        kLeafNode               = -1,
        !            92:        kIndexNode              =  0,
        !            93:        kHeaderNode             =  1,
        !            94:        kMapNode                =  2
        !            95: } NodeType;
        !            96: 
        !            97: 
        !            98: //// Header Node Structure (BTNodeDescriptor + Header Record)
        !            99: //#if defined(powerpc) || defined (__powerpc)
        !           100: #pragma options align=mac68k
        !           101: //#endif
        !           102: typedef struct {
        !           103:        BTNodeDescriptor                node;
        !           104:        UInt16                                  treeDepth;
        !           105:        UInt32                                  rootNode;
        !           106:        UInt32                                  leafRecords;
        !           107:        UInt32                                  firstLeafNode;
        !           108:        UInt32                                  lastLeafNode;
        !           109:        UInt16                                  nodeSize;
        !           110:        UInt16                                  maxKeyLength;
        !           111:        UInt32                                  totalNodes;
        !           112:        UInt32                                  freeNodes;
        !           113:        UInt16                                  reserved1;
        !           114:        UInt32                                  clumpSize;              // misalligned
        !           115:        UInt8                                   btreeType;
        !           116:        UInt8                                   reserved2;
        !           117:        UInt32                                  attributes;             // long aligned again
        !           118:        UInt32                                  reserved3[16];
        !           119: } HeaderRec, *HeaderPtr;
        !           120: 
        !           121: 
        !           122: typedef enum {
        !           123:        kBTBadCloseMask                         = 0x00000001,
        !           124:        kBTBigKeysMask                          = 0x00000002,
        !           125:        kBTVariableIndexKeysMask        = 0x00000004
        !           126: }      BTreeAttributes;
        !           127: 
        !           128: 
        !           129: enum {
        !           130:        kBTreeHeaderUserBytes = 128
        !           131: 
        !           132: };
        !           133: 
        !           134: #if PRAGMA_STRUCT_ALIGN
        !           135:        #pragma options align=reset
        !           136: #elif PRAGMA_STRUCT_PACKPUSH
        !           137:        #pragma pack(pop)
        !           138: #elif PRAGMA_STRUCT_PACK
        !           139:        #pragma pack()
        !           140: #endif
        !           141: 
        !           142: #endif //__HFSBTREESPRIV__

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.