From nobody Wed Nov 27 14:26:56 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 4Xz1wc5wxWz5fGqB; Wed, 27 Nov 2024 14:26:56 +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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Xz1wc5CNSz4YMk; Wed, 27 Nov 2024 14:26:56 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732717616; 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=JZ9KzRuLtlj6wOwa96+kXZtF/p8NiUYHPxj+hsKnUjk=; b=MhTXKL6bEJ+I5BSwGoqqaUBsIbNJHxH22H8Ec37/TFOB78HduEcmzuwWiArmErBlWas9QO 6iq0Ctu1WLZMC1cPZAQW6S57T04limETR+7KkmdxgVnpl1GOKSiUegQ3vD8/qOfZgghnxv yqjDq0UkqJzJBl/HH+819rfKOMtbICKBsN6cf8ptFm76T/lnIqIvfmCrKLGg2SWMQUzIfa W3G9bidfW9Dsh7G7ea2ngvOxTHq1qH/wIfZ33dGPmnkrs6d98TqqKtERebVIzVrPeE55mQ Ad5zRgKsK3UyR8I956MAUuC4cUY48s1nNWvW4BEj00NfQ9ETFgSLUYUnChtHeQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732717616; 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=JZ9KzRuLtlj6wOwa96+kXZtF/p8NiUYHPxj+hsKnUjk=; b=ZSh245IjngBfoDqHVRW7E5B7MhpiQcOjF33B/zyipHuHVimRzKi3Wo+aTGfXWpdGfSk3Iz xxm64rwUoOE3u0IdJLDuCzCENpbRhMegzeuAD+xOWEvjfxCNq1AmlCcuXgTq6ZLGw3gFlR T8rV1wYKN8+kKv4F2SOJMmC1FjdyABqAhsFyDwjh2yG2sE459CQb6F8PEXAbX6sJEB3jtp HojkAkHOyz0RREgF4rWJuTcC27D0UycPChy/6wZ65SQ6wmSAv5etjONZ0895Tg+OhKRA/s uabBFX72Ui2s+NoV7gs2z0n5mfo1W4IV3RgL+FBkemwWozo3MQz1pYm+c25Hwg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732717616; a=rsa-sha256; cv=none; b=Ni67F+pLqpXuqVf3M1IkU/HVJQmZaDogxo0/ycOMUMMXthWnvTpjl5KcP81yZpnMNtcWbe BQmg9yKE2q/DKQ1rJDkeOZMyE7btNYZ1OjAlAr7cevVcSAbAHQhrsIoI/W4R9FqNQKx+2/ Ma74AnW2m57CUPz/If0rOlV2Q2QYhmo4FluG9B6SLzzmGChkDLbwVjR0qgb3CBvaC7ehYB Vn9WkEh2OMf2AFbs8Aj77zrqPkFzxf7S25Yp2nK6vJuE2P4xI4nxXLZPvpf9J2jxXoiLG0 g/G9fKEXz38j+6etCvlGtI0YZpwkDbKNS4bvaZX0+jqAeJWbZ6Pw4kojmwhTjQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Xz1wc4kQNz1D03; Wed, 27 Nov 2024 14:26:56 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AREQuTN033301; Wed, 27 Nov 2024 14:26:56 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AREQuZv033298; Wed, 27 Nov 2024 14:26:56 GMT (envelope-from git) Date: Wed, 27 Nov 2024 14:26:56 GMT Message-Id: <202411271426.4AREQuZv033298@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mariusz Zaborski Subject: git: 4dd6597a56f8 - main - perror(1): Replace magic exit codes with standard macros 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: oshogbo X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 4dd6597a56f8c7ff03d4f451b612a9e45442c549 Auto-Submitted: auto-generated The branch main has been updated by oshogbo: URL: https://cgit.FreeBSD.org/src/commit/?id=4dd6597a56f8c7ff03d4f451b612a9e45442c549 commit 4dd6597a56f8c7ff03d4f451b612a9e45442c549 Author: Faraz Vahedi AuthorDate: 2024-10-26 18:21:20 +0000 Commit: Mariusz Zaborski CommitDate: 2024-11-27 14:26:51 +0000 perror(1): Replace magic exit codes with standard macros Signed-off-by: Faraz Vahedi Reviewed by: markj, oshogbo MFC after: 1 week Pull Request: https://github.com/freebsd/freebsd-src/pull/1492 --- usr.bin/perror/perror.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/usr.bin/perror/perror.c b/usr.bin/perror/perror.c index 2ef65adf56e2..e2453edc4577 100644 --- a/usr.bin/perror/perror.c +++ b/usr.bin/perror/perror.c @@ -53,20 +53,20 @@ main(int argc, char **argv) errnum = strtol(argv[1], &cp, 0); if (errno != 0) - err(1, NULL); + err(EXIT_FAILURE, NULL); if ((errstr = strerror(errnum)) == NULL) - err(1, NULL); + err(EXIT_FAILURE, NULL); printf("%s\n", errstr); - exit(0); + exit(EXIT_SUCCESS); } static void usage(void) { fprintf(stderr, "usage: perror number\n"); - exit(1); + exit(EXIT_FAILURE); }