From nobody Mon Dec 29 01:16:43 2025 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 4dfdbb5HfTz6LRB1 for ; Mon, 29 Dec 2025 01:16:43 +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 "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dfdbb22stz3Xmf for ; Mon, 29 Dec 2025 01:16:43 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1766971003; 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=+Of75UDRbwo6X8pBVm4KGccUTBuLI7jbByckk/AmrIc=; b=xm7r9X18HYns4CByfdEkhm4wY+IIhNEujWhrvkzLSAeNtf4Zev5wIekJThZSOoBcsRTipW I5+BVb6kD08srCL8fjEAjbE9MZCurcn6DMfbeE/0lMDNVmSXlD//nXGH+wrpk7oEu9h9gX VICreW31vPUyRscLzw2eQqUbYLlteEDk3VTknoVR2dqASwCIiPSyt420Ng3W8pEk56098S f2MuyL6NqIFFy04AJUbGLR56YXgF70QJfVhXrwuPAJReZKH4epTE5xJXRmL7kJjyc4gpx7 ov9u+3mG5YOvfbh9kQotyMbHItBCuBrvcgaqZ6WeM4BvBjmWPTRxddzJxOqT7g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1766971003; 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=+Of75UDRbwo6X8pBVm4KGccUTBuLI7jbByckk/AmrIc=; b=dTSvuF1oVr/zrqYuuzdDAb54AV6S3n86vUpX3GaKNucA3GE23QWuF2+vmnU8Ls+aKKII8j s6Mwnz9Uoq3PZV5792ekBcLZXp4iwPWydn0l5KJUVv+dL1n2uohWGPycl7dp7X5K8rgDHg Zq2WEHHglL4JWawKZm5nVH+804+oI+Ce4XKb+EZoswcD+AurMMlPlfQuic5cG6aVeqPd4c sKkwNS6K+wTAAlvXuzgmU+a2MybD+I5KPYbMiFPxFDGKhQ1g6XnU+QyXZedggKjRoq1XzZ uGPR3We5LSVF3ITM99205ypigXFtSqktoysnWm0B+LMC2Y/QGrKBCoB1uENe9A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1766971003; a=rsa-sha256; cv=none; b=ITxUzBOS3FsjVKhe3L7/kmmK0vFoasIk/aeyUzYwrwt11wDq1qaMr3lKbgtQ+fPJTBc1uQ L2fNg3QX09qZQvq1DdusOsUIq3TUvxdihDnQbCMabuwT83K5x9nXH6agfio3qYNWmDHsSF NisvtSlitTsCjKEIeISEO5kzO7mtZleXcsOvBOQ+osLommHM7M24SR4wJOkoYTs0VJvvnf g1WqVVQ6djfeG+Wa9p5P0F9NDQceI3b7BDWzq+s3LDNgIOtepudvlZER+ReGAKQ6NMTCl5 efR4qOhj2Jq2CO5TGe7JmHNZA6LzgzIbJ3pV1ZnPlJu53Slf5mciwqAUsS8gYg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dfdbb1SDmz17Tn for ; Mon, 29 Dec 2025 01:16:43 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 378bb by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 29 Dec 2025 01:16:43 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Konstantin Belousov Subject: git: 3088263177da - main - man pages: provide some description for extended errors 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: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-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: 3088263177da2813dd09364171feadd0e31d1fc3 Auto-Submitted: auto-generated Date: Mon, 29 Dec 2025 01:16:43 +0000 Message-Id: <6951d67b.378bb.514f81a1@gitrepo.freebsd.org> The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=3088263177da2813dd09364171feadd0e31d1fc3 commit 3088263177da2813dd09364171feadd0e31d1fc3 Author: Konstantin Belousov AuthorDate: 2025-12-28 20:41:38 +0000 Commit: Konstantin Belousov CommitDate: 2025-12-29 01:16:25 +0000 man pages: provide some description for extended errors , related functions, and the EXTERROR_VERBOSE environment variable. Reviewed by: emaste, mckusick Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D54380 --- lib/libc/gen/err.3 | 16 ++++++++++++++++ share/man/man7/environ.7 | 16 +++++++++++++++- 2 files changed, 31 insertions(+), 1 deletion(-) diff --git a/lib/libc/gen/err.3 b/lib/libc/gen/err.3 index 088ead71239b..70a214152a19 100644 --- a/lib/libc/gen/err.3 +++ b/lib/libc/gen/err.3 @@ -114,6 +114,22 @@ preceded by another colon and space unless the argument is .Dv NULL . .Pp +If the kernel returned an extended error string in addition to the +.Va errno +code, the +.Fn err +function prints the string with interpolated values for parameters, +as provided to the corresponding invocation of +.Xr EXTERROR 9 . +If the extended error string was not provided, but extended error +information was, or even if string was provided and the +.Ev EXTERROR_VERBOSE +environment variable is present, an additional report is printed. +The report includes at least the category of the error, the name of +the source file (if known by the used version of libc), +the source line number, and parameters. +The format of the printed string is not contractual and might be changed. +.Pp In the case of the .Fn errc , .Fn verrc , diff --git a/share/man/man7/environ.7 b/share/man/man7/environ.7 index 51fb6544fc5a..ada2cc45a650 100644 --- a/share/man/man7/environ.7 +++ b/share/man/man7/environ.7 @@ -114,6 +114,18 @@ A startup list of commands read by .Xr ex 1 and .Xr vi 1 . +.It Ev EXTERROR_VERBOSE +Request the +.Xr err 3 +and +.Xr uexterr_gettext +functions to unconditionally report additional information, +mostly useful for the (kernel) developer to diagnose the issue. +See +.Xr err 3 +and +.Xr exterror 9 +for more details. .It Ev HOME A user's login directory, set by .Xr login 1 @@ -298,6 +310,7 @@ built-in command in .Xr cd 1 , .Xr csh 1 , .Xr env 1 , +.Xr err 3 , .Xr ex 1 , .Xr login 1 , .Xr printenv 1 , @@ -311,7 +324,8 @@ built-in command in .Xr system 3 , .Xr termcap 3 , .Xr termcap 5 , -.Xr simd 7 +.Xr simd 7 , +.Xr exterror 9 .Sh HISTORY The .Nm