Whamcloud - gitweb
Move declaration of FS_IOC_FIEMAP ioctl to fiemap.h
authorTheodore Ts'o <tytso@mit.edu>
Sat, 22 Aug 2009 17:16:14 +0000 (13:16 -0400)
committerTheodore Ts'o <tytso@mit.edu>
Sat, 22 Aug 2009 17:16:14 +0000 (13:16 -0400)
This helps e4defrag compile on systems where the system header files
don't yet define FS_IOC_FIEMAP.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
lib/ext2fs/fiemap.h
misc/e4defrag.c
misc/filefrag.c

index 934e22d..0696729 100644 (file)
@@ -36,6 +36,10 @@ struct fiemap {
        struct fiemap_extent fm_extents[0]; /* array of mapped extents (out) */
 };
 
+#ifndef FS_IOC_FIEMAP
+#define FS_IOC_FIEMAP  _IOWR('f', 11, struct fiemap)
+#endif
+
 #define FIEMAP_MAX_OFFSET      (~0ULL)
 
 #define FIEMAP_FLAG_SYNC       0x00000001 /* sync file data before map */
index 4c83fa3..4451a63 100644 (file)
@@ -34,8 +34,8 @@
 #include <ext2fs/ext2_types.h>
 #include <ext2fs/ext2fs.h>
 #include <linux/fs.h>
-#include <ext2fs/fiemap.h>
 #include <sys/ioctl.h>
+#include <ext2fs/fiemap.h>
 #include <sys/mman.h>
 #include <sys/stat.h>
 #include <sys/statfs.h>
index eed2b86..66a09e7 100644 (file)
@@ -54,7 +54,6 @@ unsigned long long filesize;
 
 #define FIBMAP         _IO(0x00, 1)    /* bmap access */
 #define FIGETBSZ       _IO(0x00, 2)    /* get the block size used for bmap */
-#define FS_IOC_FIEMAP  _IOWR('f', 11, struct fiemap)
 
 #define        EXT4_EXTENTS_FL                 0x00080000 /* Inode uses extents */
 #define        EXT3_IOC_GETFLAGS               _IOR('f', 1, long)