Results 1 to 2 of 2
|
Enjoy an ad free experience by logging in. Not a member yet? Register.
|
|
-
07-26-2005 #1
- Join Date
- Jul 2005
- Posts
- 3
Linux equivalent for "makedevice" command
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
-
07-27-2005 #2
- 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.