From 11dd858e1d9da71a182bc707ca3a481dafbccbe4 Mon Sep 17 00:00:00 2001 From: Amlal Date: Sun, 27 Apr 2025 19:51:43 +0200 Subject: dev, kernel: refactor and improve parts of the kernel, related to I/O Signed-off-by: Amlal --- dev/kernel/src/FS/HeFS+FileMgr.cc | 4 ++-- dev/kernel/src/FS/NeFS+FileMgr.cc | 14 +++++++------- 2 files changed, 9 insertions(+), 9 deletions(-) (limited to 'dev/kernel/src') diff --git a/dev/kernel/src/FS/HeFS+FileMgr.cc b/dev/kernel/src/FS/HeFS+FileMgr.cc index e0b92a8d..d7530d8f 100644 --- a/dev/kernel/src/FS/HeFS+FileMgr.cc +++ b/dev/kernel/src/FS/HeFS+FileMgr.cc @@ -10,5 +10,5 @@ #include #include -#endif // ifdef __FSKIT_INCLUDES_HEFS__ -#endif // ifndef __NE_MINIMAL_OS__ +#endif // ifdef __FSKIT_INCLUDES_HEFS__ +#endif // ifndef __NE_MINIMAL_OS__ diff --git a/dev/kernel/src/FS/NeFS+FileMgr.cc b/dev/kernel/src/FS/NeFS+FileMgr.cc index 56fc2dbb..c92d6727 100644 --- a/dev/kernel/src/FS/NeFS+FileMgr.cc +++ b/dev/kernel/src/FS/NeFS+FileMgr.cc @@ -10,7 +10,7 @@ #include #include -/// @brief NeFS File manager. +/// @brief NeFS File System Manager. /// BUGS: 0 namespace Kernel { @@ -42,28 +42,28 @@ bool NeFileSystemMgr::Remove(_Input const Char* path) { /// @param path The filename path. /// @return The Node pointer. NodePtr NeFileSystemMgr::Create(_Input const Char* path) { - return node_cast(mParser->CreateCatalog(path)); + return rtl_node_cast(mParser->CreateCatalog(path)); } /// @brief Creates a node with is a directory. /// @param path The filename path. /// @return The Node pointer. NodePtr NeFileSystemMgr::CreateDirectory(const Char* path) { - return node_cast(mParser->CreateCatalog(path, 0, kNeFSCatalogKindDir)); + return rtl_node_cast(mParser->CreateCatalog(path, 0, kNeFSCatalogKindDir)); } /// @brief Creates a node with is a alias. /// @param path The filename path. /// @return The Node pointer. NodePtr NeFileSystemMgr::CreateAlias(const Char* path) { - return node_cast(mParser->CreateCatalog(path, 0, kNeFSCatalogKindAlias)); + return rtl_node_cast(mParser->CreateCatalog(path, 0, kNeFSCatalogKindAlias)); } /// @brief Creates a node with is a page file. /// @param path The filename path. /// @return The Node pointer. NodePtr NeFileSystemMgr::CreateSwapFile(const Char* path) { - return node_cast(mParser->CreateCatalog(path, 0, kNeFSCatalogKindPage)); + return rtl_node_cast(mParser->CreateCatalog(path, 0, kNeFSCatalogKindPage)); } /// @brief Gets the root directory. @@ -101,7 +101,7 @@ _Output NodePtr NeFileSystemMgr::Open(_Input const Char* path, _Input const Char auto catalog = mParser->GetCatalog(path); - return node_cast(catalog); + return rtl_node_cast(catalog); } /// @brief Writes to a catalog's fork. @@ -177,7 +177,7 @@ _Output Bool NeFileSystemMgr::Seek(NodePtr node, SizeT off) { /// @retval false always returns this, it is unimplemented. _Output SizeT NeFileSystemMgr::Tell(NodePtr node) { - if (!node) return kNPos; + if (!node) return kFileMgrNPos; return mParser->Tell(reinterpret_cast(node)); } -- cgit v1.2.3