home *** CD-ROM | disk | FTP | other *** search
- /*
- * %Z% %M% %I% %D% %Q%
- *
- * Copyright (C) The Santa Cruz Operation, 1985, 1986, 1987.
- * This Module contains Proprietary Information of
- * The Santa Cruz Operation and should be treated as Confidential.
- *
- */
-
- /* The boot block partition table
- *
- * Note: High two bits of the sector field are the high order two bits
- * of the the cylinder number
- */
-
- #define BOOTBLK ((daddr_t)0) /* Block number of boot block */
- #define PT_OFFSET 0x1BE /* Partition table offset in bootblk */
- #define PT_ACTIVE 0x80 /* Indicates partition is active */
- #define PT_SIGNATURE 0xAA55 /* Boot block signature */
-
-
- struct partition {
- unsigned char pt_bootind; /* Bootable partition indicator */
- unsigned char pt_bhead; /* Beginning head */
- unsigned char pt_bsector; /* Beginning sector */
- unsigned char pt_bcyl; /* Beginning cylinder */
- unsigned char pt_sysind; /* Operating system indicator */
- unsigned char pt_ehead; /* Ending head */
- unsigned char pt_esector; /* Ending sector */
- unsigned char pt_ecyl; /* Ending cylinder */
- unsigned short pt_lowoff; /* Lo word of partition offset in sectors */
- unsigned short pt_hioff; /* Hi word of partition offset in sectors */
- unsigned short pt_lowsz; /* Lo word of partition size in sectors */
- unsigned short pt_hisz; /* Hi word of partition size in sectors */
- };
-
- #ifdef M_I386
- #pragma pack(2)
- #endif
-
- /* The actual 4 partitions in the table */
-
- struct parttbl {
- struct partition part[4];
- unsigned short pt_signature;
- };
-
- #ifdef M_I386
- #pragma pack()
- #endif
-
- /* Text size of the new masterboot code up to the disk partition table */
-
- #define PT_CODESZ (PT_OFFSET - 2*sizeof(char) - 3*sizeof(unsigned short))
- #define PT_TBLSZ (sizeof(struct parttbl))
-
- struct masterboot { /* New masterboot sector */
- char jmpcode[2]; /* Jump to code start */
- unsigned short tbladdr0; /* Drive 0 disk table address */
- unsigned short tbladdr1; /* Drive 1 disk table address */
- unsigned short ctrlrtype; /* Disk controller type */
- char code[PT_CODESZ]; /* Masterboot procedures */
- char parttbl[PT_TBLSZ]; /* fdisk partition table */
- };
-