Changes by: szaka
Update of /cvs/linux-ntfs/ntfsprogs/ntfsprogs
In directory delta357.server4you.de:/tmp/cvs-serv2313/ntfsprogs
Modified Files:
ntfsclone.c
Log Message:
fix 64 bit destination size calculation on Mac OS X
Index: ntfsclone.c
===================================================================
RCS file: /cvs/linux-ntfs/ntfsprogs/ntfsprogs/ntfsclone.c,v
retrieving revision 1.79
retrieving revision 1.80
diff -u -p -r1.79 -r1.80
--- ntfsclone.c 5 Apr 2006 12:43:07 -0000 1.79
+++ ntfsclone.c 15 Jun 2006 18:43:25 -0000 1.80
@@ -1621,11 +1621,14 @@ static void check_dest_free_space(u64 sr
return;
}
- dest_bytes = stvfs.f_bsize * stvfs.f_bfree;
-
+ dest_bytes = (u64)stvfs.f_frsize * stvfs.f_bfree;
+ if (!dest_bytes)
+ dest_bytes = (u64)stvfs.f_bsize * stvfs.f_bfree;
+
if (dest_bytes < src_bytes)
- err_exit("Destination has no enough free space: %llu MB < %llu"
- " MB\n", rounded_up_division(dest_bytes, NTFS_MBYTE),
+ err_exit("Destination doesn't have enough free space: "
+ "%llu MB < %llu MB\n",
+ rounded_up_division(dest_bytes, NTFS_MBYTE),
rounded_up_division(src_bytes, NTFS_MBYTE));
}
|