[PATCH] generic/386: Fix _filter_quota_rpt

[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]



It outputs nothing because of awk errors.

Signed-off-by: Kusanagi Kouichi <slash@xxxxxxxxxxxxxxx>
---
 tests/generic/386 | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

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;
 		}
-- 
2.24.0




[Index of Archives]     [Linux Filesystems Development]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux