home *** CD-ROM | disk | FTP | other *** search
- /*
- File: MacOSMediaPartitionMap.h
-
- Contains: MacOS Partition Map Format definitions
-
- Version: Technology: Copland
- Release: Universal Interfaces 3.0d3 on Copland DR1
-
- Copyright: © 1984-1996 by Apple Computer, Inc. All rights reserved.
-
- Bugs?: If you find a problem with this file, send the file and version
- information (from above) and the problem description to:
-
- Internet: apple.bugs@applelink.apple.com
- AppleLink: APPLE.BUGS
-
- */
- #ifndef __MACOSMEDIAPARTITIONMAP__
- #define __MACOSMEDIAPARTITIONMAP__
-
- #ifndef __TYPES__
- #include <Types.h>
- #endif
-
- #ifdef __cplusplus
- extern "C" {
- #endif
-
- #if PRAGMA_IMPORT_SUPPORTED
- #pragma import on
- #endif
-
- #if PRAGMA_ALIGN_SUPPORTED
- #pragma options align=mac68k
- #endif
-
- #if FOR_SYSTEM8_PREEMPTIVE
- /*
- * Prior to System 8 these structures are defined in SCSI.h
- */
- /* Signatures */
-
- enum {
- sbSIGWord = 0x4552, /* signature word for Block 0 ('ER') */
- sbMac = 1, /* system type for Mac */
- pMapSIG = 0x504D, /* partition map signature ('PM') */
- pdSigWord = 0x5453
- };
-
-
- enum {
- oldPMSigWord = pdSigWord,
- newPMSigWord = pMapSIG
- };
-
- /* Driver Descriptor Map */
- struct Block0 {
- unsigned short sbSig; /* unique value for SCSI block 0 */
- unsigned short sbBlkSize; /* block size of device */
- unsigned long sbBlkCount; /* number of blocks on device */
- unsigned short sbDevType; /* device type */
- unsigned short sbDevId; /* device id */
- unsigned long sbData; /* not used */
- unsigned short sbDrvrCount; /* driver descriptor count */
- unsigned long ddBlock; /* 1st driver's starting block */
- unsigned short ddSize; /* size of 1st driver (512-byte blks) */
- unsigned short ddType; /* system type (1 for Mac+) */
- unsigned short ddPad[243]; /* ARRAY[0..242] OF INTEGER; not used */
- };
- typedef struct Block0 Block0;
-
- /*Driver descriptor*/
- struct DDMap {
- unsigned long ddBlock; /* 1st driver's starting block */
- unsigned short ddSize; /* size of 1st driver (512-byte blks) */
- unsigned short ddType; /* system type (1 for Mac+) */
- };
- typedef struct DDMap DDMap;
-
- /* Partition Map Entry */
- /* packed in ".i"*/
- struct Partition {
- unsigned short pmSig; /* unique value for map entry blk */
- unsigned short pmSigPad; /* currently unused */
- unsigned long pmMapBlkCnt; /* # of blks in partition map */
- unsigned long pmPyPartStart; /* physical start blk of partition */
- unsigned long pmPartBlkCnt; /* # of blks in this partition */
- unsigned char pmPartName[32]; /* ASCII partition name */
- unsigned char pmParType[32]; /* ASCII partition type */
- unsigned long pmLgDataStart; /* log. # of partition's 1st data blk */
- unsigned long pmDataCnt; /* # of blks in partition's data area */
- unsigned long pmPartStatus; /* bit field for partition status */
- unsigned long pmLgBootStart; /* log. blk of partition's boot code */
- unsigned long pmBootSize; /* number of bytes in boot code */
- unsigned long pmBootAddr; /* memory load address of boot code */
- unsigned long pmBootAddr2; /* currently unused */
- unsigned long pmBootEntry; /* entry point of boot code */
- unsigned long pmBootEntry2; /* currently unused */
- unsigned long pmBootCksum; /* checksum of boot code */
- unsigned char pmProcessor[16]; /* ASCII for the processor type */
- unsigned short pmPad[188]; /* ARRAY[0..187] OF INTEGER; not used */
- };
- typedef struct Partition Partition;
-
- #endif
-
- #if PRAGMA_ALIGN_SUPPORTED
- #pragma options align=reset
- #endif
-
- #if PRAGMA_IMPORT_SUPPORTED
- #pragma import off
- #endif
-
- #ifdef __cplusplus
- }
- #endif
-
- #endif /* __MACOSMEDIAPARTITIONMAP__ */
-
-