Skip to contentSkip to conversation

definition of sys_access function

DISCUSSION johnspaul92 5 participants 8 messages May 29, 2013 – Dec 23, 2013

lore
Share & tools
lore
#1 lore raw
Quoted 4 lines · On Wed, May 29, 2013 at 10:12 AM, johnspaul92 <[email protected]> wrote:

Where can i find the definition of the sys_access function???
I tried checking in syscalls.h. But there i found only the declaration. Where can i find the definition so that i can understand what that function actually does.

Use git grep to find out.
E.g. git grep "SYSCALL_DEFINE[0-9](access"

--
Thanks,
//richard

#4 lore raw
In reply to richard -rw- weinberger

Hi Richard ,

This system call is defined in this file :

Kernel/fs/open.c

Please check it .

Thanks

-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of richard -rw- weinberger
Sent: Wednesday, May 29, 2013 4:19 PM
To: johnspaul92
Cc: LKML
Subject: Re: definition of sys_access function

Quoted 4 lines · On Wed, May 29, 2013 at 10:12 AM, johnspaul92 <[email protected]> wrote:

Where can i find the definition of the sys_access function??? I tried checking in syscalls.h. But there i found only the declaration. Where can i find the definition so that i can understand what that function actually does.

Use git grep to find out.
E.g. git grep "SYSCALL_DEFINE[0-9](access"

--
Thanks,
//richard
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

#3 lore raw
In reply to johnspaul92

Hi

You should search like this in fs/open.c

SYSCALL_DEFINE2(access, const char __user *, filename, int, mode)

You can find it .

Thanks

-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of johnspaul92
Sent: Wednesday, May 29, 2013 4:28 PM
To: [email protected]
Subject: Re: definition of sys_access function

I tried that and i got the result as fs/open.c But i couldnt find any references to sys_access.

--
View this message in context: http://linux-kernel.2935.n7.nabble.com/definition-of-sys-access-function-tp657210p657226.html
Sent from the Linux Kernel mailing list archive at Nabble.com.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

#6 lore raw
In reply to johnspaul92
Quoted 4 lines · On 05/29/2013 03:12:57 AM, johnspaul92 wrote:

Where can i find the definition of the sys_access function???
I tried checking in syscalls.h. But there i found only the declaration. Where can i find the definition so that i can understand what that function actually does.

$ find linux -name "*.c" | xargs grep SYSCALL | grep '(access'
linux/fs/open.c:SYSCALL_DEFINE2(access, const char __user *, filename, int, mode)

Rob