common/xfs: Fix _require_scratch_xfs_shrink bug
[xfstests-dev.git] / common / xfs
index d7f2a0054d4652929bf6b769233e4d0317229761..c5e3942721dbc1cd0b63462b73aa47c568e2ec40 100644 (file)
@@ -820,7 +820,8 @@ _require_scratch_xfs_shrink()
        . $tmp.mkfs
        _scratch_mount
        # here just to check if kernel supports, no need do more extra work
-       local errmsg=$($XFS_GROWFS_PROG -D$((dblocks-1)) "$SCRATCH_MNT" 2>&1)
+       local errmsg
+       errmsg=$($XFS_GROWFS_PROG -D$((dblocks-1)) "$SCRATCH_MNT" 2>&1)
        if [ "$?" -ne 0 ]; then
                echo "$errmsg" | grep 'XFS_IOC_FSGROWFSDATA xfsctl failed: Invalid argument' > /dev/null && \
                        _notrun "kernel does not support shrinking"