home *** CD-ROM | disk | FTP | other *** search
/ NeXTSTEP 3.1 (Developer) [x86] / NeXT Step 3.1 Intel dev.cdr.dmg / NextDeveloper / Headers / bsd / dev / i386 / disk.h < prev    next >
Encoding:
C/C++ Source or Header  |  1993-04-30  |  1.7 KB  |  52 lines

  1. /*
  2.  * Copyright (c) 1992 NeXT Computer, Inc.
  3.  *
  4.  * IBM PC disk partitioning data structures.
  5.  *
  6.  * HISTORY
  7.  *
  8.  * 8 July 1992 David E. Bohman at NeXT
  9.  *    Created.
  10.  */
  11.  
  12. #if    defined(KERNEL_PRIVATE) || defined(DRIVER_PRIVATE)
  13.  
  14. #define DISK_BLK0    0        /* blkno of boot block */
  15. #define DISK_BLK0SZ    512        /* size of boot block */
  16. #define DISK_BOOTSZ    446        /* size of boot code in boot block */
  17. #define    DISK_SIGNATURE    0xAA55        /* signature of the boot record */
  18. #define FDISK_NPART    4        /* number of entries in fdisk table */
  19. #define FDISK_ACTIVE    0x80        /* indicator of active partition */
  20. #define FDISK_NEXTNAME    0xA7        /* indicator of NeXT partition */
  21. #define FDISK_DOS12    0x01            /* 12-bit fat < 10MB dos partition */
  22. #define FDISK_DOS16S    0x04            /* 16-bit fat < 32MB dos partition */
  23. #define FDISK_DOSEXT    0x05            /* extended dos partition */
  24. #define FDISK_DOS16B    0x06            /* 16-bit fat >= 32MB dos partition */
  25.  
  26. /*
  27.  * Format of fdisk partion entry (if present).
  28.  */
  29. struct fdisk_part {
  30.     unsigned char    bootid;        /* bootable or not */
  31.     unsigned char    beghead;    /* begining head, sector, cylinder */
  32.     unsigned char    begsect;    /* begcyl is a 10-bit number */
  33.     unsigned char    begcyl;        /* High 2 bits are in begsect */
  34.     unsigned char    systid;        /* OS type */
  35.     unsigned char    endhead;    /* ending head, sector, cylinder */
  36.     unsigned char    endsect;    /* endcyl is a 10-bit number */
  37.     unsigned char    endcyl;        /* High 2 bits are in endsect */
  38.     unsigned long    relsect;    /* partion physical offset on disk */
  39.     unsigned long    numsect;    /* number of sectors in partition */
  40. };
  41.  
  42. /*
  43.  * Format of boot block.
  44.  */
  45. struct disk_blk0 {
  46.     unsigned char    bootcode[DISK_BOOTSZ];
  47.     unsigned char    parts[FDISK_NPART][sizeof (struct fdisk_part)];
  48.     unsigned short    signature;
  49. };
  50.  
  51. #endif
  52.