WFS: Share error codes with WFSI.

This commit is contained in:
Pierre Bourdon 2017-08-16 06:50:18 +02:00
parent e6e00f6c8d
commit 2a8d9a53b7
3 changed files with 9 additions and 14 deletions

View File

@ -355,7 +355,7 @@ IPCCommandResult WFSI::IOCtl(const IOCtlRequest& request)
if (!fp) if (!fp)
{ {
WARN_LOG(IOS_WFS, "IOCTL_WFSI_LOAD_DOL: no such file or directory: %s", path.c_str()); 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; break;
} }
@ -395,7 +395,7 @@ u32 WFSI::GetTmd(u16 group_id, u32 title_id, u64 subtitle_id, u32 address, u32*
if (!fp) if (!fp)
{ {
WARN_LOG(IOS, "GetTmd: no such file or directory: %s", path.c_str()); WARN_LOG(IOS, "GetTmd: no such file or directory: %s", path.c_str());
return WFSI_ENOENT; return WFS_ENOENT;
} }
if (address) if (address)
{ {

View File

@ -64,11 +64,6 @@ private:
ARCUnpacker m_arc_unpacker; ARCUnpacker m_arc_unpacker;
enum
{
WFSI_ENOENT = -12000,
};
enum enum
{ {
IOCTL_WFSI_PREPARE_DEVICE = 0x02, IOCTL_WFSI_PREPARE_DEVICE = 0x02,

View File

@ -22,6 +22,13 @@ namespace WFS
std::string NativePath(const std::string& wfs_path); 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 namespace Device
{ {
class WFSSRV : public Device class WFSSRV : public Device
@ -73,13 +80,6 @@ private:
IOCTL_WFS_WRITE_ABSOLUTE = 0x49, 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 struct FileDescriptor
{ {
bool in_use; bool in_use;