[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH] bug fix for the ntfs driver
From: |
Bean |
Subject: |
[PATCH] bug fix for the ntfs driver |
Date: |
Thu, 16 Aug 2007 00:26:16 +0800 |
Hi,
This patch fix a bug in the ntfs driver which occurs when accessing
certain compressed files.
--
Bean
2007-08-16 Bean <address@hidden>
* fs/ntfs.c (read_block): Bug fix for compressed files.
Index: fs/ntfs.c
===================================================================
RCS file: /sources/grub/grub2/fs/ntfs.c,v
retrieving revision 1.1
diff -u -p -r1.1 ntfs.c
--- fs/ntfs.c 3 Aug 2007 07:44:01 -0000 1.1
+++ fs/ntfs.c 15 Aug 2007 16:15:48 -0000
@@ -665,9 +665,6 @@ read_block (struct grub_ntfs_rlst *ctx,
if (read_run_list (ctx))
return grub_errno;
}
- if (ctx->target_vcn + 16 < ctx->next_vcn)
- return grub_error (GRUB_ERR_BAD_FS,
- "Compression block should be 16 sector long");
}
nn = (16 - (ctx->target_vcn & 0xF)) / cpb;
@@ -732,7 +729,9 @@ read_block (struct grub_ntfs_rlst *ctx,
if (buf)
{
if (grub_disk_read
- (ctx->comp.disk, ctx->curr_lcn * ctx->comp.spc, 0,
+ (ctx->comp.disk,
+ (ctx->target_vcn - ctx->curr_vcn +
+ ctx->curr_lcn) * ctx->comp.spc, 0,
nn * (ctx->comp.spc << BLK_SHR), buf))
return grub_errno;
buf += nn * (ctx->comp.spc << BLK_SHR);
- [PATCH] bug fix for the ntfs driver,
Bean <=