Find the answer to your Linux question:
Results 1 to 2 of 2
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1

    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.


  2. #2
    Linux Guru
    Join Date
    Oct 2001
    Täby, Sweden
    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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts