mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-06 08:36:15 +00:00
Kernel: Make UserOrKernelBuffer return KResult from read/write/memset
This allows us to simplify a whole bunch of call sites with TRY(). :^)
This commit is contained in:
@@ -154,8 +154,7 @@ KResultOr<size_t> DevFSLinkInode::read_bytes(off_t offset, size_t, UserOrKernelB
|
||||
MutexLocker locker(m_inode_lock);
|
||||
VERIFY(offset == 0);
|
||||
VERIFY(m_link);
|
||||
if (!buffer.write(m_link->characters() + offset, m_link->length()))
|
||||
return EFAULT;
|
||||
TRY(buffer.write(m_link->characters() + offset, m_link->length()));
|
||||
return m_link->length();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user