mirror of
https://github.com/Atmosphere-NX/Atmosphere.git
synced 2024-12-18 16:32:05 +00:00
Loader: Fix argument passing.
This commit is contained in:
parent
9687218fbc
commit
bcf81fe957
6 changed files with 10 additions and 9 deletions
|
@ -25,9 +25,9 @@ Result DebugMonitorService::dispatch(IpcParsedCommand &r, IpcCommand &out_c, u64
|
|||
return rc;
|
||||
}
|
||||
|
||||
std::tuple<Result> DebugMonitorService::add_title_to_launch_queue(u64 tid, InPointer<char> args) {
|
||||
fprintf(stderr, "Add to launch queue: %p, %zX\n", args.pointer, args.num_elements);
|
||||
return {LaunchQueue::add(tid, args.pointer, args.num_elements)};
|
||||
std::tuple<Result> DebugMonitorService::add_title_to_launch_queue(u64 args_size, u64 tid, InPointer<char> args) {
|
||||
fprintf(stderr, "Add to launch queue: %p, %zX\n", args.pointer, std::min(args_size, args.num_elements));
|
||||
return {LaunchQueue::add(tid, args.pointer, std::min(args_size, args.num_elements))};
|
||||
}
|
||||
|
||||
std::tuple<Result> DebugMonitorService::clear_launch_queue(u64 dat) {
|
||||
|
|
|
@ -24,7 +24,7 @@ class DebugMonitorService final : public IServiceObject {
|
|||
|
||||
private:
|
||||
/* Actual commands. */
|
||||
std::tuple<Result> add_title_to_launch_queue(u64 tid, InPointer<char> args);
|
||||
std::tuple<Result> add_title_to_launch_queue(u64 args_size, u64 tid, InPointer<char> args);
|
||||
std::tuple<Result> clear_launch_queue(u64 dat);
|
||||
std::tuple<Result, u32> get_nso_info(u64 pid, OutPointerWithClientSize<Registration::NsoInfo> out);
|
||||
};
|
||||
|
|
|
@ -141,6 +141,7 @@ Result NsoUtils::CalculateNsoLoadExtents(u32 addspace_type, u32 args_size, NsoLo
|
|||
/* What the fuck? Where does 0x9007 come from? */
|
||||
extents->args_size = (2 * args_size + 0x9007);
|
||||
extents->args_size &= ~0xFFFULL;
|
||||
extents->total_size += extents->args_size;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -142,7 +142,7 @@ Result ProcessCreation::CreateProcess(Handle *out_process_h, u64 index, char *nc
|
|||
if (R_FAILED(rc)) {
|
||||
goto CREATE_PROCESS_END;
|
||||
}
|
||||
|
||||
|
||||
/* Figure out where NSOs will be mapped, and how much space they (and arguments) will take up. */
|
||||
rc = NsoUtils::CalculateNsoLoadExtents(process_info.process_flags, launch_item != NULL ? launch_item->arg_size : 0, &nso_extents);
|
||||
if (R_FAILED(rc)) {
|
||||
|
|
|
@ -20,9 +20,9 @@ Result ShellService::dispatch(IpcParsedCommand &r, IpcCommand &out_c, u64 cmd_id
|
|||
return rc;
|
||||
}
|
||||
|
||||
std::tuple<Result> ShellService::add_title_to_launch_queue(u64 tid, InPointer<char> args) {
|
||||
fprintf(stderr, "Add to launch queue: %p, %zX\n", args.pointer, args.num_elements);
|
||||
return {LaunchQueue::add(tid, args.pointer, args.num_elements)};
|
||||
std::tuple<Result> ShellService::add_title_to_launch_queue(u64 args_size, u64 tid, InPointer<char> args) {
|
||||
fprintf(stderr, "Add to launch queue: %p, %zX\n", args.pointer, std::min(args_size, args.num_elements));
|
||||
return {LaunchQueue::add(tid, args.pointer, std::min(args_size, args.num_elements))};
|
||||
}
|
||||
|
||||
std::tuple<Result> ShellService::clear_launch_queue(u64 dat) {
|
||||
|
|
|
@ -21,6 +21,6 @@ class ShellService final : public IServiceObject {
|
|||
|
||||
private:
|
||||
/* Actual commands. */
|
||||
std::tuple<Result> add_title_to_launch_queue(u64 tid, InPointer<char> args);
|
||||
std::tuple<Result> add_title_to_launch_queue(u64 args_size, u64 tid, InPointer<char> args);
|
||||
std::tuple<Result> clear_launch_queue(u64 dat);
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue