hdt: Making dumping code easier to use
[syslinux.git] / libinstaller / linuxioctl.h
blob7ef919a36d7f505e81b1e74d9e6eceef84cb8eea
1 /*
2 * linuxioctl.h
4 * Wrapper for Linux ioctl definitions, including workarounds
5 */
7 #ifndef LIBINSTALLER_LINUXIOCTL_H
8 #define LIBINSTALLER_LINUXIOCTL_H
10 #include <sys/ioctl.h>
12 #define statfs _kernel_statfs /* HACK to deal with broken 2.4 distros */
14 #include <linux/fd.h> /* Floppy geometry */
15 #include <linux/hdreg.h> /* Hard disk geometry */
17 #include <linux/fs.h> /* FIGETBSZ, FIBMAP, FS_IOC_FIEMAP */
18 #include <linux/msdos_fs.h> /* FAT_IOCTL_SET_ATTRIBUTES */
20 #undef SECTOR_SIZE /* Defined in msdos_fs.h for no good reason */
21 #undef SECTOR_BITS
22 #include <linux/ext2_fs.h> /* EXT2_IOC_* */
24 #ifndef FAT_IOCTL_GET_ATTRIBUTES
25 # define FAT_IOCTL_GET_ATTRIBUTES _IOR('r', 0x10, __u32)
26 #endif
28 #ifndef FAT_IOCTL_SET_ATTRIBUTES
29 # define FAT_IOCTL_SET_ATTRIBUTES _IOW('r', 0x11, __u32)
30 #endif
32 #include <linux/fiemap.h> /* FIEMAP definitions */
34 #ifndef FS_IOC_FIEMAP
35 # define FS_IOC_FIEMAP _IOWR('f', 11, struct fiemap)
36 #endif
38 #undef statfs
40 #if defined(__linux__) && !defined(BLKGETSIZE64)
41 /* This takes a u64, but the size field says size_t. Someone screwed big. */
42 # define BLKGETSIZE64 _IOR(0x12,114,size_t)
43 #endif
45 #include <linux/loop.h>
47 #endif /* LIBINSTALLER_LINUXIOCTL_H */