mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 23:58:11 +00:00
DevPtsFS: Do not assume there is one of it
Unfortunately, that also means it can no longer inherit from SynthFS.
This commit is contained in:
parent
37cc80fb96
commit
66a0a12435
5 changed files with 188 additions and 45 deletions
|
@ -13,7 +13,7 @@ SlavePTY::SlavePTY(MasterPTY& master, unsigned index)
|
|||
m_tty_name = String::format("/dev/pts/%u", m_index);
|
||||
set_uid(current->process().uid());
|
||||
set_gid(current->process().gid());
|
||||
DevPtsFS::the().register_slave_pty(*this);
|
||||
DevPtsFS::register_slave_pty(*this);
|
||||
set_size(80, 25);
|
||||
}
|
||||
|
||||
|
@ -22,7 +22,7 @@ SlavePTY::~SlavePTY()
|
|||
#ifdef SLAVEPTY_DEBUG
|
||||
dbgprintf("~SlavePTY(%u)\n", m_index);
|
||||
#endif
|
||||
DevPtsFS::the().unregister_slave_pty(*this);
|
||||
DevPtsFS::unregister_slave_pty(*this);
|
||||
}
|
||||
|
||||
String SlavePTY::tty_name() const
|
||||
|
|
|
@ -12,9 +12,6 @@ public:
|
|||
void on_master_write(const u8*, ssize_t);
|
||||
unsigned index() const { return m_index; }
|
||||
|
||||
InodeIdentifier devpts_inode_id() const { return m_devpts_inode_id; }
|
||||
void set_devpts_inode_id(InodeIdentifier inode_id) { m_devpts_inode_id = inode_id; }
|
||||
|
||||
private:
|
||||
// ^TTY
|
||||
virtual String tty_name() const override;
|
||||
|
@ -32,6 +29,5 @@ private:
|
|||
|
||||
RefPtr<MasterPTY> m_master;
|
||||
unsigned m_index;
|
||||
InodeIdentifier m_devpts_inode_id;
|
||||
String m_tty_name;
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue