ladybird/Kernel/Devices/BlockDevice.h

18 lines
429 B
C
Raw Normal View History

2019-02-16 02:52:58 +03:00
#pragma once
#include <Kernel/Devices/Device.h>
#include <Kernel/LinearAddress.h>
2019-02-16 02:52:58 +03:00
class BlockDevice : public Device {
public:
virtual ~BlockDevice() override;
virtual Region* mmap(Process&, LinearAddress preferred_laddr, size_t offset, size_t size) = 0;
2019-02-16 02:52:58 +03:00
protected:
BlockDevice(unsigned major, unsigned minor) : Device(major, minor) { }
private:
virtual bool is_block_device() const final { return true; }
2019-02-16 02:52:58 +03:00
};