diff --git a/deps/ox/src/ox/fs/filesystem/filesystem.cpp b/deps/ox/src/ox/fs/filesystem/filesystem.cpp index bcbbad4e..e29ab8b4 100644 --- a/deps/ox/src/ox/fs/filesystem/filesystem.cpp +++ b/deps/ox/src/ox/fs/filesystem/filesystem.cpp @@ -13,7 +13,7 @@ namespace ox { -Result FileSystem::directAccess(const FileAddress &addr) noexcept { +Result FileSystem::directAccess(const FileAddress &addr) noexcept { switch (addr.type()) { case FileAddressType::Inode: return directAccess(addr.getInode().value); diff --git a/deps/ox/src/ox/fs/filesystem/filesystem.hpp b/deps/ox/src/ox/fs/filesystem/filesystem.hpp index 6fadfb06..5d9b25f7 100644 --- a/deps/ox/src/ox/fs/filesystem/filesystem.hpp +++ b/deps/ox/src/ox/fs/filesystem/filesystem.hpp @@ -34,13 +34,13 @@ class FileSystem { virtual Error read(const char *path, void *buffer, std::size_t buffSize) noexcept = 0; - virtual Result directAccess(const char *path) noexcept = 0; + virtual Result directAccess(const char *path) noexcept = 0; virtual Error read(uint64_t inode, void *buffer, std::size_t size) noexcept = 0; virtual Error read(uint64_t inode, std::size_t readStart, std::size_t readSize, void *buffer, std::size_t *size) noexcept = 0; - virtual Result directAccess(uint64_t inode) noexcept = 0; + virtual Result directAccess(uint64_t inode) noexcept = 0; Error read(const FileAddress &addr, void *buffer, std::size_t size) noexcept; @@ -48,7 +48,7 @@ class FileSystem { Error read(const FileAddress &addr, std::size_t readStart, std::size_t readSize, void *buffer, std::size_t *size) noexcept; - Result directAccess(const FileAddress &addr) noexcept; + Result directAccess(const FileAddress &addr) noexcept; Result> ls(const ox::String &dir) noexcept; @@ -124,13 +124,13 @@ class FileSystemTemplate: public FileSystem { Error read(const char *path, void *buffer, std::size_t buffSize) noexcept override; - Result directAccess(const char*) noexcept override; + Result directAccess(const char*) noexcept override; Error read(uint64_t inode, void *buffer, std::size_t size) noexcept override; Error read(uint64_t inode, std::size_t readStart, std::size_t readSize, void *buffer, std::size_t *size) noexcept override; - Result directAccess(uint64_t) noexcept override; + Result directAccess(uint64_t) noexcept override; Result> ls(const char *dir) noexcept override; @@ -249,7 +249,7 @@ Error FileSystemTemplate::read(const char *path, void *buf } template -Result FileSystemTemplate::directAccess(const char *path) noexcept { +Result FileSystemTemplate::directAccess(const char *path) noexcept { auto fd = fileSystemData(); oxReturnError(fd.error); Directory rootDir(m_fs, fd.value.rootDirInode); @@ -269,12 +269,12 @@ Error FileSystemTemplate::read(uint64_t inode, std::size_t } template -Result FileSystemTemplate::directAccess(uint64_t inode) noexcept { +Result FileSystemTemplate::directAccess(uint64_t inode) noexcept { auto data = m_fs.read(inode); if (!data.valid()) { return OxError(1); } - return data.get(); + return bit_cast(data.get()); } template diff --git a/deps/ox/src/ox/fs/filesystem/passthroughfs.cpp b/deps/ox/src/ox/fs/filesystem/passthroughfs.cpp index 6b4c185e..97a82968 100644 --- a/deps/ox/src/ox/fs/filesystem/passthroughfs.cpp +++ b/deps/ox/src/ox/fs/filesystem/passthroughfs.cpp @@ -76,7 +76,7 @@ Error PassThroughFS::read(const char *path, void *buffer, std::size_t buffSize) return OxError(0); } -Result PassThroughFS::directAccess(const char*) noexcept { +Result PassThroughFS::directAccess(const char*) noexcept { return OxError(1, "PassThroughFS::directAccess not supported"); } @@ -90,7 +90,7 @@ Error PassThroughFS::read(uint64_t, std::size_t, std::size_t, void*, std::size_t return OxError(1); } -Result PassThroughFS::directAccess(uint64_t) noexcept { +Result PassThroughFS::directAccess(uint64_t) noexcept { return OxError(1, "PassThroughFS::directAccess not supported"); } diff --git a/deps/ox/src/ox/fs/filesystem/passthroughfs.hpp b/deps/ox/src/ox/fs/filesystem/passthroughfs.hpp index 2745aa34..e60c73e4 100644 --- a/deps/ox/src/ox/fs/filesystem/passthroughfs.hpp +++ b/deps/ox/src/ox/fs/filesystem/passthroughfs.hpp @@ -43,13 +43,13 @@ class PassThroughFS: public FileSystem { Error read(const char *path, void *buffer, std::size_t buffSize) noexcept override; - Result directAccess(const char*) noexcept override; + Result directAccess(const char*) noexcept override; Error read(uint64_t inode, void *buffer, std::size_t size) noexcept override; Error read(uint64_t inode, std::size_t readStart, std::size_t readSize, void *buffer, std::size_t *size) noexcept override; - Result directAccess(uint64_t) noexcept override; + Result directAccess(uint64_t) noexcept override; Result> ls(const char *dir) noexcept override;