mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 18:07:34 +00:00
Kernel: Rename /sys/kernel/variables => /sys/kernel/conf
The name "variables" is a bit awkward and what the directory entries are really about is kernel configuration so let's make it clear with the new name.
This commit is contained in:
parent
3151099b21
commit
751aae77bc
24 changed files with 99 additions and 99 deletions
|
@ -1,10 +1,10 @@
|
|||
/*
|
||||
* Copyright (c) 2022, Liav A. <liavalb@hotmail.co.il>
|
||||
* Copyright (c) 2022-2023, Liav A. <liavalb@hotmail.co.il>
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
#include <Kernel/FileSystem/SysFS/Subsystems/Kernel/Variables/BooleanVariable.h>
|
||||
#include <Kernel/FileSystem/SysFS/Subsystems/Kernel/Configuration/BooleanVariable.h>
|
||||
#include <Kernel/Sections.h>
|
||||
#include <Kernel/Tasks/Process.h>
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2022, Liav A. <liavalb@hotmail.co.il>
|
||||
* Copyright (c) 2022-2023, Liav A. <liavalb@hotmail.co.il>
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
|
@ -1,11 +1,11 @@
|
|||
/*
|
||||
* Copyright (c) 2022, Liav A. <liavalb@hotmail.co.il>
|
||||
* Copyright (c) 2022-2023, Liav A. <liavalb@hotmail.co.il>
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
#include <Kernel/Devices/HID/Management.h>
|
||||
#include <Kernel/FileSystem/SysFS/Subsystems/Kernel/Variables/CapsLockRemap.h>
|
||||
#include <Kernel/FileSystem/SysFS/Subsystems/Kernel/Configuration/CapsLockRemap.h>
|
||||
#include <Kernel/Sections.h>
|
||||
|
||||
namespace Kernel {
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2022, Liav A. <liavalb@hotmail.co.il>
|
||||
* Copyright (c) 2022-2023, Liav A. <liavalb@hotmail.co.il>
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
@ -8,7 +8,7 @@
|
|||
|
||||
#include <AK/RefPtr.h>
|
||||
#include <AK/Types.h>
|
||||
#include <Kernel/FileSystem/SysFS/Subsystems/Kernel/Variables/BooleanVariable.h>
|
||||
#include <Kernel/FileSystem/SysFS/Subsystems/Kernel/Configuration/BooleanVariable.h>
|
||||
#include <Kernel/Library/UserOrKernelBuffer.h>
|
||||
#include <Kernel/Locking/Spinlock.h>
|
||||
|
|
@ -1,10 +1,10 @@
|
|||
/*
|
||||
* Copyright (c) 2022, Liav A. <liavalb@hotmail.co.il>
|
||||
* Copyright (c) 2022-2023, Liav A. <liavalb@hotmail.co.il>
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
#include <Kernel/FileSystem/SysFS/Subsystems/Kernel/Variables/CoredumpDirectory.h>
|
||||
#include <Kernel/FileSystem/SysFS/Subsystems/Kernel/Configuration/CoredumpDirectory.h>
|
||||
#include <Kernel/Sections.h>
|
||||
#include <Kernel/Tasks/Coredump.h>
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2022, Liav A. <liavalb@hotmail.co.il>
|
||||
* Copyright (c) 2022-2023, Liav A. <liavalb@hotmail.co.il>
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
@ -8,7 +8,7 @@
|
|||
|
||||
#include <AK/RefPtr.h>
|
||||
#include <AK/Types.h>
|
||||
#include <Kernel/FileSystem/SysFS/Subsystems/Kernel/Variables/StringVariable.h>
|
||||
#include <Kernel/FileSystem/SysFS/Subsystems/Kernel/Configuration/StringVariable.h>
|
||||
#include <Kernel/Library/UserOrKernelBuffer.h>
|
||||
|
||||
namespace Kernel {
|
|
@ -0,0 +1,36 @@
|
|||
/*
|
||||
* Copyright (c) 2022-2023, Liav A. <liavalb@hotmail.co.il>
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
#include <AK/Error.h>
|
||||
#include <AK/Try.h>
|
||||
#include <Kernel/FileSystem/SysFS/Component.h>
|
||||
#include <Kernel/FileSystem/SysFS/Subsystems/Kernel/Configuration/CapsLockRemap.h>
|
||||
#include <Kernel/FileSystem/SysFS/Subsystems/Kernel/Configuration/CoredumpDirectory.h>
|
||||
#include <Kernel/FileSystem/SysFS/Subsystems/Kernel/Configuration/Directory.h>
|
||||
#include <Kernel/FileSystem/SysFS/Subsystems/Kernel/Configuration/DumpKmallocStack.h>
|
||||
#include <Kernel/FileSystem/SysFS/Subsystems/Kernel/Configuration/UBSANDeadly.h>
|
||||
|
||||
namespace Kernel {
|
||||
|
||||
UNMAP_AFTER_INIT NonnullRefPtr<SysFSKernelConfigurationDirectory> SysFSKernelConfigurationDirectory::must_create(SysFSDirectory const& parent_directory)
|
||||
{
|
||||
auto global_variables_directory = adopt_ref_if_nonnull(new (nothrow) SysFSKernelConfigurationDirectory(parent_directory)).release_nonnull();
|
||||
MUST(global_variables_directory->m_child_components.with([&](auto& list) -> ErrorOr<void> {
|
||||
list.append(SysFSCapsLockRemap::must_create(*global_variables_directory));
|
||||
list.append(SysFSDumpKmallocStacks::must_create(*global_variables_directory));
|
||||
list.append(SysFSUBSANDeadly::must_create(*global_variables_directory));
|
||||
list.append(SysFSCoredumpDirectory::must_create(*global_variables_directory));
|
||||
return {};
|
||||
}));
|
||||
return global_variables_directory;
|
||||
}
|
||||
|
||||
UNMAP_AFTER_INIT SysFSKernelConfigurationDirectory::SysFSKernelConfigurationDirectory(SysFSDirectory const& parent_directory)
|
||||
: SysFSDirectory(parent_directory)
|
||||
{
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,24 @@
|
|||
/*
|
||||
* Copyright (c) 2021-2023, Liav A. <liavalb@hotmail.co.il>
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <AK/Types.h>
|
||||
#include <Kernel/FileSystem/SysFS/Component.h>
|
||||
#include <Kernel/FileSystem/SysFS/RootDirectory.h>
|
||||
|
||||
namespace Kernel {
|
||||
|
||||
class SysFSKernelConfigurationDirectory : public SysFSDirectory {
|
||||
public:
|
||||
static NonnullRefPtr<SysFSKernelConfigurationDirectory> must_create(SysFSDirectory const&);
|
||||
virtual StringView name() const override { return "conf"sv; }
|
||||
|
||||
private:
|
||||
explicit SysFSKernelConfigurationDirectory(SysFSDirectory const&);
|
||||
};
|
||||
|
||||
}
|
|
@ -1,10 +1,10 @@
|
|||
/*
|
||||
* Copyright (c) 2022, Liav A. <liavalb@hotmail.co.il>
|
||||
* Copyright (c) 2022-2023, Liav A. <liavalb@hotmail.co.il>
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
#include <Kernel/FileSystem/SysFS/Subsystems/Kernel/Variables/DumpKmallocStack.h>
|
||||
#include <Kernel/FileSystem/SysFS/Subsystems/Kernel/Configuration/DumpKmallocStack.h>
|
||||
#include <Kernel/Sections.h>
|
||||
#include <Kernel/Tasks/Process.h>
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2022, Liav A. <liavalb@hotmail.co.il>
|
||||
* Copyright (c) 2022-2023, Liav A. <liavalb@hotmail.co.il>
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
@ -8,7 +8,7 @@
|
|||
|
||||
#include <AK/RefPtr.h>
|
||||
#include <AK/Types.h>
|
||||
#include <Kernel/FileSystem/SysFS/Subsystems/Kernel/Variables/BooleanVariable.h>
|
||||
#include <Kernel/FileSystem/SysFS/Subsystems/Kernel/Configuration/BooleanVariable.h>
|
||||
#include <Kernel/Library/UserOrKernelBuffer.h>
|
||||
#include <Kernel/Locking/Spinlock.h>
|
||||
|
|
@ -1,10 +1,10 @@
|
|||
/*
|
||||
* Copyright (c) 2022, Liav A. <liavalb@hotmail.co.il>
|
||||
* Copyright (c) 2022-2023, Liav A. <liavalb@hotmail.co.il>
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
#include <Kernel/FileSystem/SysFS/Subsystems/Kernel/Variables/StringVariable.h>
|
||||
#include <Kernel/FileSystem/SysFS/Subsystems/Kernel/Configuration/StringVariable.h>
|
||||
#include <Kernel/Sections.h>
|
||||
#include <Kernel/Tasks/Process.h>
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2022, Liav A. <liavalb@hotmail.co.il>
|
||||
* Copyright (c) 2022-2023, Liav A. <liavalb@hotmail.co.il>
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
|
@ -1,11 +1,11 @@
|
|||
/*
|
||||
* Copyright (c) 2022, Liav A. <liavalb@hotmail.co.il>
|
||||
* Copyright (c) 2022-2023, Liav A. <liavalb@hotmail.co.il>
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
#include <AK/UBSanitizer.h>
|
||||
#include <Kernel/FileSystem/SysFS/Subsystems/Kernel/Variables/UBSANDeadly.h>
|
||||
#include <Kernel/FileSystem/SysFS/Subsystems/Kernel/Configuration/UBSANDeadly.h>
|
||||
#include <Kernel/Sections.h>
|
||||
|
||||
namespace Kernel {
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2022, Liav A. <liavalb@hotmail.co.il>
|
||||
* Copyright (c) 2022-2023, Liav A. <liavalb@hotmail.co.il>
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
@ -8,7 +8,7 @@
|
|||
|
||||
#include <AK/RefPtr.h>
|
||||
#include <AK/Types.h>
|
||||
#include <Kernel/FileSystem/SysFS/Subsystems/Kernel/Variables/BooleanVariable.h>
|
||||
#include <Kernel/FileSystem/SysFS/Subsystems/Kernel/Configuration/BooleanVariable.h>
|
||||
#include <Kernel/Library/UserOrKernelBuffer.h>
|
||||
|
||||
namespace Kernel {
|
|
@ -8,6 +8,7 @@
|
|||
#include <AK/Try.h>
|
||||
#include <Kernel/FileSystem/SysFS/Component.h>
|
||||
#include <Kernel/FileSystem/SysFS/Subsystems/Kernel/CPUInfo.h>
|
||||
#include <Kernel/FileSystem/SysFS/Subsystems/Kernel/Configuration/Directory.h>
|
||||
#include <Kernel/FileSystem/SysFS/Subsystems/Kernel/Constants/Directory.h>
|
||||
#include <Kernel/FileSystem/SysFS/Subsystems/Kernel/Directory.h>
|
||||
#include <Kernel/FileSystem/SysFS/Subsystems/Kernel/DiskUsage.h>
|
||||
|
@ -23,7 +24,6 @@
|
|||
#include <Kernel/FileSystem/SysFS/Subsystems/Kernel/Profile.h>
|
||||
#include <Kernel/FileSystem/SysFS/Subsystems/Kernel/SystemStatistics.h>
|
||||
#include <Kernel/FileSystem/SysFS/Subsystems/Kernel/Uptime.h>
|
||||
#include <Kernel/FileSystem/SysFS/Subsystems/Kernel/Variables/Directory.h>
|
||||
|
||||
namespace Kernel {
|
||||
|
||||
|
@ -47,7 +47,7 @@ UNMAP_AFTER_INIT NonnullRefPtr<SysFSGlobalKernelStatsDirectory> SysFSGlobalKerne
|
|||
list.append(SysFSJails::must_create(*global_kernel_stats_directory));
|
||||
|
||||
list.append(SysFSGlobalNetworkStatsDirectory::must_create(*global_kernel_stats_directory));
|
||||
list.append(SysFSGlobalKernelVariablesDirectory::must_create(*global_kernel_stats_directory));
|
||||
list.append(SysFSKernelConfigurationDirectory::must_create(*global_kernel_stats_directory));
|
||||
return {};
|
||||
}));
|
||||
return global_kernel_stats_directory;
|
||||
|
|
|
@ -1,36 +0,0 @@
|
|||
/*
|
||||
* Copyright (c) 2022, Liav A. <liavalb@hotmail.co.il>
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
#include <AK/Error.h>
|
||||
#include <AK/Try.h>
|
||||
#include <Kernel/FileSystem/SysFS/Component.h>
|
||||
#include <Kernel/FileSystem/SysFS/Subsystems/Kernel/Variables/CapsLockRemap.h>
|
||||
#include <Kernel/FileSystem/SysFS/Subsystems/Kernel/Variables/CoredumpDirectory.h>
|
||||
#include <Kernel/FileSystem/SysFS/Subsystems/Kernel/Variables/Directory.h>
|
||||
#include <Kernel/FileSystem/SysFS/Subsystems/Kernel/Variables/DumpKmallocStack.h>
|
||||
#include <Kernel/FileSystem/SysFS/Subsystems/Kernel/Variables/UBSANDeadly.h>
|
||||
|
||||
namespace Kernel {
|
||||
|
||||
UNMAP_AFTER_INIT NonnullRefPtr<SysFSGlobalKernelVariablesDirectory> SysFSGlobalKernelVariablesDirectory::must_create(SysFSDirectory const& parent_directory)
|
||||
{
|
||||
auto global_variables_directory = adopt_ref_if_nonnull(new (nothrow) SysFSGlobalKernelVariablesDirectory(parent_directory)).release_nonnull();
|
||||
MUST(global_variables_directory->m_child_components.with([&](auto& list) -> ErrorOr<void> {
|
||||
list.append(SysFSCapsLockRemap::must_create(*global_variables_directory));
|
||||
list.append(SysFSDumpKmallocStacks::must_create(*global_variables_directory));
|
||||
list.append(SysFSUBSANDeadly::must_create(*global_variables_directory));
|
||||
list.append(SysFSCoredumpDirectory::must_create(*global_variables_directory));
|
||||
return {};
|
||||
}));
|
||||
return global_variables_directory;
|
||||
}
|
||||
|
||||
UNMAP_AFTER_INIT SysFSGlobalKernelVariablesDirectory::SysFSGlobalKernelVariablesDirectory(SysFSDirectory const& parent_directory)
|
||||
: SysFSDirectory(parent_directory)
|
||||
{
|
||||
}
|
||||
|
||||
}
|
|
@ -1,24 +0,0 @@
|
|||
/*
|
||||
* Copyright (c) 2021, Liav A. <liavalb@hotmail.co.il>
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <AK/Types.h>
|
||||
#include <Kernel/FileSystem/SysFS/Component.h>
|
||||
#include <Kernel/FileSystem/SysFS/RootDirectory.h>
|
||||
|
||||
namespace Kernel {
|
||||
|
||||
class SysFSGlobalKernelVariablesDirectory : public SysFSDirectory {
|
||||
public:
|
||||
static NonnullRefPtr<SysFSGlobalKernelVariablesDirectory> must_create(SysFSDirectory const&);
|
||||
virtual StringView name() const override { return "variables"sv; }
|
||||
|
||||
private:
|
||||
explicit SysFSGlobalKernelVariablesDirectory(SysFSDirectory const&);
|
||||
};
|
||||
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue