Skip to content
Advertisement

Add syscalls to linux kernel

I’m new in working with kernel. I want to add a linked list to my kernel, and I try to fix it like this link : Linux Kernel Programming–Linked List

here is code’s that I added to sys.c :

syscall defenition:

JavaScript

and my struct for linked list:

JavaScript

and when I compile the kernel, I saw this error:

JavaScript

thanks for your replies.

that error disappeared, but another one is still exist.

JavaScript

again thanks for your replies.

Advertisement

Answer

The list_add_tail function is

JavaScript

The second param should a pointer to a struct list_head so just use like this:

JavaScript
User contributions licensed under: CC BY-SA
4 People found this is helpful
Advertisement