mirror of
https://github.com/RGBCube/serenity
synced 2025-07-28 05:17:34 +00:00
Kernel: Replace KResult and KResultOr<T> with Error and ErrorOr<T>
We now use AK::Error and AK::ErrorOr<T> in both kernel and userspace! This was a slightly tedious refactoring that took a long time, so it's not unlikely that some bugs crept in. Nevertheless, it does pass basic functionality testing, and it's just real nice to finally see the same pattern in all contexts. :^)
This commit is contained in:
parent
7ee10c6926
commit
79fa9765ca
262 changed files with 2415 additions and 2600 deletions
|
@ -41,7 +41,7 @@ public:
|
|||
};
|
||||
|
||||
public:
|
||||
static KResultOr<NonnullOwnPtr<Pipe>> try_create_pipe(USBController const& controller, Type type, Direction direction, u8 endpoint_address, u16 max_packet_size, i8 device_address, u8 poll_interval = 0);
|
||||
static ErrorOr<NonnullOwnPtr<Pipe>> try_create_pipe(USBController const& controller, Type type, Direction direction, u8 endpoint_address, u16 max_packet_size, i8 device_address, u8 poll_interval = 0);
|
||||
|
||||
Type type() const { return m_type; }
|
||||
Direction direction() const { return m_direction; }
|
||||
|
@ -57,7 +57,7 @@ public:
|
|||
void set_toggle(bool toggle) { m_data_toggle = toggle; }
|
||||
void set_device_address(i8 addr) { m_device_address = addr; }
|
||||
|
||||
KResultOr<size_t> control_transfer(u8 request_type, u8 request, u16 value, u16 index, u16 length, void* data);
|
||||
ErrorOr<size_t> control_transfer(u8 request_type, u8 request, u16 value, u16 index, u16 length, void* data);
|
||||
|
||||
Pipe(USBController const& controller, Type type, Direction direction, u16 max_packet_size);
|
||||
Pipe(USBController const& controller, Type type, Direction direction, USBEndpointDescriptor& endpoint);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue