mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 10:28:10 +00:00
Kernel/SysFS: Migrate components code from SysFS.cpp to the SysFS folder
This commit is contained in:
parent
4d05a41b30
commit
23c1c40e86
29 changed files with 496 additions and 286 deletions
27
Kernel/FileSystem/SysFS/Subsystems/Devices/Directory.cpp
Normal file
27
Kernel/FileSystem/SysFS/Subsystems/Devices/Directory.cpp
Normal file
|
@ -0,0 +1,27 @@
|
|||
/*
|
||||
* Copyright (c) 2022, Liav A. <liavalb@hotmail.co.il>
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
#include <Kernel/FileSystem/SysFS/RootDirectory.h>
|
||||
#include <Kernel/FileSystem/SysFS/Subsystems/Devices/BlockDevicesDirectory.h>
|
||||
#include <Kernel/FileSystem/SysFS/Subsystems/Devices/CharacterDevicesDirectory.h>
|
||||
#include <Kernel/FileSystem/SysFS/Subsystems/Devices/Directory.h>
|
||||
#include <Kernel/Sections.h>
|
||||
|
||||
namespace Kernel {
|
||||
|
||||
UNMAP_AFTER_INIT NonnullRefPtr<SysFSDevicesDirectory> SysFSDevicesDirectory::must_create(SysFSRootDirectory const& root_directory)
|
||||
{
|
||||
auto devices_directory = adopt_ref_if_nonnull(new SysFSDevicesDirectory(root_directory)).release_nonnull();
|
||||
devices_directory->m_components.append(SysFSBlockDevicesDirectory::must_create(*devices_directory));
|
||||
devices_directory->m_components.append(SysFSCharacterDevicesDirectory::must_create(*devices_directory));
|
||||
return devices_directory;
|
||||
}
|
||||
SysFSDevicesDirectory::SysFSDevicesDirectory(SysFSRootDirectory const& root_directory)
|
||||
: SysFSDirectory(root_directory)
|
||||
{
|
||||
}
|
||||
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue