Reputation: 21
I'm developing a module for linux and I need to mount a .iso file.
I have read and found that there is a function called sys_mount that calls the linux's mount programm and does all that stuff.
The problem is that when I'm trying to compile it shows a warning that says: '"sys_mount" [/home/.../example.ko] undefined!' and then when I try "insmod example.ko" it says that "insmod: error inserting 'example.ko': -1 Unkown symbol in module".
Does anyone know what should I do to compile it? Do I need to include something that is missing?
Thanks in advice!
Upvotes: 2
Views: 1022
Reputation: 107829
sys_mount
is what a user program invokes via the mount
syscall. It performs argument validation and copying before calling do_mount
, which does the bulk of the job. From within the kernel, call do_mount
directly. This sys_foo
/do_foo
separation is a common convention for Linux syscall implementation.
Upvotes: 3