Download your favorite Linux distribution at LQ ISO.
Go Back > Forums > Linux Forums > Linux - Software > Linux - Kernel
User Name
Linux - Kernel This forum is for all discussion relating to the Linux kernel.


  Search this Thread
Old 08-23-2011, 06:41 AM   #1
LQ Newbie
Registered: Aug 2011
Posts: 2

Rep: Reputation: Disabled
how can we dynamically create the device node for character driver.


For creating the node for miscellaneous device, by using the struct miscdevice and struct file_operation structure
the miscellaneous device node created at /proc/misc.

But, how we create a node for the character device?
ie., dynamically create a node at /proc/devices

Last edited by Inba; 08-23-2011 at 06:53 AM.
Old 08-24-2011, 12:21 AM   #2
Registered: Feb 2009
Posts: 347

Rep: Reputation: 72
I am not sure what are you asking. The device nodes are created in /dev and not in /proc. Creating entries in /proc is completely different from creating device entries in /dev, what are you looking for ?
Old 08-24-2011, 12:39 AM   #3
LQ Newbie
Registered: Aug 2011
Posts: 2

Original Poster
Rep: Reputation: Disabled
Iam looking for to create a node dynamically at /dev only.
Old 08-30-2011, 07:42 PM   #4
Registered: May 2007
Location: New Zealand
Distribution: Ubuntu
Posts: 88

Rep: Reputation: 16
To dynamically create device nodes (which are in /dev) you should use udev or maybe mdev for embedded systems.

In your char driver you could set the major number to 0 and this will mean the major number is dynamically allocated.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
dynamically create/delete device nodes by driver prakashgkk Linux - Newbie 1 04-16-2010 05:18 PM
how to create a device node in sysfs? hash123 Linux - Kernel 0 08-11-2008 01:41 AM
I can`t create a device node in /dev gcasados Slackware 8 02-21-2005 05:17 AM
udev does not create scsi device node maenho Linux - Software 0 11-27-2004 05:08 AM
how to create device node for dynamically allocated major number appas Programming 5 11-01-2004 09:37 AM > Forums > Linux Forums > Linux - Software > Linux - Kernel

All times are GMT -5. The time now is 12:19 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration