On 12/09/2013 05:10 PM, Bernhard Voelker wrote:
> On openSUSE-13.1, I get the above warnings which I didn't in previous
> openSUSE releases.
> 
> Is this a "severe" or an "informational" warning?
> 
> Log attached, fstype is ext4, host is a VirtualBox VM.

It seems the `filefrag -v` format has changed with:
https://git.kernel.org/cgit/fs/ext2/e2fsprogs.git/commit/misc/filefrag.c?id=2508eaa71
The attached should handle both old and new formats.

thanks,
Pádraig.
>From b95aac31803e64c766f4f0a097938366c7e3cee1 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?P=C3=A1draig=20Brady?= <[email protected]>
Date: Wed, 11 Dec 2013 04:42:59 +0000
Subject: [PATCH] tests: avoid warnings due to new filefrag -v format

* tests/cp/sparse-fiemap.sh: Newer versions of filefrag output
more fields, in different orders, so handle that to avoid warnings.
---
 tests/cp/sparse-fiemap.sh |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/tests/cp/sparse-fiemap.sh b/tests/cp/sparse-fiemap.sh
index 47ddf29..59b7db3 100755
--- a/tests/cp/sparse-fiemap.sh
+++ b/tests/cp/sparse-fiemap.sh
@@ -64,7 +64,8 @@ fi
 f()
 {
   sed 's/ [a-z,][a-z,]*$//' $@ \
-    | $AWK '/^ *[0-9]/ {printf "%d %d ", $2, (NF<5 ? $NF : $5) } END {print ""}'
+    | $AWK '/^ *[0-9]/ {printf "%d %d ", $2, (NF>=6 ? $6 : (NF<5 ? $NF : $5)) }
+            END {print ""}'
 }
 
 for i in $(seq 1 2 21); do
-- 
1.7.7.6

Reply via email to