diff options
| author | Felix Morgner <felix.morgner@ost.ch> | 2026-07-24 19:37:41 +0200 |
|---|---|---|
| committer | Felix Morgner <felix.morgner@ost.ch> | 2026-07-24 19:38:00 +0200 |
| commit | 1eec1ed62987f34a8473db0ff2b89f82dd92ff4d (patch) | |
| tree | 0d4b97c6161e856c97154aa9ef6237a2dc34319e | |
| parent | 40c91984152a238351529d2611fe627040f6a618 (diff) | |
| download | kernel-1eec1ed62987f34a8473db0ff2b89f82dd92ff4d.tar.xz kernel-1eec1ed62987f34a8473db0ff2b89f82dd92ff4d.zip | |
kapi: rename interface to interface_id
26 files changed, 63 insertions, 64 deletions
diff --git a/arch/x86_64/arch/bus/isa.hpp b/arch/x86_64/arch/bus/isa.hpp index aa6eb01a..fa85c8e8 100644 --- a/arch/x86_64/arch/bus/isa.hpp +++ b/arch/x86_64/arch/bus/isa.hpp @@ -16,7 +16,7 @@ namespace arch::bus struct isa_identification { //! The ID of this interface. - constexpr auto static id = kapi::devices::interface{"isa_identification"}; + constexpr auto static id = kapi::devices::interface_id{"isa_identification"}; //! Allow for correct destruction through base pointers. virtual ~isa_identification() = default; @@ -27,7 +27,7 @@ namespace arch::bus struct isa_driver_identification { - constexpr auto static id = kapi::devices::interface{"isa_driver_identification"}; + constexpr auto static id = kapi::devices::interface_id{"isa_driver_identification"}; virtual ~isa_driver_identification() = default; diff --git a/arch/x86_64/arch/devices/init.cpp b/arch/x86_64/arch/devices/init.cpp index 10848508..03d082f6 100644 --- a/arch/x86_64/arch/devices/init.cpp +++ b/arch/x86_64/arch/devices/init.cpp @@ -7,7 +7,6 @@ #include <kapi/acpi.hpp> #include <kapi/cpu.hpp> #include <kapi/devices.hpp> -#include <kapi/devices/driver_registry.hpp> #include <acpi/acpi.hpp> diff --git a/arch/x86_64/arch/devices/pit.cpp b/arch/x86_64/arch/devices/pit.cpp index df28288f..a280bcdc 100644 --- a/arch/x86_64/arch/devices/pit.cpp +++ b/arch/x86_64/arch/devices/pit.cpp @@ -18,7 +18,7 @@ namespace arch::devices return "pit"; } - auto pit::query_interface(kapi::devices::interface interface) -> void * + auto pit::query_interface(kapi::devices::interface_id interface) -> void * { if (interface == arch::bus::isa_identification::id) { diff --git a/arch/x86_64/arch/devices/pit.hpp b/arch/x86_64/arch/devices/pit.hpp index 5104087b..452eedc0 100644 --- a/arch/x86_64/arch/devices/pit.hpp +++ b/arch/x86_64/arch/devices/pit.hpp @@ -24,7 +24,7 @@ namespace arch::devices [[nodiscard]] auto isa_name() const -> std::string_view override; protected: - auto query_interface(kapi::devices::interface interface) -> void * override; + auto query_interface(kapi::devices::interface_id interface) -> void * override; }; } // namespace arch::devices diff --git a/arch/x86_64/arch/drivers/pit.cpp b/arch/x86_64/arch/drivers/pit.cpp index 2b03172d..6bad179e 100644 --- a/arch/x86_64/arch/drivers/pit.cpp +++ b/arch/x86_64/arch/drivers/pit.cpp @@ -87,7 +87,7 @@ namespace arch::drivers return kapi::interrupts::status::handled; } - auto pit::query_interface(kapi::devices::interface interface) -> void * + auto pit::query_interface(kapi::devices::interface_id interface) -> void * { if (interface == arch::bus::isa_driver_identification::id) { diff --git a/arch/x86_64/arch/drivers/pit.hpp b/arch/x86_64/arch/drivers/pit.hpp index f22c6037..6e51ec36 100644 --- a/arch/x86_64/arch/drivers/pit.hpp +++ b/arch/x86_64/arch/drivers/pit.hpp @@ -30,7 +30,7 @@ namespace arch::drivers auto handle_interrupt(std::uint32_t irq_number, kstd::weak_ptr<void> context) -> kapi::interrupts::status override; protected: - auto query_interface(kapi::devices::interface interface) -> void * override; + auto query_interface(kapi::devices::interface_id interface) -> void * override; private: struct data diff --git a/kapi/kapi/boot_modules/bus.hpp b/kapi/kapi/boot_modules/bus.hpp index 2c52677e..3e982d85 100644 --- a/kapi/kapi/boot_modules/bus.hpp +++ b/kapi/kapi/boot_modules/bus.hpp @@ -18,7 +18,7 @@ namespace kapi::boot_modules struct boot_module_identification { - constexpr auto static id = devices::interface{"boot_module_identification"}; + constexpr auto static id = devices::interface_id{"boot_module_identification"}; virtual ~boot_module_identification() = default; @@ -29,7 +29,7 @@ namespace kapi::boot_modules struct boot_module_driver_identification { - constexpr auto static id = devices::interface{"boot_module_driver_identification"}; + constexpr auto static id = devices::interface_id{"boot_module_driver_identification"}; virtual ~boot_module_driver_identification() = default; @@ -45,7 +45,7 @@ namespace kapi::boot_modules [[nodiscard]] auto module() const -> struct module const & override; protected: - auto query_interface(kapi::devices::interface interface) -> void * override; + auto query_interface(kapi::devices::interface_id interface) -> void * override; private: struct module m_module; diff --git a/kapi/kapi/devices.hpp b/kapi/kapi/devices.hpp index ed082bed..c1e7e9f4 100644 --- a/kapi/kapi/devices.hpp +++ b/kapi/kapi/devices.hpp @@ -11,7 +11,7 @@ #include <kapi/devices/driver.hpp> // IWYU pragma: export #include <kapi/devices/driver_registry.hpp> // IWYU pragma: export #include <kapi/devices/error.hpp> // IWYU pragma: export -#include <kapi/devices/interface.hpp> // IWYU pragma: export +#include <kapi/devices/interface_id.hpp> // IWYU pragma: export #include <kapi/devices/interface_registry.hpp> // IWYU pragma: export #include <kstd/memory.hpp> diff --git a/kapi/kapi/devices/block_device.hpp b/kapi/kapi/devices/block_device.hpp index dfd08899..e606188e 100644 --- a/kapi/kapi/devices/block_device.hpp +++ b/kapi/kapi/devices/block_device.hpp @@ -3,7 +3,7 @@ // IWYU pragma: private, include <kapi/devices.hpp> -#include <kapi/devices/interface.hpp> +#include <kapi/devices/interface_id.hpp> #include <kstd/result.hpp> #include <kstd/units.hpp> @@ -15,7 +15,7 @@ namespace kapi::devices struct block_device { - constexpr auto static id = interface{"block"}; + constexpr auto static id = interface_id{"block"}; //! Virtual destructor to enable clean deletes through base pointers. virtual ~block_device() = default; diff --git a/kapi/kapi/devices/character_device.hpp b/kapi/kapi/devices/character_device.hpp index 7e7e8d6d..40921940 100644 --- a/kapi/kapi/devices/character_device.hpp +++ b/kapi/kapi/devices/character_device.hpp @@ -3,7 +3,7 @@ // IWYU pragma: private, include <kapi/devices.hpp> -#include <kapi/devices/interface.hpp> +#include <kapi/devices/interface_id.hpp> #include <kstd/result.hpp> #include <kstd/units.hpp> @@ -16,7 +16,7 @@ namespace kapi::devices struct character_device { - constexpr auto static id = interface{"char"}; + constexpr auto static id = interface_id{"char"}; //! Virtual destructor to enable clean deletes through base pointers. virtual ~character_device() = default; diff --git a/kapi/kapi/devices/device.hpp b/kapi/kapi/devices/device.hpp index 2c799d5d..c8b32b8b 100644 --- a/kapi/kapi/devices/device.hpp +++ b/kapi/kapi/devices/device.hpp @@ -4,7 +4,7 @@ // IWYU pragma: private, include <kapi/devices.hpp> #include <kapi/devices/driver.hpp> -#include <kapi/devices/interface.hpp> +#include <kapi/devices/interface_id.hpp> #include <kstd/memory.hpp> #include <kstd/string.hpp> @@ -40,9 +40,9 @@ namespace kapi::devices */ virtual ~device() = default; - [[nodiscard]] auto as(interface interface) noexcept -> void *; + [[nodiscard]] auto as(interface_id interface) noexcept -> void *; - [[nodiscard]] auto as(interface interface) const noexcept -> void const *; + [[nodiscard]] auto as(interface_id interface) const noexcept -> void const *; template<typename InterfaceType> [[nodiscard]] auto as() -> InterfaceType * @@ -56,7 +56,7 @@ namespace kapi::devices return static_cast<InterfaceType const *>(as(InterfaceType::id)); } - [[nodiscard]] auto is_a(interface interface) const noexcept -> bool; + [[nodiscard]] auto is_a(interface_id interface) const noexcept -> bool; template<typename InterfaceType> [[nodiscard]] auto is_a() const noexcept -> bool @@ -94,7 +94,7 @@ namespace kapi::devices auto set_driver_data(kstd::shared_ptr<void> data) -> void; protected: - auto virtual query_interface(interface interface) -> void *; + auto virtual query_interface(interface_id interface) -> void *; private: friend struct bus; diff --git a/kapi/kapi/devices/driver.hpp b/kapi/kapi/devices/driver.hpp index 837b47e4..b8646573 100644 --- a/kapi/kapi/devices/driver.hpp +++ b/kapi/kapi/devices/driver.hpp @@ -3,7 +3,7 @@ // IWYU pragma: private, include <kapi/devices.hpp> -#include <kapi/devices/interface.hpp> +#include <kapi/devices/interface_id.hpp> #include <kstd/result.hpp> @@ -81,7 +81,7 @@ namespace kapi::devices protected: //! Return a pointer to the implementation of the given interface if this driver supports it. - virtual auto query_interface(interface interface) -> void *; + virtual auto query_interface(interface_id interface) -> void *; }; //! @} diff --git a/kapi/kapi/devices/interface.hpp b/kapi/kapi/devices/interface_id.hpp index f5198691..6c472e59 100644 --- a/kapi/kapi/devices/interface.hpp +++ b/kapi/kapi/devices/interface_id.hpp @@ -9,10 +9,10 @@ namespace kapi::devices { //! A tag to mark that a given devices provides a specific device capability interface. - struct interface + struct interface_id { //! Construct a new interface with a given name. - constexpr explicit interface(std::string_view name) + constexpr explicit interface_id(std::string_view name) : m_name{name} {} @@ -20,7 +20,7 @@ namespace kapi::devices [[nodiscard]] constexpr auto name() const noexcept -> std::string_view const &; //! Check if this interface is equal to another one. - constexpr auto operator==(interface const &) const noexcept -> bool = default; + constexpr auto operator==(interface_id const &) const noexcept -> bool = default; private: std::string_view m_name; diff --git a/kapi/kapi/devices/interface_registry.hpp b/kapi/kapi/devices/interface_registry.hpp index 155a23cd..9df76f6d 100644 --- a/kapi/kapi/devices/interface_registry.hpp +++ b/kapi/kapi/devices/interface_registry.hpp @@ -4,7 +4,7 @@ // IWYU pragma: private, include <kapi/devices.hpp> #include <kapi/devices/device.hpp> -#include <kapi/devices/interface.hpp> +#include <kapi/devices/interface_id.hpp> #include <kstd/memory.hpp> #include <kstd/result.hpp> @@ -22,7 +22,7 @@ namespace kapi::devices { struct entry { - constexpr entry(kstd::shared_ptr<struct device> device, kstd::string name, interface interface, + constexpr entry(kstd::shared_ptr<struct device> device, kstd::string name, interface_id interface, void * implementation) : m_device{device} , m_name{name} @@ -40,7 +40,7 @@ namespace kapi::devices return m_name; } - [[nodiscard]] constexpr auto interface() const noexcept -> interface + [[nodiscard]] constexpr auto interface() const noexcept -> interface_id { return m_interface; } @@ -65,7 +65,7 @@ namespace kapi::devices private: kstd::weak_ptr<struct device> m_device; kstd::string m_name; - struct interface m_interface; + struct interface_id m_interface; void * m_implementation; }; @@ -107,24 +107,24 @@ namespace kapi::devices //! //! @param device The device to withdraw the interface for. //! @param interface The interface to withdraw for the given device. - auto unpublish(device const & device, interface interface) -> void; + auto unpublish(device const & device, interface_id interface) -> void; //! Get all devices implementing a given interface. //! //! @param interface The interface for which to get the implementing devices. - [[nodiscard]] auto all(interface interface) const -> kstd::vector<entry>; + [[nodiscard]] auto all(interface_id interface) const -> kstd::vector<entry>; //! Attempt to resolve a given device, by name, to a given interface implementation //! //! @param interface The interface to look for. //! @param name The stable name of the device to look for. - [[nodiscard]] auto resolve(interface interface, std::string_view name) -> void *; + [[nodiscard]] auto resolve(interface_id interface, std::string_view name) -> void *; //! Attempt to resolve a given device to a given interface implementation //! //! @param interface The interface to look for. //! @param device The device to look for. - [[nodiscard]] auto resolve(interface interface, device & device) -> void *; + [[nodiscard]] auto resolve(interface_id interface, device & device) -> void *; //! Attempt to resolve a given device, by name, to a given interface implementation //! @@ -153,7 +153,7 @@ namespace kapi::devices //! @param name A stable name for the device. //! @param interface The capability interface to be published for the device. //! @param implementation The implementation of the interface for the device. - auto do_publish(kstd::shared_ptr<device> device, kstd::string name, interface interface, void * implementation) + auto do_publish(kstd::shared_ptr<device> device, kstd::string name, interface_id interface, void * implementation) -> kstd::result<void>; kstd::vector<entry> m_entries; diff --git a/kernel/kapi/boot_module/bus.cpp b/kernel/kapi/boot_module/bus.cpp index 95264d00..17052629 100644 --- a/kernel/kapi/boot_module/bus.cpp +++ b/kernel/kapi/boot_module/bus.cpp @@ -43,7 +43,7 @@ namespace kapi::boot_modules return m_module; } - auto boot_module_device::query_interface(kapi::devices::interface interface) -> void * + auto boot_module_device::query_interface(kapi::devices::interface_id interface) -> void * { if (interface == boot_module_identification::id) { diff --git a/kernel/kapi/devices/device.cpp b/kernel/kapi/devices/device.cpp index 3eb9aaac..01096165 100644 --- a/kernel/kapi/devices/device.cpp +++ b/kernel/kapi/devices/device.cpp @@ -12,17 +12,17 @@ namespace kapi::devices : m_name(name) {} - auto device::as(interface interface) noexcept -> void * + auto device::as(interface_id interface) noexcept -> void * { return query_interface(interface); } - auto device::as(interface interface) const noexcept -> void const * + auto device::as(interface_id interface) const noexcept -> void const * { return const_cast<device *>(this)->query_interface(interface); } - auto device::is_a(interface interface) const noexcept -> bool + auto device::is_a(interface_id interface) const noexcept -> bool { return const_cast<device *>(this)->query_interface(interface) != nullptr; } @@ -67,7 +67,7 @@ namespace kapi::devices m_driver_data = data; } - auto device::query_interface(interface) -> void * + auto device::query_interface(interface_id) -> void * { return nullptr; } diff --git a/kernel/kapi/devices/driver.cpp b/kernel/kapi/devices/driver.cpp index c6b5e056..be2866f0 100644 --- a/kernel/kapi/devices/driver.cpp +++ b/kernel/kapi/devices/driver.cpp @@ -11,7 +11,7 @@ namespace kapi::devices return std::nullopt; } - auto driver::query_interface(interface) -> void * + auto driver::query_interface(interface_id) -> void * { return nullptr; } diff --git a/kernel/kapi/devices/driver.tests.cpp b/kernel/kapi/devices/driver.tests.cpp index 53c569dd..ea351cca 100644 --- a/kernel/kapi/devices/driver.tests.cpp +++ b/kernel/kapi/devices/driver.tests.cpp @@ -16,14 +16,14 @@ namespace { struct controller_identification { - constexpr auto static id = kapi::devices::interface{"stacking_test_controller_identification"}; + constexpr auto static id = kapi::devices::interface_id{"stacking_test_controller_identification"}; virtual ~controller_identification() = default; [[nodiscard]] virtual auto controller_name() const -> std::string_view = 0; }; struct controller_driver_identification { - constexpr auto static id = kapi::devices::interface{"stacking_test_controller_driver_identification"}; + constexpr auto static id = kapi::devices::interface_id{"stacking_test_controller_driver_identification"}; virtual ~controller_driver_identification() = default; [[nodiscard]] virtual auto supported_names() const -> std::span<std::string_view const> = 0; }; @@ -64,7 +64,7 @@ namespace } protected: - auto query_interface(kapi::devices::interface interface) -> void * override + auto query_interface(kapi::devices::interface_id interface) -> void * override { if (interface == controller_identification::id) { @@ -76,14 +76,14 @@ namespace struct leaf_identification { - constexpr kapi::devices::interface static id{"stacking_test_leaf_identification"}; + constexpr kapi::devices::interface_id static id{"stacking_test_leaf_identification"}; virtual ~leaf_identification() = default; [[nodiscard]] virtual auto leaf_name() const -> std::string_view = 0; }; struct leaf_driver_identification { - constexpr kapi::devices::interface static id{"stacking_test_leaf_driver_identification"}; + constexpr kapi::devices::interface_id static id{"stacking_test_leaf_driver_identification"}; virtual ~leaf_driver_identification() = default; [[nodiscard]] virtual auto supported_names() const -> std::span<std::string_view const> = 0; }; @@ -100,7 +100,7 @@ namespace } protected: - auto query_interface(kapi::devices::interface interface) -> void * override + auto query_interface(kapi::devices::interface_id interface) -> void * override { if (interface == leaf_identification::id) { @@ -158,7 +158,7 @@ namespace } protected: - auto query_interface(kapi::devices::interface interface) -> void * override + auto query_interface(kapi::devices::interface_id interface) -> void * override { if (interface == controller_driver_identification::id) { @@ -185,7 +185,7 @@ namespace } protected: - auto query_interface(kapi::devices::interface interface) -> void * override + auto query_interface(kapi::devices::interface_id interface) -> void * override { if (interface == leaf_driver_identification::id) { diff --git a/kernel/kapi/devices/driver_registry.tests.cpp b/kernel/kapi/devices/driver_registry.tests.cpp index bf87fb47..662b91bf 100644 --- a/kernel/kapi/devices/driver_registry.tests.cpp +++ b/kernel/kapi/devices/driver_registry.tests.cpp @@ -14,7 +14,7 @@ namespace struct test_identification { - constexpr auto static id = kapi::devices::interface{"test_identification"}; + constexpr auto static id = kapi::devices::interface_id{"test_identification"}; virtual ~test_identification() = default; @@ -100,7 +100,7 @@ namespace mutable unsigned probe_calls; protected: - auto query_interface(kapi::devices::interface interface) -> void * override + auto query_interface(kapi::devices::interface_id interface) -> void * override { if (interface == test_identification::id) { diff --git a/kernel/kapi/devices/interface_registry.cpp b/kernel/kapi/devices/interface_registry.cpp index 58364d0a..2ec336ed 100644 --- a/kernel/kapi/devices/interface_registry.cpp +++ b/kernel/kapi/devices/interface_registry.cpp @@ -43,7 +43,7 @@ namespace kapi::devices return *registry; } - auto interface_registry::do_publish(kstd::shared_ptr<device> device, kstd::string name, interface interface, + auto interface_registry::do_publish(kstd::shared_ptr<device> device, kstd::string name, interface_id interface, void * implementation) -> kstd::result<void> { erase_if(m_entries, [interface](auto e) { return e.interface() == interface && !e.device(); }); @@ -67,7 +67,7 @@ namespace kapi::devices return kstd::success(); } - auto interface_registry::unpublish(device const & device, interface interface) -> void + auto interface_registry::unpublish(device const & device, interface_id interface) -> void { erase_if(m_entries, [&](auto e) { auto locked_device = e.device(); @@ -75,7 +75,7 @@ namespace kapi::devices }); } - auto interface_registry::all(interface interface) const -> kstd::vector<entry> + auto interface_registry::all(interface_id interface) const -> kstd::vector<entry> { auto filtered = m_entries; erase_if(filtered, [&](auto e) { @@ -85,7 +85,7 @@ namespace kapi::devices return filtered; } - auto interface_registry::resolve(interface interface, std::string_view name) -> void * + auto interface_registry::resolve(interface_id interface, std::string_view name) -> void * { auto found = std::ranges::find_if(m_entries, [&](auto e) { return e.name() == name && e.device(); }); @@ -101,7 +101,7 @@ namespace kapi::devices return nullptr; } - auto interface_registry::resolve(interface interface, device & device) -> void * + auto interface_registry::resolve(interface_id interface, device & device) -> void * { if (auto by_device = device.as(interface)) { diff --git a/kernel/kapi/devices/interface_registry.tests.cpp b/kernel/kapi/devices/interface_registry.tests.cpp index 1982edbf..4d2e2097 100644 --- a/kernel/kapi/devices/interface_registry.tests.cpp +++ b/kernel/kapi/devices/interface_registry.tests.cpp @@ -8,7 +8,7 @@ namespace { struct probe_device { - constexpr auto static id = kapi::devices::interface{"probe"}; + constexpr auto static id = kapi::devices::interface_id{"probe"}; virtual ~probe_device() = default; @@ -17,7 +17,7 @@ namespace struct const_device { - constexpr auto static id = kapi::devices::interface{"flip"}; + constexpr auto static id = kapi::devices::interface_id{"flip"}; virtual ~const_device() = default; @@ -29,7 +29,7 @@ namespace struct unimplemented_device { - constexpr auto static id = kapi::devices::interface{"unimplemented"}; + constexpr auto static id = kapi::devices::interface_id{"unimplemented"}; virtual ~unimplemented_device() = default; }; @@ -47,7 +47,7 @@ namespace return m_value; } - auto query_interface(kapi::devices::interface interface) -> void * override + auto query_interface(kapi::devices::interface_id interface) -> void * override { if (interface == probe_device::id) { diff --git a/kernel/kernel/drivers/storage/ram_disk.cpp b/kernel/kernel/drivers/storage/ram_disk.cpp index db87a48b..f4223c19 100644 --- a/kernel/kernel/drivers/storage/ram_disk.cpp +++ b/kernel/kernel/drivers/storage/ram_disk.cpp @@ -144,7 +144,7 @@ namespace kernel::drivers::storage return kernel::filesystem::block_major_numbers::ram_disk; } - auto ram_disk::query_interface(kapi::devices::interface interface) -> void * + auto ram_disk::query_interface(kapi::devices::interface_id interface) -> void * { if (interface == kapi::boot_modules::boot_module_driver_identification::id) { diff --git a/kernel/kernel/drivers/storage/ram_disk.hpp b/kernel/kernel/drivers/storage/ram_disk.hpp index 973a9e45..ab4c5a1b 100644 --- a/kernel/kernel/drivers/storage/ram_disk.hpp +++ b/kernel/kernel/drivers/storage/ram_disk.hpp @@ -25,7 +25,7 @@ namespace kernel::drivers::storage [[nodiscard]] auto claimed_major() const -> std::optional<std::uint8_t> override; protected: - auto query_interface(kapi::devices::interface interface) -> void * override; + auto query_interface(kapi::devices::interface_id interface) -> void * override; }; } // namespace kernel::drivers::storage diff --git a/kernel/kernel/filesystem/file_type_bindings.hpp b/kernel/kernel/filesystem/file_type_bindings.hpp index 94f6a763..00651f4a 100644 --- a/kernel/kernel/filesystem/file_type_bindings.hpp +++ b/kernel/kernel/filesystem/file_type_bindings.hpp @@ -14,7 +14,7 @@ namespace kernel::filesystem //! A binding between an interface, a posix special file type struct file_type_binding // NOLINT(cppcoreguidelines-pro-type-member-init) { - kapi::devices::interface interface; + kapi::devices::interface_id interface; file_type posix_type; }; diff --git a/kernel/kernel/test_support/devices/block_device.cpp b/kernel/kernel/test_support/devices/block_device.cpp index 3fd84611..a91a9cfb 100644 --- a/kernel/kernel/test_support/devices/block_device.cpp +++ b/kernel/kernel/test_support/devices/block_device.cpp @@ -67,7 +67,7 @@ namespace kernel::tests::devices return kstd::units::bytes{data.size()}; } - auto block_device::query_interface(kapi::devices::interface interface) -> void * + auto block_device::query_interface(kapi::devices::interface_id interface) -> void * { if (interface == kapi::devices::block_device::id) { diff --git a/kernel/kernel/test_support/devices/block_device.hpp b/kernel/kernel/test_support/devices/block_device.hpp index dc4f685e..a1c37688 100644 --- a/kernel/kernel/test_support/devices/block_device.hpp +++ b/kernel/kernel/test_support/devices/block_device.hpp @@ -27,7 +27,7 @@ namespace kernel::tests::devices kstd::vector<uint8_t> data{}; private: - [[nodiscard]] auto query_interface(kapi::devices::interface interface) -> void * override; + [[nodiscard]] auto query_interface(kapi::devices::interface_id interface) -> void * override; kstd::units::bytes m_block_size{}; }; |
