Remove structec API from debug_menu.c

Change-Id: I6b35bcdc4e676e81faf5353ca01ba4bd728ffb14
This commit is contained in:
Aidan MacDonald 2022-12-01 01:08:13 +00:00
parent 18fc68401c
commit 825ec0b601

View file

@ -29,7 +29,6 @@
#include "menu.h" #include "menu.h"
#include "debug_menu.h" #include "debug_menu.h"
#include "kernel.h" #include "kernel.h"
#include "structec.h"
#include "action.h" #include "action.h"
#include "debug.h" #include "debug.h"
#include "thread.h" #include "thread.h"
@ -1752,10 +1751,16 @@ static bool dbg_identify_info(void)
int fd = creat("/identify_info.bin", 0666); int fd = creat("/identify_info.bin", 0666);
if(fd >= 0) if(fd >= 0)
{ {
const unsigned short *identify_info = ata_get_identify();
#ifdef ROCKBOX_LITTLE_ENDIAN #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 #else
write(fd, ata_get_identify(), SECTOR_SIZE); write(fd, identify_info, SECTOR_SIZE);
#endif #endif
close(fd); close(fd);
} }