LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
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, 06: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 06:53 AM.
 
Old 08-24-2011, 12: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, 12: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, 07:42 PM   #4
AustinMarton
Member
 
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.
 
  


Reply



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

LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel

All times are GMT -5. The time now is 06:43 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
Open Source Consulting | Domain Registration