diff options
author | Brian Gianforcaro <bgianf@serenityos.org> | 2021-08-31 23:44:55 -0700 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-09-01 18:06:14 +0200 |
commit | 668c4299000e013852bd07e5df81750db672d607 (patch) | |
tree | f65ddce4c981fa983a3c54d2de90a3d2c15b8cc4 /Kernel/Devices/HID | |
parent | f3baa5d8c915285ea109cf12553e497adb7051ca (diff) | |
download | serenity-668c4299000e013852bd07e5df81750db672d607.zip |
Kernel: Convert UserOrKernelBuffer callbacks to use AK::Bytes
Diffstat (limited to 'Kernel/Devices/HID')
-rw-r--r-- | Kernel/Devices/HID/KeyboardDevice.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Kernel/Devices/HID/KeyboardDevice.cpp b/Kernel/Devices/HID/KeyboardDevice.cpp index 85c5611d18..485d5ccbb3 100644 --- a/Kernel/Devices/HID/KeyboardDevice.cpp +++ b/Kernel/Devices/HID/KeyboardDevice.cpp @@ -292,9 +292,9 @@ KResultOr<size_t> KeyboardDevice::read(FileDescription&, u64, UserOrKernelBuffer lock.unlock(); - auto result = buffer.write_buffered<sizeof(Event)>(sizeof(Event), [&](u8* data, size_t data_bytes) { - memcpy(data, &event, sizeof(Event)); - return data_bytes; + auto result = buffer.write_buffered<sizeof(Event)>(sizeof(Event), [&](Bytes bytes) { + memcpy(bytes.data(), &event, sizeof(Event)); + return bytes.size(); }); if (result.is_error()) return result.error(); |