mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-03 23:25:20 +00:00
Kernel: Make SysFS and ProcFS generator functions return KResult
This allows us to propagate a whole bunch of KBufferBuilder errors.
This commit is contained in:
@@ -144,8 +144,7 @@ KResult ProcFSGlobalInformation::refresh_data(FileDescription& description) cons
|
||||
return ENOMEM;
|
||||
}
|
||||
KBufferBuilder builder;
|
||||
if (!const_cast<ProcFSGlobalInformation&>(*this).output(builder))
|
||||
return ENOENT;
|
||||
TRY(const_cast<ProcFSGlobalInformation&>(*this).try_generate(builder));
|
||||
auto& typed_cached_data = static_cast<ProcFSInodeData&>(*cached_data);
|
||||
typed_cached_data.buffer = builder.build();
|
||||
if (!typed_cached_data.buffer)
|
||||
|
||||
Reference in New Issue
Block a user