ladybird/Kernel/BlockDevice.h
Andreas Kling 799177feda Kernel: Make BochsVGADevice a BlockDevice and support mmapping it.
Currently you can only mmap the entire framebuffer.
Using this when starting up the WindowServer gets us yet another step
closer towards it moving into userspace. :^)
2019-02-16 09:57:42 +01:00

16 lines
387 B
C++

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