From nobody Wed Sep 23 14:42:41 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 4hqfns4q0gz6t8WS for ; Wed, 23 Sep 2026 14:42:41 +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 4hqfns4BhXz4rXP for ; Wed, 23 Sep 2026 14:42:41 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1790174561; 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=NXsZTFBckTtDuXyiy9xypKot2XJWD2nE6+Ux6GQXH2M=; b=wgg+PiJuD0iMRnAiQJlTvrA8wZ5PW7Vib3Pq9jdI78eqCDb5lVLies518CMjQsIBUlXPOc rnn8lWbGVi+upg1mC8Icyd2mG1AcPYPHhobzO2CeMNpHu3cE6FYHv5lSdwFAxCZm5aZbZW JRcTNdFxaEkqe3GDtSTSWCFE647dhSfLHRWzwxMr6Qkj7ABGfuJZynMHqD6QQ6hQhcczVr pgtcBEExeb/zYqq36R4IF+fR4ey6IV6pxvpGZuLRvnPYYZQzlf9JvyjaANVM9BuQIpagEq 6TNsqQ893K+TUWlWc0kk7VZ/VtCqrOB/OwguqPf1Ufor1yFkfgoQZz/uphWfaA== ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1790174561; b=oVejFgZ3Izq3cnPuWoT8RIyLC8Efhc4pI2OO2j7GURccloNkyUOr4W1mU5c1rY+6qU481A IpmqhPbb68v8mBt9C0//IBJeG/FZWBN6z7M13+Jc6IWDnpxwftN1jnQp2Bzbw5mqFvvZyL OGN6AD4xu7I3YC37WMTT6UkF8KDsCZ/v/vtvu0u8IIcQNzY+m/uxXl+7Tqr/ghn9uX/KmN at9i5TJu5kAROwaNCXxAfxUM5Oj6hTzjYEfsA3IHgrZr9PMoA/2PgOoBmYlQNPJ1uoU85p /4HH9OshHWoV+K3LUzT4U6o3AmGfBA3C0TiZ39JZB3A5UfTpJdKfdiOlW8/aAQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1790174561; 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=NXsZTFBckTtDuXyiy9xypKot2XJWD2nE6+Ux6GQXH2M=; b=nq+esVDnRmwh9eispVNdpmFi67jjF2ABsXFulFtbnUNzh9202UD5ugJaLs+MbkUmjQtVJ1 hkLnC2JD1ejuryWvnHzOOrx+8TLj4WdbOZxqiqGPo1bada7JKlLYcm519K0Tyio3a6/Ij6 q2+aJ4sy4VdDWalw1iGwsb4MDp+X5aYk5SP+ZqFopUO1RvK6LDon2Xy/wuvYpUKy9OUQnr L0j1vvD2jaLOyaIR5pDea21x/Qz76m8LsMU9P5WUOqWT+re5he9+xEiDH0dHLv8DKVLvVG KNq/tlnzKCjA8+gZe5w2h0SF6q6QcR/+VSc8TrN6Jk8SBg2dxe670vQArI6NlQ== 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 4hqfns3F7Kzxw8 for ; Wed, 23 Sep 2026 14:42:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 31369 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 23 Sep 2026 14:42:41 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mateusz Piotrowski <0mp@FreeBSD.org> Subject: git: 14c7492637ec - main - 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/main X-Git-Reftype: branch X-Git-Commit: 14c7492637ec0644b5bb88da114e8cc76b9bf629 Auto-Submitted: auto-generated Date: Wed, 23 Sep 2026 14:42:41 +0000 Message-Id: <6ab3e561.31369.ee9e0a3@gitrepo.freebsd.org> The branch main has been updated by 0mp: URL: https://cgit.FreeBSD.org/src/commit/?id=14c7492637ec0644b5bb88da114e8cc76b9bf629 commit 14c7492637ec0644b5bb88da114e8cc76b9bf629 Author: Mateusz Piotrowski <0mp@FreeBSD.org> AuthorDate: 2026-09-23 14:19:05 +0000 Commit: Mateusz Piotrowski <0mp@FreeBSD.org> CommitDate: 2026-09-23 14:41:57 +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 --- 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 e228ece64331..ced741eec31e 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 b796bb4224a8..628e6cde46d9 100644 --- a/usr.bin/sdiff/sdiff.c +++ b/usr.bin/sdiff/sdiff.c @@ -117,6 +117,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.",