mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 12:48:10 +00:00
Kernel: Fix failing in can_read()/can_write()
Now that the SystemMonitor queries which open files can be read and written to, having can_read()/can_write() unconditionally call ASSERT_NOT_REACHED() leads to system crashes when inspecting the WindowServer. Instead, just return true from can_read()/can_write() (indicating that the read()/write() syscalls should not block) and return -EINVAL when trying to actually read from or write to these devices.
This commit is contained in:
parent
fabdc8cdcb
commit
cfdbb712fb
4 changed files with 8 additions and 48 deletions
|
@ -81,23 +81,3 @@ int MBVGADevice::ioctl(FileDescription&, unsigned request, unsigned arg)
|
|||
return -EINVAL;
|
||||
};
|
||||
}
|
||||
|
||||
bool MBVGADevice::can_read(const FileDescription&) const
|
||||
{
|
||||
ASSERT_NOT_REACHED();
|
||||
}
|
||||
|
||||
bool MBVGADevice::can_write(const FileDescription&) const
|
||||
{
|
||||
ASSERT_NOT_REACHED();
|
||||
}
|
||||
|
||||
ssize_t MBVGADevice::read(FileDescription&, u8*, ssize_t)
|
||||
{
|
||||
ASSERT_NOT_REACHED();
|
||||
}
|
||||
|
||||
ssize_t MBVGADevice::write(FileDescription&, const u8*, ssize_t)
|
||||
{
|
||||
ASSERT_NOT_REACHED();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue