From: Theodore Ts'o Date: Sat, 22 Aug 2009 17:16:14 +0000 (-0400) Subject: Move declaration of FS_IOC_FIEMAP ioctl to fiemap.h X-Git-Url: https://git.whamcloud.com/gitweb?a=commitdiff_plain;h=88fca201aca752cbb7a981e1fe1b2a875cc29833;p=tools%2Fe2fsprogs.git Move declaration of FS_IOC_FIEMAP ioctl to fiemap.h This helps e4defrag compile on systems where the system header files don't yet define FS_IOC_FIEMAP. Signed-off-by: "Theodore Ts'o" --- diff --git a/lib/ext2fs/fiemap.h b/lib/ext2fs/fiemap.h index 934e22d..0696729 100644 --- a/lib/ext2fs/fiemap.h +++ b/lib/ext2fs/fiemap.h @@ -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 */ diff --git a/misc/e4defrag.c b/misc/e4defrag.c index 4c83fa3..4451a63 100644 --- a/misc/e4defrag.c +++ b/misc/e4defrag.c @@ -34,8 +34,8 @@ #include #include #include -#include #include +#include #include #include #include diff --git a/misc/filefrag.c b/misc/filefrag.c index eed2b86..66a09e7 100644 --- a/misc/filefrag.c +++ b/misc/filefrag.c @@ -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)