aboutsummaryrefslogtreecommitdiff
path: root/kapi
diff options
context:
space:
mode:
Diffstat (limited to 'kapi')
-rw-r--r--kapi/kapi/filesystem.hpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/kapi/kapi/filesystem.hpp b/kapi/kapi/filesystem.hpp
index 3bd9aaf4..02f174e9 100644
--- a/kapi/kapi/filesystem.hpp
+++ b/kapi/kapi/filesystem.hpp
@@ -1,9 +1,11 @@
#ifndef TEACHOS_KAPI_FILESYSTEM_HPP
#define TEACHOS_KAPI_FILESYSTEM_HPP
+#include <kstd/system_error.hpp>
#include <kstd/unikstd.h>
#include <cstddef>
+#include <expected>
#include <string_view>
namespace kapi::filesystem
@@ -39,7 +41,7 @@ namespace kapi::filesystem
@return A file descriptor on success, -1 on failure.
@qualifier kernel-defined
*/
- auto open(std::string_view path) -> kstd::ssize_t;
+ auto open(std::string_view path) -> std::expected<std::size_t, kstd::error_code>;
/**
@brief Closes a @p file_descriptor.