From 4c320380a0a85d23c37aae89478bdafe9c31825e Mon Sep 17 00:00:00 2001 From: Peter D'Hoye Date: Wed, 27 Feb 2008 22:52:18 +0000 Subject: [PATCH] Add ability to dump ata identify info to the debug menu (by amiconn + ifdeffed by me) git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16441 a1c6a512-1295-4272-9138-f99709370657 --- apps/debug_menu.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/apps/debug_menu.c b/apps/debug_menu.c index 8cd1fedf5b..0c316c6366 100644 --- a/apps/debug_menu.c +++ b/apps/debug_menu.c @@ -1874,6 +1874,17 @@ static int disk_callback(int btn, struct gui_synclist *lists) "Cluster size: %d bytes", fat_get_cluster_size(IF_MV(0))); return btn; } + +static bool dbg_identify_info(void) +{ + int fd = creat("/identify_info.bin"); + if(fd >= 0) + { + write(fd, ata_get_identify(), SECTOR_SIZE); + close(fd); + } + return false; +} #endif /* !defined(HAVE_MMC) && !defined(HAVE_HOTSWAP) */ static bool dbg_disk_info(void) { @@ -2386,6 +2397,9 @@ static const struct the_menu_item menuitems[] = { #endif #ifndef SIMULATOR { "View disk info", dbg_disk_info }, +#if !defined(HAVE_MMC) && !defined(HAVE_HOTSWAP) + { "Dump ATA identify info", dbg_identify_info}, +#endif #endif #ifdef HAVE_DIRCACHE { "View dircache info", dbg_dircache_info },