mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-02-27 18:15:10 +00:00
Add a PTY multiplexer (/dev/ptmx) device.
When you open /dev/ptmx, you get a file descriptor pointing to one of the available MasterPTY's. If none are available, you get an EBUSY. This makes it possible to open multiple (up to 4) Terminals. :^) To support this, I also added a CharacterDevice::open() that gets control when VFS is opening a CharacterDevice. This is useful when we want to return a custom FileDescriptor like we do here.
This commit is contained in:
@@ -3,12 +3,11 @@
|
||||
|
||||
CharacterDevice::~CharacterDevice()
|
||||
{
|
||||
ASSERT_NOT_REACHED();
|
||||
}
|
||||
|
||||
RetainPtr<FileDescriptor> CharacterDevice::open(int options)
|
||||
RetainPtr<FileDescriptor> CharacterDevice::open(int& error, int options)
|
||||
{
|
||||
return VFS::the().open(*this, options);
|
||||
return VFS::the().open(*this, error, options);
|
||||
}
|
||||
|
||||
int CharacterDevice::ioctl(Process&, unsigned, unsigned)
|
||||
|
||||
Reference in New Issue
Block a user