/* * Copyright (c) 2021-2022, Andreas Kling * * SPDX-License-Identifier: BSD-2-Clause */ #include #include #include namespace Kernel { AnonymousFile::AnonymousFile(NonnullLockRefPtr vmobject) : m_vmobject(move(vmobject)) { } AnonymousFile::~AnonymousFile() = default; ErrorOr> AnonymousFile::vmobject_for_mmap(Process&, Memory::VirtualRange const&, u64& offset, bool) { if (offset != 0) return EINVAL; return m_vmobject; } ErrorOr> AnonymousFile::pseudo_path(OpenFileDescription const&) const { return KString::try_create(":anonymous-file:"sv); } }