From e8ee7d903546bd717e599c607314eceb74b9ab5e Mon Sep 17 00:00:00 2001 From: Ed Maste Date: Tue, 16 Apr 2019 13:26:31 +0000 Subject: [PATCH] correct readlinkat(2) return type r176215 corrected readlink(2)'s return type and the type of the last argument. readlink(2) was introduced in r177788 after being developed as part of Google Summer of Code 2007; it appears to have inherited the wrong return type. Man pages and header files were already ssize_t; update syscalls.master to match. PR: 197915 Submitted by: Henning Petersen MFC after: 2 weeks --- sys/compat/freebsd32/syscalls.master | 2 +- sys/kern/syscalls.master | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/compat/freebsd32/syscalls.master b/sys/compat/freebsd32/syscalls.master index 94bea54d84c3..b52561928abf 100644 --- a/sys/compat/freebsd32/syscalls.master +++ b/sys/compat/freebsd32/syscalls.master @@ -963,7 +963,7 @@ uint32_t dev); } 499 AUE_OPENAT_RWTC NOPROTO { int openat(int fd, const char *path, \ int flag, mode_t mode); } -500 AUE_READLINKAT NOPROTO { int readlinkat(int fd, const char *path, \ +500 AUE_READLINKAT NOPROTO { ssize_t readlinkat(int fd, const char *path, \ char *buf, size_t bufsize); } 501 AUE_RENAMEAT NOPROTO { int renameat(int oldfd, const char *old, \ int newfd, const char *new); } diff --git a/sys/kern/syscalls.master b/sys/kern/syscalls.master index 57af35814f64..f85c0ab3d2ff 100644 --- a/sys/kern/syscalls.master +++ b/sys/kern/syscalls.master @@ -2716,7 +2716,7 @@ ); } 500 AUE_READLINKAT STD { - int readlinkat( + ssize_t readlinkat( int fd, _In_z_ const char *path, _Out_writes_bytes_(bufsize) char *buf,