summaryrefslogtreecommitdiffstats
path: root/balkan/rw.c
blob: 663dd03a4502a642d40daf511cf4227e28f37694 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#include "balkan.h"
#include "dos.h"

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

    /* Try sun labels first: they contain
       both magic (tho 16bit) and checksum.  */
    ret = sunpReadTable(fd, table);
    if (ret != BALKAN_ERROR_BADMAGIC)
	return ret;
    ret = bsdlReadTable(fd, table);
    if (ret != BALKAN_ERROR_BADMAGIC)
	return ret;
	
    return dospReadTable(fd, table);    
}