mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 19:07:35 +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:
parent
1f2d0d0ad4
commit
0ae8702692
10 changed files with 19 additions and 20 deletions
|
@ -137,11 +137,11 @@ ErrorOr<NonnullOwnPtr<KString>> FIFO::pseudo_path(const OpenFileDescription&) co
|
|||
return KString::formatted("fifo:{}", m_fifo_id);
|
||||
}
|
||||
|
||||
ErrorOr<void> FIFO::stat(::stat& st) const
|
||||
ErrorOr<struct stat> FIFO::stat() const
|
||||
{
|
||||
memset(&st, 0, sizeof(st));
|
||||
struct stat st = {};
|
||||
st.st_mode = S_IFIFO;
|
||||
return {};
|
||||
return st;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue