mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 03:17: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
|
@ -11,7 +11,6 @@ class DiskDevice : public BlockDevice {
|
|||
public:
|
||||
virtual ~DiskDevice() override;
|
||||
|
||||
virtual unsigned block_size() const = 0;
|
||||
virtual bool read_block(unsigned index, u8*) const = 0;
|
||||
virtual bool write_block(unsigned index, const u8*) = 0;
|
||||
bool read(DiskOffset, unsigned length, u8*) const;
|
||||
|
@ -23,5 +22,5 @@ public:
|
|||
virtual bool is_disk_device() const override { return true; };
|
||||
|
||||
protected:
|
||||
DiskDevice(int major, int minor);
|
||||
DiskDevice(int major, int minor, size_t block_size = 512);
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue