From 113fffaa86ca105694dd4da28fc8685350aba947 Mon Sep 17 00:00:00 2001 From: Björn Stenberg Date: Tue, 13 Aug 2002 13:21:55 +0000 Subject: Don't save settings on disk if it has no partition table git-svn-id: svn://svn.rockbox.org/rockbox/trunk@1712 a1c6a512-1295-4272-9138-f99709370657 --- firmware/drivers/fat.c | 5 +++++ firmware/drivers/fat.h | 1 + 2 files changed, 6 insertions(+) (limited to 'firmware/drivers') diff --git a/firmware/drivers/fat.c b/firmware/drivers/fat.c index 7fe011c863..78d0f8ff44 100644 --- a/firmware/drivers/fat.c +++ b/firmware/drivers/fat.c @@ -218,6 +218,11 @@ static int first_sector_of_cluster(int cluster) return (cluster - 2) * fat_bpb.bpb_secperclus + fat_bpb.firstdatasector; } +int fat_startsector(void) +{ + return fat_bpb.startsector; +} + int fat_mount(int startsector) { unsigned char buf[SECTOR_SIZE]; diff --git a/firmware/drivers/fat.h b/firmware/drivers/fat.h index 844864d88b..836d5c6866 100644 --- a/firmware/drivers/fat.h +++ b/firmware/drivers/fat.h @@ -66,6 +66,7 @@ extern int fat_mount(int startsector); extern int fat_create_file(unsigned int currdir, char *name); extern int fat_create_dir(unsigned int currdir, char *name); #endif +extern int fat_startsector(void); extern int fat_open(unsigned int cluster, struct fat_file *ent); extern int fat_read(struct fat_file *ent, int sectorcount, void* buf ); extern int fat_seek(struct fat_file *ent, int sector ); -- cgit v1.2.3