Kernel: Handle fstat() on sockets

This commit is contained in:
Sergey Bugaev 2019-11-26 18:50:24 +03:00 committed by Andreas Kling
parent b64cee4589
commit 8aef0a0755
Notes: sideshowbarker 2024-07-19 11:04:29 +09:00

View file

@ -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);