From nobody Mon Dec 06 23:27:43 2021 X-Original-To: dev-commits-src-all@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 8209018C8301; Mon, 6 Dec 2021 23:27:44 +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 4J7KNH6qJkz3nC7; Mon, 6 Dec 2021 23:27:43 +0000 (UTC) (envelope-from git@FreeBSD.org) 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 C4CA5151DB; Mon, 6 Dec 2021 23:27:43 +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 1B6NRhYW040855; Mon, 6 Dec 2021 23:27:43 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1B6NRh8J040854; Mon, 6 Dec 2021 23:27:43 GMT (envelope-from git) Date: Mon, 6 Dec 2021 23:27:43 GMT Message-Id: <202112062327.1B6NRh8J040854@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Konstantin Belousov Subject: git: 97722455cce4 - main - fcntl(2): be more precise about third arg type List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 97722455cce4f8398f6411eaaa80d595dcb5fb3c Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1638833264; 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=7Px2TeTbRurFEfMzODoWs5dIi14QwDnNOR96W4enSmk=; b=h/T5GLI+fLjzBFyYs4+mQ0DjF1buNQYBw3evkJ8b/VmPH7kd4XQb4mGS7yb0JKSoS+LLqh x3VwwQYKDMcBderr+orrGEJaxlaa2LdPUr8G12UZpyUixMjy/1W9tf/yvdhAsrM3bPk9rP peT7RAakgT8d4FXt34lGMAP/zNH9uGKAKbr9+Rs/7gCfvnoDx9xfjqynYZfexG1ZpvBr8b n3NybTGypZJhhGJjbiuz8takZr3H4P76fMK8qSWjW6DQ2Eev5VBhl0laq+OU3mlAvjyESn nq8JsMAWESzBCGRm5/gqheLe6OeNcZ7kT89SnAcVk9C+S393ySbluWsD2lM5yg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1638833264; a=rsa-sha256; cv=none; b=rcfF3meJOYMsJ/t7qgvJlgcU/oNRZ+yWTuOUjXY3En2qAzwTl1NSRQxIptpXq4/XZCqP8e FPLElJFuQhCtDUWrTFMYHl6vkZrBAN5AYy47J1s07oH/jsS+ii9aQejrhou8penUsPEURs XhKR0ycuqOt6uRtAZ8qmUm4hNibou9VZ0OL5EZMtiSsZPGgYNeeuvvv6LJcnLp3q5A3sgR Cr0+g7FZeuYrbSwbaq7/S13hylbBT0/eEKpeL+LvXkCDkcLHG52Dhw91RoB/2rrDy0lmyK xBWwur8k4Upeh0pjAUwBP/1f2ittX4ElqyW6SwiIRPXiDlyWZDA3T2DdT3MOaQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=97722455cce4f8398f6411eaaa80d595dcb5fb3c commit 97722455cce4f8398f6411eaaa80d595dcb5fb3c Author: Konstantin Belousov AuthorDate: 2021-12-06 20:14:25 +0000 Commit: Konstantin Belousov CommitDate: 2021-12-06 23:27:38 +0000 fcntl(2): be more precise about third arg type Also use the term operation consistently, over the command. Reviewed by: emaste, jhb, markj Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D33277 --- lib/libc/sys/fcntl.2 | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/lib/libc/sys/fcntl.2 b/lib/libc/sys/fcntl.2 index c0a13ee6df18..d6d48f7a4797 100644 --- a/lib/libc/sys/fcntl.2 +++ b/lib/libc/sys/fcntl.2 @@ -53,7 +53,11 @@ Depending on the value of .Fa cmd , .Fn fcntl can take an additional third argument -.Fa "long arg" . +.Fa arg . +Unless otherwise noted below for a specific operation, +.Fa arg +has type +.Vt int . .Bl -tag -width F_DUP2FD_CLOEXEC .It Dv F_DUPFD Return a new descriptor as follows: @@ -286,7 +290,7 @@ and will fail and return .Dv EINVAL . .Pp -Several commands are available for doing advisory file locking; +Several operations are available for doing advisory file locking; they all operate on the following structure: .Bd -literal struct flock { @@ -298,6 +302,10 @@ struct flock { int l_sysid; /* remote system id or zero for local */ }; .Ed +These advisory file locking operations take a pointer to +.Vt struct flock +as the third argument +.Fa arg . The commands available for advisory record locking are as follows: .Bl -tag -width F_SETLKWX .It Dv F_GETLK