* grub-core/loader/i386/coreboot/chainloader.c (load_segment): Use
right buffer for temporary load.
This commit is contained in:
parent
5460cfeba8
commit
87d62d7d29
2 changed files with 8 additions and 1 deletions
|
@ -1,3 +1,8 @@
|
||||||
|
2013-11-10 Vladimir Serbinenko <phcoder@gmail.com>
|
||||||
|
|
||||||
|
* grub-core/loader/i386/coreboot/chainloader.c (load_segment): Use
|
||||||
|
right buffer for temporary load.
|
||||||
|
|
||||||
2013-11-10 Vladimir Serbinenko <phcoder@gmail.com>
|
2013-11-10 Vladimir Serbinenko <phcoder@gmail.com>
|
||||||
|
|
||||||
* grub-core/loader/i386/coreboot/chainloader.c: Support tianocore.
|
* grub-core/loader/i386/coreboot/chainloader.c: Support tianocore.
|
||||||
|
|
|
@ -162,7 +162,7 @@ load_segment (grub_file_t file, const char *filename,
|
||||||
buf = grub_malloc (*size);
|
buf = grub_malloc (*size);
|
||||||
if (!buf)
|
if (!buf)
|
||||||
return grub_errno;
|
return grub_errno;
|
||||||
if (grub_file_read (file, load_addr, *size)
|
if (grub_file_read (file, buf, *size)
|
||||||
!= (grub_ssize_t) *size)
|
!= (grub_ssize_t) *size)
|
||||||
{
|
{
|
||||||
if (!grub_errno)
|
if (!grub_errno)
|
||||||
|
@ -187,6 +187,8 @@ load_segment (grub_file_t file, const char *filename,
|
||||||
/* ELzmaFinishMode finishMode,
|
/* ELzmaFinishMode finishMode,
|
||||||
ELzmaStatus *status, ISzAlloc *alloc)*/
|
ELzmaStatus *status, ISzAlloc *alloc)*/
|
||||||
grub_free (buf);
|
grub_free (buf);
|
||||||
|
grub_dprintf ("chain", "%x, %x, %x, %x\n",
|
||||||
|
insize, src_len, outsize, dst_len);
|
||||||
if (res != SZ_OK
|
if (res != SZ_OK
|
||||||
|| src_len != insize || dst_len != outsize)
|
|| src_len != insize || dst_len != outsize)
|
||||||
return grub_error (GRUB_ERR_BAD_OS, "decompression failure %d", res);
|
return grub_error (GRUB_ERR_BAD_OS, "decompression failure %d", res);
|
||||||
|
|
Loading…
Reference in a new issue