home *** CD-ROM | disk | FTP | other *** search
/ Piper's Pit BBS/FTP: ibm 0010 - 0019 / ibm0010-0019 / ibm0010.tar / ibm0010 / UNIX3862.ZIP / U386-06.ZIP / U386-6.TD0 / usr / include / sys / fdisk.h < prev    next >
Encoding:
C/C++ Source or Header  |  1988-06-26  |  2.5 KB  |  70 lines

  1. /*    Copyright (c) 1984, 1986, 1987, 1988 AT&T    */
  2. /*      All Rights Reserved      */
  3.  
  4. /*    THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF AT&T    */
  5. /*    The copyright notice above does not evidence any       */
  6. /*    actual or intended publication of such source code.    */
  7.  
  8. /* fdisk.h
  9.  * This file defines the structure of physical disk sector 0 for use on
  10.  * AT386 systems.  The format of this sector is constrained by the ROM
  11.  * BIOS and MS-DOS conventions.
  12.  * Note that this block does not define the partitions used by the unix
  13.  * driver.  The unix partitions are obtained from the VTOC.
  14.  */
  15.  
  16. #ident    "@(#)head.sys:fdisk.h    1.3.1.1"
  17.  
  18. #define BOOTSZ        446    /* size of boot code in master boot block */
  19. #define FD_NUMPART    4    /* number of 'partitions' in fdisk table */
  20. #define MBB_MAGIC    0xAA55    /* magic number for mboot.signature */
  21. #define DEFAULT_INTLV    4    /* default interleave for testing tracks */
  22. #define MINPSIZE    4    /* minimum number of cylinders in a partition */
  23. #define TSTPAT        0xE5    /* test pattern for verifying disk */
  24.  
  25. /*
  26.  * structure to hold the fdisk partition table
  27.  */
  28. struct ipart {
  29.     unsigned char bootid;    /* bootable or not */
  30.     unsigned char beghead;    /* beginning head, sector, cylinder */
  31.     unsigned char begsect;    /* begcyl is a 10-bit number. High 2 bits */
  32.     unsigned char begcyl;    /*     are in begsect. */
  33.     unsigned char systid;    /* OS type */
  34.     unsigned char endhead;    /* ending head, sector, cylinder */
  35.     unsigned char endsect;    /* endcyl is a 10-bit number.  High 2 bits */
  36.     unsigned char endcyl;    /*     are in endsect. */
  37.     long    relsect;    /* first sector relative to start of disk */
  38.     long    numsect;    /* number of sectors in partition */
  39. };
  40. /*
  41.  * Values for bootid.
  42.  */
  43. #define NOTACTIVE    0
  44. #define ACTIVE        128
  45. /*
  46.  * Values for systid.
  47.  */
  48. #define DOSOS12        1    /* DOS partition, 12-bit FAT */
  49. #define PCIXOS        2    /* PC/IX partition */
  50. #define DOSDATA        86    /* DOS data partition */
  51. #define DOSOS16        4    /* DOS partition, 16-bit FAT */
  52. #define EXTDOS        5    /* EXT-DOS partition */
  53. #define OTHEROS        98    /* part. type for appl. (DB?) needs raw partition */
  54.                 /* ID was 0 but conflicted with DOS 3.3 fdisk    */
  55. #define UNIXOS        99    /* UNIX V.x partition */
  56. #define UNUSED        100    /* unassigned partition */
  57. #define MAXDOS        65535L    /* max size (sectors) for DOS partition */
  58. /*
  59.  * structure to hold master boot block in physical sector 0 of the disk.
  60.  * Note that partitions stuff can't be directly included in the structure
  61.  * because of lameo '386 compiler alignment design.
  62.  */
  63.  
  64. struct  mboot {     /* master boot block */
  65.     char    bootinst[BOOTSZ];
  66.     char    parts[FD_NUMPART * sizeof(struct ipart)];
  67.     ushort   signature;
  68. };
  69.  
  70.