mirror of
https://github.com/RGBCube/serenity
synced 2025-07-10 04:37:35 +00:00
Kernel: Move DiskDevice::block_size() up to BlockDevice
All block devices should have a block size, after all. This defaults to PAGE_SIZE if no size is specified.
This commit is contained in:
parent
52366e3f02
commit
5de483cfbb
11 changed files with 23 additions and 45 deletions
|
@ -84,7 +84,7 @@ const char* FloppyDiskDevice::class_name() const
|
|||
|
||||
FloppyDiskDevice::FloppyDiskDevice(FloppyDiskDevice::DriveType type)
|
||||
: IRQHandler(IRQ_FLOPPY_DRIVE)
|
||||
, DiskDevice(89, (type == FloppyDiskDevice::DriveType::Master) ? 0 : 1)
|
||||
, DiskDevice(89, (type == FloppyDiskDevice::DriveType::Master) ? 0 : 1, BYTES_PER_SECTOR)
|
||||
, m_io_base_addr((type == FloppyDiskDevice::DriveType::Master) ? 0x3F0 : 0x370)
|
||||
{
|
||||
initialize();
|
||||
|
@ -94,11 +94,6 @@ FloppyDiskDevice::~FloppyDiskDevice()
|
|||
{
|
||||
}
|
||||
|
||||
unsigned FloppyDiskDevice::block_size() const
|
||||
{
|
||||
return BYTES_PER_SECTOR;
|
||||
}
|
||||
|
||||
bool FloppyDiskDevice::read_block(unsigned index, u8* data) const
|
||||
{
|
||||
return const_cast<FloppyDiskDevice*>(this)->read_blocks(index, 1, data);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue