mirror of
https://github.com/RGBCube/serenity
synced 2025-07-10 12:07:35 +00:00
Kernel: Convert MasterPTY creation to use DoubleBuffer factory
In order to remove the public DoubleBuffer constructor, we need to convert the callers to the factory instead, allowing the caller to observe OOM.
This commit is contained in:
parent
f816abcbad
commit
43f930d3aa
3 changed files with 31 additions and 11 deletions
|
@ -40,7 +40,7 @@ KResultOr<NonnullRefPtr<FileDescription>> PTYMultiplexer::open(int options)
|
|||
if (m_freelist.is_empty())
|
||||
return EBUSY;
|
||||
auto master_index = m_freelist.take_last();
|
||||
auto master = try_create<MasterPTY>(master_index);
|
||||
auto master = MasterPTY::try_create(master_index);
|
||||
if (!master)
|
||||
return ENOMEM;
|
||||
dbgln_if(PTMX_DEBUG, "PTYMultiplexer::open: Vending master {}", master->index());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue