mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 21:37:35 +00:00
Kernel/ScatterGatherList: Return ErrorOr from try_create
This removes the TODO from the try_create API to return ErrorOr. This is also a preparation patch to move the init code in the constructor that can fail to this try_create function.
This commit is contained in:
parent
4617c05a08
commit
489e268b96
3 changed files with 5 additions and 9 deletions
|
@ -19,7 +19,7 @@ namespace Kernel::Memory {
|
|||
|
||||
class ScatterGatherList final : public AtomicRefCounted<ScatterGatherList> {
|
||||
public:
|
||||
static LockRefPtr<ScatterGatherList> try_create(AsyncBlockDeviceRequest&, Span<NonnullRefPtr<PhysicalPage>> allocated_pages, size_t device_block_size);
|
||||
static ErrorOr<LockRefPtr<ScatterGatherList>> try_create(AsyncBlockDeviceRequest&, Span<NonnullRefPtr<PhysicalPage>> allocated_pages, size_t device_block_size);
|
||||
VMObject const& vmobject() const { return m_vm_object; }
|
||||
VirtualAddress dma_region() const { return m_dma_region->vaddr(); }
|
||||
size_t scatters_count() const { return m_vm_object->physical_pages().size(); }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue