diff options
Diffstat (limited to 'kernel/devices/include/devices/block_device.hpp')
| -rw-r--r-- | kernel/devices/include/devices/block_device.hpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/kernel/devices/include/devices/block_device.hpp b/kernel/devices/include/devices/block_device.hpp index a2c849f1..4831be52 100644 --- a/kernel/devices/include/devices/block_device.hpp +++ b/kernel/devices/include/devices/block_device.hpp @@ -52,20 +52,20 @@ namespace devices * @brief Return logical block size in bytes. * @return One logical block size in bytes. */ - auto block_size() const -> size_t; + [[nodiscard]] auto block_size() const -> size_t; /** * @brief Return device capacity in bytes. * @return Total number of addressable bytes. */ - auto capacity() const -> size_t; + [[nodiscard]] auto capacity() const -> size_t; /** * @brief Override to identify block devices. * @return true if this device is a block device, false otherwise. */ - auto is_block_device() const -> bool override + [[nodiscard]] auto is_block_device() const -> bool override { return true; } @@ -85,14 +85,14 @@ namespace devices * @brief Return total device size in bytes. * @return Total number of addressable bytes. */ - virtual auto size() const -> size_t = 0; + [[nodiscard]] virtual auto size() const -> size_t = 0; /** * @brief Compute transfer information for @p block_index. * @param block_index Zero-based block index. * @return Computed transfer information for one logical block access. */ - auto calculate_transfer(size_t block_index) const -> transfer_info; + [[nodiscard]] auto calculate_transfer(size_t block_index) const -> transfer_info; size_t m_block_size; }; |
