summaryrefslogtreecommitdiff
path: root/firmware/drivers/fat.c
diff options
context:
space:
mode:
authorJens Arnold <amiconn@rockbox.org>2005-01-05 00:42:24 +0000
committerJens Arnold <amiconn@rockbox.org>2005-01-05 00:42:24 +0000
commitd851d98c815ff4bab61393fad460b9ccb27f34e3 (patch)
tree41ca689cc8855cf97c233b8f9299ce3195badb61 /firmware/drivers/fat.c
parent7414687c58ed7a1dab4a04687acceaeb5af8314d (diff)
Fixed some warnings.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@5537 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/drivers/fat.c')
-rw-r--r--firmware/drivers/fat.c7
1 files changed, 6 insertions, 1 deletions
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