[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

how to create a device in an LKM



hello there,
    I am working on 2.4 kernel. I want to create some 
character devices during insmod and remove the devices 
at the time of rmmod. I used the following lines in LKM :
 
    dev_t dev;
    dev = (major<< 8)|(0);
    sys_mknod(DEVICE_NAME,S_IFCHR|S_IRWXU,dev);

used the .h file, "/lib/modules/`uname -r`/build/include/linux/syscalls.h"
I confronted with a warning as "implicit declaration of function 
sys_mknod", though I included the necessary header file. Can any one
suggest how to resolve the problem. 
    Thanks in advance.

- kishore, packetware.

    


--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           http://kernelnewbies.org/faq/