mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-05 08:06:09 +00:00
Kernel/FileSystem: Rename logical_block_size -> device_block_size
This never was a logical block size, it always was a device specific block size. Ideally the block size would change in accordance to whatever the driver wants to use, but that is a change for the future. For now, let's get rid of this confusing naming.
This commit is contained in:
committed by
Jelle Raaijmakers
parent
bf1610d378
commit
d1e6e6110d
@@ -31,7 +31,7 @@ ErrorOr<void> FATFS::initialize_while_locked()
|
||||
VERIFY(m_lock.is_locked());
|
||||
VERIFY(!is_initialized_while_locked());
|
||||
|
||||
m_boot_record = TRY(KBuffer::try_create_with_size("FATFS: Boot Record"sv, m_logical_block_size));
|
||||
m_boot_record = TRY(KBuffer::try_create_with_size("FATFS: Boot Record"sv, m_device_block_size));
|
||||
auto boot_record_buffer = UserOrKernelBuffer::for_kernel_buffer(m_boot_record->data());
|
||||
TRY(raw_read(0, boot_record_buffer));
|
||||
|
||||
@@ -62,10 +62,10 @@ ErrorOr<void> FATFS::initialize_while_locked()
|
||||
return EINVAL;
|
||||
}
|
||||
|
||||
m_logical_block_size = boot_record()->bytes_per_sector;
|
||||
set_block_size(m_logical_block_size);
|
||||
m_device_block_size = boot_record()->bytes_per_sector;
|
||||
set_block_size(m_device_block_size);
|
||||
|
||||
u32 root_directory_sectors = ((boot_record()->root_directory_entry_count * sizeof(FATEntry)) + (m_logical_block_size - 1)) / m_logical_block_size;
|
||||
u32 root_directory_sectors = ((boot_record()->root_directory_entry_count * sizeof(FATEntry)) + (m_device_block_size - 1)) / m_device_block_size;
|
||||
m_first_data_sector = boot_record()->reserved_sector_count + (boot_record()->fat_count * boot_record()->sectors_per_fat) + root_directory_sectors;
|
||||
|
||||
TRY(BlockBasedFileSystem::initialize_while_locked());
|
||||
|
||||
Reference in New Issue
Block a user