From nobody Wed Apr 24 19:48:56 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VPqLJ3cdBz5HyyG; Wed, 24 Apr 2024 19:48:56 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VPqLJ35wvz4GFD; Wed, 24 Apr 2024 19:48:56 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1713988136; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/68mWIHjynLsDqVx2aj91jNmPdZu3sVhA+Ad2b70ilo=; b=dybOON+rA2EkWyaoTOoe1hLk3VqO/2RToTt7ZB0Tm1bsdvX3wW3QTBFXmf8Ugn4fpiB1uv 3SdI+obxvz9Uj8bQ09jpAhm0kCKNMyobUgqfFE+oDlPb8N/ICXOWbaU6po4KZnRnHDCqZ+ iIDtbGf7jF2UeQ808bsvYfAKcH/CTF0/VeSyi2n7umjT912jO7rEaeImXdWoM+/xJeD3al KduUaSscC6GkBkbS9G5dMbqEXEt5niHjbtAUvAAIEvIDGCQMpJRlf9UI0s9Aun2c4neeD0 7p+fmzXO64i1fUbZBVyISd5t9RtU7Y0a0YwB4sE8kOs+vyh+OcKqIqHJ1UDyYg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1713988136; a=rsa-sha256; cv=none; b=WacK1I9B7Ps5AS7cRDmoNioqg9Zc/IORkkBBmniiYQfvJfawhAANpETuD7dZZQalXhwEJX IIWp28gtSkpeQg/NIJd3TfJUHPw514y4PqschgYAIZZU+hEwXzX5puITQtE0ebcBovJ/MN NXAvNLGLkuPu1WGD7DU8PQ+Nnb35jPWG6w1bPRB4tV4wHnQzleOgGYjFF3muPBH3Q+iK8Q 6CR7OgoTg18dTTlZrAN5yNN3tYNGlLx63zlUuzmwGC8vWBz+acL/swQuZ+P1bhUCl8Y/+8 z9zmNge6KKS+ElbqPi8c0LP+Wb97Wi/mGgEx0y4YjRLPeHN7ppgKd2jcBn4lFA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1713988136; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/68mWIHjynLsDqVx2aj91jNmPdZu3sVhA+Ad2b70ilo=; b=pUoukVzCWi6drN21d+WBlFLC9NIbl9moalHM75vziSXr39s2GJBqjcXc3oxIWZdnSoSFe1 L/PDLJKQIafYyRD7pXCGFZL/B4GCV6pUgxv+e/qSVqCiEoGN/fvA77OBwQA42J/FhXmXcL GpZhJ4aTkjX+YyDXCa8GRnM9ZE/nCxhrOIkJqz302lzDR4sksW1xSV7ecS+OiNOGm36FUF kJsok9D94kxmkkEOCujfI1zQwnTqD7fMxUnI6k7gJm/8N4OsfW1cJagrR963ITuic6woUY lV/vIhIFE657JCBTL2X9P7955a152IJcE/gQFfg2X2rS+CfXhoUVZKww/41iQQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4VPqLJ2VSszSgR; Wed, 24 Apr 2024 19:48:56 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 43OJmuqV014904; Wed, 24 Apr 2024 19:48:56 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 43OJmuOL014901; Wed, 24 Apr 2024 19:48:56 GMT (envelope-from git) Date: Wed, 24 Apr 2024 19:48:56 GMT Message-Id: <202404241948.43OJmuOL014901@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Brooks Davis Subject: git: 78101d437a92 - main - syscalls.master: correct return type of {read,write}v List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: brooks X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 78101d437a92d539584795ffd2c46724da37e662 Auto-Submitted: auto-generated The branch main has been updated by brooks: URL: https://cgit.FreeBSD.org/src/commit/?id=78101d437a92d539584795ffd2c46724da37e662 commit 78101d437a92d539584795ffd2c46724da37e662 Author: Brooks Davis AuthorDate: 2024-04-24 19:47:22 +0000 Commit: Brooks Davis 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: