mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 04:47:35 +00:00
Kernel: Don't assume paths of TTYs and pseudo terminals anymore
The obsolete ttyname and ptsname syscalls are removed. LibC doesn't rely on these anymore, and it helps simplifying the Kernel in many places, so it's an overall an improvement. In addition to that, /proc/PID/tty node is removed too as it is not needed anymore by userspace to get the attached TTY of a process, as /dev/tty (which is already a character device) represents that as well.
This commit is contained in:
parent
de7566c2c4
commit
b5ef900ccd
19 changed files with 13 additions and 141 deletions
|
@ -20,7 +20,6 @@ public:
|
|||
virtual ~MasterPTY() override;
|
||||
|
||||
unsigned index() const { return m_index; }
|
||||
KString const& pts_name() const;
|
||||
ErrorOr<size_t> on_slave_write(const UserOrKernelBuffer&, size_t);
|
||||
bool can_write_from_slave() const;
|
||||
void notify_slave_closed(Badge<SlavePTY>);
|
||||
|
@ -29,7 +28,7 @@ public:
|
|||
virtual ErrorOr<NonnullOwnPtr<KString>> pseudo_path(const OpenFileDescription&) const override;
|
||||
|
||||
private:
|
||||
explicit MasterPTY(unsigned index, NonnullOwnPtr<DoubleBuffer> buffer, NonnullOwnPtr<KString> pts_name);
|
||||
explicit MasterPTY(unsigned index, NonnullOwnPtr<DoubleBuffer> buffer);
|
||||
// ^CharacterDevice
|
||||
virtual ErrorOr<size_t> read(OpenFileDescription&, u64, UserOrKernelBuffer&, size_t) override;
|
||||
virtual ErrorOr<size_t> write(OpenFileDescription&, u64, const UserOrKernelBuffer&, size_t) override;
|
||||
|
@ -44,7 +43,6 @@ private:
|
|||
unsigned m_index;
|
||||
bool m_closed { false };
|
||||
NonnullOwnPtr<DoubleBuffer> m_buffer;
|
||||
NonnullOwnPtr<KString> m_pts_name;
|
||||
};
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue