summaryrefslogtreecommitdiff
path: root/Kernel/Devices/DebugLogDevice.h
blob: 9b09205074210b224bc1c69cbc107d2ec3464dd8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#include <Kernel/Devices/CharacterDevice.h>

class DebugLogDevice final : public CharacterDevice {
public:
    DebugLogDevice();
    virtual ~DebugLogDevice() override;

    static DebugLogDevice& the();

private:
    // ^CharacterDevice
    virtual ssize_t read(FileDescriptor&, byte*, ssize_t) override { return 0; }
    virtual ssize_t write(FileDescriptor&, const byte*, ssize_t) override;
    virtual bool can_write(FileDescriptor&) const override { return true; }
    virtual bool can_read(FileDescriptor&) const override { return true; }
    virtual const char* class_name() const override { return "DebugLogDevice"; }
};