summaryrefslogtreecommitdiff
path: root/apps/debug_menu.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/debug_menu.c')
-rw-r--r--apps/debug_menu.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/apps/debug_menu.c b/apps/debug_menu.c
index d80705df13..6794b3fe9f 100644
--- a/apps/debug_menu.c
+++ b/apps/debug_menu.c
@@ -29,7 +29,6 @@
29#include "menu.h" 29#include "menu.h"
30#include "debug_menu.h" 30#include "debug_menu.h"
31#include "kernel.h" 31#include "kernel.h"
32#include "structec.h"
33#include "action.h" 32#include "action.h"
34#include "debug.h" 33#include "debug.h"
35#include "thread.h" 34#include "thread.h"
@@ -1752,10 +1751,16 @@ static bool dbg_identify_info(void)
1752 int fd = creat("/identify_info.bin", 0666); 1751 int fd = creat("/identify_info.bin", 0666);
1753 if(fd >= 0) 1752 if(fd >= 0)
1754 { 1753 {
1754 const unsigned short *identify_info = ata_get_identify();
1755#ifdef ROCKBOX_LITTLE_ENDIAN 1755#ifdef ROCKBOX_LITTLE_ENDIAN
1756 ecwrite(fd, ata_get_identify(), SECTOR_SIZE/2, "s", true); 1756 /* this is a pointer to a driver buffer so we can't modify it */
1757 for (int i = 0; i < SECTOR_SIZE/2; ++i)
1758 {
1759 unsigned short word = swap16(identify_info[i]);
1760 write(fd, &word, 2);
1761 }
1757#else 1762#else
1758 write(fd, ata_get_identify(), SECTOR_SIZE); 1763 write(fd, identify_info, SECTOR_SIZE);
1759#endif 1764#endif
1760 close(fd); 1765 close(fd);
1761 } 1766 }