mirror of
https://github.com/wiiu-env/libfat.git
synced 2024-11-26 03:44:15 +01:00
remove unnecessary function
This commit is contained in:
parent
47853a41bb
commit
1c6db0ae1b
@ -340,34 +340,6 @@ int _FAT_close_r (struct _reent *r, int fd) {
|
||||
return ret;
|
||||
}
|
||||
|
||||
sec_t _FAT_Num_Sectors_To_Cache(CACHE* cache, FILE_POSITION position,PARTITION* partition) {
|
||||
uint32_t limit;
|
||||
uint32_t ra_start, ra_end, ra_sectors;
|
||||
|
||||
|
||||
limit = cache->sectorsPerPage;
|
||||
|
||||
ra_start = position.cluster;
|
||||
ra_sectors = - position.sector;
|
||||
|
||||
while (true) {
|
||||
ra_end = ra_start;
|
||||
ra_start = _FAT_fat_nextCluster(partition, ra_end);
|
||||
|
||||
if (ra_start != ra_end + 1)
|
||||
break;
|
||||
|
||||
ra_sectors += partition->sectorsPerCluster;
|
||||
|
||||
if (ra_sectors >= limit)
|
||||
break;
|
||||
}
|
||||
if (ra_sectors > limit) ra_sectors = limit;
|
||||
|
||||
return ra_sectors;
|
||||
|
||||
}
|
||||
|
||||
ssize_t _FAT_read_r (struct _reent *r, int fd, char *ptr, size_t len) {
|
||||
FILE_STRUCT* file = (FILE_STRUCT*) fd;
|
||||
PARTITION* partition;
|
||||
|
Loading…
Reference in New Issue
Block a user