Explorar o código

Kernel: Handle fstat() on sockets

Sergey Bugaev %!s(int64=5) %!d(string=hai) anos
pai
achega
8aef0a0755
Modificáronse 1 ficheiros con 5 adicións e 0 borrados
  1. 5 0
      Kernel/FileSystem/FileDescription.cpp

+ 5 - 0
Kernel/FileSystem/FileDescription.cpp

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