From 825ec0b601410740028daea6abd1f6543c74eb2c Mon Sep 17 00:00:00 2001 From: Aidan MacDonald Date: Thu, 1 Dec 2022 01:08:13 +0000 Subject: Remove structec API from debug_menu.c Change-Id: I6b35bcdc4e676e81faf5353ca01ba4bd728ffb14 --- apps/debug_menu.c | 11 ++++++++--- 1 file 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); } -- cgit v1.2.3