mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-25 10:22:14 +00:00
The ProcFS is an utter mess currently, so let's start move things that are not related to processes-info. To ensure it's done in a sane manner, we start by duplicating all /proc/ global nodes to the /sys/kernel/ directory, then we will move Userland to use the new directory so the old directory nodes can be removed from the /proc directory.
29 lines
793 B
C++
29 lines
793 B
C++
/*
|
|
* Copyright (c) 2022, Liav A. <liavalb@hotmail.co.il>
|
|
*
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
#include <AK/Types.h>
|
|
#include <Kernel/FileSystem/SysFS/Subsystems/Kernel/GlobalInformation.h>
|
|
#include <Kernel/KBufferBuilder.h>
|
|
#include <Kernel/Library/LockRefPtr.h>
|
|
#include <Kernel/UserOrKernelBuffer.h>
|
|
|
|
namespace Kernel {
|
|
|
|
class SysFSKernelLog final : public SysFSGlobalInformation {
|
|
public:
|
|
virtual StringView name() const override { return "dmesg"sv; }
|
|
static NonnullLockRefPtr<SysFSKernelLog> must_create(SysFSDirectory const& parent_directory);
|
|
|
|
virtual mode_t permissions() const override;
|
|
|
|
private:
|
|
explicit SysFSKernelLog(SysFSDirectory const& parent_directory);
|
|
virtual ErrorOr<void> try_generate(KBufferBuilder& builder) override;
|
|
};
|
|
|
|
}
|