The HyperNews Linux KHG Discussion Pages

Question: connecting user space and kernel space

Forum: Device Drivers
Keywords: ioctl mknod insmod sonic
Date: Sun, 22 Feb 1998 16:53:25 GMT
From: Joe Phillips <jaiger@acm.org>

hello all,

I have a module that loads successfully and can probe for my devices.

My next step is to make an ioctl that will report the number of boards found, very simple.

I don't know how to get my user space program to make ioctl's to my device driver.

So far, i've done:

 $ mknod /dev/sonic c 127 0
 $ insmod sonic.o

but when I do this, the module can't register to major 127 any longer. I get -EBUSY from register_chrdev() at insmod.

if I:

 $ rm /dev/sonic

then I can't open("/dev/sonic", ...) in my user-space program since it doesn't exist but register_chrdev() works.

How do I get a /dev/ entry to map to my driver so I can start using it? What am I missing?

help?

TIA,

joe phillips jaiger@acm.org