From nobody Tue Apr 23 19:58:19 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 4VPCbj0qLDz5HyGl; Tue, 23 Apr 2024 19:58:25 +0000 (UTC) (envelope-from pho@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (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 "smtp.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VPCbj0FCBz4k02; Tue, 23 Apr 2024 19:58:25 +0000 (UTC) (envelope-from pho@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1713902305; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=nULj9aoC1FY/K7CVtmKJWal1IvMItYD2dvBoUygvvVw=; b=kpSB6HhU1JGRCyqsGyC9rQUhtj1yxHAkIgbRus2SFLz8666+eyZakmeDvQ718L2IoZ8aQi IT8cSI6KpmfjNdEWVJFkZS0UCs2JDB5zjn1MFpyxqgb5n1q/F1y/jStWQEof9K1K+Gr7dw t4+W0tg0HZGiGnZAT9o8C+WOvRCyFzNgNcLEoMEFcJvC2/6vOf7/H638hjk6D7biUIih4d miAIgTwxVMzEwdp89vqQ8dfPaffE1OZA36RFnKMo4MyTwdvUnUP2AfmGpxdai7JlvBxJve ZITL513fdxAh4MbeZzJEtUtttAinII5aHdLDUFdYohZASZOXLZ82sPnkIHxChA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1713902305; a=rsa-sha256; cv=none; b=xzJaNnBkua6WmM+w5ZDG3avv+vWi6ZUKaDBgWc/LPnV45mcYmjyO8ivFMz5Z6XkAZfSbia rXKYaEaZR6sLOzTgkjed5yv/MmdbDm9/fY2L9M/yEZFbVZVGAyQHvTozW8zTUFByi5X6Xs B0t9fSwTMvfEGslyLZnDwX83IjRifr5x4dUFg4m8Df2NpZ7keYXE449dkrOrEGSAriZuMR Pony0yKG7qAs8MOq0ouYR4X9HZ+f2LeSwcfostpehjy6rjijMtf8pe3SPYprBfCShjjyfR KI2aeQFB+aM/o/PxjhQwBomlY9a5B621s4EwUBq8ORQcKgWP5ord4SvUrrqwQA== 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=1713902305; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=nULj9aoC1FY/K7CVtmKJWal1IvMItYD2dvBoUygvvVw=; b=IsSIsux/ztQ6x44hj7FrwGG41kDgFEXmY6uFPz+uABZsp6ZpNe2jP7V6lvfDVNC0VKS/1z bdScMlcCsJ2LrM5pZBuHqIrC5Z8acMMsutSF3YO3aWcHSkRbq63j7IBG7WmqoRWiQ9OGSI jGtWjOpBimSAwxchbaDQgt8chSET7ZnYtXK5QYQCRfROzZ6nX0NC7tO7PvN1tYjoZGtx9g md9kP4vytcgafYSXQwWQFC1RnBjv0g0U0q33ZvKnW7qyj7XODy44G0RR53C/6CR0mp9gmW opIaeqfnsd2gYg2fqQv/dXee+lGQD95KlkvnK3cndk+gv24iqvlFtA4URc4W8g== Received: from Peters-Air (c-x599688e4.customers.hiper-net.dk [89.150.136.228]) (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) (Authenticated sender: pho) by smtp.freebsd.org (Postfix) with ESMTPSA id 4VPCbh2c9MzjkT; Tue, 23 Apr 2024 19:58:24 +0000 (UTC) (envelope-from pho@FreeBSD.org) Date: Tue, 23 Apr 2024 21:58:19 +0200 From: Peter Holm To: Brooks Davis Cc: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: Re: git: 1fd880742ace - main - libsys: add a libsys.h Message-ID: References: <202404161648.43GGmLAN079971@gitrepo.freebsd.org> 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=us-ascii Content-Disposition: inline In-Reply-To: <202404161648.43GGmLAN079971@gitrepo.freebsd.org> On Tue, Apr 16, 2024 at 04:48:21PM +0000, Brooks Davis wrote: > The branch main has been updated by brooks: > > URL: https://cgit.FreeBSD.org/src/commit/?id=1fd880742ace94e11fa60ee0b074f0b18e54c54f > > commit 1fd880742ace94e11fa60ee0b074f0b18e54c54f > Author: Brooks Davis > AuthorDate: 2024-04-16 16:48:07 +0000 > Commit: Brooks Davis > CommitDate: 2024-04-16 16:48:07 +0000 > > libsys: add a libsys.h > > This declares an API for libsys which currently consists of > __sys_() declarations for system call stubs and function pointer > typedefs of the form __sys__t. The vast majority of the > implementation resides in a generated _libsys.h which ensures that all > system call stub declarations match syscalls.master. > > Reviewed by: kib > Differential Revision: https://reviews.freebsd.org/D44387 > --- > lib/libsys/Makefile | 2 + > lib/libsys/_libsys.h | 865 +++++++++++++++++++++++++++++++++++++++++++++++++ > lib/libsys/libsys.h | 25 ++ > sys/kern/syscalls.conf | 1 + > 4 files changed, 893 insertions(+) > Shouldn't readv() and writev() return ssize_t? Like this: 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); - Peter