diff --git a/include/stratosphere/fs/fs_remote_filesystem.hpp b/include/stratosphere/fs/fs_remote_filesystem.hpp index 8aaee50f..d797d44a 100644 --- a/include/stratosphere/fs/fs_remote_filesystem.hpp +++ b/include/stratosphere/fs/fs_remote_filesystem.hpp @@ -38,7 +38,7 @@ namespace ams::fs { } virtual Result GetSizeImpl(s64 *out) override final { - return fsFileGetSize(this->base_file.get(), reinterpret_cast(out)); + return fsFileGetSize(this->base_file.get(), out); } virtual Result FlushImpl() override final { @@ -72,11 +72,11 @@ namespace ams::fs { virtual ~RemoteDirectory() { fsDirClose(this->base_dir.get()); } public: virtual Result ReadImpl(s64 *out_count, DirectoryEntry *out_entries, s64 max_entries) override final { - return fsDirRead(this->base_dir.get(), 0, reinterpret_cast(out_count), max_entries, out_entries); + return fsDirRead(this->base_dir.get(), out_count, max_entries, out_entries); } virtual Result GetEntryCountImpl(s64 *out) override final { - return fsDirGetEntryCount(this->base_dir.get(), reinterpret_cast(out)); + return fsDirGetEntryCount(this->base_dir.get(), out); } }; @@ -147,11 +147,11 @@ namespace ams::fs { virtual Result GetFreeSpaceSizeImpl(s64 *out, const char *path) { - return fsFsGetFreeSpace(this->base_fs.get(), path, reinterpret_cast(out)); + return fsFsGetFreeSpace(this->base_fs.get(), path, out); } virtual Result GetTotalSpaceSizeImpl(s64 *out, const char *path) { - return fsFsGetTotalSpace(this->base_fs.get(), path, reinterpret_cast(out)); + return fsFsGetTotalSpace(this->base_fs.get(), path, out); } virtual Result CleanDirectoryRecursivelyImpl(const char *path) { @@ -163,8 +163,8 @@ namespace ams::fs { return fsFsGetFileTimeStampRaw(this->base_fs.get(), path, reinterpret_cast<::FsTimeStampRaw *>(out)); } - virtual Result QueryEntryImpl(char *dst, size_t dst_size, const char *src, size_t src_size, fsa::QueryType query, const char *path) { - return fsFsQueryEntry(this->base_fs.get(), dst, dst_size, src, src_size, path, static_cast(query)); + virtual Result QueryEntryImpl(char *dst, size_t dst_size, const char *src, size_t src_size, fsa::QueryId query, const char *path) { + return fsFsQueryEntry(this->base_fs.get(), dst, dst_size, src, src_size, path, static_cast(query)); } }; diff --git a/include/stratosphere/fs/fs_remote_storage.hpp b/include/stratosphere/fs/fs_remote_storage.hpp index 07b08c94..2eb580f9 100644 --- a/include/stratosphere/fs/fs_remote_storage.hpp +++ b/include/stratosphere/fs/fs_remote_storage.hpp @@ -44,7 +44,7 @@ namespace ams::fs { }; virtual Result GetSize(s64 *out_size) override { - return fsStorageGetSize(this->base_storage.get(), reinterpret_cast(out_size)); + return fsStorageGetSize(this->base_storage.get(), out_size); }; virtual Result SetSize(s64 size) override { diff --git a/include/stratosphere/fs/fsa/fs_ifilesystem.hpp b/include/stratosphere/fs/fsa/fs_ifilesystem.hpp index 98a7a9e4..7d5ac04e 100644 --- a/include/stratosphere/fs/fsa/fs_ifilesystem.hpp +++ b/include/stratosphere/fs/fsa/fs_ifilesystem.hpp @@ -23,8 +23,8 @@ namespace ams::fs::fsa { class IFile; class IDirectory; - enum class QueryType { - SetArchiveBit = FsFileSystemQueryType_SetArchiveBit + enum class QueryId { + SetConcatenationFileAttribute = FsFileSystemQueryId_SetConcatenationFileAttribute }; class IFileSystem { @@ -122,7 +122,7 @@ namespace ams::fs::fsa { return this->GetFileTimeStampRawImpl(out, path); } - Result QueryEntry(char *dst, size_t dst_size, const char *src, size_t src_size, QueryType query, const char *path) { + Result QueryEntry(char *dst, size_t dst_size, const char *src, size_t src_size, QueryId query, const char *path) { R_UNLESS(path != nullptr, fs::ResultInvalidPath()); return this->QueryEntryImpl(dst, dst_size, src, src_size, query, path); } @@ -170,7 +170,7 @@ namespace ams::fs::fsa { return fs::ResultNotImplemented(); } - virtual Result QueryEntryImpl(char *dst, size_t dst_size, const char *src, size_t src_size, QueryType query, const char *path) { + virtual Result QueryEntryImpl(char *dst, size_t dst_size, const char *src, size_t src_size, QueryId query, const char *path) { return fs::ResultNotImplemented(); } diff --git a/source/util/util_ini.cpp b/source/util/util_ini.cpp index aac3c20b..66f61769 100644 --- a/source/util/util_ini.cpp +++ b/source/util/util_ini.cpp @@ -30,7 +30,7 @@ namespace ams::util::ini { size_t num_left; explicit FsFileContext(FsFile *f) : f(f), offset(0) { - u64 size; + s64 size; R_ASSERT(fsFileGetSize(this->f, &size)); this->num_left = size_t(size); }