fix 64 bit destination size calculation on Mac OS X

edge.strict_endians
szaka 2006-06-15 18:43:24 +00:00
parent 345247a596
commit f61d45b970
2 changed files with 9 additions and 4 deletions

View File

@ -50,6 +50,8 @@ xx/xx/2006 - 1.13.1-WIP
- configure.ac fix for Cygwin. (Yuval)
- Fix bug with renaming directories with names in DOS and WIN32
namespaces. (Yura)
- ntfsclone: fix 64 bit destination size calculation on Mac OS X
(Mike Bombich, Anton, Szaka)
27/02/2006 - 1.13.0 - Lots and lots and lots of fixes and enhancements.

View File

@ -1621,11 +1621,14 @@ static void check_dest_free_space(u64 src_bytes)
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));
}