2009-09-01 Vladimir Serbinenko <phcoder@gmail.com>
* commands/loadenv.c (check_blocklists): Fix off-by-one error. (write_blocklists): Likewise.
This commit is contained in:
parent
3e81e9369b
commit
aa0f752dfe
2 changed files with 7 additions and 2 deletions
|
@ -1,3 +1,8 @@
|
||||||
|
2009-09-01 Vladimir Serbinenko <phcoder@gmail.com>
|
||||||
|
|
||||||
|
* commands/loadenv.c (check_blocklists): Fix off-by-one error.
|
||||||
|
(write_blocklists): Likewise.
|
||||||
|
|
||||||
2009-09-01 Colin Watson <cjwatson@ubuntu.com>
|
2009-09-01 Colin Watson <cjwatson@ubuntu.com>
|
||||||
|
|
||||||
* script/lua/grub_lua.h (fputs): Supply a format string as the first
|
* script/lua/grub_lua.h (fputs): Supply a format string as the first
|
||||||
|
|
|
@ -242,7 +242,7 @@ check_blocklists (grub_envblk_t envblk, struct blocklist *blocklists,
|
||||||
part_start = 0;
|
part_start = 0;
|
||||||
|
|
||||||
buf = grub_envblk_buffer (envblk);
|
buf = grub_envblk_buffer (envblk);
|
||||||
for (p = blocklists, index = 0; p; p = p->next, index += p->length)
|
for (p = blocklists, index = 0; p; index += p->length, p = p->next)
|
||||||
{
|
{
|
||||||
char blockbuf[GRUB_DISK_SECTOR_SIZE];
|
char blockbuf[GRUB_DISK_SECTOR_SIZE];
|
||||||
|
|
||||||
|
@ -278,7 +278,7 @@ write_blocklists (grub_envblk_t envblk, struct blocklist *blocklists,
|
||||||
part_start = 0;
|
part_start = 0;
|
||||||
|
|
||||||
index = 0;
|
index = 0;
|
||||||
for (p = blocklists; p; p = p->next, index += p->length)
|
for (p = blocklists; p; index += p->length, p = p->next)
|
||||||
{
|
{
|
||||||
if (grub_disk_write (disk, p->sector - part_start,
|
if (grub_disk_write (disk, p->sector - part_start,
|
||||||
p->offset, p->length, buf + index))
|
p->offset, p->length, buf + index))
|
||||||
|
|
Loading…
Reference in a new issue