1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-18 02:05:07 +00:00

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

View file

@ -54,6 +54,11 @@ KResult FileDescription::fstat(stat& buffer)
buffer.st_mode = 001000; buffer.st_mode = 001000;
return KSuccess; return KSuccess;
} }
if (is_socket()) {
memset(&buffer, 0, sizeof(buffer));
buffer.st_mode = 0140000;
return KSuccess;
}
if (!m_inode) if (!m_inode)
return KResult(-EBADF); return KResult(-EBADF);