summaryrefslogtreecommitdiff
path: root/Source/Kernel/FileSystems/FAT/FATFS.class.cpp
diff options
context:
space:
mode:
authorAlexis211 <alexis211@gmail.com>2009-11-28 14:01:27 +0100
committerAlexis211 <alexis211@gmail.com>2009-11-28 14:01:27 +0100
commita913d4c2cb4daf10c0eac4d548fccb26b2a9f099 (patch)
tree6573d49f1cf4a88e8af4a82ee4bf566925233b67 /Source/Kernel/FileSystems/FAT/FATFS.class.cpp
parent4d0939e2853ffd9d49b83524923351f9776866d7 (diff)
downloadMelon-a913d4c2cb4daf10c0eac4d548fccb26b2a9f099.tar.gz
Melon-a913d4c2cb4daf10c0eac4d548fccb26b2a9f099.zip
Fixed some stuff
Diffstat (limited to 'Source/Kernel/FileSystems/FAT/FATFS.class.cpp')
-rw-r--r--Source/Kernel/FileSystems/FAT/FATFS.class.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/Source/Kernel/FileSystems/FAT/FATFS.class.cpp b/Source/Kernel/FileSystems/FAT/FATFS.class.cpp
index 35c18eb..4c20b3f 100644
--- a/Source/Kernel/FileSystems/FAT/FATFS.class.cpp
+++ b/Source/Kernel/FileSystems/FAT/FATFS.class.cpp
@@ -63,12 +63,12 @@ FileSystem* FATFS::mount(Partition* p, DirectoryNode* mountpoint, bool readwrite
}
u32int FATFS::nextCluster(u32int cluster) {
- u8int fat_table[m_part->getBlockSize()];
+ u8int fat_table[m_part->blockSize()];
u32int val;
if (m_fatType == 12) {
u32int fat_offset = cluster + (cluster / 2);
- u32int fat_sector = m_bs.reserved_sector_count + (fat_offset / m_part->getBlockSize());
- u32int ent_offset = fat_offset % m_part->getBlockSize();
+ u32int fat_sector = m_bs.reserved_sector_count + (fat_offset / m_part->blockSize());
+ u32int ent_offset = fat_offset % m_part->blockSize();
m_fatCache.readBlocks(fat_sector, 1, fat_table);
u16int tblval = *(u16int*)&fat_table[ent_offset];
if (cluster & 1) val = tblval >> 4;
@@ -76,16 +76,16 @@ u32int FATFS::nextCluster(u32int cluster) {
if (val >= 0xFF7) val = 0;
} else if (m_fatType == 16) {
u32int fat_offset = cluster * 2;
- u32int fat_sector = m_bs.reserved_sector_count + (fat_offset / m_part->getBlockSize());
- u32int ent_offset = fat_offset % m_part->getBlockSize();
+ u32int fat_sector = m_bs.reserved_sector_count + (fat_offset / m_part->blockSize());
+ u32int ent_offset = fat_offset % m_part->blockSize();
m_fatCache.readBlocks(fat_sector, 1, fat_table);
u16int tblval = *(u16int*)&fat_table[ent_offset];
val = tblval;
if (tblval >= 0xFFF7) val = 0;
} else if (m_fatType == 32) {
u32int fat_offset = cluster * 4;
- u32int fat_sector = m_bs.reserved_sector_count + (fat_offset / m_part->getBlockSize());
- u32int ent_offset = fat_offset % m_part->getBlockSize();
+ u32int fat_sector = m_bs.reserved_sector_count + (fat_offset / m_part->blockSize());
+ u32int ent_offset = fat_offset % m_part->blockSize();
m_fatCache.readBlocks(fat_sector, 1, fat_table);
val = *(u32int*)&fat_table[ent_offset] & 0x0FFFFFFF;
if (val >= 0x0FFFFFF7) val = 0;
@@ -175,7 +175,7 @@ bool FATFS::loadContents(DirectoryNode* dir) {
u32int entries = m_clusterSize / sizeof(fat_dir_entry_t);
if (cluster == 2 and m_fatType != 32) { //This is the value we use for the root directory
- e.c = (u8int*)Mem::alloc(m_rootDirSectors * m_part->getBlockSize());
+ e.c = (u8int*)Mem::alloc(m_rootDirSectors * m_part->blockSize());
if (!m_part->readBlocks(m_firstDataSector, m_rootDirSectors, e.c)) return false;
} else {
e.c = (u8int*)Mem::alloc(m_clusterSize);