sf: Change interface definition methodology (#1074)
* sf: Begin experimenting with new interface declaration format * sf: convert fs interfaces to new format * sf: finish conversion of libstrat to new definitions * sf: convert loader to new format * sf: convert spl to new format * sf: update ncm for new format * sf: convert pm to new format * sf: convert ro/sm to new format * sf: update fatal for new format * sf: support building dmnt under new scheme * sf: update ams.mitm for new format * sf: correct invocation def for pointer holder * fs: correct 10.x+ user bindings for Get*SpaceSize
This commit is contained in:
@@ -411,21 +411,21 @@ namespace ams::mitm::sysupdater {
|
||||
return this->SetupUpdateImpl(transfer_memory.GetValue(), transfer_memory_size, path, exfat, firmware_variation_id);
|
||||
}
|
||||
|
||||
Result SystemUpdateService::RequestPrepareUpdate(sf::OutCopyHandle out_event_handle, sf::Out<std::shared_ptr<IAsyncResult>> out_async) {
|
||||
Result SystemUpdateService::RequestPrepareUpdate(sf::OutCopyHandle out_event_handle, sf::Out<std::shared_ptr<ns::impl::IAsyncResult>> out_async) {
|
||||
/* Ensure the update is setup but not prepared. */
|
||||
R_UNLESS(this->setup_update, ns::ResultCardUpdateNotSetup());
|
||||
R_UNLESS(!this->requested_update, ns::ResultPrepareCardUpdateAlreadyRequested());
|
||||
|
||||
/* Create the async result. */
|
||||
auto async_result = std::make_shared<AsyncPrepareSdCardUpdateImpl>(std::addressof(*this->update_task));
|
||||
auto async_result = sf::MakeShared<ns::impl::IAsyncResult, AsyncPrepareSdCardUpdateImpl>(std::addressof(*this->update_task));
|
||||
R_UNLESS(async_result != nullptr, ns::ResultOutOfMaxRunningTask());
|
||||
|
||||
/* Run the task. */
|
||||
R_TRY(async_result->Run());
|
||||
R_TRY(async_result->GetImpl().Run());
|
||||
|
||||
/* We prepared the task! */
|
||||
this->requested_update = true;
|
||||
out_event_handle.SetValue(async_result->GetEvent().GetReadableHandle());
|
||||
out_event_handle.SetValue(async_result->GetImpl().GetEvent().GetReadableHandle());
|
||||
out_async.SetValue(std::move(async_result));
|
||||
|
||||
return ResultSuccess();
|
||||
|
||||
Reference in New Issue
Block a user