From 799f6f4ec63e13f2407a6fa1920136553d2e1635 Mon Sep 17 00:00:00 2001 From: Sergey Bugaev Date: Fri, 22 May 2020 19:33:57 +0300 Subject: [PATCH] Kernel: Return ESPIPE when seeking an unseekable This is what Dr. POSIX says it should do. --- Kernel/FileSystem/FileDescription.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Kernel/FileSystem/FileDescription.cpp b/Kernel/FileSystem/FileDescription.cpp index 4de7c7e9f4..cbedbbecb4 100644 --- a/Kernel/FileSystem/FileDescription.cpp +++ b/Kernel/FileSystem/FileDescription.cpp @@ -96,7 +96,7 @@ off_t FileDescription::seek(off_t offset, int whence) { LOCKER(m_lock); if (!m_file->is_seekable()) - return -EINVAL; + return -ESPIPE; off_t new_offset;