I have compiled kernel debian 6.12.111+deb13-amd64. Note, that I have also run update-grub.
I did a small application including lseek call.
First, I have to include f_pos from struct file at include/linux/fs.h. I hope you do have this folder on your system (full path is ~/kernel/linux-6.12.111/debian/linux-headers-6.12.111+deb13-common/usr/src/linux-headers-6.12.111+deb13-common/include/linux/fs.h.
Basically, I need a kernel module with this code
#include <include/linux/fs.h>
int main (int argc, char *argv[]) {
// int fd = open(argv[1], O_WRONLY | O_CREAT, S_IRUSR | S_IWUSR);
// struct file *file = fget(fd);
// lseek(fd, 0, SEEK_END);
// printk("%ldn", f_pos);
Can you add more information so I could complete this task?