summaryrefslogtreecommitdiffstats
path: root/src/core/hle/service/filesystem
diff options
context:
space:
mode:
authorLioncash <mathew1800@gmail.com>2019-11-12 11:38:12 +0100
committerLioncash <mathew1800@gmail.com>2019-11-12 13:55:39 +0100
commitf11b87ebf1cd5770f9128e62931183b0c9331067 (patch)
tree286bed12845e8843e88d2a317388d115b69d2d95 /src/core/hle/service/filesystem
parentperf_stats: Resolve implicit int to double conversion error (diff)
downloadyuzu-f11b87ebf1cd5770f9128e62931183b0c9331067.tar
yuzu-f11b87ebf1cd5770f9128e62931183b0c9331067.tar.gz
yuzu-f11b87ebf1cd5770f9128e62931183b0c9331067.tar.bz2
yuzu-f11b87ebf1cd5770f9128e62931183b0c9331067.tar.lz
yuzu-f11b87ebf1cd5770f9128e62931183b0c9331067.tar.xz
yuzu-f11b87ebf1cd5770f9128e62931183b0c9331067.tar.zst
yuzu-f11b87ebf1cd5770f9128e62931183b0c9331067.zip
Diffstat (limited to 'src/core/hle/service/filesystem')
-rw-r--r--src/core/hle/service/filesystem/filesystem.cpp26
-rw-r--r--src/core/hle/service/filesystem/fsp_srv.cpp6
2 files changed, 16 insertions, 16 deletions
diff --git a/src/core/hle/service/filesystem/filesystem.cpp b/src/core/hle/service/filesystem/filesystem.cpp
index 11e5c56b7..102017d73 100644
--- a/src/core/hle/service/filesystem/filesystem.cpp
+++ b/src/core/hle/service/filesystem/filesystem.cpp
@@ -58,11 +58,11 @@ ResultCode VfsDirectoryServiceWrapper::CreateFile(const std::string& path_, u64
auto file = dir->CreateFile(FileUtil::GetFilename(path));
if (file == nullptr) {
// TODO(DarkLordZach): Find a better error code for this
- return ResultCode(-1);
+ return RESULT_UNKNOWN;
}
if (!file->Resize(size)) {
// TODO(DarkLordZach): Find a better error code for this
- return ResultCode(-1);
+ return RESULT_UNKNOWN;
}
return RESULT_SUCCESS;
}
@@ -80,7 +80,7 @@ ResultCode VfsDirectoryServiceWrapper::DeleteFile(const std::string& path_) cons
}
if (!dir->DeleteFile(FileUtil::GetFilename(path))) {
// TODO(DarkLordZach): Find a better error code for this
- return ResultCode(-1);
+ return RESULT_UNKNOWN;
}
return RESULT_SUCCESS;
@@ -94,7 +94,7 @@ ResultCode VfsDirectoryServiceWrapper::CreateDirectory(const std::string& path_)
auto new_dir = dir->CreateSubdirectory(FileUtil::GetFilename(path));
if (new_dir == nullptr) {
// TODO(DarkLordZach): Find a better error code for this
- return ResultCode(-1);
+ return RESULT_UNKNOWN;
}
return RESULT_SUCCESS;
}
@@ -104,7 +104,7 @@ ResultCode VfsDirectoryServiceWrapper::DeleteDirectory(const std::string& path_)
auto dir = GetDirectoryRelativeWrapped(backing, FileUtil::GetParentPath(path));
if (!dir->DeleteSubdirectory(FileUtil::GetFilename(path))) {
// TODO(DarkLordZach): Find a better error code for this
- return ResultCode(-1);
+ return RESULT_UNKNOWN;
}
return RESULT_SUCCESS;
}
@@ -114,7 +114,7 @@ ResultCode VfsDirectoryServiceWrapper::DeleteDirectoryRecursively(const std::str
auto dir = GetDirectoryRelativeWrapped(backing, FileUtil::GetParentPath(path));
if (!dir->DeleteSubdirectoryRecursive(FileUtil::GetFilename(path))) {
// TODO(DarkLordZach): Find a better error code for this
- return ResultCode(-1);
+ return RESULT_UNKNOWN;
}
return RESULT_SUCCESS;
}
@@ -125,7 +125,7 @@ ResultCode VfsDirectoryServiceWrapper::CleanDirectoryRecursively(const std::stri
if (!dir->CleanSubdirectoryRecursive(FileUtil::GetFilename(sanitized_path))) {
// TODO(DarkLordZach): Find a better error code for this
- return ResultCode(-1);
+ return RESULT_UNKNOWN;
}
return RESULT_SUCCESS;
@@ -142,7 +142,7 @@ ResultCode VfsDirectoryServiceWrapper::RenameFile(const std::string& src_path_,
return FileSys::ERROR_PATH_NOT_FOUND;
if (!src->Rename(FileUtil::GetFilename(dest_path))) {
// TODO(DarkLordZach): Find a better error code for this
- return ResultCode(-1);
+ return RESULT_UNKNOWN;
}
return RESULT_SUCCESS;
}
@@ -160,7 +160,7 @@ ResultCode VfsDirectoryServiceWrapper::RenameFile(const std::string& src_path_,
if (!src->GetContainingDirectory()->DeleteFile(FileUtil::GetFilename(src_path))) {
// TODO(DarkLordZach): Find a better error code for this
- return ResultCode(-1);
+ return RESULT_UNKNOWN;
}
return RESULT_SUCCESS;
@@ -177,7 +177,7 @@ ResultCode VfsDirectoryServiceWrapper::RenameDirectory(const std::string& src_pa
return FileSys::ERROR_PATH_NOT_FOUND;
if (!src->Rename(FileUtil::GetFilename(dest_path))) {
// TODO(DarkLordZach): Find a better error code for this
- return ResultCode(-1);
+ return RESULT_UNKNOWN;
}
return RESULT_SUCCESS;
}
@@ -189,7 +189,7 @@ ResultCode VfsDirectoryServiceWrapper::RenameDirectory(const std::string& src_pa
src_path, dest_path);
// TODO(DarkLordZach): Find a better error code for this
- return ResultCode(-1);
+ return RESULT_UNKNOWN;
}
ResultVal<FileSys::VirtualFile> VfsDirectoryServiceWrapper::OpenFile(const std::string& path_,
@@ -287,7 +287,7 @@ ResultVal<FileSys::VirtualFile> FileSystemController::OpenRomFSCurrentProcess()
if (romfs_factory == nullptr) {
// TODO(bunnei): Find a better error code for this
- return ResultCode(-1);
+ return RESULT_UNKNOWN;
}
return romfs_factory->OpenCurrentProcess(system.CurrentProcess()->GetTitleID());
@@ -300,7 +300,7 @@ ResultVal<FileSys::VirtualFile> FileSystemController::OpenRomFS(
if (romfs_factory == nullptr) {
// TODO(bunnei): Find a better error code for this
- return ResultCode(-1);
+ return RESULT_UNKNOWN;
}
return romfs_factory->Open(title_id, storage_id, type);
diff --git a/src/core/hle/service/filesystem/fsp_srv.cpp b/src/core/hle/service/filesystem/fsp_srv.cpp
index cbd5466c1..92162d3e1 100644
--- a/src/core/hle/service/filesystem/fsp_srv.cpp
+++ b/src/core/hle/service/filesystem/fsp_srv.cpp
@@ -785,7 +785,7 @@ void FSP_SRV::OpenFileSystemWithPatch(Kernel::HLERequestContext& ctx) {
static_cast<u8>(type), title_id);
IPC::ResponseBuilder rb{ctx, 2, 0, 0};
- rb.Push(ResultCode(-1));
+ rb.Push(RESULT_UNKNOWN);
}
void FSP_SRV::OpenSdCardFileSystem(Kernel::HLERequestContext& ctx) {
@@ -891,7 +891,7 @@ void FSP_SRV::OpenDataStorageByCurrentProcess(Kernel::HLERequestContext& ctx) {
// TODO (bunnei): Find the right error code to use here
LOG_CRITICAL(Service_FS, "no file system interface available!");
IPC::ResponseBuilder rb{ctx, 2};
- rb.Push(ResultCode(-1));
+ rb.Push(RESULT_UNKNOWN);
return;
}
@@ -928,7 +928,7 @@ void FSP_SRV::OpenDataStorageByDataId(Kernel::HLERequestContext& ctx) {
"could not open data storage with title_id={:016X}, storage_id={:02X}", title_id,
static_cast<u8>(storage_id));
IPC::ResponseBuilder rb{ctx, 2};
- rb.Push(ResultCode(-1));
+ rb.Push(RESULT_UNKNOWN);
return;
}