summaryrefslogtreecommitdiff
path: root/Kernel/BlockDevice.h
blob: 1a17a201fd864571e1ede0ba591c64918d12196b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#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; }
};