delete_module.2: SYNOPSIS: Fix prototype parameter types
PATCH 1/1 delete_module.2: SYNOPSIS: Fix prototype parameter types
The Linux kernel uses 'unsigned int' instead of 'int' for the 'flags' parameter. As glibc provides no wrapper, use the same type the kernel uses.
......
$ syscall='delete_module';
$ find linux/ -type f -name '*.c' \
|xargs pcregrep -Mn "(?s)^[\w_]*SYSCALL_DEFINE.\(${syscall},.*?\)";
linux/kernel/module.c:977:
SYSCALL_DEFINE2(delete_module, const char __user *, name_user,
unsigned int, flags)Signed-off-by Alejandro Colomar <[email protected]>
--- man2/delete_module.2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
man2/delete_module.2 +1 -1
@@ -27,7 +27,7 @@ delete_module \- unload a kernel module .SH SYNOPSIS .nf -.BI "int delete_module(const char *" name ", int " flags ); +.BI "int delete_module(const char *" name ", unsigned int " flags ); .fi .PP .IR Note :
Signature · 1 line
2.29.2
Hi ALex,
Quoted 4 lines · Alejandro Colomar
The Linux kernel uses 'unsigned int' instead of 'int' for the 'flags' parameter. As glibc provides no wrapper, use the same type the kernel uses> ......
Quoted 8 lines
$ syscall='delete_module'; $ find linux/ -type f -name '*.c' \ |xargs pcregrep -Mn "(?s)^[\w_]*SYSCALL_DEFINE.\(${syscall},.*?\)"; linux/kernel/module.c:977: SYSCALL_DEFINE2(delete_module, const char __user *, name_user, unsigned int, flags)Signed-off-by Alejandro Colomar <[email protected]>
Thanks. Patch applied.
Cheers,
Michael
Quoted 18 lines
--- man2/delete_module.2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)man2/delete_module.2 +1
-1@@ -27,7 +27,7 @@ delete_module \- unload a kernel module .SH SYNOPSIS .nf -.BI "int delete_module(const char *" name ", int " flags ); +.BI "int delete_module(const char *" name ", unsigned int " flags ); .fi .PP .IR Note :
Signature · 3 lines
Michael Kerrisk Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/ Linux/UNIX System Programming Training: http://man7.org/training/