mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-10 10:36:30 +00:00
Kernel/ProcFS: Remove unused ProcFSExposedComponent::entries_count()
This commit is contained in:
@@ -61,7 +61,6 @@ class ProcFSProcessStacks final : public ProcFSExposedDirectory {
|
||||
// therefore, we don't use m_components so when we are done with the ProcFSThreadStack object,
|
||||
// It should be deleted (as soon as possible)
|
||||
public:
|
||||
virtual KResultOr<size_t> entries_count() const override;
|
||||
virtual KResult traverse_as_directory(unsigned, Function<bool(FileSystem::DirectoryEntryView const&)>) const override;
|
||||
virtual RefPtr<ProcFSExposedComponent> lookup(StringView name) override;
|
||||
|
||||
@@ -87,18 +86,6 @@ private:
|
||||
mutable Mutex m_lock;
|
||||
};
|
||||
|
||||
KResultOr<size_t> ProcFSProcessStacks::entries_count() const
|
||||
{
|
||||
Locker locker(m_lock);
|
||||
auto parent_folder = m_process_folder.strong_ref();
|
||||
if (parent_folder.is_null())
|
||||
return KResult(EINVAL);
|
||||
auto process = parent_folder->associated_process();
|
||||
if (process.is_null())
|
||||
return KResult(ESRCH);
|
||||
return process->thread_count();
|
||||
}
|
||||
|
||||
KResult ProcFSProcessStacks::traverse_as_directory(unsigned fsid, Function<bool(FileSystem::DirectoryEntryView const&)> callback) const
|
||||
{
|
||||
Locker locker(m_lock);
|
||||
@@ -171,7 +158,6 @@ class ProcFSProcessFileDescriptions final : public ProcFSExposedDirectory {
|
||||
// therefore, we don't use m_components so when we are done with the ProcFSProcessFileDescription object,
|
||||
// It should be deleted (as soon as possible)
|
||||
public:
|
||||
virtual KResultOr<size_t> entries_count() const override;
|
||||
virtual KResult traverse_as_directory(unsigned, Function<bool(FileSystem::DirectoryEntryView const&)>) const override;
|
||||
virtual RefPtr<ProcFSExposedComponent> lookup(StringView name) override;
|
||||
|
||||
@@ -196,17 +182,6 @@ private:
|
||||
mutable Mutex m_lock;
|
||||
};
|
||||
|
||||
KResultOr<size_t> ProcFSProcessFileDescriptions::entries_count() const
|
||||
{
|
||||
Locker locker(m_lock);
|
||||
auto parent_folder = m_process_folder.strong_ref();
|
||||
if (parent_folder.is_null())
|
||||
return KResult(EINVAL);
|
||||
auto process = parent_folder->associated_process();
|
||||
if (process.is_null())
|
||||
return KResult(ESRCH);
|
||||
return process->fds().open_count();
|
||||
}
|
||||
KResult ProcFSProcessFileDescriptions::traverse_as_directory(unsigned fsid, Function<bool(FileSystem::DirectoryEntryView const&)> callback) const
|
||||
{
|
||||
Locker locker(m_lock);
|
||||
|
||||
Reference in New Issue
Block a user