* grub-core/commands/hdparm.c (le16_to_char): Always byte-swap strings.

(grub_ata_strncpy): Likewise.
	(grub_ata_identify): Add missing byteswaps.
This commit is contained in:
Vladimir 'phcoder' Serbinenko 2012-06-06 12:22:32 +02:00
parent 5e3535aee7
commit b7b4ab33ae
3 changed files with 14 additions and 8 deletions

View file

@ -169,7 +169,7 @@ le16_to_char (grub_uint16_t *dest, const grub_uint16_t * src16, unsigned bytes)
{
unsigned i;
for (i = 0; i < bytes / 2; i++)
dest[i] = grub_be_to_cpu16 (src16[i]);
dest[i] = grub_swap_bytes16 (src16[i]);
dest[i] = 0;
return (char *) dest;
}