Device mapper header file error

Rajat Sharma fs.rajat at gmail.com
Thu Jul 14 07:05:33 EDT 2011


On Wed, Jul 13, 2011 at 11:49 PM, Adil Mujeeb <mujeeb.adil at gmail.com> wrote:
> Hi List,
>
>
>
> I am trying to compile a kernel module which uses the device mapper header
> files (dm.h and dm-bio-list.h). I checked in the stock kernel source that
> these files are present under drivers/md directory.
>
> When I try to build the module, it gives error for these header files as
> missing. I checked the Makefile and found that it includes the path
> (-I$(TOPDIR)/ drivers/md)
>
>
>
> But when I check the content of this directory on my machine it doesn’t
> include the header files:
>
> [root at localhost redhat]# ls /usr/src/kernels/2.6.18-8.el5-i686/drivers/md
>
> Kconfig  Makefile  raid6test
>
> [root at localhost redhat]#
>
>
>
> While the other header files referred by the kernel module under
> include/linux directory exists.
>
>
>
> My machine detail:
>
> [adil at localhost ~]$ uname -a
>
> Linux localhost.localdomain 2.6.18-8.el5 #1 SMP Fri Jan 26 14:15:21 EST 2007
> i686 i686 i386 GNU/Linux
>
> [adil at localhost ~]$
>
>
>
> Thanks in advance.
>
>
>
> Regards,
>
> Adil Mujeeb
>
> _______________________________________________
> Kernelnewbies mailing list
> Kernelnewbies at kernelnewbies.org
> http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
>
>

Well technically these are internal files of dm module and not
supposed to be used by external loadable kernel modules. So, what you
see in /usr/src/kernels/2.6.18-8.el5-i686 directory is kernel-devel
package against which you can compile module only if they are using
include/linux headers files (as they are supposed to).

But if you really want to compile against internal files of dm, please
use complete kernel source package and compile it on your test
machine. It will have everything you are looking including .c files as
well.

Thanks,
Rajat



More information about the Kernelnewbies mailing list