home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 15 / 15.iso / s / s053 / 8.ddi / usr / include / sys / fdisk.h < prev    next >
Encoding:
C/C++ Source or Header  |  1990-12-08  |  2.5 KB  |  68 lines

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