[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: how to use mknod in LKM's
On Wed, Mar 01, 2006 at 10:36:36AM +0530, kishore wrote:
> hai,
> I tried mknod( ) inside an LKM,but it needs
> "/usr/include header files, which is not preferred, I hope .
> I turned to use sys_mknod( ) in
> "/lib/modules/`uname -r`/build/include/linux/syscalls.h".
> When I tried to compile the LKM, it raised a warning
> " implicit declaration of function sys_mknod "
>
> Can any one suggest how to create a device in an LKM.
No, please do not do that, you should be calling mknod from userspace
from a tool, like udev.
Why do you feel you need to create this from within the kernel?
thanks,
greg k-h
--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive: http://mail.nl.linux.org/kernelnewbies/
FAQ: http://kernelnewbies.org/faq/