[ox/fs] Fix FileSystemTemplate::directAccess

This commit is contained in:
Gary Talent 2021-04-18 16:06:52 -05:00
parent 659830fcdf
commit c587bf0997
2 changed files with 4 additions and 4 deletions

View File

@ -10,13 +10,13 @@
namespace ox {
Result<const uint8_t*> FileSystem::read(FileAddress addr) noexcept {
Result<const uint8_t*> FileSystem::directAccess(FileAddress addr) noexcept {
switch (addr.type()) {
case FileAddressType::Inode:
return read(addr.getInode().value);
return directAccess(addr.getInode().value);
case FileAddressType::ConstPath:
case FileAddressType::Path:
return read(addr.getPath().value);
return directAccess(addr.getPath().value);
default:
return OxError(1);
}

View File

@ -44,7 +44,7 @@ class FileSystem {
Error read(FileAddress addr, std::size_t readStart, std::size_t readSize, void *buffer, std::size_t *size) noexcept;
Result<const uint8_t*> read(FileAddress addr) noexcept;
Result<const uint8_t*> directAccess(FileAddress addr) noexcept;
Result<Vector<String>> ls(const ox::String &dir) noexcept;