Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Chapter 11 Kernel module #5

Open
pararti opened this issue Jul 27, 2022 · 2 comments
Open

Chapter 11 Kernel module #5

pararti opened this issue Jul 27, 2022 · 2 comments

Comments

@pararti
Copy link

pararti commented Jul 27, 2022

My linux kernel version 5.18.14-arch1-1 and hwkm.c don't work.
I have a next error -
error: in passing argument 4 "proc_create": incompatible pointer type [-Werror=incompatible-pointer-types]

proc_file = proc_create("hwkm", 0, NULL, &proc_file_fops);
| ^~~~~~~~~~~~~~~
| |
| const struct file_operations *
I know that in kernel 5.6 and more its done differently but i don't know how...

@pararti
Copy link
Author

pararti commented Jul 27, 2022

I am sorry for my bad english and this is my first issue:)

@CharlzKlug
Copy link

My linux kernel version 5.18.14-arch1-1 and hwkm.c don't work.

In the kernel 5.18.14 uses const struct proc_ops *proc_ops, not const struct file_operations*. You should use const struct proc_ops *proc_ops

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants