partitions/efi: Fix partition name parsing in GUID partition entry
GUID partition entry defined to have a partition name as 36 UTF-16LE code units. This means that on big-endian platforms ASCII symbols would be read with 0xXX00 efi_char16_t character code. In order to correctly extract ASCII characters from a partition name field we should be converted from 16LE to CPU architecture. The problem exists on all big endian platforms. [ mingo: Minor edits. ] Fixes: eec7ecfe ("genhd, efi: add efi partition metadata to hd_structs") Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Nikolai Merinov <n.merinov@inango-systems.com> Signed-off-by: Ard Biesheuvel <ardb@kernel.org> Signed-off-by: Ingo Molnar <mingo@kernel.org> Link: https://lore.kernel.org/r/20200308080859.21568-29-ardb@kernel.org Link: https://lore.kernel.org/r/797777312.1324734.1582544319435.JavaMail.zimbra@inango-systems.com/
Showing
Please register or sign in to comment