From 2a8d9a53b7a8e7fc855766ab5415405bda642510 Mon Sep 17 00:00:00 2001 From: Pierre Bourdon Date: Wed, 16 Aug 2017 06:50:18 +0200 Subject: [PATCH] WFS: Share error codes with WFSI. --- Source/Core/Core/IOS/WFS/WFSI.cpp | 4 ++-- Source/Core/Core/IOS/WFS/WFSI.h | 5 ----- Source/Core/Core/IOS/WFS/WFSSRV.h | 14 +++++++------- 3 files changed, 9 insertions(+), 14 deletions(-) diff --git a/Source/Core/Core/IOS/WFS/WFSI.cpp b/Source/Core/Core/IOS/WFS/WFSI.cpp index 70f03b4281..274850451d 100644 --- a/Source/Core/Core/IOS/WFS/WFSI.cpp +++ b/Source/Core/Core/IOS/WFS/WFSI.cpp @@ -355,7 +355,7 @@ IPCCommandResult WFSI::IOCtl(const IOCtlRequest& request) if (!fp) { WARN_LOG(IOS_WFS, "IOCTL_WFSI_LOAD_DOL: no such file or directory: %s", path.c_str()); - return_error_code = WFSI_ENOENT; + return_error_code = WFS_ENOENT; break; } @@ -395,7 +395,7 @@ u32 WFSI::GetTmd(u16 group_id, u32 title_id, u64 subtitle_id, u32 address, u32* if (!fp) { WARN_LOG(IOS, "GetTmd: no such file or directory: %s", path.c_str()); - return WFSI_ENOENT; + return WFS_ENOENT; } if (address) { diff --git a/Source/Core/Core/IOS/WFS/WFSI.h b/Source/Core/Core/IOS/WFS/WFSI.h index 01f9e30831..b7a7747218 100644 --- a/Source/Core/Core/IOS/WFS/WFSI.h +++ b/Source/Core/Core/IOS/WFS/WFSI.h @@ -64,11 +64,6 @@ private: ARCUnpacker m_arc_unpacker; - enum - { - WFSI_ENOENT = -12000, - }; - enum { IOCTL_WFSI_PREPARE_DEVICE = 0x02, diff --git a/Source/Core/Core/IOS/WFS/WFSSRV.h b/Source/Core/Core/IOS/WFS/WFSSRV.h index 3b2f2d5f2d..a5697f28fc 100644 --- a/Source/Core/Core/IOS/WFS/WFSSRV.h +++ b/Source/Core/Core/IOS/WFS/WFSSRV.h @@ -22,6 +22,13 @@ namespace WFS std::string NativePath(const std::string& wfs_path); } +enum +{ + WFS_EBADFD = -10026, // Invalid file descriptor. + WFS_EEXIST = -10027, // File already exists. + WFS_ENOENT = -10028, // No such file or directory. +}; + namespace Device { class WFSSRV : public Device @@ -73,13 +80,6 @@ private: IOCTL_WFS_WRITE_ABSOLUTE = 0x49, }; - enum - { - WFS_EBADFD = -10026, // Invalid file descriptor. - WFS_EEXIST = -10027, // File already exists. - WFS_ENOENT = -10028, // No such file or directory. - }; - struct FileDescriptor { bool in_use;