From d851d98c815ff4bab61393fad460b9ccb27f34e3 Mon Sep 17 00:00:00 2001 From: Jens Arnold Date: Wed, 5 Jan 2005 00:42:24 +0000 Subject: Fixed some warnings. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@5537 a1c6a512-1295-4272-9138-f99709370657 --- firmware/drivers/fat.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'firmware/drivers/fat.c') diff --git a/firmware/drivers/fat.c b/firmware/drivers/fat.c index c989c86f84..d9f7c3ceaa 100644 --- a/firmware/drivers/fat.c +++ b/firmware/drivers/fat.c @@ -230,6 +230,7 @@ struct bpb static struct bpb fat_bpbs[NUM_VOLUMES]; /* mounted partition info */ static int update_fsinfo(IF_MV_NONVOID(struct bpb* fat_bpb)); +static int flush_fat(IF_MV_NONVOID(struct bpb* fat_bpb)); static int bpb_is_sane(IF_MV_NONVOID(struct bpb* fat_bpb)); static void *cache_fat_sector(IF_MV2(struct bpb* fat_bpb,) int secnum, bool dirty); static int create_dos_name(const unsigned char *name, unsigned char *newname); @@ -483,10 +484,12 @@ int fat_mount(IF_MV2(int volume,) IF_MV2(int drive,) int startsector) #ifdef HAVE_MULTIVOLUME int fat_unmount(int volume, bool flush) { + int rc; struct bpb* fat_bpb = &fat_bpbs[volume]; + if(flush) { - flush_fat(fat_bpb); /* the clean way, while still alive */ + rc = flush_fat(fat_bpb); /* the clean way, while still alive */ } else { /* volume is not accessible any more, e.g. MMC removed */ @@ -502,8 +505,10 @@ int fat_unmount(int volume, bool flush) } } mutex_unlock(&cache_mutex); + rc = 0; } fat_bpb->mounted = false; + return rc; } #endif -- cgit v1.2.3