]> git.ipfire.org Git - thirdparty/grub.git/commit
loader/linux: do not pad initrd with zeroes at the end
authorAndrei Borzenkov <arvidjaar@gmail.com>
Thu, 7 May 2015 17:24:24 +0000 (20:24 +0300)
committerAndrei Borzenkov <arvidjaar@gmail.com>
Thu, 7 May 2015 17:24:24 +0000 (20:24 +0300)
commita8c473288d3f0a5e17a903a5121dea1a695dda3b
treeea896ebe16bd92a7a115db7920809a8ce8c6c7e7
parent71783dc9780c1e1897a59ec3273e6259807f47eb
loader/linux: do not pad initrd with zeroes at the end

Syslinux memdisk is using initrd image and needs to know uncompressed
size in advance. For gzip uncompressed size is at the end of compressed
stream. Grub padded each input file to 4 bytes at the end, which means
syslinux got wrong size.

Linux initramfs loader apparently does not care about trailing alignment.
So change code to align beginning of each file instead which atomatically
gives us the correct size for single file.

Reported-By: David Shaw <dshaw@jabberwocky.com>
grub-core/loader/linux.c