1 #ifndef PARTX_H_INCLUDED
2 #define PARTX_H_INCLUDED
5 * For each partition type there is a routine that takes
6 * a block device and a range, and returns the list of
7 * slices found there in the supplied array SP that can
8 * hold NS entries. The return value is the number of
9 * entries stored, or -1 if the appropriate type is not
14 /* units: 512 byte sectors */
20 typedef int (ptreader)(int fd, struct slice all, struct slice *sp, int ns);
22 extern ptreader read_dos_pt, read_bsd_pt, read_solaris_pt, read_unixware_pt, read_gpt_pt;
24 unsigned char *getblock(int fd, unsigned int secnr);
27 four2int(unsigned char *p) {
28 return p[0] + (p[1]<<8) + (p[2]<<16) + (p[3]<<24);
31 #endif /* PARTX_H_INCLUDED */