diff options
author | Subv <subv2112@gmail.com> | 2015-12-28 16:03:09 +0100 |
---|---|---|
committer | Subv <subv2112@gmail.com> | 2016-03-20 20:28:17 +0100 |
commit | 96f0e32f836b19edb3d14ce4f87a7aed1ac6a8e1 (patch) | |
tree | 9eed35100efe7714f7ef5a39ff2c3bbf897f3dae /src/core/file_sys/ivfc_archive.cpp | |
parent | HLE/FS: Corrected the error codes for DeleteFile (diff) | |
download | yuzu-96f0e32f836b19edb3d14ce4f87a7aed1ac6a8e1.tar yuzu-96f0e32f836b19edb3d14ce4f87a7aed1ac6a8e1.tar.gz yuzu-96f0e32f836b19edb3d14ce4f87a7aed1ac6a8e1.tar.bz2 yuzu-96f0e32f836b19edb3d14ce4f87a7aed1ac6a8e1.tar.lz yuzu-96f0e32f836b19edb3d14ce4f87a7aed1ac6a8e1.tar.xz yuzu-96f0e32f836b19edb3d14ce4f87a7aed1ac6a8e1.tar.zst yuzu-96f0e32f836b19edb3d14ce4f87a7aed1ac6a8e1.zip |
Diffstat (limited to '')
-rw-r--r-- | src/core/file_sys/ivfc_archive.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/core/file_sys/ivfc_archive.cpp b/src/core/file_sys/ivfc_archive.cpp index f2f96ef1a..e7b37e09d 100644 --- a/src/core/file_sys/ivfc_archive.cpp +++ b/src/core/file_sys/ivfc_archive.cpp @@ -68,17 +68,18 @@ u64 IVFCArchive::GetFreeBytes() const { //////////////////////////////////////////////////////////////////////////////////////////////////// -size_t IVFCFile::Read(const u64 offset, const size_t length, u8* buffer) const { +ResultVal<size_t> IVFCFile::Read(const u64 offset, const size_t length, u8* buffer) const { LOG_TRACE(Service_FS, "called offset=%llu, length=%zu", offset, length); romfs_file->Seek(data_offset + offset, SEEK_SET); size_t read_length = (size_t)std::min((u64)length, data_size - offset); - return romfs_file->ReadBytes(buffer, read_length); + return MakeResult<size_t>(romfs_file->ReadBytes(buffer, read_length)); } -size_t IVFCFile::Write(const u64 offset, const size_t length, const bool flush, const u8* buffer) const { +ResultVal<size_t> IVFCFile::Write(const u64 offset, const size_t length, const bool flush, const u8* buffer) const { LOG_ERROR(Service_FS, "Attempted to write to IVFC file"); - return 0; + // TODO(Subv): Find error code + return MakeResult<size_t>(0); } u64 IVFCFile::GetSize() const { |