[v5,05/35] access.2: Use syscall(SYS_...); for system calls without a wrapper

Message ID 20210404115847.78166-6-alx.manpages@gmail.com
State New
Headers show
Series
  • Untitled series #36388
Related show

Commit Message

Martin Sebor via Libc-alpha April 4, 2021, 11:58 a.m.
Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>

---
 man2/access.2 | 11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)

-- 
2.31.0

Comments

Martin Sebor via Libc-alpha April 5, 2021, 11:17 a.m. | #1
Hi Alex,

On 4/4/21 1:58 PM, Alejandro Colomar wrote:
> Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>

> ---

>  man2/access.2 | 11 ++++++++---

>  1 file changed, 8 insertions(+), 3 deletions(-)


Patch applied.

Thanks,

Michael


> diff --git a/man2/access.2 b/man2/access.2

> index 4a6e28db3..f24a73161 100644

> --- a/man2/access.2

> +++ b/man2/access.2

> @@ -49,15 +49,20 @@ access, faccessat, faccessat2 \- check user's permissions for a file

>  .PP

>  .BI "int access(const char *" pathname ", int " mode );

>  .PP

> -.BR "#include <fcntl.h>           " "/* Definition of AT_* constants */"

> +.BR "#include <fcntl.h>" "            /* Definition of " AT_* " constants */"

>  .B #include <unistd.h>

>  .PP

>  .BI "int faccessat(int " dirfd ", const char *" pathname ", int " \

>  mode ", int " flags );

>                  /* But see C library/kernel differences, below */

>  .PP

> -.BI "int faccessat2(int " dirfd ", const char *" pathname ", int " \

> -mode ", int " flags );

> +.BR "#include <fcntl.h>" "            /* Definition of " AT_* " constants */"

> +.BR "#include <sys/syscall.h>" "      /* Definition of " SYS_* " constants */"

> +.B #include <unistd.h>

> +.PP

> +.BI "int syscall(SYS_faccessat2,"

> +.BI "            int " dirfd ", const char *" pathname ", int " mode \

> +", int " flags );

>  .fi

>  .PP

>  .RS -4

> 



-- 
Michael Kerrisk
Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/
Linux/UNIX System Programming Training: http://man7.org/training/

Patch

diff --git a/man2/access.2 b/man2/access.2
index 4a6e28db3..f24a73161 100644
--- a/man2/access.2
+++ b/man2/access.2
@@ -49,15 +49,20 @@  access, faccessat, faccessat2 \- check user's permissions for a file
 .PP
 .BI "int access(const char *" pathname ", int " mode );
 .PP
-.BR "#include <fcntl.h>           " "/* Definition of AT_* constants */"
+.BR "#include <fcntl.h>" "            /* Definition of " AT_* " constants */"
 .B #include <unistd.h>
 .PP
 .BI "int faccessat(int " dirfd ", const char *" pathname ", int " \
 mode ", int " flags );
                 /* But see C library/kernel differences, below */
 .PP
-.BI "int faccessat2(int " dirfd ", const char *" pathname ", int " \
-mode ", int " flags );
+.BR "#include <fcntl.h>" "            /* Definition of " AT_* " constants */"
+.BR "#include <sys/syscall.h>" "      /* Definition of " SYS_* " constants */"
+.B #include <unistd.h>
+.PP
+.BI "int syscall(SYS_faccessat2,"
+.BI "            int " dirfd ", const char *" pathname ", int " mode \
+", int " flags );
 .fi
 .PP
 .RS -4