diff options
author | Roger Pau Monne <roger.pau@citrix.com> | 2012-09-14 10:02:47 +0100 |
---|---|---|
committer | Roger Pau Monne <roger.pau@citrix.com> | 2012-09-14 10:02:47 +0100 |
commit | 19459d56f493b380e2df30e06822cc7b01183186 (patch) | |
tree | 9b397d655903efa89e6522badd7e33489f6d41d0 /tools/libfsimage | |
parent | 393a6e75afb627fe126bfc8050bd53b9e086e1dc (diff) | |
download | xen-19459d56f493b380e2df30e06822cc7b01183186.tar.gz xen-19459d56f493b380e2df30e06822cc7b01183186.tar.bz2 xen-19459d56f493b380e2df30e06822cc7b01183186.zip |
libfsimage: add ext4 support for CentOS 5.x
CentOS 5.x forked e2fs ext4 support into a different package called
e4fs, and so headers and library names changed from ext2fs to ext4fs.
Check if ext4fs/ext2fs.h and -lext4fs work, and use that instead of
ext2fs to build libfsimage. This patch assumes that if the ext4fs
library is present it should always be used instead of ext2fs.
This patch includes a rework of the ext2fs check, a new ext4fs check
and a minor modification in libfsimage to use the correct library.
Signed-off-by: Roger Pau Monne <roger.pau@citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
Committed-by: Ian Campbell <ian.campbell@citrix.com>
Diffstat (limited to 'tools/libfsimage')
-rw-r--r-- | tools/libfsimage/Makefile | 2 | ||||
-rw-r--r-- | tools/libfsimage/ext2fs-lib/Makefile | 5 | ||||
-rw-r--r-- | tools/libfsimage/ext2fs-lib/ext2fs-lib.c | 5 |
3 files changed, 9 insertions, 3 deletions
diff --git a/tools/libfsimage/Makefile b/tools/libfsimage/Makefile index 5a506f3325..69fd18a820 100644 --- a/tools/libfsimage/Makefile +++ b/tools/libfsimage/Makefile @@ -3,7 +3,7 @@ include $(XEN_ROOT)/tools/Rules.mk SUBDIRS-y = common ufs reiserfs iso9660 fat zfs SUBDIRS-$(CONFIG_X86) += xfs -ifeq ($(CONFIG_EXT2FS), y) +ifneq ($(EXTFS_LIBS), ) SUBDIRS-y += ext2fs-lib else SUBDIRS-y += ext2fs diff --git a/tools/libfsimage/ext2fs-lib/Makefile b/tools/libfsimage/ext2fs-lib/Makefile index 142207f63b..671fbffd73 100644 --- a/tools/libfsimage/ext2fs-lib/Makefile +++ b/tools/libfsimage/ext2fs-lib/Makefile @@ -4,7 +4,10 @@ LIB_SRCS-y = ext2fs-lib.c FS = ext2fs-lib -FS_LIBDEPS = -lext2fs +FS_LIBDEPS = $(EXTFS_LIBS) + +# Include configure output (config.h) to headers search path +CFLAGS += -I$(XEN_ROOT)/tools .PHONY: all all: fs-all diff --git a/tools/libfsimage/ext2fs-lib/ext2fs-lib.c b/tools/libfsimage/ext2fs-lib/ext2fs-lib.c index 36a27dc028..ed471465f9 100644 --- a/tools/libfsimage/ext2fs-lib/ext2fs-lib.c +++ b/tools/libfsimage/ext2fs-lib/ext2fs-lib.c @@ -21,8 +21,11 @@ * Use is subject to license terms. */ +/* Include output from configure */ +#include <config.h> + #include <fsimage_plugin.h> -#include <ext2fs/ext2fs.h> +#include INCLUDE_EXTFS_H #include <errno.h> #include <inttypes.h> |