diff options
author | Paulo Alcantara <pcacjr@gmail.com> | 2011-08-28 21:40:46 +0000 |
---|---|---|
committer | Paulo Alcantara <pcacjr@gmail.com> | 2011-09-11 04:09:59 +0000 |
commit | c65a32b86a09f997cf443149c0dc9acfb6d20186 (patch) | |
tree | 508519dc3d0bc491e72cd4a3bf909fbf5a1e062f | |
parent | 0c2b2061e6b26d1aaaf188ed18fc669abcd73346 (diff) | |
download | syslinux-c65a32b86a09f997cf443149c0dc9acfb6d20186.tar.gz syslinux-c65a32b86a09f997cf443149c0dc9acfb6d20186.tar.xz syslinux-c65a32b86a09f997cf443149c0dc9acfb6d20186.zip |
ntfs: fix ntfs_read()
lbytes variable wasn't set correctly.
Signed-off-by: Paulo Alcantara <pcacjr@gmail.com>
-rw-r--r-- | 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 82a8f75f..51557eef 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; } |