diff options
| author | Dave Chapman <dave@dchapman.com> | 2005-12-15 08:43:03 +0000 |
|---|---|---|
| committer | Dave Chapman <dave@dchapman.com> | 2005-12-15 08:43:03 +0000 |
| commit | 7758763ef3c0c5002734ac022f2378c0b5070d22 (patch) | |
| tree | c1d3161b1c2f472d4d9abe3d89f8fcc872984645 /apps/debug_menu.c | |
| parent | a6fad74d3249c52d80012eb577fc819d2fac6356 (diff) | |
| download | rockbox-7758763ef3c0c5002734ac022f2378c0b5070d22.zip rockbox-7758763ef3c0c5002734ac022f2378c0b5070d22.tar.gz rockbox-7758763ef3c0c5002734ac022f2378c0b5070d22.tar.bz2 rockbox-7758763ef3c0c5002734ac022f2378c0b5070d22.tar.xz | |
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
Diffstat (limited to 'apps/debug_menu.c')
| -rw-r--r-- | apps/debug_menu.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/apps/debug_menu.c b/apps/debug_menu.c index b9af2f8..4bb2cfb 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); |