From 2bf97dc2927da8f051661d104d52fec41222c670 Mon Sep 17 00:00:00 2001 From: Felix Morgner Date: Sat, 25 Jul 2026 14:30:10 +0200 Subject: kapi: introduce driver names --- kapi/kapi/devices/driver.hpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'kapi') diff --git a/kapi/kapi/devices/driver.hpp b/kapi/kapi/devices/driver.hpp index b8646573..a2c2e396 100644 --- a/kapi/kapi/devices/driver.hpp +++ b/kapi/kapi/devices/driver.hpp @@ -9,6 +9,7 @@ #include #include +#include namespace kapi::devices { @@ -79,6 +80,11 @@ namespace kapi::devices //! Drivers that want to claim an auto-populated device node in devfs must override this function. [[nodiscard]] virtual auto claimed_major() const -> std::optional; + //! Get the name of this driver. + //! + //! @return The static name of this driver. + [[nodiscard]] virtual auto name() const noexcept -> std::string_view = 0; + protected: //! Return a pointer to the implementation of the given interface if this driver supports it. virtual auto query_interface(interface_id interface) -> void *; -- cgit v1.2.3