c - error: ‘struct tty_driver’ has no member named ‘ioctl’ -
I received a similar post but the solution could not be found, so thought that my question would be posted. I am working with a device driver, I know, the task below is compiled successfully with 2.6 kernel headers and is now trying to compile it with "3.2.0-4-686-pae" (Debian) . I get an error message,
Error: The name of 'struct tty_driver' is not a member of the 'ioctl' error: 'vc_tty' is the name of 'struct vc_data' I have checked "tty_driver" in tty_driver.h (which is included in tty.h) and found that int (* Ioctl) (struct tty_struct * tty, struct file * file, unsigned complete CMD, unsigned long arg);
is defined but it is not sure why I got this error.
Also, I did not find 'console_struct.h' included in 'vc_data'. Anybody will tell me to work with "3.2.0-4-686-PA" to see if updates need to be done?
#include & lt; Linux / tty j & gt; #include & lt; Linux / console_struct.h & gt; Structure tty_driver * my_driver; Fixed zero my_func (unsigned long PTR) {/ * some code * / (my_driver-> ioctl) (vc_cons [fg_console] .d- & gt; vc_tty, NULL, KDSETLED, * pstatus); / * Some more code * /}
I did not post the entire code here but thought it would be posted if necessary. Please tell me that you need more information.
tty_driver
a separate struct tty_operations * ops
The member was transferred to some point, now you will get the ioctl
((my_driver- & gt; Ops) - & gt; ioctl) (...); The only thing for port data was transferred to a struct tty_port port
member in struct vc_data . Instead use: vc_cons [fg_console] .d- & gt; Port.tty
You can easily find these types of changes and get the exact error messages you are receiving (one by one), and patch and bug reports are mango For such simple things, it will work 99% of the time.
Then you can use sites like Linux cross reference so that you can navigate between different versions of the header and get details. (For example,.)
Comments
Post a Comment