From nobody Sat Jul 16 17:27:38 2022 X-Original-To: fs@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 4LlZtM322Cz4X3QH for ; Sat, 16 Jul 2022 17:27:39 +0000 (UTC) (envelope-from bugzilla-noreply@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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4LlZtM20BNz3r7T for ; Sat, 16 Jul 2022 17:27:39 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2610:1c1:1:606c::50:1d]) (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 4LlZtM143LzVGt for ; Sat, 16 Jul 2022 17:27:39 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.5]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id 26GHRdKt036907 for ; Sat, 16 Jul 2022 17:27:39 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from bugzilla@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 26GHRdZW036906 for fs@FreeBSD.org; Sat, 16 Jul 2022 17:27:39 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: bugzilla set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: fs@FreeBSD.org Subject: [Bug 265184] gunion(8) create has exit code 1 on success Date: Sat, 16 Jul 2022 17:27:38 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: bin X-Bugzilla-Version: CURRENT X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: commit-hook@FreeBSD.org X-Bugzilla-Status: In Progress X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: fs@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated List-Id: Filesystems List-Archive: https://lists.freebsd.org/archives/freebsd-fs List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-fs@freebsd.org MIME-Version: 1.0 ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1657992459; 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: in-reply-to:in-reply-to:references:references; bh=oiGOKQl5s0bxrWnCbdcaJFrFCAlYlXbr8NhXOmWSq9Q=; b=K7k+DQNuFpIVTrBWGevMnBqicgLdnpd2Hg+j7zsP5gHAe+nqw2x8epGnyIDoq8B8iW3ysw kqobwF/BtdZOIkGll4zWbes06NF81sgWzUS0lhKJNenmPjZnFiULhyMwtYw3HTwUxKVP6J MTuel6d5xYIcPxwJ8DE0iyO8LaeG8T2+DAB6hI81SmoF7GI8cmi8IuDwY3PS3ER5hcl7hM kJe8v54oxOYpOcOdiuG8aCd1mkP80w0V52g4UcP7/+JcmXj3ukRXKKKpqpvqj+QNccdM51 GZUMYqdnhV6dHDr7+8+FWRfG4A9uG2XF6ndvcwUZ0oUJzOhkrvyg6xeCFfLrTg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1657992459; a=rsa-sha256; cv=none; b=vv1ZoYWGS745pvtiFmECvR+By1tJYSdI/a4nzBCyqY5IqYRcLvGmWOBRlTk65cYbs1w9OC WyBBbI7q2fm4Xoj1DJje6fHbMleVRE+jD6gotSdZn4V27jMfp1WMGPB9sV3yBqkTYipdLJ Xxa+0XyyGsMxqggs/NZ3OKzKMglK5hwsP/Kz9xaG5uJP3wOjq7SVGjfTfLyDGZ+MAdf2mU m8LLbEffw16Y83FMthmAhsnUIYb4whzkBSENrM7rROqonbahMaosyknqe7RITI/ofPDl3p PDtRMIrvit6wJbC79BhznTUPeAbDc2k7qGK2zwRJXvThg0JafQigrAXxyE/jFQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D265184 --- Comment #6 from commit-hook@FreeBSD.org --- A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/src/commit/?id=3D90e29718cffcec987769ccbe393083572= 02c46d5 commit 90e29718cffcec987769ccbe39308357202c46d5 Author: Kirk McKusick AuthorDate: 2022-07-16 17:25:22 +0000 Commit: Kirk McKusick CommitDate: 2022-07-16 17:26:51 +0000 Clarify when GEOM utilities exit with success or failure. Historically, GEOM utilities (gpart(8), gstripe(8), gmirror(8), etc) used the gctl_error() routine to report errors. If they called gctl_error() they would exit with EXIT_FAILURE, otherwise they would return with EXIT_SUCCESS. If they used gctl_error() to output an informational message, for example when run with the -v (verbose) option, they would mistakenly exit with EXIT_FAILURE. A further limitation of the gctl_error() function was that it could only be called once. Messages from any additional calls to gctl_error() would be silently discarded. To resolve these problems a new function, gctl_msg() has been added. It can be called multiple times to output multiple messages. It also has an additional errno argument which should be zero if it is an informational message or an errno value (EINVAL, EBUSY, etc) if it is an error. When done the gctl_post_messages() function should be called to indicate that all messages have been posted. If any of the messages had a non-zero errno, the utility will EXIT_FAILURE. If only informational messages (with zero errno) were posted, the utility will EXIT_SUCCESS. Tested by: Peter Holm PR: 265184 MFC after: 1 week lib/libgeom/geom_ctl.c | 6 ++-- sbin/geom/core/geom.c | 5 +++- sys/geom/geom.h | 2 +- sys/geom/geom_ctl.c | 10 ++++++- sys/geom/union/g_union.c | 75 ++++++++++++++++++++++++++------------------= ---- 5 files changed, 57 insertions(+), 41 deletions(-) --=20 You are receiving this mail because: You are the assignee for the bug.=