Kernel: Add /dev/tty symlink that targets the current tty
This commit is contained in:
@@ -14,7 +14,7 @@ namespace Kernel
|
||||
|
||||
void initialize_device_updater();
|
||||
|
||||
void add_device(BAN::StringView path, BAN::RefPtr<Device>);
|
||||
void add_device(BAN::StringView path, BAN::RefPtr<RamInode>);
|
||||
|
||||
dev_t get_next_dev();
|
||||
|
||||
|
||||
@@ -45,11 +45,15 @@ namespace Kernel
|
||||
|
||||
virtual void update() override;
|
||||
|
||||
protected:
|
||||
virtual BAN::StringView name() const override { return m_name; }
|
||||
|
||||
private:
|
||||
SerialTTY(Serial);
|
||||
bool initialize();
|
||||
|
||||
private:
|
||||
BAN::String m_name;
|
||||
Serial m_serial;
|
||||
|
||||
public:
|
||||
|
||||
@@ -47,6 +47,8 @@ namespace Kernel
|
||||
: CharacterDevice(mode, uid, gid)
|
||||
{ }
|
||||
|
||||
virtual BAN::StringView name() const = 0;
|
||||
|
||||
private:
|
||||
void do_backspace();
|
||||
|
||||
|
||||
@@ -23,6 +23,9 @@ namespace Kernel
|
||||
virtual uint32_t width() const override { return m_width; }
|
||||
virtual void putchar(uint8_t ch) override;
|
||||
|
||||
protected:
|
||||
virtual BAN::StringView name() const override { return m_name; }
|
||||
|
||||
private:
|
||||
VirtualTTY(TerminalDriver*);
|
||||
|
||||
@@ -64,6 +67,8 @@ namespace Kernel
|
||||
};
|
||||
|
||||
private:
|
||||
BAN::String m_name;
|
||||
|
||||
State m_state { State::Normal };
|
||||
AnsiState m_ansi_state { };
|
||||
UTF8State m_utf8_state { };
|
||||
|
||||
Reference in New Issue
Block a user