mirror of
				https://github.com/RGBCube/serenity
				synced 2025-10-31 00:12:44 +00:00 
			
		
		
		
	 673592dea8
			
		
	
	
		673592dea8
		
	
	
	
	
		
			
			There was only one permanent storage location for these: as a member in the Mount class. That member is never modified after Mount initialization, so we don't need to worry about races there.
		
			
				
	
	
		
			33 lines
		
	
	
	
		
			674 B
		
	
	
	
		
			C++
		
	
	
	
	
	
			
		
		
	
	
			33 lines
		
	
	
	
		
			674 B
		
	
	
	
		
			C++
		
	
	
	
	
	
| /*
 | |
|  * Copyright (c) 2021, Liav A. <liavalb@hotmail.co.il>
 | |
|  *
 | |
|  * SPDX-License-Identifier: BSD-2-Clause
 | |
|  */
 | |
| 
 | |
| #include <AK/StringView.h>
 | |
| #include <Kernel/FileSystem/SysFS/FileSystem.h>
 | |
| #include <Kernel/FileSystem/SysFS/Inode.h>
 | |
| #include <Kernel/FileSystem/SysFS/Registry.h>
 | |
| 
 | |
| namespace Kernel {
 | |
| 
 | |
| ErrorOr<NonnullRefPtr<FileSystem>> SysFS::try_create()
 | |
| {
 | |
|     return TRY(adopt_nonnull_ref_or_enomem(new (nothrow) SysFS));
 | |
| }
 | |
| 
 | |
| SysFS::SysFS() = default;
 | |
| SysFS::~SysFS() = default;
 | |
| 
 | |
| ErrorOr<void> SysFS::initialize()
 | |
| {
 | |
|     m_root_inode = TRY(SysFSComponentRegistry::the().root_directory().to_inode(*this));
 | |
|     return {};
 | |
| }
 | |
| 
 | |
| Inode& SysFS::root_inode()
 | |
| {
 | |
|     return *m_root_inode;
 | |
| }
 | |
| 
 | |
| }
 |