diff --git a/src/ox/fs/filesystem.cpp b/src/ox/fs/filesystem.cpp index 2b1aef861..64573b380 100644 --- a/src/ox/fs/filesystem.cpp +++ b/src/ox/fs/filesystem.cpp @@ -6,3 +6,8 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #include "filesystem.hpp" + +namespace ox { +namespace fs { +} +} diff --git a/src/ox/fs/filesystem.hpp b/src/ox/fs/filesystem.hpp index 06eb8469c..3196aafff 100644 --- a/src/ox/fs/filesystem.hpp +++ b/src/ox/fs/filesystem.hpp @@ -41,6 +41,9 @@ class FileSystem { } }; + // static members + static typename FileStore::InodeId_t INODE_ROOT_DIR; + FileStore *store = nullptr; public: @@ -55,6 +58,9 @@ class FileSystem { static uint8_t *format(uint8_t *buffer, typename FileStore::FsSize_t size); }; +template +typename FileStore::InodeId_t FileSystem::INODE_ROOT_DIR = 2; + template int FileSystem::mkdir(const char *path) { return 0; @@ -81,7 +87,7 @@ uint8_t *FileSystem::format(uint8_t *buffer, typename FileStore::FsSi char dirBuff[sizeof(Directory) + sizeof(Directory)]; Directory &dir = *((Directory*) dirBuff); DirectoryEntry entry; - entry.inode = 2; + entry.inode = INODE_ROOT_DIR; entry.name = '/'; entry.nameLen = 1;