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.
This commit is contained in:
Lachlan McIlroy
2008-01-15 14:59:05 +00:00
parent ca74d86f8f
commit 5ac26da787
3 changed files with 5 additions and 5 deletions
+2 -2
View File
@@ -47,8 +47,8 @@ _check_files()
# if file is missing then fsync failed # if file is missing then fsync failed
if [ -e $file ] if [ -e $file ]
then then
# if file size is not 32k then fsync failed # if file size is not 32KB then fsync failed
if [ `stat -c %s $file` -eq 32768 ] if [ `ls -l $file | tr -s ' ' | cut -d ' ' -f 5` -eq 32768 ]
then then
# if file has non-zero size but no extents then it's contents will be NULLs, bad. # 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 if xfs_bmap $file | grep 'no extents' > /dev/null
+1 -1
View File
@@ -53,7 +53,7 @@ _check_files()
if [ -e $file ] if [ -e $file ]
then then
# if file size is not 10MB then sync failed # 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 then
# if file has non-zero size but no extents then it's contents will be NULLs, bad. # 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 if xfs_bmap $file | grep 'no extents' > /dev/null
+2 -2
View File
@@ -47,8 +47,8 @@ _check_files()
# if file is missing then sync failed # if file is missing then sync failed
if [ -e $file ] if [ -e $file ]
then then
# if file size is not 10MB then sync failed # if file size is not 32KB then sync failed
if [ `stat -c %s $file` -eq 32768 ] if [ `ls -l $file | tr -s ' ' | cut -d ' ' -f 5` -eq 32768 ]
then then
# if file has non-zero size but no extents then it's contents will be NULLs, bad. # 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 if xfs_bmap $file | grep 'no extents' > /dev/null