diff options
author | Frank Gevaerts <frank@gevaerts.be> | 2010-11-28 15:22:51 +0000 |
---|---|---|
committer | Frank Gevaerts <frank@gevaerts.be> | 2010-11-28 15:22:51 +0000 |
commit | 1db3dfdd759476ae4930958ec775fd2009674091 (patch) | |
tree | d3f4ca8200a049ecdad0452ca4bb322e452b2ae6 /firmware/common/file.c | |
parent | 4063389bffe63052da2e78413b0cc1f530733db3 (diff) | |
download | rockbox-1db3dfdd759476ae4930958ec775fd2009674091.tar.gz rockbox-1db3dfdd759476ae4930958ec775fd2009674091.zip |
Accept FS#11774 by Michael Hohmuth (with some own modifications to #ifdef conditions)
Unmount all filesystems before connecting USB. This ensures that all filehandles are closed, which avoids possible filesystem corruption
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28693 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/common/file.c')
-rw-r--r-- | firmware/common/file.c | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/firmware/common/file.c b/firmware/common/file.c index da85846a34..3477c10061 100644 --- a/firmware/common/file.c +++ b/firmware/common/file.c | |||
@@ -793,7 +793,6 @@ off_t filesize(int fd) | |||
793 | } | 793 | } |
794 | 794 | ||
795 | 795 | ||
796 | #ifdef HAVE_HOTSWAP | ||
797 | /* release all file handles on a given volume "by force", to avoid leaks */ | 796 | /* release all file handles on a given volume "by force", to avoid leaks */ |
798 | int release_files(int volume) | 797 | int release_files(int volume) |
799 | { | 798 | { |
@@ -814,4 +813,3 @@ int release_files(int volume) | |||
814 | } | 813 | } |
815 | return closed; /* return how many we did */ | 814 | return closed; /* return how many we did */ |
816 | } | 815 | } |
817 | #endif /* #ifdef HAVE_HOTSWAP */ | ||