Kernel: Make /proc/PID/fds display something useful for character devices.

This commit is contained in:
Andreas Kling 2019-01-21 02:33:01 +01:00
commit e6fc84e234
Notes: sideshowbarker 2024-07-19 15:59:33 +09:00
14 changed files with 46 additions and 6 deletions

View file

@ -8,16 +8,18 @@ class SlavePTY final : public TTY {
public:
virtual ~SlavePTY() override;
virtual String tty_name() const override;
void on_master_write(const byte*, size_t);
unsigned index() const { return m_index; }
protected:
virtual void on_tty_write(const byte*, size_t) override;
virtual bool can_write(Process&) const override;
private:
// ^TTY
virtual String tty_name() const override;
virtual void on_tty_write(const byte*, size_t) override;
// ^CharacterDevice
virtual bool can_write(Process&) const override;
virtual const char* class_name() const override { return "SlavePTY"; }
friend class MasterPTY;
SlavePTY(MasterPTY&, unsigned index);