pc-bios/s390-ccw: El Torito 16-bit boot image size field workaround
commit869648e87eeb998cc0ede230f3b7aabfdf0eb2dd
authorMaxim Samoylov <max7255@linux.vnet.ibm.com>
Mon, 12 Oct 2015 15:50:20 +0000 (12 17:50 +0200)
committerCornelia Huck <cornelia.huck@de.ibm.com>
Wed, 11 Nov 2015 16:21:39 +0000 (11 17:21 +0100)
tree2a2d75a4c23ec8ac747defaf0ddad4d4b686454a
parentba21f0cca8165c5b284274edd12dc955cf4fb248
pc-bios/s390-ccw: El Torito 16-bit boot image size field workaround

Because of El Torito spec flaw boot image size needs to be verified.

Boot catalog entry size field has 16-bit width, and specifies size
in 512-byte units.

Thus, boot image size cannot exceed 32M.

We actually search for the file to get the file size.

This is done by scanning the ISO directory tree for the ISO block number
and reading the file size from the directory entry.

Signed-off-by: Maxim Samoylov <max7255@linux.vnet.ibm.com>
Reviewed-by: David Hildenbrand <dahi@linux.vnet.ibm.com>
Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
pc-bios/s390-ccw/bootmap.c
pc-bios/s390-ccw/bootmap.h