service: Halt on ReportUnimplementedFunction and improve output log.

This commit is contained in:
bunnei 2017-12-28 15:24:59 -05:00
parent d5995fd30f
commit 16fb1c8fe7

View file

@ -96,7 +96,7 @@ void ServiceFrameworkBase::RegisterHandlersBase(const FunctionInfoBase* function
void ServiceFrameworkBase::ReportUnimplementedFunction(Kernel::HLERequestContext& ctx, void ServiceFrameworkBase::ReportUnimplementedFunction(Kernel::HLERequestContext& ctx,
const FunctionInfoBase* info) { const FunctionInfoBase* info) {
auto cmd_buf = ctx.CommandBuffer(); auto cmd_buf = ctx.CommandBuffer();
std::string function_name = info == nullptr ? fmt::format("{:#08x}", ctx.GetCommand()) : info->name; std::string function_name = info == nullptr ? fmt::format("{}", ctx.GetCommand()) : info->name;
fmt::MemoryWriter w; fmt::MemoryWriter w;
w.write("function '{}': port='{}' cmd_buf={{[0]={:#x}", function_name, service_name, w.write("function '{}': port='{}' cmd_buf={{[0]={:#x}", function_name, service_name,
@ -107,9 +107,7 @@ void ServiceFrameworkBase::ReportUnimplementedFunction(Kernel::HLERequestContext
w << '}'; w << '}';
LOG_ERROR(Service, "unknown / unimplemented %s", w.c_str()); LOG_ERROR(Service, "unknown / unimplemented %s", w.c_str());
// TODO(bunnei): Hack - ignore error UNIMPLEMENTED();
IPC::RequestBuilder rb{ctx, 1};
rb.Push(RESULT_SUCCESS);
} }
void ServiceFrameworkBase::InvokeRequest(Kernel::HLERequestContext& ctx) { void ServiceFrameworkBase::InvokeRequest(Kernel::HLERequestContext& ctx) {