From 7478b2396cbf0ab013710685d31dd64c8c950485 Mon Sep 17 00:00:00 2001 From: Erik Larsson Date: Mon, 22 Nov 2010 15:26:27 +0100 Subject: [PATCH] ntfsmove.c: Adapted calls to ntfs_get_size_for_mapping_pairs to the libntfs-3g interface. Note: libntfs-3g has a 'max_size' variable to cap the size calculation, but this variable is frequently set to INT_MAX in the libntfs-3g code itself when there is no desire to limit the size calculation. We will do the same here. --- ntfsprogs/ntfsmove.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ntfsprogs/ntfsmove.c b/ntfsprogs/ntfsmove.c index 03a51653..e5459d19 100644 --- a/ntfsprogs/ntfsmove.c +++ b/ntfsprogs/ntfsmove.c @@ -690,7 +690,7 @@ static s64 move_datarun(ntfs_volume *vol, ntfs_inode *ino, ATTR_RECORD *rec, ntfs_log_info("move %lld,%lld,%lld to %lld,%lld,%lld\n", run->vcn, run->lcn, run->length, to->vcn, to->lcn, to->length); - need_from = ntfs_get_size_for_mapping_pairs(vol, from, 0); + need_from = ntfs_get_size_for_mapping_pairs(vol, from, 0, INT_MAX); ntfs_log_info("orig data run = %d bytes\n", need_from); //ntfs_debug_runlist_dump2(from, 5, "\t"); @@ -704,7 +704,7 @@ static s64 move_datarun(ntfs_volume *vol, ntfs_inode *ino, ATTR_RECORD *rec, //ntfs_debug_runlist_dump2(from, 5, "\t"); - need_to = ntfs_get_size_for_mapping_pairs(vol, from, 0); + need_to = ntfs_get_size_for_mapping_pairs(vol, from, 0, INT_MAX); ntfs_log_info("new data run = %d bytes\n", need_to); need_from = calc_attr_length(rec, need_from);