|
|
1.1 ! root 1: /* ! 2: * Creation Date: <1999/07/06 15:45:12 samuel> ! 3: * Time-stamp: <2002/10/20 16:31:48 samuel> ! 4: * ! 5: * <partition_table.h> ! 6: * ! 7: * Headers describing the partition table ! 8: * ! 9: * Copyright (C) 1999, 2002 Samuel Rydh ([email protected]) ! 10: * ! 11: * This program is free software; you can redistribute it and/or ! 12: * modify it under the terms of the GNU General Public License ! 13: * as published by the Free Software Foundation ! 14: * ! 15: */ ! 16: ! 17: #ifndef _H_PARTITION_TABLE ! 18: #define _H_PARTITION_TABLE ! 19: ! 20: /* This information is based upon IM vol V. */ ! 21: ! 22: #define DESC_MAP_SIGNATURE 0x4552 ! 23: #define DESC_PART_SIGNATURE 0x504d ! 24: ! 25: enum { ! 26: kPartitionAUXIsValid = 0x00000001, ! 27: kPartitionAUXIsAllocated = 0x00000002, ! 28: kPartitionAUXIsInUse = 0x00000004, ! 29: kPartitionAUXIsBootValid = 0x00000008, ! 30: kPartitionAUXIsReadable = 0x00000010, ! 31: kPartitionAUXIsWriteable = 0x00000020, ! 32: kPartitionAUXIsBootCodePositionIndependent = 0x00000040, ! 33: kPartitionISMountedAtStartup = 0x40000000, ! 34: kPartitionIsStartup = 0x80000000, ! 35: kPartitionIsChainCompatible = 0x00000100, ! 36: kPartitionIsRealDeviceDriver = 0x00000200, ! 37: kPartitionCanChainToNext = 0x00000400, ! 38: }; ! 39: ! 40: typedef struct { ! 41: u32 ddBlock; /* first block of driver */ ! 42: u16 ddSize; /* driver size in blocks */ ! 43: s16 ddType; /* 1 & -1 for SCSI */ ! 44: } driver_entry_t; ! 45: ! 46: typedef struct { /* Block 0 of a device */ ! 47: u16 sbSig; /* always 0x4552 */ ! 48: u16 sbBlockSize; /* 512 */ ! 49: s32 sbBlkCount; /* #blocks on device */ ! 50: u16 sbDevType; /* 0 */ ! 51: u16 sbDevID; /* 0 */ ! 52: u32 sbData; /* 0 */ ! 53: s16 sbDrvrCount; /* #driver descriptors */ ! 54: ! 55: /* driver entries goes here */ ! 56: driver_entry_t drivers[61] __attribute__ ((packed)); ! 57: ! 58: u16 filler1; ! 59: u32 filler2; ! 60: } desc_map_t; ! 61: ! 62: typedef struct { /* Partition descriptor */ ! 63: u16 pmSig; /* always 0x504d 'PM' */ ! 64: u16 pmSigPad; /* 0 */ ! 65: u32 pmMapBlkCnt; /* #blocks in partition map */ ! 66: u32 pmPyPartStart; /* first physical block of part. */ ! 67: u32 pmPartBlkCnt; /* #blocks in partition */ ! 68: char pmPartName[32]; /* partition name */ ! 69: char pmPartType[32]; /* partition type */ ! 70: ! 71: /* these fields may or may not be used */ ! 72: u32 pmLgDataStart; ! 73: u32 pmDataCnt; ! 74: u32 pmPartStatus; ! 75: u32 pmLgBootStart; ! 76: u32 pmBootSize; ! 77: u32 pmBootLoad; ! 78: u32 pmBootLoad2; ! 79: u32 pmBootEntry; ! 80: u32 pmBootEntry2; ! 81: u32 pmBootCksum; ! 82: char pmProcessor[16]; ! 83: ! 84: char filler[376]; /* might contain extra information */ ! 85: } part_entry_t; ! 86: ! 87: ! 88: #endif /* _H_PARTITION_TABLE */
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.