diff options
| author | Felix Morgner <felix.morgner@ost.ch> | 2026-08-24 10:50:05 +0200 |
|---|---|---|
| committer | Felix Morgner <felix.morgner@ost.ch> | 2026-08-26 11:16:17 +0200 |
| commit | a8bd597ed30f4d57bb8ec348b66f13a90c197b69 (patch) | |
| tree | c90800e631299cd38efb7106b303dc9bd1be16f7 | |
| parent | 3bf74c2494148f4de14ad0e59e4b2cd473bb650a (diff) | |
| download | kernel-a8bd597ed30f4d57bb8ec348b66f13a90c197b69.tar.xz kernel-a8bd597ed30f4d57bb8ec348b66f13a90c197b69.zip | |
kernel/fs: devfs: fix directory listing sentinel
The previous sentinel value would have prevent a device with major:minor
255:255 from showing up, if the read buffer was small enough to just
barely not read that device in one go. The new value is an actually
invalid device number, so it does not preclude any devices from showing
up in directory listings.
| -rw-r--r-- | kernel/kernel/filesystem/devfs/inode.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/kernel/kernel/filesystem/devfs/inode.cpp b/kernel/kernel/filesystem/devfs/inode.cpp index 67f03768..8813eb2a 100644 --- a/kernel/kernel/filesystem/devfs/inode.cpp +++ b/kernel/kernel/filesystem/devfs/inode.cpp @@ -16,6 +16,7 @@ #include <cstdint> #include <functional> #include <iterator> +#include <limits> #include <ranges> #include <span> #include <utility> @@ -26,7 +27,7 @@ namespace kernel::filesystem::devfs { namespace { - constexpr auto static sentinel = directory_listing_cursor{0xffff}; + constexpr auto static sentinel = directory_listing_cursor{std::numeric_limits<std::uint64_t>::max()}; } auto inode::read(std::span<std::byte>, kstd::bytes) const -> kstd::result<kstd::bytes> |
