path: root/firmware/export
diff options
authorJens Arnold <>2005-01-03 07:59:49 +0000
committerJens Arnold <>2005-01-03 07:59:49 +0000
commit316ae187aa6fbd6ddced713b46fba847d3e652e1 (patch)
tree797390856dc722f0ee0c0122d97b1b75a8d43374 /firmware/export
parent98ccef267f033fa444a0ca269ec3037a3f7115d7 (diff)
Correct handling of FAT16 root directory when it does not start on a pseudo cluster boundary. Fixed some places where the cluster number can become negative. Significant code cleanup.
git-svn-id: svn:// a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/export')
1 files changed, 4 insertions, 4 deletions
diff --git a/firmware/export/fat.h b/firmware/export/fat.h
index 7150d2b09f..2f1c7be0a8 100644
--- a/firmware/export/fat.h
+++ b/firmware/export/fat.h
@@ -57,10 +57,10 @@ struct fat_file
int sectornum; /* sector number in this cluster */
unsigned int direntry; /* short dir entry index from start of dir */
unsigned int direntries; /* number of dir entries used by this file */
- unsigned int dircluster; /* first cluster of dir */
+ int dircluster; /* first cluster of dir */
bool eof;
- int volume; /* file resides on which volume */
+ int volume; /* file resides on which volume */
@@ -83,7 +83,7 @@ extern int fat_create_dir(const char* name,
struct fat_dir* dir);
extern int fat_startsector(IF_MV_NONVOID(int volume)); // public for config sector
extern int fat_open(IF_MV2(int volume,)
- unsigned int cluster,
+ int cluster,
struct fat_file* ent,
const struct fat_dir* dir);
extern int fat_create_file(const char* name,
@@ -96,7 +96,7 @@ extern int fat_seek(struct fat_file *ent, unsigned int sector );
extern int fat_remove(struct fat_file *ent);
extern int fat_truncate(const struct fat_file *ent);
extern int fat_rename(struct fat_file* file,
- struct fat_dir* dir,
+ struct fat_dir* dir,
const unsigned char* newname,
int size, int attr);