From patchwork Fri Sep 22 11:45:01 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Filipe Manana X-Patchwork-Id: 13395642 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 06A0FC04AAB for ; Fri, 22 Sep 2023 11:45:10 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233802AbjIVLpO (ORCPT ); Fri, 22 Sep 2023 07:45:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33878 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233384AbjIVLpN (ORCPT ); Fri, 22 Sep 2023 07:45:13 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C8CF3100; Fri, 22 Sep 2023 04:45:07 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 8A3FEC433C8; Fri, 22 Sep 2023 11:45:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1695383107; bh=uR/h12H4tUSld//WUy5EjZ19GU8VnbLlJ4DEyzMR6RU=; h=From:To:Cc:Subject:Date:From; b=fL1KyVIzpiZbcx+oZJMeJFD3kkyS7frU8EYI31+LYH5hBUcFvhcz4h16iih9XKHjK AD//V6K3Zi9imUxqKLcWqVm7hPJVmPWf2cNPekhu/iv7aqow+PMS6Dxu5bh9D+Iv+7 yPFZtnXXczK5+0YMUcfqiZEv/i/CMEhEtlboYKnukGV88hxP0claDg+lrol+k+0phk qObxhWp1vs0hci38elr16R7c9DEikrDu952OyG1JzNq44Rs0oWK7F7tTdHgdGL2qgr 6kqHW2JqhaIX9jdF+wNqjGSUPfhXDIbv1dNCBXoudiYRSLwV4lnAFoUK4U8Ie1E2J1 0pVqBgoxe9CFg== From: fdmanana@kernel.org To: fstests@vger.kernel.org Cc: linux-btrfs@vger.kernel.org, Filipe Manana Subject: [PATCH] btrfs: use full subcommand name at _btrfs_get_subvolid() Date: Fri, 22 Sep 2023 12:45:01 +0100 Message-Id: X-Mailer: git-send-email 2.40.1 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-btrfs@vger.kernel.org From: Filipe Manana Avoid using the shortcut "sub" for the "subvolume" command, as this is the standard practice because such shortcuts are not guaranteed to exist in every btrfs-progs release (they may come and go). Also make the variables local. Signed-off-by: Filipe Manana Reviewed-by: David Disseldorp Reviewed-by: Qu Wenruo --- common/btrfs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/common/btrfs b/common/btrfs index c9903a41..62cee209 100644 --- a/common/btrfs +++ b/common/btrfs @@ -6,10 +6,10 @@ _btrfs_get_subvolid() { - mnt=$1 - name=$2 + local mnt=$1 + local name=$2 - $BTRFS_UTIL_PROG sub list $mnt | grep -E "\s$name$" | $AWK_PROG '{ print $2 }' + $BTRFS_UTIL_PROG subvolume list $mnt | grep -E "\s$name$" | $AWK_PROG '{ print $2 }' } # _require_btrfs_command [|