summaryrefslogtreecommitdiffstats
path: root/src/core/hle/service/pm/pm.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/hle/service/pm/pm.cpp')
-rw-r--r--src/core/hle/service/pm/pm.cpp15
1 files changed, 13 insertions, 2 deletions
diff --git a/src/core/hle/service/pm/pm.cpp b/src/core/hle/service/pm/pm.cpp
index 53e7da9c3..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);
}
@@ -24,8 +24,19 @@ private:
IPC::ResponseBuilder rb{ctx, 3};
rb.Push(RESULT_SUCCESS);
- rb.Push<u32>(static_cast<u32>(SystemBootMode::Normal)); // Normal 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;
};
class DebugMonitor final : public ServiceFramework<DebugMonitor> {