diff options
author | Michael Sparmann <theseven@rockbox.org> | 2009-10-09 20:36:09 +0000 |
---|---|---|
committer | Michael Sparmann <theseven@rockbox.org> | 2009-10-09 20:36:09 +0000 |
commit | f0a96580ae84cdfbb09db568f296491c699b6a4b (patch) | |
tree | 73d71563c1ab314f322e0fe10fc80c3b7f698ab7 /firmware/storage.c | |
parent | 8e3e5e7a59f741c16eafc5ff0672af2eb1404835 (diff) | |
download | rockbox-f0a96580ae84cdfbb09db568f296491c699b6a4b.tar.gz rockbox-f0a96580ae84cdfbb09db568f296491c699b6a4b.tar.bz2 rockbox-f0a96580ae84cdfbb09db568f296491c699b6a4b.zip |
Core changes to allow storage drivers to do cleanup on shutdown, and iPod Nano 2G shutdown code rework (FS#10668)
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23057 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/storage.c')
-rw-r--r-- | firmware/storage.c | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/firmware/storage.c b/firmware/storage.c index cee7d1cc8b..d6700d1148 100644 --- a/firmware/storage.c +++ b/firmware/storage.c @@ -293,6 +293,35 @@ int storage_soft_reset(void) return rc; } +#ifdef HAVE_STORAGE_FLUSH +int storage_flush(void) +{ + int rc=0; + +#if (CONFIG_STORAGE & STORAGE_ATA) + //if ((rc=ata_flush())) return rc; +#endif + +#if (CONFIG_STORAGE & STORAGE_MMC) + //if ((rc=mmc_flush())) return rc; +#endif + +#if (CONFIG_STORAGE & STORAGE_SD) + //if ((rc=sd_flush())) return rc; +#endif + +#if (CONFIG_STORAGE & STORAGE_NAND) + if ((rc=nand_flush())) return rc; +#endif + +#if (CONFIG_STORAGE & STORAGE_RAMDISK) + //if ((rc=ramdisk_flush())) return rc; +#endif + + return rc; +} +#endif + void storage_spin(void) { #if (CONFIG_STORAGE & STORAGE_ATA) |