From nobody Sun May 12 07:30:28 2024 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 4VcZ605Vnrz5KTnM; Sun, 12 May 2024 07:30:32 +0000 (UTC) (envelope-from SRS0=jN6w=MP=klop.ws=ronald-lists@realworks.nl) Received: from smtp-relay-int.realworks.nl (smtp-relay-int.realworks.nl [194.109.157.24]) (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 mx1.freebsd.org (Postfix) with ESMTPS id 4VcZ603B8mz4Zsb; Sun, 12 May 2024 07:30:32 +0000 (UTC) (envelope-from SRS0=jN6w=MP=klop.ws=ronald-lists@realworks.nl) Authentication-Results: mx1.freebsd.org; none Date: Sun, 12 May 2024 09:30:28 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=klop.ws; s=rw2; t=1715499029; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to; bh=QucQMg2Zyz67OLFgYCgHfO/x8bGM6QGEF57RciLuUMo=; b=bAVkZ8G3ktjkaZSV/xMFriek2NVPNxMCDTOM6mc5oNFdcr/GLlADqvO7EGuB5KM/vM312T ibGndchba01ItgrB0DUG8cMGluEmOZQnUE/rj7DrpxeJJ4MRJXQBBCdnB06uCIU+DjH7DG oIFx67xPqGR6/vNblmzfbw0QuBlidWwT9Zo/GNs87vWOR0kU3/yREnwRbOqur8sq0TQuRa XCeigNb2eR97EK00nNX7Jg0gUvZnuCQbwcSRWQYUxtxHTs53K+NbH7s/NlXcwIyNbT4eBN z7/ROC7Ln14aRNoVOow//HOP5CiNjUDQF6oGsOvloB1POlxCwF71zvx0p6FRMQ== From: Ronald Klop To: Warner Losh Cc: dev-commits-src-main@FreeBSD.org, src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org Message-ID: <1570892010.7412.1715499028011@localhost> In-Reply-To: <202405111916.44BJGJ2I010959@gitrepo.freebsd.org> Subject: Re: git: 9bcc1b18c119 - main - /bin/rmdir: Exit with status 2 for invalid arguments 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: multipart/alternative; boundary="----=_Part_7411_631143796.1715499028007" X-Mailer: Realworks (701.27) Importance: Normal X-Priority: 3 (Normal) X-Spamd-Bar: ---- X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:3265, ipnet:194.109.0.0/16, country:NL] X-Rspamd-Queue-Id: 4VcZ603B8mz4Zsb ------=_Part_7411_631143796.1715499028007 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: quoted-printable Wouldn=E2=80=99t EX_USAGE fit really well? https://man.freebsd.org/cgi/man.cgi?query=3Dsysexits&manpath=3DFreeBSD+4.3-= RELEASE Regards, Ronald Van: Warner Losh Datum: 11 mei 2024 21:16 Aan: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commi= ts-src-main@FreeBSD.org Onderwerp: git: 9bcc1b18c119 - main - /bin/rmdir: Exit with status 2 for i= nvalid arguments >=20 >=20 > The branch main has been updated by imp: >=20 > URL: https://cgit.FreeBSD.org/src/commit/?id=3D9bcc1b18c119148e4455e548c9= 0b2bc9cef16d1b >=20 > commit 9bcc1b18c119148e4455e548c90b2bc9cef16d1b > Author: Henrich Hartzer=20 > AuthorDate: 2024-05-10 17:53:49 +0000 > Commit: Warner Losh=20 > CommitDate: 2024-05-11 19:13:28 +0000 >=20 > /bin/rmdir: Exit with status 2 for invalid arguments > =20 > PR: 277677 > =20 > Signed-off-by: Henrich Hartzer=20 > Reviewed by: imp > Pull Request: https://github.com/freebsd/freebsd-src/pull/1161 > --- > bin/rmdir/rmdir.1 | 15 ++++++++------- > bin/rmdir/rmdir.c | 2 +- > bin/rmdir/tests/rmdir_test.sh | 6 +++--- > 3 files changed, 12 insertions(+), 11 deletions(-) >=20 > diff --git a/bin/rmdir/rmdir.1 b/bin/rmdir/rmdir.1 > index 87ca1f1547f0..eb23c605050c 100644 > --- a/bin/rmdir/rmdir.1 > +++ b/bin/rmdir/rmdir.1 > @@ -74,14 +74,14 @@ The > .Nm > utility exits with one of the following values: > .Bl -tag -width indent > -.It Li 0 > -Each directory entry specified by a > +.It Er 0 > +Each > .Ar directory > -operand > -referred to an empty directory and was removed > -successfully. > -.It Li >0 > -An error occurred. > +referred to an empty directory and was removed successfully. > +.It Er 1 > +An error occurred while attempting to remove one or more directories. > +.It Er 2 > +Invalid arguments. > .El > .Sh EXAMPLES > Remove the directory > @@ -97,6 +97,7 @@ stopping at the first non-empty directory (if any): > .Dl $ rmdir -p cow/horse/monkey > .Sh SEE ALSO > .Xr rm 1 > +.Xr rmdir 2 > .Sh STANDARDS > The > .Nm > diff --git a/bin/rmdir/rmdir.c b/bin/rmdir/rmdir.c > index c5d3db831309..0a495018495c 100644 > --- a/bin/rmdir/rmdir.c > +++ b/bin/rmdir/rmdir.c > @@ -112,5 +112,5 @@ usage(void) > { > =20 > (void)fprintf(stderr, "usage: rmdir [-pv] directory ..."); > - exit(1); > + exit(2); > } > diff --git a/bin/rmdir/tests/rmdir_test.sh b/bin/rmdir/tests/rmdir_test.s= h > index d443849258b6..ba80ac6204be 100644 > --- a/bin/rmdir/tests/rmdir_test.sh > +++ b/bin/rmdir/tests/rmdir_test.sh > @@ -35,8 +35,8 @@ invalid_usage_head() > =20 > invalid_usage_body() > { > - atf_check -s not-exit:0 -e match:"$usage_output" rmdir -p > - atf_check -s not-exit:0 -e match:"$usage_output" rmdir -v > + atf_check -s exit:2 -e match:"$usage_output" rmdir -p > + atf_check -s exit:2 -e match:"$usage_output" rmdir -v > } > =20 > atf_test_case no_arguments > @@ -47,7 +47,7 @@ no_arguments_head() > =20 > no_arguments_body() > { > - atf_check -s not-exit:0 -e match:"$usage_output" rmdir > + atf_check -s exit:2 -e match:"$usage_output" rmdir > } > =20 > atf_init_test_cases() >=20 >=20 >=20 >=20 >=20 ------=_Part_7411_631143796.1715499028007 Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: quoted-printable Wouldn=E2=80=99t EX_USAGE fit really well?

Regards,
Ronald

Van:= Warner Losh <imp@FreeBSD.org>
Datum: 11= mei 2024 21:16
Aan: src-committers@FreeBSD.org, dev-co= mmits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
Onde= rwerp: git: 9bcc1b18c119 - main - /bin/rmdir: Exit with status 2 = for invalid arguments

The branch main has been updated by imp:

URL: https://cgit.FreeBSD.org/src/commit/?id=3D9bcc1b18= c119148e4455e548c90b2bc9cef16d1b

commit 9bcc1b18c119148e4455e548c90b2bc9cef16d1b
Author:     Henrich Hartzer AuthorDate: 2024-05-10 17:53:49 +0000
Commit:     Warner Losh
CommitDate: 2024-05-11 19:13:28 +0000

    /bin/rmdir: Exit with status 2 for invalid argument= s
    
    PR: 277677
    
    Signed-off-by: Henrich Hartzer
    Reviewed by: imp
    Pull Request: https://github.com/freebsd/freebsd-src/pull/1161
---
 bin/rmdir/rmdir.1         &nb= sp;   | 15 ++++++++-------
 bin/rmdir/rmdir.c         &nb= sp;   |  2 +-
 bin/rmdir/tests/rmdir_test.sh |  6 +++---
 3 files changed, 12 insertions(+), 11 deletions(-)

diff --git a/bin/rmdir/rmdir.1 b/bin/rmdir/rmdir.1
index 87ca1f1547f0..eb23c605050c 100644
--- a/bin/rmdir/rmdir.1
+++ b/bin/rmdir/rmdir.1
@@ -74,14 +74,14 @@ The
 .Nm
 utility exits with one of the following values:
 .Bl -tag -width indent
-.It Li 0
-Each directory entry specified by a
+.It Er 0
+Each
 .Ar directory
-operand
-referred to an empty directory and was removed
-successfully.
-.It Li >0
-An error occurred.
+referred to an empty directory and was removed successfully.
+.It Er 1
+An error occurred while attempting to remove one or more directories.
+.It Er 2
+Invalid arguments.
 .El
 .Sh EXAMPLES
 Remove the directory
@@ -97,6 +97,7 @@ stopping at the first non-empty directory (if any):
 .Dl $ rmdir -p cow/horse/monkey
 .Sh SEE ALSO
 .Xr rm 1
+.Xr rmdir 2
 .Sh STANDARDS
 The
 .Nm
diff --git a/bin/rmdir/rmdir.c b/bin/rmdir/rmdir.c
index c5d3db831309..0a495018495c 100644
--- a/bin/rmdir/rmdir.c
+++ b/bin/rmdir/rmdir.c
@@ -112,5 +112,5 @@ usage(void)
 {
 
    (void)fprintf(stderr, "usage: rmdir [-pv] directory= ... ");
-   exit(1);
+   exit(2);
 }
diff --git a/bin/rmdir/tests/rmdir_test.sh b/bin/rmdir/tests/rmdir_test.sh<= br> index d443849258b6..ba80ac6204be 100644
--- a/bin/rmdir/tests/rmdir_test.sh
+++ b/bin/rmdir/tests/rmdir_test.sh
@@ -35,8 +35,8 @@ invalid_usage_head()
 
 invalid_usage_body()
 {
-   atf_check -s not-exit:0 -e match:"$usage_output" rmdir -p
-   atf_check -s not-exit:0 -e match:"$usage_output" rmdir -v
+   atf_check -s exit:2 -e match:"$usage_output" rmdir -p
+   atf_check -s exit:2 -e match:"$usage_output" rmdir -v
 }
 
 atf_test_case no_arguments
@@ -47,7 +47,7 @@ no_arguments_head()
 
 no_arguments_body()
 {
-   atf_check -s not-exit:0 -e match:"$usage_output" rmdir
+   atf_check -s exit:2 -e match:"$usage_output" rmdir
 }
 
 atf_init_test_cases()

<= !-- TextPlainViewer -->



------=_Part_7411_631143796.1715499028007--