diff options
author | Lioncash <mathew1800@gmail.com> | 2019-01-28 11:48:08 -0500 |
---|---|---|
committer | Lioncash <mathew1800@gmail.com> | 2019-01-28 11:48:11 -0500 |
commit | 932922f67f6b2a6be05dd8d6c6966397367f2ca2 (patch) | |
tree | 2073e97d60489a10219cfb5e3bf9d21372898d1d /src | |
parent | cb2ce9924a6ac65cebc0ebe1014cf6eb459506e5 (diff) |
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.
Diffstat (limited to 'src')
-rw-r--r-- | src/core/hle/service/pm/pm.cpp | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/core/hle/service/pm/pm.cpp b/src/core/hle/service/pm/pm.cpp index 40655532c..6b27dc4a3 100644 --- a/src/core/hle/service/pm/pm.cpp +++ b/src/core/hle/service/pm/pm.cpp @@ -13,7 +13,7 @@ public: explicit BootMode() : ServiceFramework{"pm:bm"} { static const FunctionInfo functions[] = { {0, &BootMode::GetBootMode, "GetBootMode"}, - {1, nullptr, "SetMaintenanceBoot"}, + {1, &BootMode::SetMaintenanceBoot, "SetMaintenanceBoot"}, }; RegisterHandlers(functions); } @@ -27,6 +27,15 @@ private: 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; }; |