mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-21 20:15:17 +00:00
Kernel: Handle fstat() on sockets
This commit is contained in:
parent
b64cee4589
commit
8aef0a0755
Notes:
sideshowbarker
2024-07-19 11:04:29 +09:00
Author: https://github.com/bugaevc Commit: https://github.com/SerenityOS/serenity/commit/8aef0a07555 Pull-request: https://github.com/SerenityOS/serenity/pull/827
1 changed files with 5 additions and 0 deletions
|
@ -54,6 +54,11 @@ KResult FileDescription::fstat(stat& buffer)
|
|||
buffer.st_mode = 001000;
|
||||
return KSuccess;
|
||||
}
|
||||
if (is_socket()) {
|
||||
memset(&buffer, 0, sizeof(buffer));
|
||||
buffer.st_mode = 0140000;
|
||||
return KSuccess;
|
||||
}
|
||||
|
||||
if (!m_inode)
|
||||
return KResult(-EBADF);
|
||||
|
|
Loading…
Add table
Reference in a new issue