pm: address review comments.

This commit is contained in:
Michael Scire
2019-07-02 22:21:47 -07:00
committed by SciresM
parent 08ad48fbf3
commit a9f5b7728b
10 changed files with 135 additions and 145 deletions

View File

@@ -459,6 +459,17 @@ namespace sts::sm::impl {
return ResultSuccess;
}
Result WaitService(ServiceName service) {
bool has_service = false;
R_TRY(impl::HasService(&has_service, service));
/* Wait until we have the service. */
if (!has_service) {
return ResultServiceFrameworkRequestDeferredByUser;
}
return ResultSuccess;
}
Result GetServiceHandle(Handle *out, u64 pid, ServiceName service) {
/* Validate service name. */
R_TRY(ValidateServiceName(service));
@@ -564,6 +575,17 @@ namespace sts::sm::impl {
return ResultSuccess;
}
Result WaitMitm(ServiceName service) {
bool has_mitm = false;
R_TRY(impl::HasMitm(&has_mitm, service));
/* Wait until we have the mitm. */
if (!has_mitm) {
return ResultServiceFrameworkRequestDeferredByUser;
}
return ResultSuccess;
}
Result InstallMitm(Handle *out, Handle *out_query, u64 pid, ServiceName service) {
/* Validate service name. */
R_TRY(ValidateServiceName(service));