From nobody Thu Oct 01 08:09:03 2026 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 4hwPgz6y5Pz6vF22 for ; Thu, 01 Oct 2026 08:09:03 +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 "YR2" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4hwPgz5PfTz4btc for ; Thu, 01 Oct 2026 08:09:03 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1790842143; 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=B13bpa1sCfj+JO4prQ8Gr6Ap+MqPSl7Zd4HuPyOJCj8=; b=xnrVWelapIJxfZkhLg9Kn4gLb0c4FKucM+cdVtZwJVhcnYkNHSB/niUpxBIFlREZKQ2LSj kts1Cm1LlRL1/VKemG1IF/yLz5injMehSHe32BvJWVOOTVdSJUOTY7jrsr7RDQcTIpU7vf 1hZKxNxTrOo7DpksUS5+AycUL0oshwd2vE6zZEzovaKo8IjUXllRS48VPTMGGPQGe4p0hF 4P3qy0TSJ0HR/Qe9DfChlN4TYtaMK1J1oo81azsRxlpc3luVYjjD1iVRzGQsQB7twgNws9 sIJ4WbnZdN748U0g+D5r2MEP3B3eUvQXqZ5InbuZbWRv0yWByqheKzsg1VDrBA== ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1790842143; b=OB+RETZjxM7Uw0VDqf5sP7ZxQhMAd0rQpTEVXNjB55Jfa3ff/w+elAtO+QSxKoBezS8JWg P7dqCoJejnKSB6PH9WY5LHI5vmCSsd/yaKsOsaoonSrG1j8u6AAnEsBQTk1OHzRyG3qZxu 2kykWxTD5oZtj6wLKsE8xX1tadMopu3FOFNt19QjrkIEas2tOPU8Bt8f4YoT44lXxi/QYJ YVwuClkfdB0dRQ6n3IvBLW9BYjMTZsQPMtH1KfShL1sgRacQoHuaSk8IeNpyybt+8WCkjj qw9oU5tVV/T6ZMtLa9rqT/uF12cAMIDc0lKxmKb9/F8ShPS8n0sfrZ1bq7ryqw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1790842143; 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=B13bpa1sCfj+JO4prQ8Gr6Ap+MqPSl7Zd4HuPyOJCj8=; b=kyY3h4REzG4S8iD/YhcRtd/dU1kA8/ohVB5SSHqLf+TP+uVpYnk7R1IKznAeX1+5ixijCQ SNaH7idkT/TUqceBSXH/DRaZlnPWMYeAEcZ22D4EO6L1/O8clPdGJ529fhYp1S8/K+Kk02 kQUYFOUmtVeqrnTMaW+KoXsYc38KmF99086JedeoyTg0WOdSJEu5HSl6uWLbt7dDPK8M0Y N7j7belGosWitDX8J3xys6JULGjPgj7fs7TpRynVmqI3bdEIm8tPoWs0ecdvGjhykEpqrG 4z+ZTGn2lcI3thFm6LfO60kIhlqVrkHeVocI+xxKtXmUH6a95SKiQE1IVSSE3g== 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 4hwPgz4N4wzMff for ; Thu, 01 Oct 2026 08:09:03 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 24322 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 01 Oct 2026 08:09:03 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mateusz Piotrowski <0mp@FreeBSD.org> Subject: git: 1fadced1c869 - stable/14 - sdiff.1: Document exit status and --help 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 List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: 0mp X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 1fadced1c8695631b363bc56a06123bd8111d9bf Auto-Submitted: auto-generated Date: Thu, 01 Oct 2026 08:09:03 +0000 Message-Id: <6abe151f.24322.79b82317@gitrepo.freebsd.org> The branch stable/14 has been updated by 0mp: URL: https://cgit.FreeBSD.org/src/commit/?id=1fadced1c8695631b363bc56a06123bd8111d9bf commit 1fadced1c8695631b363bc56a06123bd8111d9bf Author: Mateusz Piotrowski <0mp@FreeBSD.org> AuthorDate: 2026-09-23 14:19:05 +0000 Commit: Mateusz Piotrowski <0mp@FreeBSD.org> CommitDate: 2026-10-01 08:08:16 +0000 sdiff.1: Document exit status and --help MFC after: 3 days Approved by: bnovkov (mentor) Sponsored by: fme AG Differential Revision: https://reviews.freebsd.org/D59927 (cherry picked from commit 14c7492637ec0644b5bb88da114e8cc76b9bf629) --- usr.bin/sdiff/sdiff.1 | 23 ++++++++++++++++++++++- usr.bin/sdiff/sdiff.c | 1 + 2 files changed, 23 insertions(+), 1 deletion(-) diff --git a/usr.bin/sdiff/sdiff.1 b/usr.bin/sdiff/sdiff.1 index ca6594c6479a..4e43a8c08c28 100644 --- a/usr.bin/sdiff/sdiff.1 +++ b/usr.bin/sdiff/sdiff.1 @@ -3,7 +3,7 @@ .\" Written by Raymond Lai . .\" Public domain. .\" -.Dd February 16, 2024 +.Dd September 23, 2026 .Dt SDIFF 1 .Os .Sh NAME @@ -17,6 +17,8 @@ .Op Fl w Ar width .Ar file1 .Ar file2 +.Nm sdiff +.Fl -help .Sh DESCRIPTION .Nm displays two files side by side, @@ -85,6 +87,8 @@ Print a maximum of .Ar width characters on each line. The default is 130 characters. +.It Fl -help +Print the usage message and exit. .El .Pp Options passed to @@ -153,6 +157,23 @@ Specifies a directory for temporary files to be created. The default is .Pa /tmp . .El +.Sh EXIT STATUS +The +.Nm +utility exits with one of the following values: +.Pp +.Bl -tag -width Ds -offset indent -compact +.It 0 +No differences were found. +.It 1 +Differences were found. +.It >1 +An error occurred. +.El +.Pp +The +.Fl -help +option exits with a status of 0. .Sh SEE ALSO .Xr cmp 1 , .Xr diff 1 , diff --git a/usr.bin/sdiff/sdiff.c b/usr.bin/sdiff/sdiff.c index daa0f43e0b0e..b991699bceb3 100644 --- a/usr.bin/sdiff/sdiff.c +++ b/usr.bin/sdiff/sdiff.c @@ -118,6 +118,7 @@ static struct option longopts[] = { static const char *help_msg[] = { "usage: sdiff [-abdilstW] [-I regexp] [-o outfile] [-w width] file1 file2\n", + " sdiff --help\n", "-l, --left-column: only print the left column for identical lines.", "-o OUTFILE, --output=OUTFILE: interactively merge file1 and file2 into outfile.", "-s, --suppress-common-lines: skip identical lines.",