From 0fc6c43728b4223095fe258b32156fcacbfd6deb Mon Sep 17 00:00:00 2001 From: Ingo Weinhold Date: Fri, 11 Apr 2008 03:35:15 +0000 Subject: [PATCH] Resolved TODO: We can check for sockets, now. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24906 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/system/kernel/fs/vfs.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/system/kernel/fs/vfs.cpp b/src/system/kernel/fs/vfs.cpp index 33ec420aef..21bbc3d91b 100644 --- a/src/system/kernel/fs/vfs.cpp +++ b/src/system/kernel/fs/vfs.cpp @@ -4759,8 +4759,9 @@ file_seek(struct file_descriptor *descriptor, off_t pos, int seekType) // some kinds of files are not seekable switch (stat.st_mode & S_IFMT) { case S_IFIFO: + case S_IFSOCK: return ESPIPE; -// TODO: We don't catch sockets here, but they are not seekable either (ESPIPE)! + // The Open Group Base Specs don't mention any file types besides pipes, // fifos, and sockets specially, so we allow seeking them. case S_IFREG: