Add ATA serial number to Disk info debug menu

Change-Id: I73cc3d85ac28c7bd090859b6c19a5b67a41cfa04
This commit is contained in:
Vencislav Atanasov 2024-06-23 07:43:12 +03:00 committed by Solomon Peachy
parent 9c458bbb0d
commit 4ea3732bd7

View file

@ -1391,6 +1391,13 @@ static int disk_callback(int btn, struct gui_synclist *lists)
for (i=39; i && buf[i]==' '; i--) for (i=39; i && buf[i]==' '; i--)
buf[i] = 0; buf[i] = 0;
simplelist_addline("Model: %s", buf); simplelist_addline("Model: %s", buf);
for (i=0; i < 10; i++)
((unsigned short*)buf)[i]=htobe16(identify_info[i+10]);
buf[20]=0;
/* kill trailing space */
for (i=19; i && buf[i]==' '; i--)
buf[i] = 0;
simplelist_addline("Serial number: %s", buf);
for (i=0; i < 4; i++) for (i=0; i < 4; i++)
((unsigned short*)buf)[i]=htobe16(identify_info[i+23]); ((unsigned short*)buf)[i]=htobe16(identify_info[i+23]);
buf[8]=0; buf[8]=0;