From: Luis Chamberlain <mcgrof@kernel.org>
To: fstests@vger.kernel.org, johannes.thumshirn@wdc.com
Cc: a.manzanares@samsung.com, p.raghav@samsung.com,
Luis Chamberlain <mcgrof@kernel.org>
Subject: [PATCH v2 2/3] common/btrfs: use $AWK_PROG
Date: Mon, 14 Feb 2022 17:48:44 -0800 [thread overview]
Message-ID: <20220215014845.4164719-3-mcgrof@kernel.org> (raw)
In-Reply-To: <20220215014845.4164719-1-mcgrof@kernel.org>
Use $AWK_PROG instead of just awk in case the preferred awk
program is different.
Signed-off-by: Luis Chamberlain <mcgrof@kernel.org>
---
common/btrfs | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/common/btrfs b/common/btrfs
index 5de926dd..2fdefb18 100644
--- a/common/btrfs
+++ b/common/btrfs
@@ -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:
--
2.34.1
next prev parent reply other threads:[~2022-02-15 1:48 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-02-15 1:48 [PATCH v2 0/3] adjust btrfs/237 uuid heuristics and use AWK_PROG Luis Chamberlain
2022-02-15 1:48 ` [PATCH v2 1/3] btrfs/237: adjust uuid heuristics Luis Chamberlain
2022-02-15 15:51 ` Johannes Thumshirn
2022-02-17 6:25 ` Adam Manzanares
2022-02-15 1:48 ` Luis Chamberlain [this message]
2022-02-15 15:52 ` [PATCH v2 2/3] common/btrfs: use $AWK_PROG Johannes Thumshirn
2022-02-17 6:26 ` Adam Manzanares
2022-02-15 1:48 ` [PATCH v2 3/3] tests/btrfs: use $AWK_PROG instead of awk Luis Chamberlain
2022-02-15 15:52 ` Johannes Thumshirn
2022-02-17 6:29 ` Adam Manzanares
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220215014845.4164719-3-mcgrof@kernel.org \
--to=mcgrof@kernel.org \
--cc=a.manzanares@samsung.com \
--cc=fstests@vger.kernel.org \
--cc=johannes.thumshirn@wdc.com \
--cc=p.raghav@samsung.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox