From: Martin Petermann Date: Wed, 15 Oct 2008 20:42:31 +0000 (+0200) Subject: [lib] libdevmapper api check X-Git-Tag: 0.4.9~184 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=7e2ca56a75734018d725df46ad08a5ac1796e9cf;p=platform%2Fupstream%2Fmultipath-tools.git [lib] libdevmapper api check In libmultipath Makefile it is checked if the symbol dm_task_no_flush is defined within the device mapper library. On my system beside the library there exists a symbolic link within the same directory pointing to this library and containing libdevmapper.so in it's name: lrwxrwxrwx 1 root root 20 Sep 22 22:15 /lib64/libdevmapper.so -> libdevmapper.so.1.02 -rwxr-xr-x 1 root root 89928 Feb 14 2008 /lib64/libdevmapper.so.1.02 In this case "grep -c" returns a 2 instead of 1 that is assumed in the Makefile. I changed this check to not equal zero. --- diff --git a/libmultipath/Makefile b/libmultipath/Makefile index 21fcd74..c70d429 100644 --- a/libmultipath/Makefile +++ b/libmultipath/Makefile @@ -16,7 +16,7 @@ OBJS = memory.o parser.o vector.o devmapper.o callout.o \ LIBDM_API_FLUSH = $(shell if test -d /lib64 ; then objdump -T /lib64/libdevmapper.so* ; else objdump -T /lib/libdevmapper.so.* ; fi | grep -c dm_task_no_flush) -ifeq ($(strip $(LIBDM_API_FLUSH)),1) +ifneq ($(strip $(LIBDM_API_FLUSH)),0) CFLAGS += -DLIBDM_API_FLUSH endif