revert fsldr change, fix null deref in pm
This commit is contained in:
@@ -205,8 +205,11 @@ static Result loadWithDependencies(Handle *outDebug, ProcessData **outProcessDat
|
||||
static Result launchTitleImpl(Handle *debug, ProcessData **outProcessData, const FS_ProgramInfo *programInfo,
|
||||
const FS_ProgramInfo *programInfoUpdate, u32 launchFlags, ExHeader_Info *exheaderInfo)
|
||||
{
|
||||
if (isTitleLaunchPrevented(programInfo->programId)) {
|
||||
if (debug != NULL) {
|
||||
*debug = 0;
|
||||
}
|
||||
|
||||
if (isTitleLaunchPrevented(programInfo->programId)) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -16,19 +16,4 @@ bool isTitleLaunchPrevented(u64 titleId)
|
||||
|
||||
svcGetSystemInfo(&numKips, 26, 0);
|
||||
return numKips >= 6 && (titleId & ~N3DS_TID_BIT) == 0x0004003000008A02ULL; // ErrDisp
|
||||
}
|
||||
|
||||
Result fsRegSetupPermissionsForKip(u32 pid, u64 titleId)
|
||||
{
|
||||
FS_ProgramInfo info;
|
||||
|
||||
ExHeader_Arm11StorageInfo storageInfo = {
|
||||
.fs_access_info = FSACCESS_NANDRO_RW | FSACCESS_NANDRW | FSACCESS_SDMC_RW,
|
||||
};
|
||||
|
||||
// Non-dummy TID
|
||||
info.programId = titleId;
|
||||
info.mediaType = MEDIATYPE_NAND;
|
||||
|
||||
return FSREG_Register(pid, 0xFFFF000000000000LL, &info, &storageInfo);;
|
||||
}
|
||||
@@ -3,5 +3,4 @@
|
||||
#include <3ds/types.h>
|
||||
|
||||
u32 getKExtSize(void);
|
||||
bool isTitleLaunchPrevented(u64 titleId);
|
||||
Result fsRegSetupPermissionsForKip(u32 pid, u64 titleId);
|
||||
bool isTitleLaunchPrevented(u64 titleId);
|
||||
@@ -42,13 +42,6 @@ void Manager_RegisterKips(void)
|
||||
}
|
||||
|
||||
ProcessList_Unlock(&g_manager.processList);
|
||||
|
||||
// Register loader, pm, and rosalina (if applicable)
|
||||
assertSuccess(fsRegSetupPermissionsForKip(1, 0x0004013000001302LL)); // loader
|
||||
assertSuccess(fsRegSetupPermissionsForKip(2, 0x0004013000001202LL)); // pm
|
||||
if (numKips >= 6) {
|
||||
assertSuccess(fsRegSetupPermissionsForKip(5, 0x0004013000006902LL)); // rosalina
|
||||
}
|
||||
}
|
||||
|
||||
Result UnregisterProcess(u64 titleId)
|
||||
|
||||
Reference in New Issue
Block a user