diff --git a/src/xenia/kernel/xam/xam_net.cc b/src/xenia/kernel/xam/xam_net.cc index f64637133..d0a3d70c3 100644 --- a/src/xenia/kernel/xam/xam_net.cc +++ b/src/xenia/kernel/xam/xam_net.cc @@ -356,7 +356,7 @@ dword_result_t NetDll_WSAWaitForMultipleEvents(dword_t num_events, } while (result == X_STATUS_ALERTED); if (XFAILED(result)) { - uint32_t error = xboxkrnl::RtlNtStatusToDosError(result); + uint32_t error = xboxkrnl::xeRtlNtStatusToDosError(result); XThread::SetLastError(error); return ~0u; } @@ -375,7 +375,7 @@ DECLARE_XAM_EXPORT1(NetDll_WSACreateEvent, kNetworking, kImplemented); dword_result_t NetDll_WSACloseEvent(dword_t event_handle) { X_STATUS result = kernel_state()->object_table()->ReleaseHandle(event_handle); if (XFAILED(result)) { - uint32_t error = xboxkrnl::RtlNtStatusToDosError(result); + uint32_t error = xboxkrnl::xeRtlNtStatusToDosError(result); XThread::SetLastError(error); return 0; } @@ -386,7 +386,7 @@ DECLARE_XAM_EXPORT1(NetDll_WSACloseEvent, kNetworking, kImplemented); dword_result_t NetDll_WSAResetEvent(dword_t event_handle) { X_STATUS result = xboxkrnl::xeNtClearEvent(event_handle); if (XFAILED(result)) { - uint32_t error = xboxkrnl::RtlNtStatusToDosError(result); + uint32_t error = xboxkrnl::xeRtlNtStatusToDosError(result); XThread::SetLastError(error); return 0; } @@ -397,7 +397,7 @@ DECLARE_XAM_EXPORT1(NetDll_WSAResetEvent, kNetworking, kImplemented); dword_result_t NetDll_WSASetEvent(dword_t event_handle) { X_STATUS result = xboxkrnl::xeNtSetEvent(event_handle, nullptr); if (XFAILED(result)) { - uint32_t error = xboxkrnl::RtlNtStatusToDosError(result); + uint32_t error = xboxkrnl::xeRtlNtStatusToDosError(result); XThread::SetLastError(error); return 0; } @@ -567,7 +567,7 @@ dword_result_t NetDll_socket(dword_t caller, dword_t af, dword_t type, if (XFAILED(result)) { socket->Release(); - uint32_t error = xboxkrnl::RtlNtStatusToDosError(result); + uint32_t error = xboxkrnl::xeRtlNtStatusToDosError(result); XThread::SetLastError(error); return -1; } @@ -643,7 +643,7 @@ dword_result_t NetDll_ioctlsocket(dword_t caller, dword_t socket_handle, X_STATUS status = socket->IOControl(cmd, arg_ptr); if (XFAILED(status)) { - XThread::SetLastError(xboxkrnl::RtlNtStatusToDosError(status)); + XThread::SetLastError(xboxkrnl::xeRtlNtStatusToDosError(status)); return -1; } @@ -665,7 +665,7 @@ dword_result_t NetDll_bind(dword_t caller, dword_t socket_handle, N_XSOCKADDR_IN native_name(name); X_STATUS status = socket->Bind(&native_name, namelen); if (XFAILED(status)) { - XThread::SetLastError(xboxkrnl::RtlNtStatusToDosError(status)); + XThread::SetLastError(xboxkrnl::xeRtlNtStatusToDosError(status)); return -1; } @@ -686,7 +686,7 @@ dword_result_t NetDll_connect(dword_t caller, dword_t socket_handle, N_XSOCKADDR native_name(name); X_STATUS status = socket->Connect(&native_name, namelen); if (XFAILED(status)) { - XThread::SetLastError(xboxkrnl::RtlNtStatusToDosError(status)); + XThread::SetLastError(xboxkrnl::xeRtlNtStatusToDosError(status)); return -1; } @@ -706,7 +706,7 @@ dword_result_t NetDll_listen(dword_t caller, dword_t socket_handle, X_STATUS status = socket->Listen(backlog); if (XFAILED(status)) { - XThread::SetLastError(xboxkrnl::RtlNtStatusToDosError(status)); + XThread::SetLastError(xboxkrnl::xeRtlNtStatusToDosError(status)); return -1; } diff --git a/src/xenia/kernel/xboxkrnl/xboxkrnl_error.cc b/src/xenia/kernel/xboxkrnl/xboxkrnl_error.cc index 676dcfea0..114111624 100644 --- a/src/xenia/kernel/xboxkrnl/xboxkrnl_error.cc +++ b/src/xenia/kernel/xboxkrnl/xboxkrnl_error.cc @@ -971,7 +971,7 @@ const error_lookup_table error_tables[] = { }; #undef MAKE_ENTRY -dword_result_t RtlNtStatusToDosError(dword_t source_status) { +uint32_t xeRtlNtStatusToDosError(uint32_t source_status) { uint32_t status = source_status; if (!status || (status & 0x20000000)) { return status; @@ -1010,6 +1010,10 @@ dword_result_t RtlNtStatusToDosError(dword_t source_status) { XELOGE("RtlNtStatusToDosError lookup NOT IMPLEMENTED"); return 317; // ERROR_MR_MID_NOT_FOUND } + +dword_result_t RtlNtStatusToDosError(dword_t source_status) { + return xeRtlNtStatusToDosError(source_status); +} DECLARE_XBOXKRNL_EXPORT3(RtlNtStatusToDosError, kNone, kImportant, kHighFrequency, kLogResult); diff --git a/src/xenia/kernel/xboxkrnl/xboxkrnl_error.h b/src/xenia/kernel/xboxkrnl/xboxkrnl_error.h index 0d0a8be19..9cd5240fc 100644 --- a/src/xenia/kernel/xboxkrnl/xboxkrnl_error.h +++ b/src/xenia/kernel/xboxkrnl/xboxkrnl_error.h @@ -17,7 +17,7 @@ namespace xe { namespace kernel { namespace xboxkrnl { -dword_result_t RtlNtStatusToDosError(dword_t source_status); +uint32_t xeRtlNtStatusToDosError(uint32_t source_status); } // namespace xboxkrnl } // namespace kernel