Jump to content

error in using ioctl


Guest sreenaath
 Share

Recommended Posts

Guest sreenaath

All

I use the sample ioctl code (ioctl.c, chardev.c) given in

http://www.faqs.org/docs/kernel/x848.html

from Linux Kernel Programming Guide.

I used the same sample program given there.

I loaded the chardev.o module and before that i created a node for the devide file using mknod char_dev c 100 0.

After that i get the device registered properly in chardev.c.

But while trying to set some message using the ioctl_set_msg function in ioctlc.c i get this error

ioctl_set_msg failed:-1.

 

I am not sure where i am goign wrong.

 

can anyone tell me what's wrong? Is there anything extra i need to do??

 

 

regards

sreenaath

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...