common/rc: fix _get_max_lfs_filesize on 32-bit platforms
[xfstests-dev.git] / common / rc
index eeac13558d0723ebd302c9e046829873f7981252..cf6bc9d5d3f0b1a16faa036abfb8bc763e2aba95 100644 (file)
--- a/common/rc
+++ b/common/rc
@@ -3999,7 +3999,9 @@ _get_max_lfs_filesize()
 {
        case "$(getconf LONG_BIT)" in
        "32")
-               echo $(( ($(getconf PAGE_SIZE) << ($(getconf LONG_BIT) - 1) ) - 1))
+               local ulong_max=$(getconf ULONG_MAX)
+               local page_size=$(getconf PAGE_SIZE)
+               echo $(( ulong_max * page_size ))
                ;;
        "64")
                echo 9223372036854775807