aboutsummaryrefslogtreecommitdiff
path: root/kernel/include
diff options
context:
space:
mode:
authorLukas Oesch <lukasoesch20@gmail.com>2026-04-26 10:11:24 +0200
committerLukas Oesch <lukasoesch20@gmail.com>2026-04-26 10:11:24 +0200
commit4e2624b63236fa309c9ecf53a694b6ac9babf4e6 (patch)
treec0103162cb0654955d22aceab63c49becbac2cff /kernel/include
parentc002a6fe53375d8757d43c48c59ac7f327f412b5 (diff)
downloadteachos-4e2624b63236fa309c9ecf53a694b6ac9babf4e6.tar.xz
teachos-4e2624b63236fa309c9ecf53a694b6ac9babf4e6.zip
rename open_file_description to open_file_descriptor
Diffstat (limited to 'kernel/include')
-rw-r--r--kernel/include/kernel/filesystem/file_descriptor_table.hpp14
-rw-r--r--kernel/include/kernel/filesystem/open_file_descriptor.hpp (renamed from kernel/include/kernel/filesystem/open_file_description.hpp)24
2 files changed, 19 insertions, 19 deletions
diff --git a/kernel/include/kernel/filesystem/file_descriptor_table.hpp b/kernel/include/kernel/filesystem/file_descriptor_table.hpp
index 293dc36..b0e699b 100644
--- a/kernel/include/kernel/filesystem/file_descriptor_table.hpp
+++ b/kernel/include/kernel/filesystem/file_descriptor_table.hpp
@@ -1,7 +1,7 @@
#ifndef TEACH_OS_KERNEL_FILESYSTEM_FILE_DESCRIPTOR_TABLE_HPP
#define TEACH_OS_KERNEL_FILESYSTEM_FILE_DESCRIPTOR_TABLE_HPP
-#include <kernel/filesystem/open_file_description.hpp>
+#include <kernel/filesystem/open_file_descriptor.hpp>
#include <kstd/memory>
#include <kstd/vector>
@@ -10,7 +10,7 @@ namespace kernel::filesystem
{
/**
@brief A table for managing file descriptors in the filesystem. This class provides methods for adding, retrieving,
- and removing open file descriptions.
+ and removing open file descriptors.
*/
struct file_descriptor_table
{
@@ -35,17 +35,17 @@ namespace kernel::filesystem
/**
@brief Add a file to the descriptor table.
- @param f The file description to add.
+ @param f The file descriptor to add.
@return The file descriptor index assigned to the file, or -1 on failure.
*/
- auto add_file(kstd::shared_ptr<open_file_description> const & f) -> int;
+ auto add_file(kstd::shared_ptr<open_file_descriptor> const & f) -> int;
/**
@brief Get a file from the descriptor table.
@param fd The file descriptor index to retrieve.
- @return A pointer to the requested file description, or a null pointer if not found.
+ @return A pointer to the requested file descriptor, or a null pointer if not found.
*/
- [[nodiscard]] auto get_file(int fd) const -> kstd::shared_ptr<open_file_description>;
+ [[nodiscard]] auto get_file(int fd) const -> kstd::shared_ptr<open_file_descriptor>;
/**
@brief Remove a file from the descriptor table.
@@ -57,7 +57,7 @@ namespace kernel::filesystem
private:
file_descriptor_table() = default;
- kstd::vector<kstd::shared_ptr<open_file_description>> m_open_files{};
+ kstd::vector<kstd::shared_ptr<open_file_descriptor>> m_open_files{};
};
} // namespace kernel::filesystem
diff --git a/kernel/include/kernel/filesystem/open_file_description.hpp b/kernel/include/kernel/filesystem/open_file_descriptor.hpp
index fad41e4..036dcf0 100644
--- a/kernel/include/kernel/filesystem/open_file_description.hpp
+++ b/kernel/include/kernel/filesystem/open_file_descriptor.hpp
@@ -1,5 +1,5 @@
-#ifndef TEACH_OS_KERNEL_FILESYSTEM_OPEN_FILE_DESCRIPTION_HPP
-#define TEACH_OS_KERNEL_FILESYSTEM_OPEN_FILE_DESCRIPTION_HPP
+#ifndef TEACH_OS_KERNEL_FILESYSTEM_OPEN_FILE_DESCRIPTOR_HPP
+#define TEACH_OS_KERNEL_FILESYSTEM_OPEN_FILE_DESCRIPTOR_HPP
#include <kernel/filesystem/inode.hpp>
@@ -10,24 +10,24 @@
namespace kernel::filesystem
{
/**
- @brief Represents an open file description in the filesystem. This class encapsulates the state of an open file,
+ @brief Represents an open file descriptor in the filesystem. This class encapsulates the state of an open file,
including a reference to the associated inode and the current file offset.
*/
- struct open_file_description
+ struct open_file_descriptor
{
/**
- @brief Constructs an open file description for the given @p inode.
- @param inode The inode to associate with the open file description.
+ @brief Constructs an open file descriptor for the given @p inode.
+ @param inode The inode to associate with the open file descriptor.
*/
- explicit open_file_description(kstd::shared_ptr<inode> const & inode);
+ explicit open_file_descriptor(kstd::shared_ptr<inode> const & inode);
/**
- @brief Destructor for the open file description.
+ @brief Destructor for the open file descriptor.
*/
- ~open_file_description() = default;
+ ~open_file_descriptor() = default;
/**
- @brief Reads data from the open file description into a @p buffer, starting at the current file offset and for a
+ @brief Reads data from the open file descriptor into a @p buffer, starting at the current file offset and for a
given
@p size. The file offset is advanced by the number of bytes read.
@param buffer The buffer to read data into.
@@ -37,7 +37,7 @@ namespace kernel::filesystem
auto read(void * buffer, size_t size) -> size_t;
/**
- @brief Writes data to the open file description from a @p buffer, starting at the current file offset and for a
+ @brief Writes data to the open file descriptor from a @p buffer, starting at the current file offset and for a
given
@p size. The file offset is advanced by the number of bytes written.
@param buffer The buffer to write data from.
@@ -47,7 +47,7 @@ namespace kernel::filesystem
auto write(void const * buffer, size_t size) -> size_t;
/**
- @brief Returns the current file offset for this open file description.
+ @brief Returns the current file offset for this open file descriptor.
@return The current file offset in bytes.
*/
[[nodiscard]] auto offset() const -> size_t;