From 7758763ef3c0c5002734ac022f2378c0b5070d22 Mon Sep 17 00:00:00 2001 From: Dave Chapman Date: Thu, 15 Dec 2005 08:43:03 +0000 Subject: Little-endian targets: Correctly byte-swap the ATA identify_info data when converting from shorts to chars git-svn-id: svn://svn.rockbox.org/rockbox/trunk@8239 a1c6a512-1295-4272-9138-f99709370657 --- apps/debug_menu.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/debug_menu.c b/apps/debug_menu.c index b9af2f8788..4bb2cfbe75 100644 --- a/apps/debug_menu.c +++ b/apps/debug_menu.c @@ -1525,7 +1525,7 @@ static bool dbg_disk_info(void) switch (page) { case 0: for (i=0; i < 20; i++) - ((unsigned short*)buf)[i]=identify_info[i+27]; + ((unsigned short*)buf)[i]=htobe16(identify_info[i+27]); buf[40]=0; /* kill trailing space */ for (i=39; i && buf[i]==' '; i--) @@ -1536,7 +1536,7 @@ static bool dbg_disk_info(void) case 1: for (i=0; i < 4; i++) - ((unsigned short*)buf)[i]=identify_info[i+23]; + ((unsigned short*)buf)[i]=htobe16(identify_info[i+23]); buf[8]=0; lcd_puts(0, y++, "Firmware"); lcd_puts(0, y++, buf); -- cgit v1.2.3