mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 13:48:12 +00:00
Kernel/SysFS: Rename Devices code folder => DeviceIdentifiers
This folder in the SysFS code represents everything related to /sys/dev, which is a directory meant to be a convenient interface to track all IDs of all block and character devices (ID = major:minor numbers).
This commit is contained in:
parent
4ad437f3a7
commit
6ff1aeb64d
12 changed files with 31 additions and 31 deletions
|
@ -1,27 +0,0 @@
|
|||
/*
|
||||
* Copyright (c) 2022, Liav A. <liavalb@hotmail.co.il>
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
#include <Kernel/Devices/Device.h>
|
||||
#include <Kernel/FileSystem/SysFS/Subsystems/Devices/DeviceComponent.h>
|
||||
#include <Kernel/Sections.h>
|
||||
|
||||
namespace Kernel {
|
||||
|
||||
NonnullRefPtr<SysFSDeviceComponent> SysFSDeviceComponent::must_create(Device const& device)
|
||||
{
|
||||
// FIXME: Handle allocation failure gracefully
|
||||
auto device_name = MUST(KString::formatted("{}:{}", device.major(), device.minor()));
|
||||
return adopt_ref_if_nonnull(new SysFSDeviceComponent(move(device_name), device)).release_nonnull();
|
||||
}
|
||||
SysFSDeviceComponent::SysFSDeviceComponent(NonnullOwnPtr<KString> major_minor_formatted_device_name, Device const& device)
|
||||
: SysFSComponent()
|
||||
, m_block_device(device.is_block_device())
|
||||
, m_major_minor_formatted_device_name(move(major_minor_formatted_device_name))
|
||||
{
|
||||
VERIFY(device.is_block_device() || device.is_character_device());
|
||||
}
|
||||
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue