Manu services: Difference between revisions
Line 131: | Line 131: | ||
| 3 || Reboot | | 3 || Reboot | ||
|- | |- | ||
| 5 || | | 5 || GetReports | ||
|} | |} | ||
Line 140: | Line 139: | ||
Shutdown/Reboot were added at some point after LaunchProgram, these are present in [9.1.0] (exact version which added these is unknown). These call the SystemApplet Main() func (also used by qlaunch) with a funcptr to call the relevant [[Applet_Manager_services|am]] IGlobalStateController StartShutdownSequence/StartRebootSequence cmd. | Shutdown/Reboot were added at some point after LaunchProgram, these are present in [9.1.0] (exact version which added these is unknown). These call the SystemApplet Main() func (also used by qlaunch) with a funcptr to call the relevant [[Applet_Manager_services|am]] IGlobalStateController StartShutdownSequence/StartRebootSequence cmd. | ||
=== LaunchProgram === | === LaunchProgram === | ||
This essentially supports launching a specified ProgramId with BuiltInSystem ([[NS_services|ns:dev]], [[PGL_services|pgl]] in newer versions) with the input arguments passed to [[Loader_services|ldr:shel]], etc. | This essentially supports launching a specified ProgramId with BuiltInSystem ([[NS_services|ns:dev]], [[PGL_services|pgl]] in newer versions) with the input arguments passed to [[Loader_services|ldr:shel]], etc. | ||
=== GetReports === | |||
This was added at some point after Shutdown/Reboot, this is present in [14.0.0] (exact version which added this is unknown). The command payload data contains a s32 path_size, followed by a NUL-terminated string with that size. After loading the input string, a handler func is called with this string. | |||
This essentially loads the error reports from [[Error_Report_services|erpt:r]] (GetReportList and reads each report). Once finished it calls the IPC vfunc for [[#WriteFile|WriteFile]] with the data buffer, and with the path from: <code>nn::util::SNPrintf(out, 0x100, "%s/%s", inarg_path, tmpstr);</code> Where tmpstr is from the following earlier: <code>nn::util::SNPrintf(tmpstr, 0x20, "%s%02d.txt", "_report", cur_report_index);</code> | |||
== Command == | == Command == |