1
0
Fork 0
mirror of https://github.com/Atmosphere-NX/Atmosphere.git synced 2024-11-11 14:36:40 +00:00

Merge branch 'master' of github.com:SciresM/Atmosphere-NX

This commit is contained in:
TuxSH 2018-05-05 22:05:19 +02:00
commit 02217bde55
11 changed files with 164 additions and 158 deletions

View file

@ -66,83 +66,83 @@ void __appExit(void) {
}
static const std::tuple<u32, bool, bool> g_gpio_map[] = {
std::make_tuple(0xFFFFFFFF, false, false), /* Invalid */
std::make_tuple(0x000000CC, true, false), /* Port Z, Pin 4 */
std::make_tuple(0x00000024, true, false), /* Port E, Pin 4 */
std::make_tuple(0x0000003C, true, false), /* Port H, Pin 4 */
std::make_tuple(0x000000DA, false, true), /* Port BB, Pin 2 */
std::make_tuple(0x000000DB, true, false), /* Port BB, Pin 3 */
std::make_tuple(0x000000DC, false, false), /* Port BB, Pin 4 */
std::make_tuple(0x00000025, true, false), /* Port E, Pin 5 */
std::make_tuple(0x00000090, false, false), /* Port S, Pin 0 */
std::make_tuple(0x00000091, false, false), /* Port S, Pin 1 */
std::make_tuple(0x00000096, true, false), /* Port S, Pin 6 */
std::make_tuple(0x00000097, false, true), /* Port S, Pin 7 */
std::make_tuple(0x00000026, false, false), /* Port E, Pin 6 */
std::make_tuple(0x00000005, true, false), /* Port A, Pin 5 */
std::make_tuple(0x00000078, false, false), /* Port P, Pin 0 */
std::make_tuple(0x00000093, false, true), /* Port S, Pin 3 */
std::make_tuple(0x0000007D, false, false), /* Port P, Pin 5 */
std::make_tuple(0x0000007C, false, false), /* Port P, Pin 4 */
std::make_tuple(0x0000007B, false, false), /* Port P, Pin 3 */
std::make_tuple(0x0000007A, false, false), /* Port P, Pin 2 */
std::make_tuple(0x000000BC, false, true), /* Port X, Pin 4 */
std::make_tuple(0x000000AE, false, false), /* Port V, Pin 6 */
std::make_tuple(0x000000BA, false, false), /* Port X, Pin 2 */
std::make_tuple(0x000000B9, false, true), /* Port X, Pin 1 */
std::make_tuple(0x000000BD, false, false), /* Port X, Pin 5 */
std::make_tuple(0x000000BE, false, true), /* Port X, Pin 6 */
std::make_tuple(0x000000BF, false, true), /* Port X, Pin 7 */
std::make_tuple(0x000000C0, false, true), /* Port Y, Pin 0 */
std::make_tuple(0x000000C1, false, false), /* Port Y, Pin 1 */
std::make_tuple(0x000000A9, true, false), /* Port V, Pin 1 */
std::make_tuple(0x000000AA, true, false), /* Port V, Pin 2 */
std::make_tuple(0x00000055, true, false), /* Port K, Pin 5 */
std::make_tuple(0x000000AD, true, false), /* Port V, Pin 5 */
std::make_tuple(0x000000C8, false, true), /* Port Z, Pin 0 */
std::make_tuple(0x000000CA, false, false), /* Port Z, Pin 2 */
std::make_tuple(0x000000CB, false, true), /* Port Z, Pin 3 */
std::make_tuple(0x0000004F, true, false), /* Port J, Pin 7 */
std::make_tuple(0x00000050, false, false), /* Port K, Pin 0 */
std::make_tuple(0x00000051, false, false), /* Port K, Pin 1 */
std::make_tuple(0x00000052, false, false), /* Port K, Pin 2 */
std::make_tuple(0x00000054, false, true), /* Port K, Pin 4 */
std::make_tuple(0x00000056, false, true), /* Port K, Pin 6 */
std::make_tuple(0x00000057, false, true), /* Port K, Pin 7 */
std::make_tuple(0x00000053, true, false), /* Port K, Pin 3 */
std::make_tuple(0x000000E3, true, false), /* Port CC, Pin 3 */
std::make_tuple(0x00000038, true, false), /* Port H, Pin 0 */
std::make_tuple(0x00000039, true, false), /* Port H, Pin 1 */
std::make_tuple(0x0000003B, true, false), /* Port H, Pin 3 */
std::make_tuple(0x0000003D, false, false), /* Port H, Pin 5 */
std::make_tuple(0x0000003F, true, false), /* Port H, Pin 7 */
std::make_tuple(0x00000040, true, false), /* Port I, Pin 0 */
std::make_tuple(0x00000041, true, false), /* Port I, Pin 1 */
std::make_tuple(0x0000003E, false, false), /* Port H, Pin 6 */
std::make_tuple(0x000000E2, false, true), /* Port CC, Pin 2 */
std::make_tuple(0x000000E4, true, false), /* Port CC, Pin 4 */
std::make_tuple(0x0000003A, false, false), /* Port H, Pin 2 */
std::make_tuple(0x000000C9, false, true), /* Port Z, Pin 1 */
std::make_tuple(0x0000004D, true, false), /* Port J, Pin 5 */
std::make_tuple(0x00000058, true, false), /* Port L, Pin 0 */
std::make_tuple(0x0000003E, false, false), /* Port H, Pin 6 */
std::make_tuple(0x00000026, false, false), /* Port E, Pin 6 */
std::make_tuple(0xFFFFFFFF, false, false), /* Invalid */
std::make_tuple(0x00000033, false, false), /* Port G, Pin 3 */
std::make_tuple(0x0000001C, false, false), /* Port D, Pin 4 */
std::make_tuple(0x000000D9, false, false), /* Port BB, Pin 1 */
std::make_tuple(0x0000000C, false, false), /* Port B, Pin 4 */
std::make_tuple(0x0000000D, false, false), /* Port B, Pin 5 */
std::make_tuple(0x00000021, false, false), /* Port E, Pin 1 */
std::make_tuple(0x00000027, false, false), /* Port E, Pin 7 */
std::make_tuple(0x00000092, false, false), /* Port S, Pin 2 */
std::make_tuple(0x00000095, false, false), /* Port S, Pin 5 */
std::make_tuple(0x00000098, false, false), /* Port T, Pin 0 */
std::make_tuple(0x00000010, false, false), /* Port C, Pin 0 */
std::make_tuple(0x00000011, false, false), /* Port C, Pin 1 */
std::make_tuple(0x00000012, false, false), /* Port C, Pin 2 */
std::make_tuple(0x00000042, false, false), /* Port I, Pin 2 */
std::make_tuple(0x000000E6, false, false), /* Port CC, Pin 6 */
{0xFFFFFFFF, false, false}, /* Invalid */
{0x000000CC, true, false}, /* Port Z, Pin 4 */
{0x00000024, true, false}, /* Port E, Pin 4 */
{0x0000003C, true, false}, /* Port H, Pin 4 */
{0x000000DA, false, true}, /* Port BB, Pin 2 */
{0x000000DB, true, false}, /* Port BB, Pin 3 */
{0x000000DC, false, false}, /* Port BB, Pin 4 */
{0x00000025, true, false}, /* Port E, Pin 5 */
{0x00000090, false, false}, /* Port S, Pin 0 */
{0x00000091, false, false}, /* Port S, Pin 1 */
{0x00000096, true, false}, /* Port S, Pin 6 */
{0x00000097, false, true}, /* Port S, Pin 7 */
{0x00000026, false, false}, /* Port E, Pin 6 */
{0x00000005, true, false}, /* Port A, Pin 5 */
{0x00000078, false, false}, /* Port P, Pin 0 */
{0x00000093, false, true}, /* Port S, Pin 3 */
{0x0000007D, false, false}, /* Port P, Pin 5 */
{0x0000007C, false, false}, /* Port P, Pin 4 */
{0x0000007B, false, false}, /* Port P, Pin 3 */
{0x0000007A, false, false}, /* Port P, Pin 2 */
{0x000000BC, false, true}, /* Port X, Pin 4 */
{0x000000AE, false, false}, /* Port V, Pin 6 */
{0x000000BA, false, false}, /* Port X, Pin 2 */
{0x000000B9, false, true}, /* Port X, Pin 1 */
{0x000000BD, false, false}, /* Port X, Pin 5 */
{0x000000BE, false, true}, /* Port X, Pin 6 */
{0x000000BF, false, true}, /* Port X, Pin 7 */
{0x000000C0, false, true}, /* Port Y, Pin 0 */
{0x000000C1, false, false}, /* Port Y, Pin 1 */
{0x000000A9, true, false}, /* Port V, Pin 1 */
{0x000000AA, true, false}, /* Port V, Pin 2 */
{0x00000055, true, false}, /* Port K, Pin 5 */
{0x000000AD, true, false}, /* Port V, Pin 5 */
{0x000000C8, false, true}, /* Port Z, Pin 0 */
{0x000000CA, false, false}, /* Port Z, Pin 2 */
{0x000000CB, false, true}, /* Port Z, Pin 3 */
{0x0000004F, true, false}, /* Port J, Pin 7 */
{0x00000050, false, false}, /* Port K, Pin 0 */
{0x00000051, false, false}, /* Port K, Pin 1 */
{0x00000052, false, false}, /* Port K, Pin 2 */
{0x00000054, false, true}, /* Port K, Pin 4 */
{0x00000056, false, true}, /* Port K, Pin 6 */
{0x00000057, false, true}, /* Port K, Pin 7 */
{0x00000053, true, false}, /* Port K, Pin 3 */
{0x000000E3, true, false}, /* Port CC, Pin 3 */
{0x00000038, true, false}, /* Port H, Pin 0 */
{0x00000039, true, false}, /* Port H, Pin 1 */
{0x0000003B, true, false}, /* Port H, Pin 3 */
{0x0000003D, false, false}, /* Port H, Pin 5 */
{0x0000003F, true, false}, /* Port H, Pin 7 */
{0x00000040, true, false}, /* Port I, Pin 0 */
{0x00000041, true, false}, /* Port I, Pin 1 */
{0x0000003E, false, false}, /* Port H, Pin 6 */
{0x000000E2, false, true}, /* Port CC, Pin 2 */
{0x000000E4, true, false}, /* Port CC, Pin 4 */
{0x0000003A, false, false}, /* Port H, Pin 2 */
{0x000000C9, false, true}, /* Port Z, Pin 1 */
{0x0000004D, true, false}, /* Port J, Pin 5 */
{0x00000058, true, false}, /* Port L, Pin 0 */
{0x0000003E, false, false}, /* Port H, Pin 6 */
{0x00000026, false, false}, /* Port E, Pin 6 */
{0xFFFFFFFF, false, false}, /* Invalid */
{0x00000033, false, false}, /* Port G, Pin 3 */
{0x0000001C, false, false}, /* Port D, Pin 4 */
{0x000000D9, false, false}, /* Port BB, Pin 1 */
{0x0000000C, false, false}, /* Port B, Pin 4 */
{0x0000000D, false, false}, /* Port B, Pin 5 */
{0x00000021, false, false}, /* Port E, Pin 1 */
{0x00000027, false, false}, /* Port E, Pin 7 */
{0x00000092, false, false}, /* Port S, Pin 2 */
{0x00000095, false, false}, /* Port S, Pin 5 */
{0x00000098, false, false}, /* Port T, Pin 0 */
{0x00000010, false, false}, /* Port C, Pin 0 */
{0x00000011, false, false}, /* Port C, Pin 1 */
{0x00000012, false, false}, /* Port C, Pin 2 */
{0x00000042, false, false}, /* Port I, Pin 2 */
{0x000000E6, false, false}, /* Port CC, Pin 6 */
};
int gpio_configure(unsigned int gpio_pad_name) {

View file

@ -88,44 +88,44 @@ bool ShouldForceMaintenanceMode() {
}
static const std::tuple<u64, bool> g_additional_launch_programs[] = {
std::make_tuple(0x0100000000000023, true), /* am */
std::make_tuple(0x0100000000000019, true), /* nvservices */
std::make_tuple(0x010000000000001C, true), /* nvnflinger */
std::make_tuple(0x010000000000002D, true), /* vi */
std::make_tuple(0x010000000000001F, true), /* ns */
std::make_tuple(0x0100000000000015, true), /* lm */
std::make_tuple(0x010000000000001B, true), /* ppc */
std::make_tuple(0x0100000000000010, true), /* ptm */
std::make_tuple(0x0100000000000013, true), /* hid */
std::make_tuple(0x0100000000000014, true), /* audio */
std::make_tuple(0x0100000000000029, true), /* lbl */
std::make_tuple(0x0100000000000016, true), /* wlan */
std::make_tuple(0x010000000000000B, true), /* bluetooth */
std::make_tuple(0x0100000000000012, true), /* bsdsockets */
std::make_tuple(0x010000000000000F, true), /* nifm */
std::make_tuple(0x0100000000000018, true), /* ldn */
std::make_tuple(0x010000000000001E, true), /* account */
std::make_tuple(0x010000000000000E, false), /* friends */
std::make_tuple(0x0100000000000020, true), /* nfc */
std::make_tuple(0x010000000000003C, true), /* jpegdec */
std::make_tuple(0x0100000000000022, true), /* capsrv */
std::make_tuple(0x0100000000000024, true), /* ssl */
std::make_tuple(0x0100000000000025, true), /* nim */
std::make_tuple(0x010000000000000C, false), /* bcat */
std::make_tuple(0x010000000000002B, true), /* erpt */
std::make_tuple(0x0100000000000033, true), /* es */
std::make_tuple(0x010000000000002E, true), /* pctl */
std::make_tuple(0x010000000000002A, true), /* btm */
std::make_tuple(0x0100000000000030, false), /* eupld */
std::make_tuple(0x0100000000000031, true), /* glue */
std::make_tuple(0x0100000000000032, true), /* eclct */
std::make_tuple(0x010000000000002F, false), /* npns */
std::make_tuple(0x0100000000000034, true), /* fatal */
std::make_tuple(0x0100000000000037, true), /* ro */
std::make_tuple(0x0100000000000038, true), /* doesn't exist on retail systems */
std::make_tuple(0x0100000000000039, true), /* sdb */
std::make_tuple(0x010000000000003A, true), /* migration */
std::make_tuple(0x0100000000000035, true), /* grc */
{0x0100000000000023, true}, /* am */
{0x0100000000000019, true}, /* nvservices */
{0x010000000000001C, true}, /* nvnflinger */
{0x010000000000002D, true}, /* vi */
{0x010000000000001F, true}, /* ns */
{0x0100000000000015, true}, /* lm */
{0x010000000000001B, true}, /* ppc */
{0x0100000000000010, true}, /* ptm */
{0x0100000000000013, true}, /* hid */
{0x0100000000000014, true}, /* audio */
{0x0100000000000029, true}, /* lbl */
{0x0100000000000016, true}, /* wlan */
{0x010000000000000B, true}, /* bluetooth */
{0x0100000000000012, true}, /* bsdsockets */
{0x010000000000000F, true}, /* nifm */
{0x0100000000000018, true}, /* ldn */
{0x010000000000001E, true}, /* account */
{0x010000000000000E, false}, /* friends */
{0x0100000000000020, true}, /* nfc */
{0x010000000000003C, true}, /* jpegdec */
{0x0100000000000022, true}, /* capsrv */
{0x0100000000000024, true}, /* ssl */
{0x0100000000000025, true}, /* nim */
{0x010000000000000C, false}, /* bcat */
{0x010000000000002B, true}, /* erpt */
{0x0100000000000033, true}, /* es */
{0x010000000000002E, true}, /* pctl */
{0x010000000000002A, true}, /* btm */
{0x0100000000000030, false}, /* eupld */
{0x0100000000000031, true}, /* glue */
{0x0100000000000032, true}, /* eclct */
{0x010000000000002F, false}, /* npns */
{0x0100000000000034, true}, /* fatal */
{0x0100000000000037, true}, /* ro */
{0x0100000000000038, true}, /* doesn't exist on retail systems */
{0x0100000000000039, true}, /* sdb */
{0x010000000000003A, true}, /* migration */
{0x0100000000000035, true}, /* grc */
};
int main(int argc, char **argv)

View file

@ -184,11 +184,17 @@ T GetValueFromIpcParsedCommand(IpcParsedCommand& r, IpcCommand& out_c, u8 *point
const size_t old_c_size_offset = cur_c_size_offset;
const size_t old_pointer_buffer_offset = pointer_buffer_offset;
if constexpr (is_specialization_of<T, InBuffer>::value) {
return T(r.Buffers[a_index], r.BufferSizes[a_index++]);
const T& value{r.Buffers[a_index], r.BufferSizes[a_index]};
++a_index;
return value;
} else if constexpr (is_specialization_of<T, OutBuffer>::value) {
return T(r.Buffers[b_index], r.BufferSizes[b_index++]);
const T& value{r.Buffers[b_index], r.BufferSizes[b_index]};
++b_index;
return value;
} else if constexpr (is_specialization_of<T, InPointer>::value) {
return T(r.Statics[x_index], r.StaticSizes[x_index++]);
const T& value{r.Statics[x_index], r.StaticSizes[x_index]};
++x_index;
return value;
} else if constexpr (std::is_base_of<OutPointerWithServerSizeBase, T>::value) {
T t = T(pointer_buffer + old_pointer_buffer_offset);
ipcAddSendStatic(&out_c, pointer_buffer + old_pointer_buffer_offset, t.num_elements * sizeof(*t.pointer), c_index++);
@ -451,4 +457,4 @@ Result WrapStaticIpcCommandImpl(IpcParsedCommand& r, IpcCommand &out_command, u8
auto result = std::apply(IpcCommandImpl, args);
return std::apply(Encoder<OutArgs>{out_command}, result);
}
}

View file

@ -158,22 +158,22 @@ class ServiceSession : public IWaitable {
/* Control commands. */
std::tuple<Result> ConvertCurrentObjectToDomain() {
/* TODO */
return std::make_tuple(0xF601);
return {0xF601};
}
std::tuple<Result> CopyFromCurrentDomain() {
/* TODO */
return std::make_tuple(0xF601);
return {0xF601};
}
std::tuple<Result> CloneCurrentObject() {
/* TODO */
return std::make_tuple(0xF601);
return {0xF601};
}
std::tuple<Result, u32> QueryPointerBufferSize() {
return std::make_tuple(0x0, (u32)sizeof(this->pointer_buffer));
return {0x0, (u32)sizeof(this->pointer_buffer)};
}
std::tuple<Result> CloneCurrentObjectEx() {
/* TODO */
return std::make_tuple(0xF601);
return {0xF601};
}
Result dispatch_control_command(IpcParsedCommand &r, IpcCommand &out_c, u64 cmd_id) {
@ -202,4 +202,4 @@ class ServiceSession : public IWaitable {
return rc;
}
};
};

View file

@ -27,13 +27,13 @@ Result DebugMonitorService::dispatch(IpcParsedCommand &r, IpcCommand &out_c, u64
std::tuple<Result> DebugMonitorService::add_title_to_launch_queue(u64 tid, InPointer<char> args) {
fprintf(stderr, "Add to launch queue: %p, %X\n", args.pointer, args.num_elements);
return std::make_tuple(LaunchQueue::add(tid, args.pointer, args.num_elements));
return {LaunchQueue::add(tid, args.pointer, args.num_elements)};
}
std::tuple<Result> DebugMonitorService::clear_launch_queue(u64 dat) {
fprintf(stderr, "Clear launch queue: %lx\n", dat);
LaunchQueue::clear();
return std::make_tuple(0);
return {0};
}
std::tuple<Result, u32> DebugMonitorService::get_nso_info(u64 pid, OutPointerWithClientSize<Registration::NsoInfo> out) {
@ -43,5 +43,5 @@ std::tuple<Result, u32> DebugMonitorService::get_nso_info(u64 pid, OutPointerWit
Result rc = Registration::GetNsoInfosForProcessId(out.pointer, out.num_elements, pid, &out_num_nsos);
return std::make_tuple(rc, out_num_nsos);
}
return {rc, out_num_nsos};
}

View file

@ -39,12 +39,12 @@ std::tuple<Result, MovedHandle> ProcessManagerService::create_process(u64 flags,
rc = Registration::GetRegisteredTidSid(index, &tid_sid);
if (R_FAILED(rc)) {
std::make_tuple(rc, MovedHandle{process_h});
return {rc, MovedHandle{process_h}};
}
rc = ContentManagement::GetContentPathForTidSid(nca_path, &tid_sid);
if (R_FAILED(rc)) {
std::make_tuple(rc, MovedHandle{process_h});
return {rc, MovedHandle{process_h}};
}
launch_item = LaunchQueue::get_item(tid_sid.title_id);
@ -55,7 +55,7 @@ std::tuple<Result, MovedHandle> ProcessManagerService::create_process(u64 flags,
ContentManagement::SetCreatedTitle(tid_sid.title_id);
}
return std::make_tuple(rc, MovedHandle{process_h});
return {rc, MovedHandle{process_h}};
}
std::tuple<Result> ProcessManagerService::get_program_info(Registration::TidSid tid_sid, OutPointerWithServerSize<ProcessManagerService::ProgramInfo, 0x1> out_program_info) {
@ -67,40 +67,40 @@ std::tuple<Result> ProcessManagerService::get_program_info(Registration::TidSid
rc = populate_program_info_buffer(out_program_info.pointer, &tid_sid);
if (R_FAILED(rc)) {
return std::make_tuple(rc);
return {rc};
}
if (tid_sid.title_id != out_program_info.pointer->title_id) {
rc = ContentManagement::GetContentPathForTidSid(nca_path, &tid_sid);
if (R_FAILED(rc)) {
return std::make_tuple(rc);
return {rc};
}
rc = ContentManagement::SetContentPath(nca_path, out_program_info.pointer->title_id, tid_sid.storage_id);
if (R_FAILED(rc)) {
return std::make_tuple(rc);
return {rc};
}
rc = LaunchQueue::add_copy(tid_sid.title_id, out_program_info.pointer->title_id);
}
return std::make_tuple(rc);
return {rc};
}
std::tuple<Result, u64> ProcessManagerService::register_title(Registration::TidSid tid_sid) {
u64 out_index = 0;
if (Registration::RegisterTidSid(&tid_sid, &out_index)) {
return std::make_tuple(0, out_index);
return {0, out_index};
} else {
return std::make_tuple(0xE09, out_index);
return {0xE09, out_index};
}
}
std::tuple<Result> ProcessManagerService::unregister_title(u64 index) {
if (Registration::UnregisterIndex(index)) {
return std::make_tuple(0);
return {0};
} else {
return std::make_tuple(0x1009);
return {0x1009};
}
}
@ -161,4 +161,4 @@ Result ProcessManagerService::populate_program_info_buffer(ProcessManagerService
return rc;
}
}

View file

@ -68,7 +68,7 @@ std::tuple<Result, u64> RelocatableObjectsService::load_nro(PidDescriptor pid_de
rc = NroUtils::LoadNro(target_proc, this->process_handle, nro_address, nro_size, bss_address, bss_size, &out_address);
LOAD_NRO_END:
return std::make_tuple(rc, out_address);
return {rc, out_address};
}
std::tuple<Result> RelocatableObjectsService::unload_nro(PidDescriptor pid_desc, u64 nro_address) {
@ -133,7 +133,7 @@ LOAD_NRR_END:
nrr_info.Close();
}
}
return std::make_tuple(rc);
return {rc};
}
std::tuple<Result> RelocatableObjectsService::unload_nrr(PidDescriptor pid_desc, u64 nrr_address) {
@ -166,5 +166,5 @@ std::tuple<Result> RelocatableObjectsService::initialize(PidDescriptor pid_desc,
this->has_initialized = true;
rc = 0;
}
return std::make_tuple(rc);
return {rc};
}

View file

@ -21,11 +21,11 @@ Result ShellService::dispatch(IpcParsedCommand &r, IpcCommand &out_c, u64 cmd_id
std::tuple<Result> ShellService::add_title_to_launch_queue(u64 tid, InPointer<char> args) {
fprintf(stderr, "Add to launch queue: %p, %X\n", args.pointer, args.num_elements);
return std::make_tuple(LaunchQueue::add(tid, args.pointer, args.num_elements));
return {LaunchQueue::add(tid, args.pointer, args.num_elements)};
}
std::tuple<Result> ShellService::clear_launch_queue(u64 dat) {
fprintf(stderr, "Clear launch queue: %lx\n", dat);
LaunchQueue::clear();
return std::make_tuple(0);
}
return {0};
}

View file

@ -24,10 +24,10 @@ Result BootModeService::handle_deferred() {
}
std::tuple<Result, bool> BootModeService::get_boot_mode() {
return std::make_tuple(0, g_is_maintenance_boot);
return {0, g_is_maintenance_boot};
}
std::tuple<Result> BootModeService::set_maintenance_boot() {
g_is_maintenance_boot = true;
return std::make_tuple(0);
}
return {0};
}

View file

@ -24,9 +24,9 @@ Result ManagerService::handle_deferred() {
std::tuple<Result> ManagerService::register_process(u64 pid, InBuffer<u8> acid_sac, InBuffer<u8> aci0_sac) {
return std::make_tuple(Registration::RegisterProcess(pid, acid_sac.buffer, acid_sac.num_elements, aci0_sac.buffer, aci0_sac.num_elements));
return {Registration::RegisterProcess(pid, acid_sac.buffer, acid_sac.num_elements, aci0_sac.buffer, aci0_sac.num_elements)};
}
std::tuple<Result> ManagerService::unregister_process(u64 pid) {
return std::make_tuple(Registration::UnregisterProcess(pid));
}
return {Registration::UnregisterProcess(pid)};
}

View file

@ -33,7 +33,7 @@ Result UserService::handle_deferred() {
std::tuple<Result> UserService::initialize(PidDescriptor pid) {
this->pid = pid.pid;
this->has_initialized = true;
return std::make_tuple(0);
return {0};
}
std::tuple<Result, MovedHandle> UserService::get_service(u64 service) {
@ -51,13 +51,13 @@ std::tuple<Result, MovedHandle> UserService::get_service(u64 service) {
if (rc == RESULT_DEFER_SESSION) {
this->deferred_service = service;
}
return std::make_tuple(rc, MovedHandle{session_h});
return {rc, MovedHandle{session_h}};
}
std::tuple<Result, MovedHandle> UserService::deferred_get_service(u64 service) {
Handle session_h = 0;
Result rc = Registration::GetServiceHandle(service, &session_h);
return std::make_tuple(rc, MovedHandle{session_h});
return {rc, MovedHandle{session_h}};
}
std::tuple<Result, MovedHandle> UserService::register_service(u64 service, u8 is_light, u32 max_sessions) {
@ -71,7 +71,7 @@ std::tuple<Result, MovedHandle> UserService::register_service(u64 service, u8 is
if (this->has_initialized) {
rc = Registration::RegisterServiceForPid(this->pid, service, max_sessions, is_light != 0, &service_h);
}
return std::make_tuple(rc, MovedHandle{service_h});
return {rc, MovedHandle{service_h}};
}
std::tuple<Result> UserService::unregister_service(u64 service) {
@ -84,5 +84,5 @@ std::tuple<Result> UserService::unregister_service(u64 service) {
if (this->has_initialized) {
rc = Registration::UnregisterServiceForPid(this->pid, service);
}
return std::make_tuple(rc);
return {rc};
}