From e2bbec91d70847cc5a2ff67eb84ca4a3c2d03e85 Mon Sep 17 00:00:00 2001 From: Amlal El Mahrouss Date: Sun, 4 Feb 2024 10:59:24 +0100 Subject: Kernel: Depend less on NewFS, add support for FileSystem protocol in NewBoot. Signed-off-by: Amlal El Mahrouss --- Private/KernelKit/FileManager.hpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'Private/KernelKit/FileManager.hpp') diff --git a/Private/KernelKit/FileManager.hpp b/Private/KernelKit/FileManager.hpp index cfd06f07..a52daa7d 100644 --- a/Private/KernelKit/FileManager.hpp +++ b/Private/KernelKit/FileManager.hpp @@ -17,7 +17,10 @@ #pragma once +#ifdef __USE_NEWFS__ #include +#endif // __USE_NEWFS__ + #include #include #include @@ -87,6 +90,7 @@ class IFilesystemManager { /** @brief invalid position. (n-pos) */ #define kNPos (SizeT)(-1); +#ifdef __USE_NEWFS__ /** * @brief Based of IFilesystemManager, takes care of managing NewFS disks. */ @@ -148,12 +152,14 @@ class NewFilesystemManager final : public IFilesystemManager { NewFSImplementation *fImpl{nullptr}; }; +#endif // ifdef __USE_NEWFS__ + /** * Usable FileStream * @tparam Encoding file encoding (char, wchar_t...) * @tparam FSClass Filesystem contract who takes care of it. */ -template +template class FileStream final { public: explicit FileStream(const Encoding *path); -- cgit v1.2.3