2007-11-10 Bean <bean123ch@gmail.com>
* fs/ntfs.c (read_block): Fix a bug caused by adjacent blocks.
This commit is contained in:
parent
a87783bfa1
commit
270c237dbe
2 changed files with 7 additions and 4 deletions
|
@ -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>
|
2007-11-10 Vesa Jaaskelainen <chaac@nic.fi>
|
||||||
|
|
||||||
* conf/i386-pc.rmk (pkgdata_MODULES): Added vga.mod.
|
* conf/i386-pc.rmk (pkgdata_MODULES): Added vga.mod.
|
||||||
|
|
|
@ -665,9 +665,6 @@ read_block (struct grub_ntfs_rlst *ctx, char *buf, int num)
|
||||||
if (read_run_list (ctx))
|
if (read_run_list (ctx))
|
||||||
return grub_errno;
|
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;
|
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 (buf)
|
||||||
{
|
{
|
||||||
if (grub_disk_read
|
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))
|
nn * (ctx->comp.spc << BLK_SHR), buf))
|
||||||
return grub_errno;
|
return grub_errno;
|
||||||
buf += nn * (ctx->comp.spc << BLK_SHR);
|
buf += nn * (ctx->comp.spc << BLK_SHR);
|
||||||
|
|
Loading…
Reference in a new issue