lkml.org 
[lkml]   [2007]   [Dec]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: syscall in a module
On Thu, Dec 20, 2007 at 10:03:53AM +0100, Pierre Savary wrote:
> I need some help about syscalls and modules. In fact I want to adapt the
> g_file_storage module to my own application.
> I need to use "sys_umount" and "sys_mount" but when I compile I obtain this
> message :
> [...]
> Kernel: arch/arm/boot/zImage is ready
> Building modules, stage 2.
> MODPOST 4 modules
> ERROR: "sys_umount" [drivers/usb/gadget/g_file_storage.ko] undefined!
> make[1]: *** [__modpost] Error 1
> make: *** [modules] Error 2
> [...]
>
> So, how can I use "sys_umount" and "sys_mount" in this module?

You don't. Syscalls are NOT for modules because they modify the
filesystem, which depends on the user context. For example, processes
running chroot have a different view of the filesystem from those which
aren't - and if you happen to be executing with the context of a
chrooted user process when you mount, and a non-chrooted process when
you umount.

I suggest you describe what you're trying to do in greater detail, and/or
ask on the main kernel list - but note that if you ask the same question
without explaining why you need it _and_ asking for alternative ideas,
you'll get the same kind of response there.


\
 
 \ /
  Last update: 2007-12-20 10:19    [W:0.027 / U:0.136 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site