2007-11-10 Bean <bean123ch@gmail.com>

* fs/ntfs.c (read_block): Fix a bug caused by adjacent blocks.
This commit is contained in:
robertmh 2007-11-10 20:08:33 +00:00
parent a87783bfa1
commit 270c237dbe
2 changed files with 7 additions and 4 deletions

View file

@ -1,3 +1,7 @@
2007-11-10 Bean <bean123ch@gmail.com>
* fs/ntfs.c (read_block): Fix a bug caused by adjacent blocks.
2007-11-10 Vesa Jaaskelainen <chaac@nic.fi>
* conf/i386-pc.rmk (pkgdata_MODULES): Added vga.mod.

View file

@ -665,9 +665,6 @@ read_block (struct grub_ntfs_rlst *ctx, char *buf, int num)
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, char *buf, int num)
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);