diff options
| author | Felix Morgner <felix.morgner@ost.ch> | 2026-07-25 14:30:10 +0200 |
|---|---|---|
| committer | Felix Morgner <felix.morgner@ost.ch> | 2026-07-25 14:30:10 +0200 |
| commit | 2bf97dc2927da8f051661d104d52fec41222c670 (patch) | |
| tree | 846c67ac64bf2b1d1375eccfe5b6889093fa1007 /kapi | |
| parent | 948453d3d073de207274535376d7274e82f04bc6 (diff) | |
| download | kernel-2bf97dc2927da8f051661d104d52fec41222c670.tar.xz kernel-2bf97dc2927da8f051661d104d52fec41222c670.zip | |
kapi: introduce driver names
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 *; |
