From nobody Fri Mar 22 09:14:11 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 4V1Gq75GnVz5G8gD; Fri, 22 Mar 2024 09:14:11 +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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4V1Gq74kj2z4X7t; Fri, 22 Mar 2024 09:14:11 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1711098851; 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=ody84Jt7z6YAtVl1RKZCbCQOfPRRbHFewezjILrP9I8=; b=urg5un4RDEe16YIVzaS/dTMyEn6H1DoW9m7qWpN7UnuwwsBCsZpF6FceFs9C6ok58W5dzQ W0UuqLSAlqO9j0yApqmzlhCPMZh+r1qevOKJCRmXISJbR8XJTsdQQrw3mRyvixKdpXQzc8 v1WFLNnsIA9XafFfpgfYMYUlyp/Nc+b5scClE6VpZnClYzUHDR/uNZjNnZKKP5QyG7irkA 36L/n/qXzREst9w550hpTzIBLdd7v+69E9HZ1hAVeEcACcklaqLe3OiCOhPuy+tkWxO/Dw WoWt1GXdV43aYRcBhec/A16fG1IdKFU/YyAOWDB+1nWs09EUEMEBQNkLHQoDWA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1711098851; a=rsa-sha256; cv=none; b=YqsAvP/RXMuvcu7ovbJPG0gsEVBD2fMZl55TDHaNlCgwWB/dm+/xKcvodSIzbh2mUKfk/0 anRKh46yuOOYtzdYgZpXIpt0nmnV5kx59VDWZX6rbOIqJwNXyKmBpmAOCnFnX2WiLLaY8W HWL1m+v44Tb7Rps5+M/jmS7a86pGOhzx0ofusS7CoFc3oCvwLwTm6S1zMa62Jl3383B/sW MjhcmMsMa7asNXhGPGKnvf6SmGvQ3d5qf6XBcawHt2X+8i21wpsuwDlLpOhx8ngxQNiV3I L6gELUNXhxMTwN1kaw1nF7YNa/81n7r+L1P3JZlFl7j1AMbbNro1/Tski2s7iQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1711098851; 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=ody84Jt7z6YAtVl1RKZCbCQOfPRRbHFewezjILrP9I8=; b=Z+Mm1iEpiVCiFXq34box42ujH9zkf5lufrUsPJVTn3mDFN3TZZIRRzKmP9gP6jriP0OtOB tNzk7CBOGPhR+I10K5OyQWphlMMUgz31AQ2hhl4F8u0nazNFDzCe/Yccsm+wf1hZdICkM8 1b3oIXvT83Hx8in0jWG2Fk4Zt7pLQ6af6Gro9Qn6Eaifrq7tHWYN6E4MC4rWHRBNABhF8A 3talYig9ZB2w3t6bQxGOJKxxSf0Rpifc5jzrB8X7QQzbXOnTJKAsdgUkUafztfsOySk+OP qfYuzKpxGJAt/8BuIvSMnDPNpbnBlKraG+KUtla8Yh/NXHNAKZBScNHjbC6kBw== 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 4V1Gq74KVSz1CQg; Fri, 22 Mar 2024 09:14:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 42M9EBmx061442; Fri, 22 Mar 2024 09:14:11 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 42M9EBto061439; Fri, 22 Mar 2024 09:14:11 GMT (envelope-from git) Date: Fri, 22 Mar 2024 09:14:11 GMT Message-Id: <202403220914.42M9EBto061439@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dag-Erling =?utf-8?Q?Sm=C3=B8rgrav?= Subject: git: d5d2452bf536 - stable/14 - bectl: Simplify command aliases. 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: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: des X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: d5d2452bf53639ee4ce0570c61e863c03483048b Auto-Submitted: auto-generated The branch stable/14 has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=d5d2452bf53639ee4ce0570c61e863c03483048b commit d5d2452bf53639ee4ce0570c61e863c03483048b Author: Dag-Erling Smørgrav AuthorDate: 2024-03-18 13:49:23 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2024-03-22 08:07:03 +0000 bectl: Simplify command aliases. MFC after: 3 days Reviewed by: kevans Differential Revision: https://reviews.freebsd.org/D44406 (cherry picked from commit a46217ce7d161ce563374899df4d94b6d000138f) --- sbin/bectl/bectl.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/sbin/bectl/bectl.c b/sbin/bectl/bectl.c index 7632540aa7ad..63c3bb369b56 100644 --- a/sbin/bectl/bectl.c +++ b/sbin/bectl/bectl.c @@ -115,7 +115,9 @@ static struct command_map_entry command_map[] = { "mount", bectl_cmd_mount, false }, { "rename", bectl_cmd_rename, false }, { "unjail", bectl_cmd_unjail, false }, + { "ujail", bectl_cmd_unjail, false }, { "unmount", bectl_cmd_unmount, false }, + { "umount", bectl_cmd_unmount, false }, { "check", bectl_cmd_check, true }, }; @@ -571,13 +573,6 @@ main(int argc, char *argv[]) optreset = 1; optind = 1; - /* Handle command aliases */ - if (strcmp(command, "umount") == 0) - command = "unmount"; - - if (strcmp(command, "ujail") == 0) - command = "unjail"; - if ((cmd = get_cmd_info(command)) == NULL) { fprintf(stderr, "Unknown command: %s\n", command); return (usage(false));