Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

Possible Duplicate:
Understanding the linux kernel source

I am sure that I must be missing something, here. I cannot for the life of me find the source code for these system calls. I can find their numbers, and I can find their prototypes, but I cannot seem to actually find the functions that implement them.

In case anyone's interested: the reason that I am trying to find them is so that I can debug a problem with the kernel's floppy driver and/or my floppy drive itself. I can dd to/from it just fine. The drive works in DOS and Windows just fine. But when I mount a disk (any disk, doesn't matter what), the disk is mounted for approximately 1/10 of a second and then automatically unmounted. I am trying to find out why and if there is a way that I can patch my kernel locally to work around it.

I know, I know, nobody uses floppies anymore. But I guess I am a nobody. :)

share|improve this question
    
Yeah, the question that this is allegedly a duplicate of doesn't actually say anything about these system calls. I did see that question. I did read it. But the answers were basically "uh, they're somewhere, but it's not regular". Additionally, I am looking for the switching points, not the implementations (I don't care about ext3 umount, I want VFS umount). –  Michael Trausch Jul 22 '11 at 16:00
add comment

marked as duplicate by Gilles, Michael Mrozek Jul 22 '11 at 15:09

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

1 Answer

up vote 1 down vote accepted

They are were in fs/super.c in Linux 2.4:

In my machine (Linux 2.6.24) they are in fs/namespace.c:

In Linux 2.6.39 (which is latest stable) I could not find sys_mount function but I found compat_sys_mount function in /fs/compat.c.

Thanks to Gilles for pointing out obsolete information.

share|improve this answer
    
They were in fs/super.c in a very old version of the kernel. They're in fs/namespace.c now. LXR is the place to search. –  Gilles Jul 22 '11 at 13:10
    
@Gilles You are right, but there is no version info in question. So haven't realized that my information is obsolete. Anyway, I have updated my answer with additional references. –  eyazici Jul 22 '11 at 14:06
    
Awesome! How did you trace them to fs/namespace.c? I guess I was grepping for the wrong thing? –  Michael Trausch Jul 22 '11 at 16:00
    
@Michael Actually I used Google Code Search and then verify the existance of files and functions in my system. –  eyazici Jul 22 '11 at 17:59
add comment

Not the answer you're looking for? Browse other questions tagged or ask your own question.