From a8bd597ed30f4d57bb8ec348b66f13a90c197b69 Mon Sep 17 00:00:00 2001 From: Felix Morgner Date: Mon, 24 Aug 2026 10:50:05 +0200 Subject: 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. --- kernel/kernel/filesystem/devfs/inode.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 #include #include +#include #include #include #include @@ -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::max()}; } auto inode::read(std::span, kstd::bytes) const -> kstd::result -- cgit v1.2.3