From nobody Sun May 12 11:15:05 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 4Vcg5N2K0hz5JLWh for ; Sun, 12 May 2024 11:15:20 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-ej1-x629.google.com (mail-ej1-x629.google.com [IPv6:2a00:1450:4864:20::629]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Vcg5N0ZdCz3xhs for ; Sun, 12 May 2024 11:15:20 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-ej1-x629.google.com with SMTP id a640c23a62f3a-a5a4bc9578cso222394966b.2 for ; Sun, 12 May 2024 04:15:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20230601.gappssmtp.com; s=20230601; t=1715512518; x=1716117318; darn=freebsd.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=c9+1iTCwsCXAPpo4KC6qOGiRWKP5uw6B05NMpqKxAKw=; b=SJadgLHCbvne69ohiO6OQQnHmWGRA3aj8UY0OpFwNxaZy+WvEIAAf8JbKJ1K9KI4fY /kFe+w9n8LebBN8MpeSRndIzHvtx2k3NSVmiPKFHdQEuDMP6pQJAaXuYkVvCLT2Lx/Xo Qcg+ZKR5nJKm1mW9n1q+muqJtc/OCb/Ni74i3BiIPgHYZhZ9bc7JCcorKE1hl3PSFCGq ULEURi9B7eoqWCNFReZAOZCP/klP/Lbt3wjUXHd9KtYKR5abmG4eRJRxspDYFyOfX1hx 8ZA3zXHT+gxurqEvOjDDB5EHLvjX9YLi5eCH2BwZFOEjMSeXJy1445yEglgBc8vlZSLJ EGnw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1715512518; x=1716117318; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=c9+1iTCwsCXAPpo4KC6qOGiRWKP5uw6B05NMpqKxAKw=; b=GsR1k1RqiD+j0lncuyFcLTne6Bspqs7pVB+5pi20iBCtXZfvG6BqneEnLRL94pMwou D4RuTtq7A2NK4S5hcIY/wppSTQIs7XQW26qPhN5xCf1L38+mFihoLd/JUApG34ZSnQSd YI0sdSDIaWgiH31Rk7B+3YA31PfERctizqPF741biMQz7eYQXEwPObZucnxJGu4rBa/m 9B44JTYUwg7r496gW1MRJWjnQsh229UsyXIz5bLl5f60wJT78cwUvUUCrXrQnw3jl8hQ VpeL2a7HXnItHA1y6mUVVEe8dWUX/KsH5zXW86IaykzTAyPTfZoxwYptAlLFUKunQzPR y1uQ== X-Forwarded-Encrypted: i=1; AJvYcCX+X4QtfYK+Npifx8OGpurGE3DX+xDKTOykq4EickspTFhRDEmlqiMwPDJPrwygOr/6yPCqqiVZdYf+QcCiRljhApsmQUeeYojoHsRJaQlw X-Gm-Message-State: AOJu0YyWPphZykxirXHTZOgQuEpOafFI4gxsMfAUQDM91c/2IL/GKe0f 481/67mAIzxjQSwj8RlVGGvxghp5Y4PH/L2nzqNa7iaFlcyBi3GbwOYEomDSTsuU0YctkN6iT27 LN6X1OAh2WLfnOQuNTwh6iMZCbpKOECA+ufRh8w== X-Google-Smtp-Source: AGHT+IEdeyWRtDeOMJBPlWVN1S8MeQDpunSRpFVrfFHg9I+yDpx3fd97bwKmy7eGR/JxOgjmOqE5whapGQawoZyOIwE= X-Received: by 2002:a17:906:f296:b0:a59:cb29:3fa8 with SMTP id a640c23a62f3a-a5a2d53adbbmr769899566b.14.1715512517566; Sun, 12 May 2024 04:15:17 -0700 (PDT) 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 References: <202405111916.44BJGJ2I010959@gitrepo.freebsd.org> <1570892010.7412.1715499028011@localhost> In-Reply-To: <1570892010.7412.1715499028011@localhost> From: Warner Losh Date: Sun, 12 May 2024 05:15:05 -0600 Message-ID: Subject: Re: git: 9bcc1b18c119 - main - /bin/rmdir: Exit with status 2 for invalid arguments To: Ronald Klop Cc: Warner Losh , "" , src-committers , "" Content-Type: multipart/alternative; boundary="00000000000037c1c206183fe2f1" 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:15169, ipnet:2a00:1450::/32, country:US] X-Rspamd-Queue-Id: 4Vcg5N0ZdCz3xhs --00000000000037c1c206183fe2f1 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Sun, May 12, 2024, 1:30=E2=80=AFAM Ronald Klop wr= ote: > Wouldn=E2=80=99t EX_USAGE fit really well? > > > https://man.freebsd.org/cgi/man.cgi?query=3Dsysexits&manpath=3DFreeBSD+4.= 3-RELEASE > Read the pull request. Warner > Regards, > Ronald > > *Van:* Warner Losh > *Datum:* 11 mei 2024 21:16 > *Aan:* src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, > dev-commits-src-main@FreeBSD.org > *Onderwerp:* 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=3D9bcc1b18c119148e4455e548c90b2bc= 9cef16d1b > > 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 arguments > > PR: 277677 > > Signed-off-by: Henrich Hartzer > 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(-) > > 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.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() > > 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() > > ------------------------------ > > > > > --00000000000037c1c206183fe2f1 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


