4 * Wrapper for Linux ioctl definitions, including workarounds
7 #ifndef LIBINSTALLER_LINUXIOCTL_H
8 #define LIBINSTALLER_LINUXIOCTL_H
10 #include <sys/ioctl.h>
14 #define statfs _kernel_statfs /* HACK to deal with broken 2.4 distros */
16 #include <linux/fd.h> /* Floppy geometry */
17 #include <linux/hdreg.h> /* Hard disk geometry */
19 #include <linux/fs.h> /* FIGETBSZ, FIBMAP, FS_IOC_* */
21 #undef SECTOR_SIZE /* Defined in msdos_fs.h for no good reason */
24 #ifndef FS_IOC_GETFLAGS
25 /* Old kernel headers, these were once ext2-specific... */
26 # include <linux/ext2_fs.h> /* EXT2_IOC_* */
28 # define FS_IOC_GETFLAGS EXT2_IOC_GETFLAGS
29 # define FS_IOC_SETFLAGS EXT2_IOC_SETFLAGS
31 # define FS_IMMUTABLE_FL EXT2_IMMUTABLE_FL
35 # include <ext2fs/ext2_fs.h>
39 #ifndef FAT_IOCTL_GET_ATTRIBUTES
40 # define FAT_IOCTL_GET_ATTRIBUTES _IOR('r', 0x10, __u32)
42 #ifndef FAT_IOCTL_SET_ATTRIBUTES
43 # define FAT_IOCTL_SET_ATTRIBUTES _IOW('r', 0x11, __u32)
46 #include <linux/fiemap.h> /* FIEMAP definitions */
49 # define FS_IOC_FIEMAP _IOWR('f', 11, struct fiemap)
55 /* This takes a u64, but the size field says size_t. Someone screwed big. */
56 # define BLKGETSIZE64 _IOR(0x12,114,size_t)
59 #include <linux/loop.h>
61 #endif /* __linux__ */
63 #endif /* LIBINSTALLER_LINUXIOCTL_H */