From 381a5c053f76a7d85d811ebf37a5943f6a57579e Mon Sep 17 00:00:00 2001 From: Subv Date: Mon, 28 Dec 2015 09:38:10 -0500 Subject: HLE/FS: FS::CreateFile takes an u64 for the file size. --- src/core/file_sys/ivfc_archive.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/core/file_sys/ivfc_archive.h') diff --git a/src/core/file_sys/ivfc_archive.h b/src/core/file_sys/ivfc_archive.h index f3fd82de4..2a4e4def3 100644 --- a/src/core/file_sys/ivfc_archive.h +++ b/src/core/file_sys/ivfc_archive.h @@ -38,7 +38,7 @@ public: bool DeleteFile(const Path& path) const override; bool RenameFile(const Path& src_path, const Path& dest_path) const override; bool DeleteDirectory(const Path& path) const override; - ResultCode CreateFile(const Path& path, u32 size) const override; + ResultCode CreateFile(const Path& path, u64 size) const override; bool CreateDirectory(const Path& path) const override; bool RenameDirectory(const Path& src_path, const Path& dest_path) const override; std::unique_ptr OpenDirectory(const Path& path) const override; -- cgit v1.2.3 From 09b0564c75c3da41eaf15dcb847831c11f4c27b9 Mon Sep 17 00:00:00 2001 From: Subv Date: Mon, 28 Dec 2015 09:59:27 -0500 Subject: HLE/FS: Corrected the error codes for DeleteFile --- src/core/file_sys/ivfc_archive.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/core/file_sys/ivfc_archive.h') diff --git a/src/core/file_sys/ivfc_archive.h b/src/core/file_sys/ivfc_archive.h index 2a4e4def3..5d3a5b61e 100644 --- a/src/core/file_sys/ivfc_archive.h +++ b/src/core/file_sys/ivfc_archive.h @@ -35,7 +35,7 @@ public: std::string GetName() const override; std::unique_ptr OpenFile(const Path& path, const Mode mode) const override; - bool DeleteFile(const Path& path) const override; + ResultCode DeleteFile(const Path& path) const override; bool RenameFile(const Path& src_path, const Path& dest_path) const override; bool DeleteDirectory(const Path& path) const override; ResultCode CreateFile(const Path& path, u64 size) const override; -- cgit v1.2.3 From 96f0e32f836b19edb3d14ce4f87a7aed1ac6a8e1 Mon Sep 17 00:00:00 2001 From: Subv Date: Mon, 28 Dec 2015 10:03:09 -0500 Subject: HLE/FS: Return the proper error codes on file Read/Write operations. These operations are limited by the open flags specified while opening the file. --- src/core/file_sys/ivfc_archive.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/core/file_sys/ivfc_archive.h') diff --git a/src/core/file_sys/ivfc_archive.h b/src/core/file_sys/ivfc_archive.h index 5d3a5b61e..acc7e60f5 100644 --- a/src/core/file_sys/ivfc_archive.h +++ b/src/core/file_sys/ivfc_archive.h @@ -56,8 +56,8 @@ public: : romfs_file(file), data_offset(offset), data_size(size) {} bool Open() override { return true; } - size_t Read(u64 offset, size_t length, u8* buffer) const override; - size_t Write(u64 offset, size_t length, bool flush, const u8* buffer) const override; + ResultVal Read(u64 offset, size_t length, u8* buffer) const override; + ResultVal Write(u64 offset, size_t length, bool flush, const u8* buffer) const override; u64 GetSize() const override; bool SetSize(u64 size) const override; bool Close() const override { return false; } -- cgit v1.2.3 From 95b34f8081e26cfe75d63a853d1626fdd5b636e6 Mon Sep 17 00:00:00 2001 From: Subv Date: Mon, 28 Dec 2015 10:17:06 -0500 Subject: HLE/FS: Return the proper error codes when opening files. --- src/core/file_sys/ivfc_archive.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/core/file_sys/ivfc_archive.h') diff --git a/src/core/file_sys/ivfc_archive.h b/src/core/file_sys/ivfc_archive.h index acc7e60f5..19d32dcca 100644 --- a/src/core/file_sys/ivfc_archive.h +++ b/src/core/file_sys/ivfc_archive.h @@ -34,7 +34,7 @@ public: std::string GetName() const override; - std::unique_ptr OpenFile(const Path& path, const Mode mode) const override; + ResultVal> OpenFile(const Path& path, const Mode mode) const override; ResultCode DeleteFile(const Path& path) const override; bool RenameFile(const Path& src_path, const Path& dest_path) const override; bool DeleteDirectory(const Path& path) const override; @@ -55,7 +55,7 @@ public: IVFCFile(std::shared_ptr file, u64 offset, u64 size) : romfs_file(file), data_offset(offset), data_size(size) {} - bool Open() override { return true; } + ResultCode Open() override { return RESULT_SUCCESS; } ResultVal Read(u64 offset, size_t length, u8* buffer) const override; ResultVal Write(u64 offset, size_t length, bool flush, const u8* buffer) const override; u64 GetSize() const override; -- cgit v1.2.3