Commit 51f375d6 authored by Committed by Vladimir SerbinenkoBrowse files
efidisk: Respect block_io_protocol buffer alignment
Returned from the OpenProtocol operation, the grub_efi_block_io_media structure contains the io_align field, specifying the minimum alignment required for buffers used in any data transfers with the device. Make grub_efidisk_readwrite() allocate a temporary buffer, aligned to this boundary, if the buffer passed to it does not already meet the requirements. Also sanity check the io_align field in grub_efidisk_open() for power-of-two-ness and bail if invalid.