aboutsummaryrefslogtreecommitdiff
path: root/kapi
diff options
context:
space:
mode:
authorFelix Morgner <felix.morgner@ost.ch>2026-07-29 21:48:02 +0200
committerFelix Morgner <felix.morgner@ost.ch>2026-07-29 21:48:02 +0200
commit0958e712a762374b4706015fe225215678906dd8 (patch)
tree2cfdaccd3f352635d7a6cd8e6cda7b36155b830c /kapi
parenteff4dc6b0a9075e640bf8abdb38959d8c408986a (diff)
downloadkernel-develop.tar.xz
kernel-develop.zip
kernel: allow reallocation of minor numbersHEADdevelop
Diffstat (limited to 'kapi')
-rw-r--r--kapi/kapi/devices/driver.hpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/kapi/kapi/devices/driver.hpp b/kapi/kapi/devices/driver.hpp
index 348e2841..20f66536 100644
--- a/kapi/kapi/devices/driver.hpp
+++ b/kapi/kapi/devices/driver.hpp
@@ -80,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 minor number associated with the driver and a device, if any.
+ //!
+ //! @param device The device associated with the relevant device number registration.
+ [[nodiscard]] virtual auto claimed_minor(device & device) const -> std::optional<std::uint8_t>;
+
//! Get the name of this driver.
//!
//! @return The static name of this driver.