diff mbox series

generic/386: Fix _filter_quota_rpt

Message ID 20191201125258765.VFOD.12766.ppp.dion.ne.jp@dmta0006.auone-net.jp (mailing list archive)
State New, archived
Headers show
Series generic/386: Fix _filter_quota_rpt | expand

Commit Message

Kusanagi Kouichi Dec. 1, 2019, 12:52 p.m. UTC
It outputs nothing because of awk errors.

Signed-off-by: Kusanagi Kouichi <slash@ac.auone-net.jp>
---
 tests/generic/386 | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
diff mbox series

Patch

diff --git a/tests/generic/386 b/tests/generic/386
index 462c5869..0c44c80e 100755
--- a/tests/generic/386
+++ b/tests/generic/386
@@ -63,7 +63,7 @@  _require_scratch
 # interested in contains our project name in the first field.  For "df"
 # it contains our project directory in the last field.
 # But if the device name is too long, the "df" output is broke into two
-# lines, the fourth field is not correct, so take $(nf-2) of "df"
+# lines, the fourth field is not correct, so take $(NF-2) of "df"
 _filter_quota_rpt() {
 	awk '
 	BEGIN {
@@ -84,12 +84,12 @@  _filter_quota_rpt() {
 		return result;
 	}
 	{
-		if ($1 =~ proj_name) {
+		if ($1 ~ proj_name) {
 			# this is the "report" output
 			bsize = byte_size($4);
-		} else if ($nf =~ proj_dir) {
+		} else if ($NF ~ proj_dir) {
 			# this is the "df" output
-			bsize = byte_size($(nf-2));
+			bsize = byte_size($(NF-2));
 		} else {
 			next;
 		}