WFSI: Rename 2 ioctls to better reflect their purposes.

* IOCTL_WFSI_PREPARE_DEVICE -> IOCTL_WFSI_IMPORT_TITLE_INIT
  (equivalent of ES_ImportTitleInit, also the official name)

* IOCTL_WFSI_IMPORT_TITLE -> IOCTL_WFSI_IMPORT_TITLE_CANCEL
  (equivalent of ES_ImportTitleCancel)
This commit is contained in:
Léo Lam 2017-08-17 11:23:38 +02:00
parent 7423563386
commit c1817b2c6d
2 changed files with 10 additions and 10 deletions

View File

@ -125,7 +125,7 @@ IPCCommandResult WFSI::IOCtl(const IOCtlRequest& request)
switch (request.request) switch (request.request)
{ {
case IOCTL_WFSI_PREPARE_DEVICE: case IOCTL_WFSI_IMPORT_TITLE_INIT:
{ {
u32 tmd_addr = Memory::Read_U32(request.buffer_in); u32 tmd_addr = Memory::Read_U32(request.buffer_in);
u32 tmd_size = Memory::Read_U32(request.buffer_in + 4); u32 tmd_size = Memory::Read_U32(request.buffer_in + 4);
@ -133,12 +133,12 @@ IPCCommandResult WFSI::IOCtl(const IOCtlRequest& request)
m_patch_type = static_cast<PatchType>(Memory::Read_U32(request.buffer_in + 32)); m_patch_type = static_cast<PatchType>(Memory::Read_U32(request.buffer_in + 32));
m_continue_install = Memory::Read_U32(request.buffer_in + 36); m_continue_install = Memory::Read_U32(request.buffer_in + 36);
INFO_LOG(IOS_WFS, "IOCTL_WFSI_PREPARE_DEVICE: patch type %d, continue install: %s", INFO_LOG(IOS_WFS, "IOCTL_WFSI_IMPORT_TITLE_INIT: patch type %d, continue install: %s",
m_patch_type, m_continue_install ? "true" : "false"); m_patch_type, m_continue_install ? "true" : "false");
if (!IOS::ES::IsValidTMDSize(tmd_size)) if (!IOS::ES::IsValidTMDSize(tmd_size))
{ {
ERROR_LOG(IOS_WFS, "IOCTL_WFSI_PREPARE_DEVICE: TMD size too large (%d)", tmd_size); ERROR_LOG(IOS_WFS, "IOCTL_WFSI_IMPORT_TITLE_INIT: TMD size too large (%d)", tmd_size);
return_error_code = IPC_EINVAL; return_error_code = IPC_EINVAL;
break; break;
} }
@ -295,8 +295,8 @@ IPCCommandResult WFSI::IOCtl(const IOCtlRequest& request)
WARN_LOG(IOS_WFS, "IOCTL_WFSI_DELETE_TITLE: unimplemented"); WARN_LOG(IOS_WFS, "IOCTL_WFSI_DELETE_TITLE: unimplemented");
break; break;
case IOCTL_WFSI_IMPORT_TITLE: case IOCTL_WFSI_IMPORT_TITLE_CANCEL:
WARN_LOG(IOS_WFS, "IOCTL_WFSI_IMPORT_TITLE: unimplemented"); WARN_LOG(IOS_WFS, "IOCTL_WFSI_IMPORT_TITLE_CANCEL: unimplemented");
break; break;
case IOCTL_WFSI_INIT: case IOCTL_WFSI_INIT:

View File

@ -67,11 +67,11 @@ private:
u16 m_import_group_id; u16 m_import_group_id;
std::string m_import_group_id_str; std::string m_import_group_id_str;
// Set on PREPARE_DEVICE when the next profile application should not delete // Set on IMPORT_TITLE_INIT when the next profile application should not delete
// temporary install files. // temporary install files.
bool m_continue_install = false; bool m_continue_install = false;
// Set on PREPARE_DEVICE to indicate that the install is a patch and not a // Set on IMPORT_TITLE_INIT to indicate that the install is a patch and not a
// standalone title. // standalone title.
enum PatchType enum PatchType
{ {
@ -85,7 +85,7 @@ private:
enum enum
{ {
IOCTL_WFSI_PREPARE_DEVICE = 0x02, IOCTL_WFSI_IMPORT_TITLE_INIT = 0x02,
IOCTL_WFSI_PREPARE_CONTENT = 0x03, IOCTL_WFSI_PREPARE_CONTENT = 0x03,
IOCTL_WFSI_IMPORT_CONTENT = 0x04, IOCTL_WFSI_IMPORT_CONTENT = 0x04,
@ -94,7 +94,7 @@ private:
IOCTL_WFSI_FINALIZE_TITLE_INSTALL = 0x06, IOCTL_WFSI_FINALIZE_TITLE_INSTALL = 0x06,
IOCTL_WFSI_DELETE_TITLE = 0x17, IOCTL_WFSI_DELETE_TITLE = 0x17,
IOCTL_WFSI_IMPORT_TITLE = 0x2f, IOCTL_WFSI_IMPORT_TITLE_CANCEL = 0x2f,
IOCTL_WFSI_INIT = 0x81, IOCTL_WFSI_INIT = 0x81,
IOCTL_WFSI_SET_DEVICE_NAME = 0x82, IOCTL_WFSI_SET_DEVICE_NAME = 0x82,