diff options
Diffstat (limited to 'kernel/kernel/filesystem/filesystem.hpp')
| -rw-r--r-- | kernel/kernel/filesystem/filesystem.hpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/kernel/kernel/filesystem/filesystem.hpp b/kernel/kernel/filesystem/filesystem.hpp index 2e713c89..f9fb2859 100644 --- a/kernel/kernel/filesystem/filesystem.hpp +++ b/kernel/kernel/filesystem/filesystem.hpp @@ -10,6 +10,7 @@ #include <kstd/system_error.hpp> #include <kstd/vector.hpp> +#include <cstdint> #include <optional> #include <string_view> #include <utility> @@ -30,11 +31,11 @@ namespace kernel::filesystem //! Virtual destructor enabling polymorphic destruction. virtual ~filesystem() = default; - //! Probes the given inode to determine if it contains a recognizable filesystem. + //! Check if the data represented by the given inode is recognized as this filesystem. //! - //! @param backing_inode The inode to probe and mount, if any. - //! @return A pointer to the instantiated filesystem and the root of it on success, an error otherwise. - auto static probe(inode_ptr const & backing_inode) -> kstd::result<filesystem_ptr>; + //! @param inode The inode to probe, if any. + //! @return the priority (higher is better) of the match on success, an error otherwise. + [[nodiscard]] virtual auto probe(inode_ptr const & inode) const -> kstd::result<std::uint32_t> = 0; //! Initializes the filesystem with the given inode. //! |
