/* common stuff for fdisk, cfdisk, sfdisk */
#include <sys/types.h>
typedef u_int16_t __u16;
typedef u_int32_t __u32;
typedef int16_t __s16;
typedef u_int8_t __u8;
/* including <linux/hdreg.h> also fails */
struct hd_geometry {
unsigned char heads;
unsigned char sectors;
unsigned short cylinders;
unsigned long start;
};
struct systypes {
unsigned char type;
char *name;
};
extern struct systypes i386_sys_types[];
extern char *partname(char *dev, int pno, int lth);
unsigned int sys_bsd_sectorsize(int fd);
int sys_bsd_getsectors(int fd, unsigned long* s);
int sys_bsd_ptsync(int fd);
int sys_bsd_getgeometry(int, struct hd_geometry*);
syntax highlighted by Code2HTML, v. 0.9.1