summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAidan MacDonald <amachronic@protonmail.com>2022-12-01 01:08:13 +0000
committerAidan MacDonald <amachronic@protonmail.com>2023-10-01 12:10:41 +0100
commit825ec0b601410740028daea6abd1f6543c74eb2c (patch)
tree8adaa2371ea6c533586709eb1d95527f32cea4e9
parent18fc68401ca075980ea7739df65bcddb9e4a8ef3 (diff)
downloadrockbox-825ec0b601410740028daea6abd1f6543c74eb2c.tar.gz
rockbox-825ec0b601410740028daea6abd1f6543c74eb2c.zip
Remove structec API from debug_menu.c
Change-Id: I6b35bcdc4e676e81faf5353ca01ba4bd728ffb14
-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 }