Results 1 to 2 of 2
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 ...
- 07-26-2005 #1Just 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
- 07-27-2005 #2Linux 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.


Reply With Quote
