Added CONFIG_CLEAR and CONFIG_RESET to config.maemo
[busybox4maemo] / debian / sfdisk / common.h
1 /* common stuff for fdisk, cfdisk, sfdisk */
2
3 /* including <linux/fs.h> fails */
4 #include <sys/types.h>
5 #include <sys/ioctl.h>
6 #define BLKRRPART    _IO(0x12,95)    /* re-read partition table */
7 #define BLKGETSIZE   _IO(0x12,96)    /* return device size */
8 #define BLKFLSBUF    _IO(0x12,97)    /* flush buffer cache */
9 #define BLKSSZGET    _IO(0x12,104)   /* get block device sector size */
10 #define BLKGETSIZE64 _IOR(0x12,114,size_t)      /* size in bytes */
11
12 /* including <linux/hdreg.h> also fails */
13 struct hd_geometry {
14       unsigned char heads;
15       unsigned char sectors;
16       unsigned short cylinders;
17       unsigned long start;
18 };
19
20 #define HDIO_GETGEO             0x0301  /* get device geometry */
21
22
23 struct systypes {
24         unsigned char type;
25         char *name;
26 };
27
28 extern struct systypes i386_sys_types[];
29
30 extern char *partname(char *dev, int pno, int lth);
31
32 int disksize(int fd, unsigned long long *sectors);