2009-07-30 07:41:12 +02:00
|
|
|
#ifndef _PARTITION_H_
|
2009-05-03 20:53:31 +02:00
|
|
|
#define _PARTITION_H_
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
2009-07-30 07:41:12 +02:00
|
|
|
extern "C" {
|
2009-05-03 20:53:31 +02:00
|
|
|
#endif
|
2009-07-30 07:41:12 +02:00
|
|
|
|
|
|
|
/* 'partition entry' structure */
|
|
|
|
typedef struct {
|
|
|
|
/* Boot indicator */
|
|
|
|
u8 boot;
|
2009-05-03 20:53:31 +02:00
|
|
|
|
2009-07-30 07:41:12 +02:00
|
|
|
/* Starting CHS */
|
|
|
|
u8 start[3];
|
2009-05-03 20:53:31 +02:00
|
|
|
|
2009-07-30 07:41:12 +02:00
|
|
|
/* Partition type */
|
|
|
|
u8 type;
|
2009-05-03 20:53:31 +02:00
|
|
|
|
2009-07-30 07:41:12 +02:00
|
|
|
/* Ending CHS */
|
|
|
|
u8 end[3];
|
2009-05-03 20:53:31 +02:00
|
|
|
|
2009-07-30 07:41:12 +02:00
|
|
|
/* Partition sector */
|
|
|
|
u32 sector;
|
2009-05-03 20:53:31 +02:00
|
|
|
|
2009-07-30 07:41:12 +02:00
|
|
|
/* Partition size */
|
|
|
|
u32 size;
|
|
|
|
} ATTRIBUTE_PACKED partitionEntry;
|
2009-05-03 20:53:31 +02:00
|
|
|
|
2009-07-30 07:41:12 +02:00
|
|
|
/* Constants */
|
2009-05-03 20:53:31 +02:00
|
|
|
#define MAX_PARTITIONS 4
|
|
|
|
|
2009-07-30 07:41:12 +02:00
|
|
|
/* Prototypes */
|
|
|
|
s32 Partition_GetEntries(partitionEntry *, u32 *);
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|
2009-05-03 20:53:31 +02:00
|
|
|
|
|
|
|
#endif
|