[syslinux:master] ntfs: fix ntfs_read()
syslinux-bot for Paulo Alcantara
pcacjr at gmail.com
Sat Dec 17 21:19:29 PST 2011
Commit-ID: c65a32b86a09f997cf443149c0dc9acfb6d20186
Gitweb: http://www.syslinux.org/commit/c65a32b86a09f997cf443149c0dc9acfb6d20186
Author: Paulo Alcantara <pcacjr at gmail.com>
AuthorDate: Sun, 28 Aug 2011 21:40:46 +0000
Committer: Paulo Alcantara <pcacjr at gmail.com>
CommitDate: Sun, 11 Sep 2011 04:09:59 +0000
ntfs: fix ntfs_read()
lbytes variable wasn't set correctly.
Signed-off-by: Paulo Alcantara <pcacjr at gmail.com>
---
core/fs/ntfs/ntfs.c | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/core/fs/ntfs/ntfs.c b/core/fs/ntfs/ntfs.c
index 82a8f75..51557ee 100644
--- a/core/fs/ntfs/ntfs.c
+++ b/core/fs/ntfs/ntfs.c
@@ -113,7 +113,7 @@ static int ntfs_read(struct fs_info *fs, void *buf, size_t len, uint64_t count,
if (!offset)
offset = (*lcn << clust_byte_shift) % blk_size;
- dprintf("lcn: 0x%X\n", *lcn);
+ dprintf("LCN: 0x%X\n", *lcn);
dprintf("offset: 0x%X\n", offset);
bytes = count; /* bytes to copy */
@@ -124,8 +124,8 @@ static int ntfs_read(struct fs_info *fs, void *buf, size_t len, uint64_t count,
loffset = offset;
offset += count;
} else {
- dprintf("bytes: %u\n", bytes);
- dprintf("bytes left: %u\n", lbytes);
+ dprintf("bytes: %u\n", bytes);
+ dprintf("bytes left: %u\n", lbytes);
/* otherwise, let's copy it partially... */
k = 0;
while (bytes) {
@@ -140,6 +140,7 @@ static int ntfs_read(struct fs_info *fs, void *buf, size_t len, uint64_t count,
if (!data)
goto out;
+ lbytes = bytes;
loffset = offset;
offset = 0;
}
More information about the Syslinux-commits
mailing list