1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 10:37:34 +00:00

Kernel: Convert KBuffer::copy() => KBuffer::try_copy()

This was a weird KBuffer API that assumed failure was impossible.
This patch converts it to a modern KResultOr<NonnullOwnPtr<KBuffer>> API
and updates the two clients to the new style.
This commit is contained in:
Andreas Kling 2021-09-07 15:36:39 +02:00
parent 250b52d6e5
commit b300f9aa2f
5 changed files with 49 additions and 28 deletions

View file

@ -17,7 +17,7 @@ typedef void* (*ModuleFiniPtr)();
struct Module {
String name;
Vector<KBuffer> sections;
NonnullOwnPtrVector<KBuffer> sections;
ModuleInitPtr module_init { nullptr };
ModuleFiniPtr module_fini { nullptr };