From 1e75455ef5e64d3d8ec5c9eec7a6cd800e7417c0 Mon Sep 17 00:00:00 2001 From: Pierre Bourdon Date: Mon, 7 Aug 2017 02:09:31 +0200 Subject: [PATCH] WFS: Return a proper ENOENT code on failed OPEN. --- Source/Core/Core/IOS/WFS/WFSSRV.cpp | 4 ++-- Source/Core/Core/IOS/WFS/WFSSRV.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Source/Core/Core/IOS/WFS/WFSSRV.cpp b/Source/Core/Core/IOS/WFS/WFSSRV.cpp index 0a76d6e482..7d3e6af3da 100644 --- a/Source/Core/Core/IOS/WFS/WFSSRV.cpp +++ b/Source/Core/Core/IOS/WFS/WFSSRV.cpp @@ -110,7 +110,7 @@ IPCCommandResult WFSSRV::IOCtl(const IOCtlRequest& request) case IOCTL_WFS_GLOB_NEXT: INFO_LOG(IOS, "IOCTL_WFS_GLOB_NEXT(%u)", request.request); - return_error_code = WFS_EEMPTY; + return_error_code = WFS_ENOENT; break; case IOCTL_WFS_GLOB_END: @@ -149,7 +149,7 @@ IPCCommandResult WFSSRV::IOCtl(const IOCtlRequest& request) { ERROR_LOG(IOS, "IOCTL_WFS_OPEN(%s, %d): error opening file", path.c_str(), mode); ReleaseFileDescriptor(fd); - return_error_code = -1; // TODO(wfs): proper error code. + return_error_code = WFS_ENOENT; break; } diff --git a/Source/Core/Core/IOS/WFS/WFSSRV.h b/Source/Core/Core/IOS/WFS/WFSSRV.h index cba30037a1..f509ae9ee1 100644 --- a/Source/Core/Core/IOS/WFS/WFSSRV.h +++ b/Source/Core/Core/IOS/WFS/WFSSRV.h @@ -73,7 +73,7 @@ private: enum { WFS_EBADFD = -10026, // Invalid file descriptor. - WFS_EEMPTY = -10028, // Directory is empty of iteration completed. + WFS_ENOENT = -10028, // No such file or directory. }; struct FileDescriptor