service/pm: Implement SetMaintenanceBoot()
This quite literally functions as a basic setter. No other error checking or anything (since there's nothing to really check against). With this, it completes the pm:bm interface in terms of functionality.
This commit is contained in:
parent
cb2ce9924a
commit
932922f67f
1 changed files with 10 additions and 1 deletions
|
@ -13,7 +13,7 @@ public:
|
||||||
explicit BootMode() : ServiceFramework{"pm:bm"} {
|
explicit BootMode() : ServiceFramework{"pm:bm"} {
|
||||||
static const FunctionInfo functions[] = {
|
static const FunctionInfo functions[] = {
|
||||||
{0, &BootMode::GetBootMode, "GetBootMode"},
|
{0, &BootMode::GetBootMode, "GetBootMode"},
|
||||||
{1, nullptr, "SetMaintenanceBoot"},
|
{1, &BootMode::SetMaintenanceBoot, "SetMaintenanceBoot"},
|
||||||
};
|
};
|
||||||
RegisterHandlers(functions);
|
RegisterHandlers(functions);
|
||||||
}
|
}
|
||||||
|
@ -27,6 +27,15 @@ private:
|
||||||
rb.PushEnum(boot_mode);
|
rb.PushEnum(boot_mode);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void SetMaintenanceBoot(Kernel::HLERequestContext& ctx) {
|
||||||
|
LOG_DEBUG(Service_PM, "called");
|
||||||
|
|
||||||
|
boot_mode = SystemBootMode::Maintenance;
|
||||||
|
|
||||||
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
|
rb.Push(RESULT_SUCCESS);
|
||||||
|
}
|
||||||
|
|
||||||
SystemBootMode boot_mode = SystemBootMode::Normal;
|
SystemBootMode boot_mode = SystemBootMode::Normal;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue