diff options
author | Aidan MacDonald <amachronic@protonmail.com> | 2022-12-01 01:08:13 +0000 |
---|---|---|
committer | Aidan MacDonald <amachronic@protonmail.com> | 2023-10-01 12:10:41 +0100 |
commit | 825ec0b601410740028daea6abd1f6543c74eb2c (patch) | |
tree | 8adaa2371ea6c533586709eb1d95527f32cea4e9 | |
parent | 18fc68401ca075980ea7739df65bcddb9e4a8ef3 (diff) | |
download | rockbox-825ec0b601.tar.gz rockbox-825ec0b601.zip |
Remove structec API from debug_menu.c
Change-Id: I6b35bcdc4e676e81faf5353ca01ba4bd728ffb14
-rw-r--r-- | apps/debug_menu.c | 11 |
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 @@ #include "menu.h" #include "debug_menu.h" #include "kernel.h" -#include "structec.h" #include "action.h" #include "debug.h" #include "thread.h" @@ -1752,10 +1751,16 @@ static bool dbg_identify_info(void) int fd = creat("/identify_info.bin", 0666); if(fd >= 0) { + const unsigned short *identify_info = ata_get_identify(); #ifdef ROCKBOX_LITTLE_ENDIAN - ecwrite(fd, ata_get_identify(), SECTOR_SIZE/2, "s", true); + /* this is a pointer to a driver buffer so we can't modify it */ + for (int i = 0; i < SECTOR_SIZE/2; ++i) + { + unsigned short word = swap16(identify_info[i]); + write(fd, &word, 2); + } #else - write(fd, ata_get_identify(), SECTOR_SIZE); + write(fd, identify_info, SECTOR_SIZE); #endif close(fd); } |