Welcome to Linux Forums! With a comprehensive Linux Forum, information on various types of Linux software and many Linux Reviews articles, we have all the knowledge you need a click away, or accessible via our knowledgeable members.
Find the answer to your Linux question:
New to Linux Forums? Register here for free!
    Linux Forums > GNU Linux Zone > The Linux Kernel > Linux equivalent for "makedevice" command

Forgot Password?
 The Linux Kernel   Compiling, theory, programming or other discussion about the linux kernel

Site Navigation
Linux Articles
Linux Forums
Linux Downloads
Linux Hosting
Free Magazines
Job Board
IRC Chat
RSS Feeds


Linux Forum Topics
Linux Forums
Your Distro
Linux Resources
GNU Linux Zone
The Community
Reply
 
Thread Tools Display Modes
Old 07-26-2005   #1 (permalink)
Just Joined!
 
Join Date: Jul 2005
Posts: 3
Linux equivalent for "makedevice" command

Hi,
Can anyone tell me what is the equivalent linux command for "makedevice" in Solaris.

Actually, I need to issue ioctl command to a device in Kernel mode. The device major, minor numbers are available. In Solaris, "makedevice" is used to create the device and pass the return value as file descriptor to ioctl system call. I want to know how it can be done in linux.

Thanks,
Ganesan
Ganesan is offline  


Reply With Quote
Old 07-27-2005   #2 (permalink)
Linux Guru
 
Join Date: Oct 2001
Location: Täby, Sweden
Posts: 7,578
There is, to my knowledge, no call to open a device by their numbers in Linux. You'll have to create a named device node and open that instead. The recommended procedure is, of course, to create a node in /dev with the mknod command, and then open it normally (with a call to open(2)) in your program.

If you're running udev, the /dev node should be create automagically for you.
Dolda2000 is offline   Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

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 On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off

Free Magazines
Run Your Own Web Server Using Linux & Apache - Free 191 Page Preview
Learn about everything you'll need to build and maintain your Linux servers, and to deploy Web applications to them.
subscribe
Open Source Security Myths Dispelled
Dispel the five major myths surrounding Open Source Security and gain the tools necessary to make a truly informed decision for your IT organization
subscribe
InformationWeek
InformationWeek is the only newsweekly you'll need to stay on top of the latest developments in information technology.
subscribe



All times are GMT. The time now is 05:18 AM.






© 2000 - 2009 - All Rights Reserved - Property of  MAS Media

Content Relevant URLs by vBSEO 3.3.0 RC2