From nobody Fri Oct 07 11:39:04 2022 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 4MkRCs1sFrz4V8Bb; Fri, 7 Oct 2022 11:39:05 +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 4MkRCs1LZCz3fTy; Fri, 7 Oct 2022 11:39:05 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1665142745; 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=X2JAk/VA/fWWypeEvSY7NtAY7p5QlAJvV4qC8JTFGIo=; b=bxAsbjdQGLRTEACbInIeLZrnz03TiQ/d7kmqMT5wrg9Z7EZt4j6oVcngTsS0EBySlgW8OJ oYHcBb77nKft1OyamdQmgtAGo5WCSRQGGRrdA6ZmH1i2wAWUo0Gzd2xMYKF0tKqn7COCeG +CPaBjwpqgv8K+0UofvSJvCO4lYL/FQNQmYjSzj12wenY8x+IuXCj/pEV4x90Tetm0FhbU 64q5Ryc13I7f9/70yb7hMh77qBnCiynV/9mLh56eZarsOSn/I8DtvSjjg1vmL7fiKpIN3o Xp+xIjLbvS/L39W4UvTMAdjsc/SSAEXK1psDJdZExTa/mmPV+o1YD192gsnbVQ== 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 4MkRCs0PmHzZs5; Fri, 7 Oct 2022 11:39:05 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 297Bd4Xw062192; Fri, 7 Oct 2022 11:39:04 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 297Bd4pq062191; Fri, 7 Oct 2022 11:39:04 GMT (envelope-from git) Date: Fri, 7 Oct 2022 11:39:04 GMT Message-Id: <202210071139.297Bd4pq062191@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Benedict Reuschling Subject: git: 1c2be25f6080 - main - Add extra EINVAL information about wrong block size to read(2)/write(2) 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bcr X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 1c2be25f6080ee63baeae55e45761e1310d1b756 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1665142745; 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=X2JAk/VA/fWWypeEvSY7NtAY7p5QlAJvV4qC8JTFGIo=; b=sYoDkyxvGWlm//I1e30WdJMo51qg2UZJT5ol9dJGXjJZi64t7HAQTOLv58NpyJHiweCgSm UjsjLCP+YwZUolrgXrS5eCl/ECVvWd9zXeGqjd2ttmnE9uS+lKOnTGtSO9toD0RKYGD8o/ 5wH7yC331Q3co8+Qfz/+MWVth9c8qPWl1vTuoZagl2uf6ENiCVk1aEg6PR/f/adjcaCBF1 FJ5ld+BzlOEXVjwg9Tpxp+zjitbHkOKMmucCb0PjU9MraBoY9zoxFEJ45tZBb5RiYr4bvO F2iRzvIbSPtTtK1Ybp7I+98mzrkalav1e0wGpFk02Ezc/08kIe3tykIuvW11hQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1665142745; a=rsa-sha256; cv=none; b=OG113DO1cfz2WdIP2clT3vCG8G0/GXMc6D04CwGOBuMST3GzsYZrVtQvmqcKwpARbeYns6 cSwqtFjJ+9U1WXag22tTIOCWypWwzuhO7C0tG3HLARdibQouDnHF24xP8Nbu6UnszllmdN axrZTcXJY7CEvZuoS+Xyfu2AT6fgqVm2XtleOiqqdE2C0c9AehORc+WFr+5jdsE/xhsQzD wfB7SpivHAK42V047Tn/xhAntqzoiyTLEDdYXvRwTfpx88OeLaQLoRLNQwODHGzoRpDJdL kB7o3B8BOAtp16CtDO5ngBWGV75QxjgsGRDt+I0P14OIITDIp5luis5nKLCXjg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by bcr (doc committer): URL: https://cgit.FreeBSD.org/src/commit/?id=1c2be25f6080ee63baeae55e45761e1310d1b756 commit 1c2be25f6080ee63baeae55e45761e1310d1b756 Author: Benedict Reuschling AuthorDate: 2022-10-07 11:32:37 +0000 Commit: Benedict Reuschling CommitDate: 2022-10-07 11:32:37 +0000 Add extra EINVAL information about wrong block size to read(2)/write(2) The read system call will return EINVAL if the current file offset is not a multiple of the block size. This also applies to write(2). Add an entry for EINVAL about this error to both man pages. PR: 91149 Event: Aberdeen Hackathon 2022 Differential Revision: https://reviews.freebsd.org/D24617 --- lib/libc/sys/read.2 | 4 +++- lib/libc/sys/write.2 | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/lib/libc/sys/read.2 b/lib/libc/sys/read.2 index 8b58debd3fbb..28d085562af3 100644 --- a/lib/libc/sys/read.2 +++ b/lib/libc/sys/read.2 @@ -28,7 +28,7 @@ .\" @(#)read.2 8.4 (Berkeley) 2/26/94 .\" $FreeBSD$ .\" -.Dd June 4, 2020 +.Dd October 7, 2022 .Dt READ 2 .Os .Sh NAME @@ -250,6 +250,8 @@ The sum of the values in the .Fa iov array overflowed a 32-bit integer. +.It Bq Er EINVAL +The current file offset is not a multiple of the block size. .It Bq Er EFAULT Part of the .Fa iov diff --git a/lib/libc/sys/write.2 b/lib/libc/sys/write.2 index 937e95b53a14..048338ed4dee 100644 --- a/lib/libc/sys/write.2 +++ b/lib/libc/sys/write.2 @@ -28,7 +28,7 @@ .\" @(#)write.2 8.5 (Berkeley) 4/2/94 .\" $FreeBSD$ .\" -.Dd February 11, 2021 +.Dd October 7, 2022 .Dt WRITE 2 .Os .Sh NAME @@ -205,6 +205,8 @@ is greater than if the sysctl .Va debug.iosize_max_clamp is non-zero). +.It Bq Er EINVAL +The current file offset is not a multiple of the block size. .It Bq Er EINTEGRITY The backing store for .Fa fd