Fork me on GitHub

root/include/fiwix/part.h

/* [previous][next][first][last][top][bottom][index][help] */

INCLUDED FROM


   1 /*
   2  * fiwix/include/fiwix/part.h
   3  *
   4  * Copyright 2018, Jordi Sanfeliu. All rights reserved.
   5  * Distributed under the terms of the Fiwix License.
   6  */
   7 
   8 #ifndef _FIWIX_PART_H
   9 #define _FIWIX_PART_H
  10 
  11 #define PARTITION_BLOCK         0
  12 #define NR_PARTITIONS           4       /* partitions in the MBR */
  13 #define MBR_CODE_SIZE           446
  14 #define ACTIVE_PART             0x80
  15 
  16 struct hd_geometry {
  17         unsigned char heads;
  18         unsigned char sectors;
  19         unsigned short int cylinders;
  20         unsigned long int start;
  21 };
  22 
  23 struct partition {
  24         unsigned char status;
  25         unsigned char head;
  26         unsigned char sector;
  27         unsigned char cyl;
  28         unsigned char type;
  29         unsigned char endhead;
  30         unsigned char endsector;
  31         unsigned char endcyl;
  32         unsigned int startsect;
  33         unsigned int nr_sects;
  34 };
  35 
  36 int read_msdos_partition(__dev_t, struct partition *);
  37 
  38 #endif /* _FIWIX_PART_H */

/* [previous][next][first][last][top][bottom][index][help] */