From 5ac26da78728b04b3192f19efbd361870254ca1b Mon Sep 17 00:00:00 2001 From: Lachlan McIlroy Date: Tue, 15 Jan 2008 14:59:05 +0000 Subject: [PATCH] Fix the file size checks so it works on IRIX too. Merge of master-melb:xfs-cmds:30336a by kenmcd. Fix the file size checks so it works on IRIX too. --- 179 | 4 ++-- 180 | 2 +- 182 | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/179 b/179 index feeddcce..6efb70fb 100644 --- a/179 +++ b/179 @@ -47,8 +47,8 @@ _check_files() # if file is missing then fsync failed if [ -e $file ] then - # if file size is not 32k then fsync failed - if [ `stat -c %s $file` -eq 32768 ] + # if file size is not 32KB then fsync failed + if [ `ls -l $file | tr -s ' ' | cut -d ' ' -f 5` -eq 32768 ] then # if file has non-zero size but no extents then it's contents will be NULLs, bad. if xfs_bmap $file | grep 'no extents' > /dev/null diff --git a/180 b/180 index 5d4247e3..88c8f54e 100644 --- a/180 +++ b/180 @@ -53,7 +53,7 @@ _check_files() if [ -e $file ] then # if file size is not 10MB then sync failed - if [ `stat -c %s $file` -eq 10485760 ] + if [ `ls -l $file | tr -s ' ' | cut -d ' ' -f 5` -eq 10485760 ] then # if file has non-zero size but no extents then it's contents will be NULLs, bad. if xfs_bmap $file | grep 'no extents' > /dev/null diff --git a/182 b/182 index eae05c3e..fdede6dd 100644 --- a/182 +++ b/182 @@ -47,8 +47,8 @@ _check_files() # if file is missing then sync failed if [ -e $file ] then - # if file size is not 10MB then sync failed - if [ `stat -c %s $file` -eq 32768 ] + # if file size is not 32KB then sync failed + if [ `ls -l $file | tr -s ' ' | cut -d ' ' -f 5` -eq 32768 ] then # if file has non-zero size but no extents then it's contents will be NULLs, bad. if xfs_bmap $file | grep 'no extents' > /dev/null -- 2.39.5