tag:blogger.com,1999:blog-5826231862295491795.post8430340236586878338..comments2024-03-28T22:51:37.336-07:00Comments on Linux World: Creating an Ioctl command in linuxtuxthinkhttp://www.blogger.com/profile/11642576082677583230noreply@blogger.comBlogger14125tag:blogger.com,1999:blog-5826231862295491795.post-70362123589346556772021-08-22T11:09:08.091-07:002021-08-22T11:09:08.091-07:00What is your kernel version, if its abofe 2.36, pl...What is your kernel version, if its abofe 2.36, please use the code in the post https://tuxthink.blogspot.com/2012/12/implementing-ioctl-call-for-kernel.htmltuxthinkhttps://www.blogger.com/profile/11642576082677583230noreply@blogger.comtag:blogger.com,1999:blog-5826231862295491795.post-32160795327626324442021-08-21T14:40:19.502-07:002021-08-21T14:40:19.502-07:00i get when compiling :
error: truct file_operati...i get when compiling : <br /><br />error: truct file_operations has no member named ioctl; did you mean iopoll<br /> ioctl: ioctl_funcs,<br />maximushttps://www.blogger.com/profile/11028946511495948325noreply@blogger.comtag:blogger.com,1999:blog-5826231862295491795.post-90706870674150693882021-03-27T09:55:18.101-07:002021-03-27T09:55:18.101-07:00Glad it was helpfulGlad it was helpfultuxthinkhttps://www.blogger.com/profile/11642576082677583230noreply@blogger.comtag:blogger.com,1999:blog-5826231862295491795.post-75490229766440179722021-03-27T09:53:44.082-07:002021-03-27T09:53:44.082-07:00This comment has been removed by the author.Satishhttps://www.blogger.com/profile/08950034257795305717noreply@blogger.comtag:blogger.com,1999:blog-5826231862295491795.post-36374205880807176102021-03-24T04:03:14.635-07:002021-03-24T04:03:14.635-07:00This post was very helpful. Thanks!This post was very helpful. Thanks!Akhileshhttps://www.blogger.com/profile/00955413229089563904noreply@blogger.comtag:blogger.com,1999:blog-5826231862295491795.post-83461736456488841272013-03-13T00:23:51.529-07:002013-03-13T00:23:51.529-07:00Thanks for pointing the error, have corrected it. ...Thanks for pointing the error, have corrected it. tuxthinkhttps://www.blogger.com/profile/11642576082677583230noreply@blogger.comtag:blogger.com,1999:blog-5826231862295491795.post-64285538999880767852013-03-12T23:15:47.990-07:002013-03-12T23:15:47.990-07:00struct file_operations fops = {
open: open
...struct file_operations fops = {<br /> open: open<br /> ioctl: our_ioctl, //Mapping the ioctl function <br /> release: release,<br />};<br />Don't you think, it is 'ioctl_funcs' and not 'our_ioctl' ? It is little confusing when u define ioctl_funcs() and assign 'our_ioctl' . Srikanth Reddyhttps://www.blogger.com/profile/14676690825933301744noreply@blogger.comtag:blogger.com,1999:blog-5826231862295491795.post-36781481158065320202013-01-21T00:43:26.959-08:002013-01-21T00:43:26.959-08:00yes we can use that name too.yes we can use that name too.tuxthinkhttps://www.blogger.com/profile/11642576082677583230noreply@blogger.comtag:blogger.com,1999:blog-5826231862295491795.post-61782807357423171682013-01-21T00:42:09.360-08:002013-01-21T00:42:09.360-08:00glad it helped :-) glad it helped :-) tuxthinkhttps://www.blogger.com/profile/11642576082677583230noreply@blogger.comtag:blogger.com,1999:blog-5826231862295491795.post-54730371307485544462013-01-18T09:03:05.706-08:002013-01-18T09:03:05.706-08:00Then we need to add the ioctl function which has t...Then we need to add the ioctl function which has the prototype: <br /><br />int ioctl_funcs (struct inode *inode, struct file *filp, unsigned int cmd, unsigned long arg)<br /><br />'ioctl_funcs' is a user defined function name, could be 'my_ioctl_funcs'.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-5826231862295491795.post-47969637547369611302013-01-17T23:25:10.845-08:002013-01-17T23:25:10.845-08:00Thank you very much for this post ! It helps me a ...Thank you very much for this post ! It helps me a lot to understand how to implement ioctl !Anonymoushttps://www.blogger.com/profile/12210312906547828312noreply@blogger.comtag:blogger.com,1999:blog-5826231862295491795.post-36862424823964575832013-01-17T21:47:59.184-08:002013-01-17T21:47:59.184-08:00/dev/temp is the character device we create using .../dev/temp is the character device we create using the command mknod. <br /><br />I see that the post uses a different name(/dev/char_arr) with mknod, will correct it. <br /><br />Thank youtuxthinkhttps://www.blogger.com/profile/11642576082677583230noreply@blogger.comtag:blogger.com,1999:blog-5826231862295491795.post-7543330669316113632013-01-17T06:40:37.418-08:002013-01-17T06:40:37.418-08:00what is "/dev/temp"?what is "/dev/temp"?Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-5826231862295491795.post-64679074737612085192012-12-28T21:17:47.338-08:002012-12-28T21:17:47.338-08:00Very good post ... Explained in a way that its ver...Very good post ... Explained in a way that its very easy for anyone to understand ..Thankyou...Anonymousnoreply@blogger.com