mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-05-24 12:08:57 +00:00
Kernel: Make File::stat() & friends return Error<struct stat>
Instead of making the caller provide a stat buffer, let's just return one as a value.
This commit is contained in:
@@ -263,11 +263,11 @@ ErrorOr<void> Socket::shutdown(int how)
|
||||
return {};
|
||||
}
|
||||
|
||||
ErrorOr<void> Socket::stat(::stat& st) const
|
||||
ErrorOr<struct stat> Socket::stat() const
|
||||
{
|
||||
memset(&st, 0, sizeof(st));
|
||||
struct stat st = {};
|
||||
st.st_mode = S_IFSOCK;
|
||||
return {};
|
||||
return st;
|
||||
}
|
||||
|
||||
void Socket::set_connected(bool connected)
|
||||
|
||||
Reference in New Issue
Block a user