diff options
| author | Pav Lucistnik <pav@FreeBSD.org> | 2006-05-05 08:52:13 +0000 |
|---|---|---|
| committer | Pav Lucistnik <pav@FreeBSD.org> | 2006-05-05 08:52:13 +0000 |
| commit | 08e703c0f0769af7cea197f9ae9a5f3e4c2b1c27 (patch) | |
| tree | d07e7c9e653ddd3d5fcd5b7645fb87f0e959bd81 /sysutils/ntfsprogs/files/patch-libntfs-attrib.c | |
| parent | Add devel/p5-Term-CallEditor 0.11, a Perl module to invoke an external (diff) | |
- Update to 1.13.0
PR: ports/96744
Submitted by: Martin Matuska <martin@matuska.org>
Notes
Notes:
svn path=/head/; revision=161395
Diffstat (limited to '')
| -rw-r--r-- | sysutils/ntfsprogs/files/patch-libntfs-attrib.c | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/sysutils/ntfsprogs/files/patch-libntfs-attrib.c b/sysutils/ntfsprogs/files/patch-libntfs-attrib.c new file mode 100644 index 000000000000..fabb701b43b7 --- /dev/null +++ b/sysutils/ntfsprogs/files/patch-libntfs-attrib.c @@ -0,0 +1,39 @@ +--- libntfs/attrib.c.orig Fri Feb 24 10:17:49 2006 ++++ libntfs/attrib.c Thu May 4 04:44:07 2006 +@@ -763,7 +763,7 @@ + */ + s64 ntfs_attr_pread(ntfs_attr *na, const s64 pos, s64 count, void *b) + { +- s64 br, to_read, ofs, total, total2; ++ s64 br, old_to_read, to_read, ofs, total, total2; + ntfs_volume *vol; + runlist_element *rl; + +@@ -799,6 +799,7 @@ + if (pos + count > na->data_size) { + if (pos >= na->data_size) + return 0; ++ ntfs_log_trace("trunacting read pos=%lld, na->data_size=%lld, (old) count=%lld\n", pos, na->data_size, count); + count = na->data_size - pos; + } + /* If it is a resident attribute, get the value from the mft record. */ +@@ -887,6 +888,10 @@ + /* It is a real lcn, read it into @dst. */ + to_read = min(count, (rl->length << vol->cluster_size_bits) - + ofs); ++ old_to_read = to_read; ++ to_read = (to_read + 511) / 512 * 512; ++ if(old_to_read != to_read) ++ ntfs_log_trace("adjusted %lld->%lld\n", old_to_read, to_read); + retry: + ntfs_log_trace("Reading 0x%llx bytes from vcn 0x%llx, lcn 0x%llx, " + "ofs 0x%llx.\n", to_read, rl->vcn, rl->lcn, ofs); +@@ -894,6 +899,8 @@ + ofs, to_read, b); + /* If everything ok, update progress counters and continue. */ + if (br > 0) { ++ if(br > old_to_read) ++ br = old_to_read; + total += br; + count -= br; + b = (u8*)b + br; |
