From nobody Sat May 4 14:58:18 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 4VWrQL6tscz5Hydg; Sat, 4 May 2024 14:58:18 +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 4VWrQL3gCMz4SYb; Sat, 4 May 2024 14:58:18 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1714834698; 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=FvY+VdKySfTXDcn1Wb/lo0Oa8Arzo2CBwbatTFDKbmE=; b=ciG/PlmDMrFSXdR9vbEbtLdzmYDucOKtgeXD0T2nvzgCfvxEmYeKn/jGjTsIPB+ui7ygpJ YHqAeptkWFoDlQtemdVire0cT7zBG1sKy6QqEhtvonI8GQLw74Q5U8FB60zTMPeXAmlbNY KGfP9uNMpgJFwRsODvswyUkgw7s22aXj/rvoa24NEVXCRR+35VvUcjB907I1JHbKX57Rla BFx6Fi1zizoilOHh52tjx96WR2lIUBVbFOIJDu78O1g7ir7I3bfvndMeU/0VeLPfk5LzUR MeYKTPw40lRg3++nO19AT5q9nfEjM4eDVDBoq3qTY+skkIGddu/8Eni/XyQWew== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1714834698; a=rsa-sha256; cv=none; b=HzwRXRRvmUypmb2r6koUyCmco4Nab3MKCufEjHwdZ3EFBvmqZxWfHwVBvH7zJJODm13y50 2eGeqWflKLjh1c51nHJJfkEvHDHopigWcvxVqvkachk7eEiKkqunz5W3X5fqjMod4nknvn JdySKPKqYr+UbwdcxPDmctJJ2Bm5loXGAjTs/JIy7e1853BB1B7AIlZnt3z8vMqxX2f6Q6 ffBHLMecV/w6V5N9ZA3OX1jDgCN559Hid196V1F2W4lVmfQtduk8gNr4ghdSIarDqooU5s Xaod4EanaL+O6TKRexwuF+ki4lj7FxYhT4LKq1K+txcRGZFSpTKmcULj9JlfDg== 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=1714834698; 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=FvY+VdKySfTXDcn1Wb/lo0Oa8Arzo2CBwbatTFDKbmE=; b=kd/0+CKNI3PMpvXecpE+wh0GMK9SnBWzuFC3J+Cwx9T26ukmAot4LwQ6W3K/9hz19KWVW3 ypx9il3bvWqewyLRs+/odXotw3hU+GqfpfCd6addaYUiUJMACzlIn4y8p4hcxNDf65PLXH acrfd0Fh5Xtw/mNFgLdR2ulYYxHoQiIWdvIlKsVr2p3mE+ihiimcB9+DGvjmWUXRvazDcl sWQE+ErryRwIuuzWjQUL/nw7IHWcd1ufRKAJYR5Ua4BlA0PENFdlqVcSOdhizqX+pW9Lb4 D1T6261P0lmqC0Lp2i5eUgoiuJoEW4sT5BIag8JDaY3rZw+diImL5C24+XVjPQ== 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 4VWrQL2xZ7zZN9; Sat, 4 May 2024 14:58:18 +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 444EwIj1012094; Sat, 4 May 2024 14:58:18 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 444EwIRp012091; Sat, 4 May 2024 14:58:18 GMT (envelope-from git) Date: Sat, 4 May 2024 14:58:18 GMT Message-Id: <202405041458.444EwIRp012091@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: 9a62cdc01327 - main - intro.2 as errno.2: Use the name macro for errno 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: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 9a62cdc0132720c439313707b5e339dc348b0d45 Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=9a62cdc0132720c439313707b5e339dc348b0d45 commit 9a62cdc0132720c439313707b5e339dc348b0d45 Author: Alexander Ziaee AuthorDate: 2024-05-04 14:54:21 +0000 Commit: Warner Losh CommitDate: 2024-05-04 14:56:10 +0000 intro.2 as errno.2: Use the name macro for errno Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/1192 --- lib/libsys/intro.2 | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/lib/libsys/intro.2 b/lib/libsys/intro.2 index f10312c1962a..008936b278ae 100644 --- a/lib/libsys/intro.2 +++ b/lib/libsys/intro.2 @@ -32,8 +32,9 @@ .Dt INTRO 2 .Os .Sh NAME -.Nm intro -.Nd introduction to system calls and error numbers +.Nm intro , +.Nm errno +.Nd introduction to system calls and their error numbers .Sh LIBRARY .Lb libc .Sh SYNOPSIS @@ -333,7 +334,7 @@ Table of currently available system calls. .Sh ERRORS Nearly all of the system calls provide an error number referenced via the external identifier -.Va errno . +.Nm errno . This identifier is defined in .In sys/errno.h as: @@ -349,7 +350,7 @@ For the initial thread and non-threaded processes, .Va __error() returns a pointer to a global -.Va errno +.Nm errno variable that is compatible with the previous definition. .Pp When a system call detects an error, @@ -357,12 +358,12 @@ it returns an integer value indicating failure .Pq usually -1 and sets the variable -.Va errno +.Nm errno accordingly. This allows interpretation of the failure on receiving -1 and to take action accordingly. Successful calls never set -.Va errno ; +.Nm errno ; once set, it remains until another error occurs. It should only be examined after an error. Note that a number of system calls overload the meanings of these