From c65a32b86a09f997cf443149c0dc9acfb6d20186 Mon Sep 17 00:00:00 2001 From: Paulo Alcantara Date: Sun, 28 Aug 2011 21:40:46 +0000 Subject: [PATCH] ntfs: fix ntfs_read() lbytes variable wasn't set correctly. Signed-off-by: Paulo Alcantara --- core/fs/ntfs/ntfs.c | 7 ++++--- 1 file 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; } -- 2.7.4