mirror of https://github.com/mkerrisk/man-pages
init_module.2: Use syscall(SYS_...); for system calls without a wrapper
Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com> Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
This commit is contained in:
parent
4695076306
commit
d9f8238d37
|
@ -29,14 +29,15 @@
|
||||||
init_module, finit_module \- load a kernel module
|
init_module, finit_module \- load a kernel module
|
||||||
.SH SYNOPSIS
|
.SH SYNOPSIS
|
||||||
.nf
|
.nf
|
||||||
.BI "int init_module(void *" module_image ", unsigned long " len ,
|
.BR "#include <linux/module.h>" " /* Definition of " MODULE_* " constants */"
|
||||||
.BI " const char *" param_values );
|
.BR "#include <sys/syscall.h>" " /* Definition of " SYS_* " constants */"
|
||||||
.BI "int finit_module(int " fd ", const char *" param_values ,
|
.B #include <unistd.h>
|
||||||
.BI " int " flags );
|
|
||||||
.fi
|
|
||||||
.PP
|
.PP
|
||||||
.IR Note :
|
.BI "int syscall(SYS_init_module, void *" module_image ", unsigned long " len ,
|
||||||
There are no glibc wrappers for these system calls; see NOTES.
|
.BI " const char *" param_values );
|
||||||
|
.BI "int syscall(SYS_finit_module, int " fd ", const char *" param_values ,
|
||||||
|
.BI " int " flags );
|
||||||
|
.fi
|
||||||
.SH DESCRIPTION
|
.SH DESCRIPTION
|
||||||
.BR init_module ()
|
.BR init_module ()
|
||||||
loads an ELF image into kernel space,
|
loads an ELF image into kernel space,
|
||||||
|
@ -268,11 +269,6 @@ manually declare the interface in your code;
|
||||||
alternatively, you can invoke the system call using
|
alternatively, you can invoke the system call using
|
||||||
.BR syscall (2).
|
.BR syscall (2).
|
||||||
.PP
|
.PP
|
||||||
Glibc does not provide a wrapper for
|
|
||||||
.BR finit_module ();
|
|
||||||
call it using
|
|
||||||
.BR syscall (2).
|
|
||||||
.PP
|
|
||||||
Information about currently loaded modules can be found in
|
Information about currently loaded modules can be found in
|
||||||
.IR /proc/modules
|
.IR /proc/modules
|
||||||
and in the file trees under the per-module subdirectories under
|
and in the file trees under the per-module subdirectories under
|
||||||
|
|
Loading…
Reference in New Issue