mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 02:37:36 +00:00
Kernel: Rename SystemExposedComponent => SysFSComponent
This commit is contained in:
parent
27244eb0ee
commit
517170a986
10 changed files with 32 additions and 32 deletions
|
@ -30,7 +30,7 @@ UNMAP_AFTER_INIT SysFSComponentRegistry::SysFSComponentRegistry()
|
|||
{
|
||||
}
|
||||
|
||||
UNMAP_AFTER_INIT void SysFSComponentRegistry::register_new_component(SystemExposedComponent& component)
|
||||
UNMAP_AFTER_INIT void SysFSComponentRegistry::register_new_component(SysFSComponent& component)
|
||||
{
|
||||
Locker locker(m_lock);
|
||||
m_root_folder->m_components.append(component);
|
||||
|
@ -84,12 +84,12 @@ NonnullRefPtr<Inode> SysFS::root_inode() const
|
|||
return *m_root_inode;
|
||||
}
|
||||
|
||||
NonnullRefPtr<SysFSInode> SysFSInode::create(SysFS const& fs, SystemExposedComponent const& component)
|
||||
NonnullRefPtr<SysFSInode> SysFSInode::create(SysFS const& fs, SysFSComponent const& component)
|
||||
{
|
||||
return adopt_ref(*new (nothrow) SysFSInode(fs, component));
|
||||
}
|
||||
|
||||
SysFSInode::SysFSInode(SysFS const& fs, SystemExposedComponent const& component)
|
||||
SysFSInode::SysFSInode(SysFS const& fs, SysFSComponent const& component)
|
||||
: Inode(const_cast<SysFS&>(fs), component.component_index())
|
||||
, m_associated_component(component)
|
||||
{
|
||||
|
@ -167,12 +167,12 @@ KResult SysFSInode::truncate(u64)
|
|||
return EPERM;
|
||||
}
|
||||
|
||||
NonnullRefPtr<SysFSDirectoryInode> SysFSDirectoryInode::create(SysFS const& sysfs, SystemExposedComponent const& component)
|
||||
NonnullRefPtr<SysFSDirectoryInode> SysFSDirectoryInode::create(SysFS const& sysfs, SysFSComponent const& component)
|
||||
{
|
||||
return adopt_ref(*new (nothrow) SysFSDirectoryInode(sysfs, component));
|
||||
}
|
||||
|
||||
SysFSDirectoryInode::SysFSDirectoryInode(SysFS const& fs, SystemExposedComponent const& component)
|
||||
SysFSDirectoryInode::SysFSDirectoryInode(SysFS const& fs, SysFSComponent const& component)
|
||||
: SysFSInode(fs, component)
|
||||
, m_parent_fs(const_cast<SysFS&>(fs))
|
||||
{
|
||||
|
|
|
@ -34,7 +34,7 @@ private:
|
|||
|
||||
class SysFSComponentRegistry {
|
||||
friend class SysFS;
|
||||
friend class SystemExposedComponent;
|
||||
friend class SysFSComponent;
|
||||
friend class SystemExposedFolder;
|
||||
friend class SysFSRootFolder;
|
||||
|
||||
|
@ -44,7 +44,7 @@ public:
|
|||
static void initialize();
|
||||
|
||||
SysFSComponentRegistry();
|
||||
void register_new_component(SystemExposedComponent&);
|
||||
void register_new_component(SysFSComponent&);
|
||||
|
||||
NonnullRefPtr<SystemExposedFolder> root_folder() { return m_root_folder; }
|
||||
|
||||
|
@ -77,11 +77,11 @@ class SysFSInode : public Inode {
|
|||
friend class SysFSDirectoryInode;
|
||||
|
||||
public:
|
||||
static NonnullRefPtr<SysFSInode> create(SysFS const&, SystemExposedComponent const&);
|
||||
static NonnullRefPtr<SysFSInode> create(SysFS const&, SysFSComponent const&);
|
||||
StringView name() const { return m_associated_component->name(); }
|
||||
|
||||
protected:
|
||||
SysFSInode(SysFS const&, SystemExposedComponent const&);
|
||||
SysFSInode(SysFS const&, SysFSComponent const&);
|
||||
virtual KResultOr<size_t> read_bytes(off_t, size_t, UserOrKernelBuffer& buffer, FileDescription*) const override;
|
||||
virtual KResult traverse_as_directory(Function<bool(FileSystem::DirectoryEntryView const&)>) const override;
|
||||
virtual RefPtr<Inode> lookup(StringView name) override;
|
||||
|
@ -96,7 +96,7 @@ protected:
|
|||
virtual KResult chown(uid_t, gid_t) override;
|
||||
virtual KResult truncate(u64) override;
|
||||
|
||||
NonnullRefPtr<SystemExposedComponent> m_associated_component;
|
||||
NonnullRefPtr<SysFSComponent> m_associated_component;
|
||||
};
|
||||
|
||||
class SysFSDirectoryInode : public SysFSInode {
|
||||
|
@ -104,11 +104,11 @@ class SysFSDirectoryInode : public SysFSInode {
|
|||
friend class SysFSRootDirectoryInode;
|
||||
|
||||
public:
|
||||
static NonnullRefPtr<SysFSDirectoryInode> create(SysFS const&, SystemExposedComponent const&);
|
||||
static NonnullRefPtr<SysFSDirectoryInode> create(SysFS const&, SysFSComponent const&);
|
||||
virtual ~SysFSDirectoryInode() override;
|
||||
|
||||
protected:
|
||||
SysFSDirectoryInode(SysFS const&, SystemExposedComponent const&);
|
||||
SysFSDirectoryInode(SysFS const&, SysFSComponent const&);
|
||||
// ^Inode
|
||||
virtual InodeMetadata metadata() const override;
|
||||
virtual KResult traverse_as_directory(Function<bool(FileSystem::DirectoryEntryView const&)>) const override;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue