summaryrefslogtreecommitdiff
path: root/firmware
diff options
context:
space:
mode:
authorNils Wallménius <nils@rockbox.org>2007-02-25 15:44:55 +0000
committerNils Wallménius <nils@rockbox.org>2007-02-25 15:44:55 +0000
commite53e67014f93e4d5188620bd2219bc654d533bf4 (patch)
treea59059a23065422731764c44919b02906e402f77 /firmware
parent2906c36df3403b8c8146718beedfc480766a9d6c (diff)
Remove unused code, make comments c-style, make one private function static
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12480 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware')
-rw-r--r--firmware/drivers/fat.c13
-rw-r--r--firmware/export/fat.h9
2 files changed, 7 insertions, 15 deletions
diff --git a/firmware/drivers/fat.c b/firmware/drivers/fat.c
index 5e1124fa3d..e3e1a755cb 100644
--- a/firmware/drivers/fat.c
+++ b/firmware/drivers/fat.c
@@ -221,15 +221,6 @@ static long cluster2sec(IF_MV2(struct bpb* fat_bpb,) long cluster)
+ fat_bpb->firstdatasector;
}
-long fat_startsector(IF_MV_NONVOID(int volume))
-{
-#ifndef HAVE_MULTIVOLUME
- const int volume = 0;
-#endif
- struct bpb* fat_bpb = &fat_bpbs[volume];
- return fat_bpb->startsector;
-}
-
void fat_size(IF_MV2(int volume,) unsigned long* size, unsigned long* free)
{
#ifndef HAVE_MULTIVOLUME
@@ -1353,7 +1344,7 @@ static int add_dir_entry(struct fat_dir* dir,
return 0;
}
-unsigned char char2dos(unsigned char c, int* randomize)
+static unsigned char char2dos(unsigned char c, int* randomize)
{
switch(c)
{
@@ -1829,7 +1820,7 @@ static int free_direntries(struct fat_file* file)
rc = fat_seek(&dir, sector);
if (rc < 0)
return rc * 10 - 7;
-
+
rc = fat_readwrite(&dir, 1, buf, true);
if (rc < 1)
return rc * 10 - 8;
diff --git a/firmware/export/fat.h b/firmware/export/fat.h
index 2680fdf751..0dfd395ea7 100644
--- a/firmware/export/fat.h
+++ b/firmware/export/fat.h
@@ -86,12 +86,13 @@ struct fat_dir
extern void fat_init(void);
extern int fat_mount(IF_MV2(int volume,) IF_MV2(int drive,) long startsector);
extern int fat_unmount(int volume, bool flush);
-extern void fat_size(IF_MV2(int volume,) unsigned long* size, unsigned long* free); // public for info
-extern void fat_recalc_free(IF_MV_NONVOID(int volume)); // public for debug info screen
+extern void fat_size(IF_MV2(int volume,) /* public for info */
+ unsigned long* size,
+ unsigned long* free);
+extern void fat_recalc_free(IF_MV_NONVOID(int volume)); /* public for debug info screen */
extern int fat_create_dir(const char* name,
struct fat_dir* newdir,
struct fat_dir* dir);
-extern long fat_startsector(IF_MV_NONVOID(int volume)); // public for config sector
extern int fat_open(IF_MV2(int volume,)
long cluster,
struct fat_file* ent,
@@ -114,7 +115,7 @@ extern int fat_opendir(IF_MV2(int volume,)
struct fat_dir *ent, unsigned long currdir,
const struct fat_dir *parent_dir);
extern int fat_getnext(struct fat_dir *ent, struct fat_direntry *entry);
-extern unsigned int fat_get_cluster_size(IF_MV_NONVOID(int volume));
+extern unsigned int fat_get_cluster_size(IF_MV_NONVOID(int volume)); /* public for debug info screen */
extern bool fat_ismounted(int volume);
#endif