git: 78101d437a92 - main - syscalls.master: correct return type of {read,write}v
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Wed, 24 Apr 2024 19:48:56 UTC
The branch main has been updated by brooks: URL: https://cgit.FreeBSD.org/src/commit/?id=78101d437a92d539584795ffd2c46724da37e662 commit 78101d437a92d539584795ffd2c46724da37e662 Author: Brooks Davis <brooks@FreeBSD.org> AuthorDate: 2024-04-24 19:47:22 +0000 Commit: Brooks Davis <brooks@FreeBSD.org> CommitDate: 2024-04-24 19:48:46 +0000 syscalls.master: correct return type of {read,write}v This was missed when read/write, etc were updated to return ssize_t. Fixes: 2e83b2816183 Fix a few syscall arguments to use size_t instead of u_int. Reviewed by: imp, kib Differential Revision: https://reviews.freebsd.org/D44930 --- lib/libsys/_libsys.h | 8 ++++---- sys/compat/freebsd32/freebsd32_systrace_args.c | 4 ++-- sys/kern/syscalls.master | 4 ++-- sys/kern/systrace_args.c | 4 ++-- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/lib/libsys/_libsys.h b/lib/libsys/_libsys.h index d0dd144bc8f1..d4cd14ceb75f 100644 --- a/lib/libsys/_libsys.h +++ b/lib/libsys/_libsys.h @@ -141,8 +141,8 @@ typedef int (__sys_listen_t)(int, int); typedef int (__sys_gettimeofday_t)(struct timeval *, struct timezone *); typedef int (__sys_getrusage_t)(int, struct rusage *); typedef int (__sys_getsockopt_t)(int, int, int, void *, __socklen_t *); -typedef int (__sys_readv_t)(int, const struct iovec *, u_int); -typedef int (__sys_writev_t)(int, const struct iovec *, u_int); +typedef ssize_t (__sys_readv_t)(int, const struct iovec *, u_int); +typedef ssize_t (__sys_writev_t)(int, const struct iovec *, u_int); typedef int (__sys_settimeofday_t)(const struct timeval *, const struct timezone *); typedef int (__sys_fchown_t)(int, int, int); typedef int (__sys_fchmod_t)(int, mode_t); @@ -540,8 +540,8 @@ int __sys_listen(int s, int backlog); int __sys_gettimeofday(struct timeval * tp, struct timezone * tzp); int __sys_getrusage(int who, struct rusage * rusage); int __sys_getsockopt(int s, int level, int name, void * val, __socklen_t * avalsize); -int __sys_readv(int fd, const struct iovec * iovp, u_int iovcnt); -int __sys_writev(int fd, const struct iovec * iovp, u_int iovcnt); +ssize_t __sys_readv(int fd, const struct iovec * iovp, u_int iovcnt); +ssize_t __sys_writev(int fd, const struct iovec * iovp, u_int iovcnt); int __sys_settimeofday(const struct timeval * tv, const struct timezone * tzp); int __sys_fchown(int fd, int uid, int gid); int __sys_fchmod(int fd, mode_t mode); diff --git a/sys/compat/freebsd32/freebsd32_systrace_args.c b/sys/compat/freebsd32/freebsd32_systrace_args.c index bfcf9a46b485..ff62adce85b9 100644 --- a/sys/compat/freebsd32/freebsd32_systrace_args.c +++ b/sys/compat/freebsd32/freebsd32_systrace_args.c @@ -9473,12 +9473,12 @@ systrace_return_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) /* freebsd32_readv */ case 120: if (ndx == 0 || ndx == 1) - p = "int"; + p = "ssize_t"; break; /* freebsd32_writev */ case 121: if (ndx == 0 || ndx == 1) - p = "int"; + p = "ssize_t"; break; /* freebsd32_settimeofday */ case 122: diff --git a/sys/kern/syscalls.master b/sys/kern/syscalls.master index 8a681889cc6a..274167ac11d8 100644 --- a/sys/kern/syscalls.master +++ b/sys/kern/syscalls.master @@ -782,14 +782,14 @@ } 119 AUE_NULL RESERVED 120 AUE_READV STD|CAPENABLED { - int readv( + ssize_t readv( int fd, _In_reads_(iovcnt) _Contains_long_ptr_ const struct iovec *iovp, u_int iovcnt ); } 121 AUE_WRITEV STD|CAPENABLED { - int writev( + ssize_t writev( int fd, _In_reads_(iovcnt) _Contains_long_ptr_ const struct iovec *iovp, u_int iovcnt diff --git a/sys/kern/systrace_args.c b/sys/kern/systrace_args.c index 59152b25177c..e7231bf8570e 100644 --- a/sys/kern/systrace_args.c +++ b/sys/kern/systrace_args.c @@ -9618,12 +9618,12 @@ systrace_return_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) /* readv */ case 120: if (ndx == 0 || ndx == 1) - p = "int"; + p = "ssize_t"; break; /* writev */ case 121: if (ndx == 0 || ndx == 1) - p = "int"; + p = "ssize_t"; break; /* settimeofday */ case 122: