Does register_chrdev function make device file under /dev ?

Kernel bu.kernel at gmail.com
Tue Mar 11 01:42:57 EDT 2014



> On Mar 10, 2014, at 10:25 PM, 김찬 <ckim at etri.re.kr> wrote:
> 
> Hi,
>  
> This should be a basic question.
> Does the regisetr_chrdev function make the device file under /dev directory?
> I am running linux on our embedded system and inside vcs_init, register_chrdev is called as below.
>  
> int __init vcs_init(void)
> {
>         unsigned int i;
>         if (register_chrdev(VCS_MAJOR, "vcs", &vcs_fops))
>                 panic("unable to get major %d for vcs device", VCS_MAJOR);
>  
> I can see the function is returning ok but I don't see any vcs* file under /dev.
> Does it only register the device on /sys or /proc directory and not under /dev?
> Thanks in advance.
>  
> Chan
>  

You have to create a device file using 'mknod'

Ex: mknod -m 666 /dev/vcs c <major no> <minor no>


> _______________________________________________
> Kernelnewbies mailing list
> Kernelnewbies at kernelnewbies.org
> http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20140310/a6406d5e/attachment.html 


More information about the Kernelnewbies mailing list