[ox/fs] Fix FileSystemTemplate::directAccess
This commit is contained in:
parent
659830fcdf
commit
c587bf0997
6
deps/ox/src/ox/fs/filesystem/filesystem.cpp
vendored
6
deps/ox/src/ox/fs/filesystem/filesystem.cpp
vendored
@ -10,13 +10,13 @@
|
|||||||
|
|
||||||
namespace ox {
|
namespace ox {
|
||||||
|
|
||||||
Result<const uint8_t*> FileSystem::read(FileAddress addr) noexcept {
|
Result<const uint8_t*> FileSystem::directAccess(FileAddress addr) noexcept {
|
||||||
switch (addr.type()) {
|
switch (addr.type()) {
|
||||||
case FileAddressType::Inode:
|
case FileAddressType::Inode:
|
||||||
return read(addr.getInode().value);
|
return directAccess(addr.getInode().value);
|
||||||
case FileAddressType::ConstPath:
|
case FileAddressType::ConstPath:
|
||||||
case FileAddressType::Path:
|
case FileAddressType::Path:
|
||||||
return read(addr.getPath().value);
|
return directAccess(addr.getPath().value);
|
||||||
default:
|
default:
|
||||||
return OxError(1);
|
return OxError(1);
|
||||||
}
|
}
|
||||||
|
2
deps/ox/src/ox/fs/filesystem/filesystem.hpp
vendored
2
deps/ox/src/ox/fs/filesystem/filesystem.hpp
vendored
@ -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;
|
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;
|
Result<Vector<String>> ls(const ox::String &dir) noexcept;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user