diff options
Diffstat (limited to 'firmware/common')
-rw-r--r-- | firmware/common/file.c | 14 |
1 files changed, 2 insertions, 12 deletions
diff --git a/firmware/common/file.c b/firmware/common/file.c index 9b88461c63..dd953f44c5 100644 --- a/firmware/common/file.c +++ b/firmware/common/file.c | |||
@@ -337,19 +337,9 @@ static int flush_cache(int fd) | |||
337 | { | 337 | { |
338 | int rc; | 338 | int rc; |
339 | struct filedesc* file = &openfiles[fd]; | 339 | struct filedesc* file = &openfiles[fd]; |
340 | #if 0 | ||
341 | int sector = file->fileoffset / SECTOR_SIZE; | ||
342 | #endif | ||
343 | |||
344 | DEBUGF("Flushing dirty sector cache %x\n", sector); | ||
345 | |||
346 | /* seek back one sector to get file position right */ | ||
347 | #if 0 | ||
348 | rc = fat_seek(&(file->fatfile), sector); | ||
349 | if ( rc < 0 ) | ||
350 | return rc * 10 - 1; | ||
351 | #endif | ||
352 | 340 | ||
341 | DEBUGF("Flushing dirty sector cache\n"); | ||
342 | |||
353 | rc = fat_readwrite(&(file->fatfile), 1, | 343 | rc = fat_readwrite(&(file->fatfile), 1, |
354 | file->cache, true ); | 344 | file->cache, true ); |
355 | if ( rc < 0 ) | 345 | if ( rc < 0 ) |