On Sun, May 12, 2024, 1:30=E2=80=AFAM Ronald Klop <= ronald-lists@klop.ws> wrote:=

Read the pull request.

Warner=C2=A0


Regards,
Ronald

Van: Warne= r Losh <imp@FreeBSD.org>
Datum: 11 mei 2024 21:16=
Aan: src-committers@FreeBSD.org, dev-commits-src-all@F= reeBSD.org, dev-commits-src-main@FreeBSD.org
Onderwerp:= git: 9bcc1b18c119 - main - /bin/rmdir: Exit with status 2 for invalid arg= uments

The branch main has been updated by i= mp:

URL: https://cgit.= FreeBSD.org/src/commit/?id=3D9bcc1b18c119148e4455e548c90b2bc9cef16d1b
commit 9bcc1b18c119148e4455e548c90b2bc9cef16d1b
Author: =C2=A0=C2=A0=C2=A0=C2=A0Henrich Hartzer
AuthorDate: 2024-05-10 17:53:49 +0000
Commit: =C2=A0=C2=A0=C2=A0=C2=A0Warner Losh
CommitDate: 2024-05-11 19:13:28 +0000

=C2=A0=C2=A0=C2=A0=C2=A0/bin/rmdir: Exit with status 2 for invalid argument= s
=C2=A0=C2=A0=C2=A0=C2=A0
=C2=A0=C2=A0=C2=A0=C2=A0PR: 277677
=C2=A0=C2=A0=C2=A0=C2=A0
=C2=A0=C2=A0=C2=A0=C2=A0Signed-off-by: Henrich Hartzer
=C2=A0=C2=A0=C2=A0=C2=A0Reviewed by: imp
=C2=A0=C2=A0=C2=A0=C2=A0Pull Request: https://github= .com/freebsd/freebsd-src/pull/1161
---
=C2=A0bin/rmdir/rmdir.1 =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0| 15 ++++++++-------
=C2=A0bin/rmdir/rmdir.c =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0| =C2=A02 +-
=C2=A0bin/rmdir/tests/rmdir_test.sh | =C2=A06 +++---
=C2=A03 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
=C2=A0.Nm
=C2=A0utility exits with one of the following values:
=C2=A0.Bl -tag -width indent
-.It Li 0
-Each directory entry specified by a
+.It Er 0
+Each
=C2=A0.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.
=C2=A0.El
=C2=A0.Sh EXAMPLES
=C2=A0Remove the directory
@@ -97,6 +97,7 @@ stopping at the first non-empty directory (if any):
=C2=A0.Dl $ rmdir -p cow/horse/monkey
=C2=A0.Sh SEE ALSO
=C2=A0.Xr rm 1
+.Xr rmdir 2
=C2=A0.Sh STANDARDS
=C2=A0The
=C2=A0.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)
=C2=A0{
=C2=A0
=C2=A0=C2=A0=C2=A0=C2=A0(void)fprintf(stderr, "usage: rmdir [-pv] dire= ctory ... ");
- =C2=A0=C2=A0exit(1);
+ =C2=A0=C2=A0exit(2);
=C2=A0}
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()
=C2=A0
=C2=A0invalid_usage_body()
=C2=A0{
- =C2=A0=C2=A0atf_check -s not-exit:0 -e match:"$usage_output" rm= dir -p
- =C2=A0=C2=A0atf_check -s not-exit:0 -e match:"$usage_output" rm= dir -v
+ =C2=A0=C2=A0atf_check -s exit:2 -e match:"$usage_output" rmdir = -p
+ =C2=A0=C2=A0atf_check -s exit:2 -e match:"$usage_output" rmdir = -v
=C2=A0}
=C2=A0
=C2=A0atf_test_case no_arguments
@@ -47,7 +47,7 @@ no_arguments_head()
=C2=A0
=C2=A0no_arguments_body()
=C2=A0{
- =C2=A0=C2=A0atf_check -s not-exit:0 -e match:"$usage_output" rm= dir
+ =C2=A0=C2=A0atf_check -s exit:2 -e match:"$usage_output" rmdir<= br> =C2=A0}
=C2=A0
=C2=A0atf_init_test_cases()





--00000000000037c1c206183fe2f1--