FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Debian > Debian Development

 
 
LinkBack Thread Tools
 
Old 01-03-2008, 03:54 PM
Dennis Nguyen
 
Default Util-linux mount function source code

Hello,

I would like to see the mount source code. I saw the mount.c module in
the util-linux called mount function. It linked to the libc-2.6.so (I
using kernel 2.6.23.8) I got the GNU libc source code but
I could not find the called mount function.

Could you show me where the mount function source code is. I need to see
the function source code for my application.

Thanks in advance,
Dennis


--
To UNSUBSCRIBE, email to debian-devel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 
Old 01-04-2008, 09:22 AM
Colin Watson
 
Default Util-linux mount function source code

On Thu, Jan 03, 2008 at 08:54:00AM -0800, Dennis Nguyen wrote:
> I would like to see the mount source code. I saw the mount.c module in
> the util-linux called mount function. It linked to the libc-2.6.so (I
> using kernel 2.6.23.8) I got the GNU libc source code but
> I could not find the called mount function.

util-linux/mount/mount.c calls the mount function in glibc, but that's
just a trivial wrapper for the kernel system call. In fact it's so
trivial that the glibc source code doesn't have an explicit
implementation for it, but just automatically generates a syscall stub.

The actual mount syscall implementation is in fs/namespace.c in the
kernel source, and I suspect it's this you're interested in rather than
the fiddly details of how a userspace function call turns into a
syscall. Start at the sys_mount function.

Cheers,

--
Colin Watson [cjwatson@debian.org]


--
To UNSUBSCRIBE, email to debian-devel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 

Thread Tools




All times are GMT. The time now is 04:00 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org