mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-28 12:18:25 +00:00
Kernel: Enable early-returns from VFS::for_each_mount
This commit is contained in:
committed by
Andreas Kling
parent
735da58d44
commit
88ca12f037
@@ -351,7 +351,8 @@ private:
|
||||
virtual KResult try_generate(KBufferBuilder& builder) override
|
||||
{
|
||||
JsonArraySerializer array { builder };
|
||||
VirtualFileSystem::the().for_each_mount([&array](auto& mount) {
|
||||
KResult result = KSuccess;
|
||||
VirtualFileSystem::the().for_each_mount([&array, &result](auto& mount) {
|
||||
auto& fs = mount.guest_fs();
|
||||
auto fs_object = array.add_object();
|
||||
fs_object.add("class_name", fs.class_name());
|
||||
@@ -368,6 +369,8 @@ private:
|
||||
fs_object.add("source", static_cast<const FileBackedFileSystem&>(fs).file_description().absolute_path());
|
||||
else
|
||||
fs_object.add("source", "none");
|
||||
|
||||
return IterationDecision::Continue;
|
||||
});
|
||||
array.finish();
|
||||
return KSuccess;
|
||||
|
||||
Reference in New Issue
Block a user