diff options
Diffstat (limited to 'kapi')
| -rw-r--r-- | kapi/kapi/devices/driver.hpp | 6 |
1 files changed, 6 insertions, 0 deletions
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 <cstdint> #include <optional> +#include <string_view> 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<std::uint8_t>; + //! 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 *; |
