Create /luma/dumps/arm9 and /luma/dumps/arm11 automatically when needed.

This commit is contained in:
TuxSH 2016-08-13 23:43:34 +02:00
parent 3709ac301a
commit 915f9ccb0d
2 changed files with 10 additions and 4 deletions

View File

@ -63,8 +63,6 @@ clean:
$(dir_out): $(dir_out):
@mkdir -p "$(dir_out)/luma/payloads" @mkdir -p "$(dir_out)/luma/payloads"
@mkdir -p "$(dir_out)/luma/dumps/arm9"
@mkdir -p "$(dir_out)/luma/dumps/arm11"
$(dir_out)/$(name).dat: $(dir_build)/main.bin $(dir_out) $(dir_out)/$(name).dat: $(dir_build)/main.bin $(dir_out)
@$(MAKE) $(FLAGS) -C $(dir_mset) launcher @$(MAKE) $(FLAGS) -C $(dir_mset) launcher

View File

@ -141,7 +141,11 @@ void detectAndProcessExceptionDumps(void)
findDumpFile(path9, fileName); findDumpFile(path9, fileName);
path9[16] = '/'; path9[16] = '/';
memcpy(&path9[17], fileName, sizeof(fileName)); memcpy(&path9[17], fileName, sizeof(fileName));
fileWrite((void *)dump, path9, size); if(!fileWrite((void *)dump, path9, size))
{
createDirectory("/luma/dumps/arm9");
fileWrite((void *)dump, path9, size);
}
} }
else else
@ -149,7 +153,11 @@ void detectAndProcessExceptionDumps(void)
findDumpFile(path11, fileName); findDumpFile(path11, fileName);
path11[17] = '/'; path11[17] = '/';
memcpy(&path11[18], fileName, sizeof(fileName)); memcpy(&path11[18], fileName, sizeof(fileName));
fileWrite((void *)dump, path11, size); if(!fileWrite((void *)dump, path11, size))
{
createDirectory("/luma/dumps/arm11");
fileWrite((void *)dump, path11, size);
}
} }
char arm11Str[] = "Processor: ARM11 (core X)"; char arm11Str[] = "Processor: ARM11 (core X)";