mirror of
https://github.com/RGBCube/serenity
synced 2025-07-28 01:47:34 +00:00
Kernel/Devices: Remove required_mode and device_name methods
These methods are no longer needed because SystemServer is able to populate the DevFS on its own. Device absolute_path no longer assume a path to the /dev location, because it really should not assume any path to a Device node. Because StorageManagement still needs to know the storage name, we declare a virtual method only for StorageDevices to override, but this technique should really be removed later on.
This commit is contained in:
parent
4f04cb98c1
commit
21b6d84ff0
38 changed files with 18 additions and 141 deletions
|
@ -130,9 +130,4 @@ String MasterPTY::absolute_path(const OpenFileDescription&) const
|
|||
return String::formatted("ptm:{}", m_pts_name);
|
||||
}
|
||||
|
||||
String MasterPTY::device_name() const
|
||||
{
|
||||
return String::formatted("{}", minor());
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -28,10 +28,6 @@ public:
|
|||
|
||||
virtual String absolute_path(const OpenFileDescription&) const override;
|
||||
|
||||
// ^Device
|
||||
virtual mode_t required_mode() const override { return 0640; }
|
||||
virtual String device_name() const override;
|
||||
|
||||
private:
|
||||
explicit MasterPTY(unsigned index, NonnullOwnPtr<DoubleBuffer> buffer);
|
||||
// ^CharacterDevice
|
||||
|
|
|
@ -35,10 +35,6 @@ public:
|
|||
|
||||
void notify_master_destroyed(Badge<MasterPTY>, unsigned index);
|
||||
|
||||
// ^Device
|
||||
virtual mode_t required_mode() const override { return 0666; }
|
||||
virtual String device_name() const override { return "ptmx"; }
|
||||
|
||||
private:
|
||||
// ^CharacterDevice
|
||||
virtual StringView class_name() const override { return "PTYMultiplexer"; }
|
||||
|
|
|
@ -107,11 +107,6 @@ KResult SlavePTY::close()
|
|||
return KSuccess;
|
||||
}
|
||||
|
||||
String SlavePTY::device_name() const
|
||||
{
|
||||
return String::formatted("{}", minor());
|
||||
}
|
||||
|
||||
FileBlockerSet& SlavePTY::blocker_set()
|
||||
{
|
||||
return m_master->blocker_set();
|
||||
|
|
|
@ -38,9 +38,6 @@ private:
|
|||
virtual StringView class_name() const override { return "SlavePTY"; }
|
||||
virtual KResult close() override;
|
||||
|
||||
// ^Device
|
||||
virtual String device_name() const override;
|
||||
|
||||
friend class MasterPTY;
|
||||
SlavePTY(MasterPTY&, unsigned index);
|
||||
|
||||
|
|
|
@ -49,9 +49,6 @@ public:
|
|||
void set_default_termios();
|
||||
void hang_up();
|
||||
|
||||
// ^Device
|
||||
virtual mode_t required_mode() const override { return 0620; }
|
||||
|
||||
protected:
|
||||
virtual KResultOr<size_t> on_tty_write(const UserOrKernelBuffer&, size_t) = 0;
|
||||
void set_size(unsigned short columns, unsigned short rows);
|
||||
|
|
|
@ -359,11 +359,6 @@ void VirtualConsole::set_cursor_style(VT::CursorStyle)
|
|||
// Do nothing
|
||||
}
|
||||
|
||||
String VirtualConsole::device_name() const
|
||||
{
|
||||
return String::formatted("tty{}", minor());
|
||||
}
|
||||
|
||||
void VirtualConsole::echo(u8 ch)
|
||||
{
|
||||
m_console_impl.on_input(ch);
|
||||
|
|
|
@ -107,9 +107,6 @@ private:
|
|||
// ^CharacterDevice
|
||||
virtual StringView class_name() const override { return "VirtualConsole"; }
|
||||
|
||||
// ^Device
|
||||
virtual String device_name() const override;
|
||||
|
||||
void set_active(bool);
|
||||
void flush_dirty_lines();
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue