diff options
author | Filipe Manana <fdmanana@suse.com> | 2023-09-22 12:45:01 +0100 |
---|---|---|
committer | Zorro Lang <zlang@kernel.org> | 2023-09-23 22:13:06 +0800 |
commit | 70ff4b82ea80d1f1fecb1fe3e3894323e575cd1d (patch) | |
tree | ac27518a0a2cfee772398918d22d3a2bbbcc9956 | |
parent | d6ac854df754c4fc62062a01457d6d91aa7e2a3a (diff) | |
download | xfstests-dev-70ff4b82ea80d1f1fecb1fe3e3894323e575cd1d.tar.gz |
btrfs: use full subcommand name at _btrfs_get_subvolid()
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 <fdmanana@suse.com>
Reviewed-by: David Disseldorp <ddiss@suse.de>
Reviewed-by: Qu Wenruo <wqu@suse.com>
Signed-off-by: Zorro Lang <zlang@kernel.org>
-rw-r--r-- | common/btrfs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/common/btrfs b/common/btrfs index c9903a413c..62cee209fd 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 <command> [<subcommand>|<option>] |