rename.2: ffix
PATCH 1/8 rename.2: ffix
--- man2/rename.2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
man2/rename.2 +1 -1
@@ -39,7 +39,7 @@ rename, renameat, renameat2 \- change the name or location of a file .PP .BI "int rename(const char *" oldpath ", const char *" newpath ); .PP -.BR "#include <fcntl.h> " "/* Definition of AT_* constants */" +.BR "#include <fcntl.h> " "/* Definition of " AT_* " constants */" .B #include <stdio.h> .PP .BI "int renameat(int " olddirfd ", const char *" oldpath ,
Signature · 1 line
2.31.1
PATCH 2/8 rt_sigqueueinfo.2: Use syscall(SYS_...); for system calls without a wrapper
--- man2/rt_sigqueueinfo.2 | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-)
man2/rt_sigqueueinfo.2 +8 -3
@@ -27,9 +27,14 @@ rt_sigqueueinfo, rt_tgsigqueueinfo \- queue a signal and data .SH SYNOPSIS .nf -.BI "int rt_sigqueueinfo(pid_t " tgid ", int " sig ", siginfo_t *" info ); -.BI "int rt_tgsigqueueinfo(pid_t " tgid ", pid_t " tid ", int " sig \ -", siginfo_t *" info ); +.BR "#include <linux/signal.h>" " /* Definition of " SI_* " constants */" +.BR "#include <sys/syscall.h>" " /* Definition of " SYS_* " constants */" +.B #include <unistd.h> +.PP +.BI "int syscall(SYS_rt_sigqueueinfo, pid_t " tgid , +.BI " int " sig ", siginfo_t *" info ); +.BI "int syscall(SYS_rt_tgsigqueueinfo, pid_t " tgid ", pid_t " tid , +.BI " int " sig ", siginfo_t *" info ); .fi .PP .IR Note :
Signature · 1 line
2.31.1
PATCH 3/8 s390_guarded_storage.2: Use syscall(SYS_...); for system calls without a wrapper
In reply to Alejandro ColomarAlso document why each header is needed.
--- man2/s390_guarded_storage.2 | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-)
man2/s390_guarded_storage.2 +10 -6
@@ -27,13 +27,20 @@ s390_guarded_storage \- operations with z/Architecture guarded storage facility .SH SYNOPSIS .nf -.B #include <asm/guarded_storage.h> +.BR "#include <asm/guarded_storage.h> " "/* Definition of " GS_* " constants */" +.BR "#include <sys/syscall.h> " \ +"/* Definition of " SYS_* " constants */" +.B #include <unistd.h> .PP -.BI "int s390_guarded_storage(int " command ", struct gs_cb *" gs_cb ");" +.BI "int syscall(SYS_s390_guarded_storage, int " command , +.BI " struct gs_cb *" gs_cb ); .fi .PP .IR Note : -There is no glibc wrapper for this system call; see NOTES. +glibc provides no wrapper for +.BR s390_guarded_storage (2), +necessitating the use of +.BR syscall (2). .SH DESCRIPTION The .BR s390_guarded_storage ()
@@ -144,9 +151,6 @@ This Linux-specific system call is available only on the s390 architecture. .PP The guarded storage facility is available beginning with System z14. .SH NOTES -Glibc does not provide a wrapper for this system call; call it using -.BR syscall (2). -.PP The description of the guarded storage facility along with related instructions and Guarded Storage Control Block and Guarded Storage Event Parameter List structure layouts
Signature · 1 line
2.31.1
PATCH 4/8 s390_pci_mmio_write.2: Use syscall(SYS_...); for system calls without a wrapper; fix includes too
In reply to Alejandro ColomarThis function doesn't use any flags or special types, so there's no reason to include <asm/unistd.h>; remove it. Add the includes needed for syscall(2) only.
--- man2/s390_pci_mmio_write.2 | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-)
man2/s390_pci_mmio_write.2 +7 -7
@@ -28,16 +28,19 @@ s390_pci_mmio_write, s390_pci_mmio_read \- transfer data to/from PCI MMIO memory page .SH SYNOPSIS .nf -.B #include <asm/unistd.h> +.BR "#include <sys/syscall.h>" " /* Definition of " SYS_* " constants */" +.B #include <unistd.h> .PP -.BI "int s390_pci_mmio_write(unsigned long " mmio_addr , +.BI "int syscall(SYS_s390_pci_mmio_write, unsigned long " mmio_addr , .BI " const void *" user_buffer ", size_t " length ); -.BI "int s390_pci_mmio_read(unsigned long " mmio_addr , +.BI "int syscall(SYS_s390_pci_mmio_read, unsigned long " mmio_addr , .BI " void *" user_buffer ", size_t " length ); .fi .PP .IR Note : -There are no glibc wrappers for these system calls; see NOTES. +glibc provides no wrappers for these system calls, +necessitating the use of +.BR syscall (2). .SH DESCRIPTION The .BR s390_pci_mmio_write ()
@@ -102,8 +105,5 @@ These system calls are available since Linux 3.19. .SH CONFORMING TO This Linux-specific system call is available only on the s390 architecture. The required PCI support is available beginning with System z EC12. -.SH NOTES -Glibc does not provide wrappers for these system calls; call them using -.BR syscall (2) .SH SEE ALSO .BR syscall (2)
Signature · 1 line
2.31.1
PATCH 5/8 s390_runtime_instr.2: Use syscall(SYS_...); for system calls without a wrapper
In reply to Alejandro Colomar--- man2/s390_runtime_instr.2 | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-)
man2/s390_runtime_instr.2 +8 -6
@@ -27,13 +27,18 @@ s390_runtime_instr \- enable/disable s390 CPU run-time instrumentation .SH SYNOPSIS .nf -.B #include <asm/runtime_instr.h> +.BR "#include <asm/runtime_instr.h>" " /* Definition of " S390_* " constants */" +.BR "#include <sys/syscall.h>" " /* Definition of " SYS_* " constants */" +.B #include <unistd.h> .PP -.BI "int s390_runtime_instr(int " command ", int " signum ");" +.BI "int syscall(SYS_s390_runtime_instr, int " command ", int " signum ); .fi .PP .IR Note : -There is no glibc wrapper for this system call; see NOTES. +glibc provides no wrapper for +.BR s390_runtime_instr (2), +necessitating the use of +.BR syscall (2). .SH DESCRIPTION The .BR s390_runtime_instr ()
@@ -97,9 +102,6 @@ This Linux-specific system call is available only on the s390 architecture. The run-time instrumentation facility is available beginning with System z EC12. .SH NOTES -Glibc does not provide a wrapper for this system call; call it using -.BR syscall (2) -.PP The .I asm/runtime_instr.h header file is available
Signature · 1 line
2.31.1
PATCH 6/8 s390_sthyi.2: Replace numeric constant by its name (macro)
In reply to Alejandro Colomar--- man2/s390_sthyi.2 | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-)
man2/s390_sthyi.2 +5 -2
@@ -27,6 +27,7 @@ s390_sthyi \- emulate STHYI instruction .SH SYNOPSIS .nf +.BR "#include <asm/sthyi.h>" " /* Definition of " STHYI_* " constants */" .B #include <asm/unistd.h> .PP .BI "int s390_sthyi(unsigned long " function_code ", void *" resp_buffer ","
@@ -49,7 +50,7 @@ The argument indicates which function to perform. The following code(s) are supported: .TP -0 +.B STHYI_FC_CP_IFL_CAP Return CP (Central Processor) and IFL (Integrated Facility for Linux) capacity information. .PP
@@ -58,7 +59,9 @@ The argument specifies the address of a response buffer. When the .I function_code -is 0, the buffer must be one page (4K) in size. +is +.BR STHYI_FC_CP_IFL_CAP , +the buffer must be one page (4K) in size. If the system call returns 0, the response buffer will be filled with CPU capacity information. Otherwise, the response buffer's content is unchanged.
Signature · 1 line
2.31.1
PATCH 7/8 s390_sthyi.2: Use syscall(SYS_...); for system calls without a wrapper
In reply to Alejandro Colomar--- man2/s390_sthyi.2 | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-)
man2/s390_sthyi.2 +9 -7
@@ -28,14 +28,19 @@ s390_sthyi \- emulate STHYI instruction .SH SYNOPSIS .nf .BR "#include <asm/sthyi.h>" " /* Definition of " STHYI_* " constants */" -.B #include <asm/unistd.h> +.BR "#include <sys/syscall.h>" " /* Definition of " SYS_* " constants */" +.B #include <unistd.h> .PP -.BI "int s390_sthyi(unsigned long " function_code ", void *" resp_buffer "," -.BI " uint64_t *" return_code ", unsigned long " flags ");" +.BI "int syscall(SYS_s390_sthyi, unsigned long " function_code , +.BI " void *" resp_buffer ", uint64_t *" return_code , +.BI " unsigned long " flags ); .fi .PP .IR Note : -There is no glibc wrapper for this system call; see NOTES. +glibc provides no wrapper for +.BR s390_sthyi (2), +necessitating the use of +.BR syscall (2). .SH DESCRIPTION The .BR s390_sthyi ()
@@ -129,9 +134,6 @@ This system call is available since Linux 4.15. .SH CONFORMING TO This Linux-specific system call is available only on the s390 architecture. .SH NOTES -Glibc does not provide a wrapper for this system call; call it using -.BR syscall (2) -.PP For details of the STHYI instruction, see .UR https://www.ibm.com\:/support\:/knowledgecenter\:/SSB27U_6.3.0\:/com.ibm.zvm.v630.hcpb4\:/hcpb4sth.htm the documentation page
Signature · 1 line
2.31.1
PATCH 8/8 sched_setattr.2: Use syscall(SYS_...); for system calls without a wrapper
In reply to Alejandro ColomarDocument also why each header is required
--- man2/sched_setattr.2 | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-)
man2/sched_setattr.2 +10 -6
@@ -29,17 +29,21 @@ sched_setattr, sched_getattr \- set and get scheduling policy and attributes .SH SYNOPSIS .nf -.B #include <sched.h> +.BR "#include <sched.h>" " /* Definition of " SCHED_* " constants */" +.BR "#include <sys/syscall.h>" " /* Definition of " SYS_* " constants */" +.B #include <unistd.h> .PP -.BI "int sched_setattr(pid_t " pid ", struct sched_attr *" attr , -.BI " unsigned int " flags ); -.BI "int sched_getattr(pid_t " pid ", struct sched_attr *" attr , -.BI " unsigned int " size ", unsigned int " flags ); +.BI "int syscall(SYS_sched_setattr, pid_t " pid ", struct sched_attr *" attr , +.BI " unsigned int " flags ); +.BI "int syscall(SYS_sched_getattr, pid_t " pid ", struct sched_attr *" attr , +.BI " unsigned int " size ", unsigned int " flags ); .fi .\" FIXME . Add feature test macro requirements .PP .IR Note : -There are no glibc wrappers for these system calls; see NOTES. +glibc provides no wrappers for these system calls, +necessitating the use of +.BR syscall (2). .SH DESCRIPTION .SS sched_setattr() The
Signature · 1 line
2.31.1
Quoted 1 line · Alejandro Colomar
Signed-off-by Alejandro Colomar <[email protected]>
Hello Alex,
I have applied all 8 patches.
Thanks,
Michael
Quoted 18 lines
--- man2/rename.2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)man2/rename.2 +1
-1@@ -39,7 +39,7 @@ rename, renameat, renameat2 \- change the name or location of a file .PP .BI "int rename(const char *" oldpath ", const char *" newpath ); .PP -.BR "#include <fcntl.h> " "/* Definition of AT_* constants */" +.BR "#include <fcntl.h> " "/* Definition of " AT_* " constants */" .B #include <stdio.h> .PP .BI "int renameat(int " olddirfd ", const char *" oldpath ,
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/