]> www.infradead.org Git - users/hch/xfstests-dev.git/commitdiff
common/btrfs: use $AWK_PROG
authorLuis Chamberlain <mcgrof@kernel.org>
Tue, 15 Feb 2022 01:48:44 +0000 (17:48 -0800)
committerEryu Guan <guaneryu@gmail.com>
Sun, 20 Feb 2022 16:44:51 +0000 (00:44 +0800)
Use $AWK_PROG instead of just awk in case the preferred awk
program is different.

Signed-off-by: Luis Chamberlain <mcgrof@kernel.org>
Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
Reviewed-by: Adam Manzanares <a.manzanares@samsung.com>
Signed-off-by: Eryu Guan <guaneryu@gmail.com>
common/btrfs

index 5de926dd9bfaa5ae46833a411502c436ac833dd6..2fdefb18b27843811c883abf18cc74e3c92183dc 100644 (file)
@@ -9,7 +9,7 @@ _btrfs_get_subvolid()
        mnt=$1
        name=$2
 
-       $BTRFS_UTIL_PROG sub list $mnt | egrep "\s$name$" | awk '{ print $2 }'
+       $BTRFS_UTIL_PROG sub list $mnt | egrep "\s$name$" | $AWK_PROG '{ print $2 }'
 }
 
 # _require_btrfs_command <command> [<subcommand>|<option>]
@@ -418,7 +418,7 @@ _run_btrfs_balance_start()
 _scratch_btrfs_sectorsize()
 {
        $BTRFS_UTIL_PROG inspect-internal dump-super $SCRATCH_DEV |\
-               grep sectorsize | awk '{print $2}'
+               grep sectorsize | $AWK_PROG '{print $2}'
 }
 
 _btrfs_supports_forget()
@@ -460,7 +460,7 @@ _require_btrfs_sysfs_fsid()
        local fsid
 
        fsid=$($BTRFS_UTIL_PROG filesystem show $TEST_DIR |grep uuid: |\
-              awk '{print $NF}')
+              $AWK_PROG '{print $NF}')
 
        # Check if the kernel has sysfs fsid support.
        # Following kernel patch adds it: