summaryrefslogtreecommitdiffstats
path: root/balkan/balkan.h
blob: bc687cd2cf5db91dfce62a529ded263ab41f2f0a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#ifndef H_BALKAN
#define H_BALKAN 1
#define _LARGEFILE_SOURCE 1
#define _LARGEFILE64_SOURCE 1

#define BALKAN_ERROR_ERRNO	1
#define BALKAN_ERROR_BADMAGIC	2
#define BALKAN_ERROR_BADTABLE	3

#define BALKAN_PART_DOS		1
#define BALKAN_PART_EXT2	2
#define BALKAN_PART_OTHER	3
#define BALKAN_PART_NTFS	4
#define BALKAN_PART_SWAP	5
#define BALKAN_PART_UFS		6
#define BALKAN_PART_RAID	7

struct partition {
    long startSector;
    long size;			/* in sectors */
    int type;			/* -1 for "not used" */
};

struct partitionTable {
    int allocationUnit;		/* in sectors */
    int maxNumPartitions;
    int sectorSize;
    struct partition parts[50];
};

int balkanReadTable(int fd, struct partitionTable * table);

#endif