LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Where is "sys_ioctl" implemented? (https://www.linuxquestions.org/questions/linux-newbie-8/where-is-sys_ioctl-implemented-905941/)

Jae-Yong Yoo 10-01-2011 11:54 AM

Where is "sys_ioctl" implemented?
 
Hi,

I was touring through the Linux kernel source code (2.6.32.44) and I found that the user-space "ioctl" is mapped to kernel-space function "sys_ioctl".
I was searching the kernel source code but I can not find the body of that function.
Also, lxr.linux.no does not show the sys_ioctl function body although I see many functions use that one.

Any help?


Jae-YOng

Jae-Yong Yoo 10-01-2011 12:13 PM

I just found out that when I call ioctl, it calls do_vfs_ioctl (at fs/ioctl.c in liunx kernel source code) but still is a mistery how it is called.

Beverly_h 08-21-2019 02:53 AM

Quote:

Originally Posted by Jae-Yong Yoo (Post 4487348)
I just found out that when I call ioctl, it calls do_vfs_ioctl (at fs/ioctl.c in liunx kernel source code) but still is a mistery how it is called.

SYSCALL_DEFINE3() in fs/ioctl.c calls do_vfs_ioctl(). I am using linux 3.13.0.


All times are GMT -5. The time now is 08:12 AM.