forked from SerenityOS/serenity
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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.
- Loading branch information
1 parent
3151099
commit 751aae7
Showing
24 changed files
with
99 additions
and
99 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
...tems/Kernel/Variables/BooleanVariable.cpp → .../Kernel/Configuration/BooleanVariable.cpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,10 @@ | ||
/* | ||
* Copyright (c) 2022, Liav A. <[email protected]> | ||
* Copyright (c) 2022-2023, Liav A. <[email protected]> | ||
* | ||
* 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> | ||
|
||
|
2 changes: 1 addition & 1 deletion
2
...ystems/Kernel/Variables/BooleanVariable.h → ...ms/Kernel/Configuration/BooleanVariable.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
/* | ||
* Copyright (c) 2022, Liav A. <[email protected]> | ||
* Copyright (c) 2022-2023, Liav A. <[email protected]> | ||
* | ||
* SPDX-License-Identifier: BSD-2-Clause | ||
*/ | ||
|
4 changes: 2 additions & 2 deletions
4
...ystems/Kernel/Variables/CapsLockRemap.cpp → ...ms/Kernel/Configuration/CapsLockRemap.cpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,11 @@ | ||
/* | ||
* Copyright (c) 2022, Liav A. <[email protected]> | ||
* Copyright (c) 2022-2023, Liav A. <[email protected]> | ||
* | ||
* 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 { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
/* | ||
* Copyright (c) 2022, Liav A. <[email protected]> | ||
* Copyright (c) 2022-2023, Liav A. <[email protected]> | ||
* | ||
* 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> | ||
|
||
|
4 changes: 2 additions & 2 deletions
4
...ms/Kernel/Variables/CoredumpDirectory.cpp → ...ernel/Configuration/CoredumpDirectory.cpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,10 @@ | ||
/* | ||
* Copyright (c) 2022, Liav A. <[email protected]> | ||
* Copyright (c) 2022-2023, Liav A. <[email protected]> | ||
* | ||
* 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> | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
/* | ||
* Copyright (c) 2022, Liav A. <[email protected]> | ||
* Copyright (c) 2022-2023, Liav A. <[email protected]> | ||
* | ||
* 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 { | ||
|
36 changes: 36 additions & 0 deletions
36
Kernel/FileSystem/SysFS/Subsystems/Kernel/Configuration/Directory.cpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
/* | ||
* Copyright (c) 2022-2023, Liav A. <[email protected]> | ||
* | ||
* 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) | ||
{ | ||
} | ||
|
||
} |
24 changes: 24 additions & 0 deletions
24
Kernel/FileSystem/SysFS/Subsystems/Kernel/Configuration/Directory.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
/* | ||
* Copyright (c) 2021-2023, Liav A. <[email protected]> | ||
* | ||
* 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&); | ||
}; | ||
|
||
} |
4 changes: 2 additions & 2 deletions
4
...ems/Kernel/Variables/DumpKmallocStack.cpp → ...Kernel/Configuration/DumpKmallocStack.cpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,10 @@ | ||
/* | ||
* Copyright (c) 2022, Liav A. <[email protected]> | ||
* Copyright (c) 2022-2023, Liav A. <[email protected]> | ||
* | ||
* 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> | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
/* | ||
* Copyright (c) 2022, Liav A. <[email protected]> | ||
* Copyright (c) 2022-2023, Liav A. <[email protected]> | ||
* | ||
* 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> | ||
|
||
|
4 changes: 2 additions & 2 deletions
4
...stems/Kernel/Variables/StringVariable.cpp → ...s/Kernel/Configuration/StringVariable.cpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,10 @@ | ||
/* | ||
* Copyright (c) 2022, Liav A. <[email protected]> | ||
* Copyright (c) 2022-2023, Liav A. <[email protected]> | ||
* | ||
* 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> | ||
|
||
|
2 changes: 1 addition & 1 deletion
2
...systems/Kernel/Variables/StringVariable.h → ...ems/Kernel/Configuration/StringVariable.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
/* | ||
* Copyright (c) 2022, Liav A. <[email protected]> | ||
* Copyright (c) 2022-2023, Liav A. <[email protected]> | ||
* | ||
* SPDX-License-Identifier: BSD-2-Clause | ||
*/ | ||
|
4 changes: 2 additions & 2 deletions
4
...bsystems/Kernel/Variables/UBSANDeadly.cpp → ...tems/Kernel/Configuration/UBSANDeadly.cpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,11 @@ | ||
/* | ||
* Copyright (c) 2022, Liav A. <[email protected]> | ||
* Copyright (c) 2022-2023, Liav A. <[email protected]> | ||
* | ||
* 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 { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
/* | ||
* Copyright (c) 2022, Liav A. <[email protected]> | ||
* Copyright (c) 2022-2023, Liav A. <[email protected]> | ||
* | ||
* 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 { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
36 changes: 0 additions & 36 deletions
36
Kernel/FileSystem/SysFS/Subsystems/Kernel/Variables/Directory.cpp
This file was deleted.
Oops, something went wrong.
24 changes: 0 additions & 24 deletions
24
Kernel/FileSystem/SysFS/Subsystems/Kernel/Variables/Directory.h
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters