LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel
User Name
Password
Linux - Kernel This forum is for all discussion relating to the Linux kernel.

Notices

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

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


Hi,

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 07:53 AM.
 
Old 08-24-2011, 01:21 AM   #2
bsat
Member
 
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, 01:39 AM   #3
Inba
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, 08:42 PM   #4
AustinMarton
Member
 
Registered: May 2007
Location: New Zealand
Distribution: Fedora at home, Ubuntu 10.04 at work
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.
 
  


Reply


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 06:18 PM
how to create a device node in sysfs? hash123 Linux - Kernel 0 08-11-2008 02:41 AM
I can`t create a device node in /dev gcasados Slackware 8 02-21-2005 06:17 AM
udev does not create scsi device node maenho Linux - Software 0 11-27-2004 06:08 AM
how to create device node for dynamically allocated major number appas Programming 5 11-01-2004 10:37 AM


All times are GMT -5. The time now is 03:55 AM.

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