mirror of
https://github.com/Atmosphere-NX/Atmosphere-libs.git
synced 2025-06-21 11:02:45 +02:00
libstrat: 0 -> ResultSuccess
This commit is contained in:
parent
492975c110
commit
5a3583d79d
@ -123,7 +123,7 @@ static IEvent *CreateSystemEvent(F f, bool autoclear = false) {
|
||||
|
||||
template <bool a = false>
|
||||
static IEvent *CreateWriteOnlySystemEvent() {
|
||||
return CreateSystemEvent([](u64 timeout) { std::abort(); return 0; }, a);
|
||||
return CreateSystemEvent([](u64 timeout) -> Result { std::abort(); }, a);
|
||||
}
|
||||
|
||||
template <class F>
|
||||
|
@ -383,7 +383,7 @@ struct Validator {
|
||||
return ResultKernelConnectionClosed;
|
||||
}
|
||||
|
||||
return 0;
|
||||
return ResultSuccess;
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -170,7 +170,7 @@ class ServiceSession : public IWaitable
|
||||
|
||||
ctx.cmd_type = (IpcCommandType)(*(u16 *)(armGetTls()));
|
||||
|
||||
ctx.rc = 0;
|
||||
ctx.rc = ResultSuccess;
|
||||
|
||||
/* Parse based on command type. */
|
||||
switch (ctx.cmd_type) {
|
||||
@ -222,7 +222,7 @@ class ServiceSession : public IWaitable
|
||||
ctx.rc = this->Reply();
|
||||
|
||||
if (ctx.rc == ResultKernelTimedOut) {
|
||||
ctx.rc = 0x0;
|
||||
ctx.rc = ResultSuccess;
|
||||
}
|
||||
|
||||
this->CleanupResponse(&ctx);
|
||||
@ -295,7 +295,7 @@ class ServiceSession : public IWaitable
|
||||
|
||||
/* Return the object id. */
|
||||
object_id.SetValue(reserved_id);
|
||||
return 0;
|
||||
return ResultSuccess;
|
||||
}
|
||||
|
||||
Result CopyFromCurrentDomain(Out<MovedHandle> out_h, u32 id) {
|
||||
@ -318,7 +318,7 @@ class ServiceSession : public IWaitable
|
||||
|
||||
this->session->GetSessionManager()->AddSession(server_h, std::move(object->Clone()));
|
||||
out_h.SetValue(client_h);
|
||||
return 0;
|
||||
return ResultSuccess;
|
||||
}
|
||||
|
||||
void CloneCurrentObject(Out<MovedHandle> out_h) {
|
||||
|
@ -35,7 +35,6 @@ class IWaitable {
|
||||
virtual Result HandleDeferred() {
|
||||
/* By default, HandleDeferred panics, because object shouldn't be deferrable. */
|
||||
std::abort();
|
||||
return 0;
|
||||
}
|
||||
|
||||
bool IsSignaled() {
|
||||
|
@ -96,7 +96,7 @@ class MitmServer : public IWaitable {
|
||||
smMitMExit();
|
||||
|
||||
this->GetSessionManager()->AddWaitable(new MitmSession(session_h, client_pid, forward_service, std::make_shared<T>(forward_service, client_pid)));
|
||||
return 0;
|
||||
return ResultSuccess;
|
||||
}
|
||||
|
||||
};
|
||||
|
@ -241,7 +241,7 @@ class MitmSession final : public ServiceSession {
|
||||
|
||||
/* Return the object id. */
|
||||
object_id.SetValue(expected_id);
|
||||
return 0;
|
||||
return ResultSuccess;
|
||||
}
|
||||
|
||||
Result CopyFromCurrentDomain(Out<MovedHandle> out_h, u32 id) {
|
||||
@ -293,7 +293,7 @@ class MitmSession final : public ServiceSession {
|
||||
} else {
|
||||
this->session->GetSessionManager()->AddSession(server_h, std::move(object->Clone()));
|
||||
}
|
||||
return 0;
|
||||
return ResultSuccess;
|
||||
}
|
||||
|
||||
void CloneCurrentObject(Out<MovedHandle> out_h) {
|
||||
|
@ -54,7 +54,7 @@ class IServer : public IWaitable {
|
||||
}
|
||||
|
||||
this->GetSessionManager()->AddSession(session_h, std::move(ServiceObjectHolder(std::move(std::make_shared<T>()))));
|
||||
return 0;
|
||||
return ResultSuccess;
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -356,7 +356,7 @@ class WaitableManager : public SessionManagerBase {
|
||||
if (this->domain_objects[i].owner == nullptr) {
|
||||
this->domain_objects[i].owner = domain;
|
||||
*out_object_id = i+1;
|
||||
return 0;
|
||||
return ResultSuccess;
|
||||
}
|
||||
}
|
||||
return ResultServiceFrameworkOutOfDomainEntries;
|
||||
@ -369,7 +369,7 @@ class WaitableManager : public SessionManagerBase {
|
||||
}
|
||||
if (this->domain_objects[object_id-1].owner == nullptr) {
|
||||
this->domain_objects[object_id-1].owner = domain;
|
||||
return 0;
|
||||
return ResultSuccess;
|
||||
}
|
||||
return ResultServiceFrameworkOutOfDomainEntries;
|
||||
}
|
||||
@ -403,7 +403,7 @@ class WaitableManager : public SessionManagerBase {
|
||||
if (this->domain_objects[object_id-1].owner == domain) {
|
||||
this->domain_objects[object_id-1].obj_holder.Reset();
|
||||
this->domain_objects[object_id-1].owner = nullptr;
|
||||
return 0x0;
|
||||
return ResultSuccess;
|
||||
}
|
||||
return ResultHipcDomainObjectNotFound;
|
||||
}
|
||||
@ -416,7 +416,7 @@ class WaitableManager : public SessionManagerBase {
|
||||
if (this->domain_objects[object_id-1].owner != nullptr) {
|
||||
this->domain_objects[object_id-1].obj_holder.Reset();
|
||||
this->domain_objects[object_id-1].owner = nullptr;
|
||||
return 0x0;
|
||||
return ResultSuccess;
|
||||
}
|
||||
return ResultHipcDomainObjectNotFound;
|
||||
}
|
||||
|
@ -28,7 +28,7 @@ Result MitmQueryUtils::GetAssociatedTidForPid(u64 pid, u64 *tid) {
|
||||
for (unsigned int i = 0; i < g_known_pids.size(); i++) {
|
||||
if (g_known_pids[i] == pid) {
|
||||
*tid = g_known_tids[i];
|
||||
rc = 0x0;
|
||||
rc = ResultSuccess;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user