mirror of
https://github.com/Atmosphere-NX/Atmosphere.git
synced 2024-11-09 21:51:45 +00:00
fusee: handle case where saving a fatal report fails (thanks @HookedBehemoth)
This commit is contained in:
parent
f197b88dd7
commit
fdc7ef62f7
1 changed files with 6 additions and 3 deletions
|
@ -90,9 +90,12 @@ static void _check_and_display_atmosphere_fatal_error(void) {
|
||||||
char filepath[0x40];
|
char filepath[0x40];
|
||||||
snprintf(filepath, sizeof(filepath) - 1, "/atmosphere/fatal_errors/report_%016llx.bin", ctx.report_identifier);
|
snprintf(filepath, sizeof(filepath) - 1, "/atmosphere/fatal_errors/report_%016llx.bin", ctx.report_identifier);
|
||||||
filepath[sizeof(filepath)-1] = 0;
|
filepath[sizeof(filepath)-1] = 0;
|
||||||
write_to_file(&ctx, sizeof(ctx), filepath);
|
if (write_to_file(&ctx, sizeof(ctx), filepath) != sizeof(ctx)) {
|
||||||
|
print(SCREEN_LOG_LEVEL_ERROR | SCREEN_LOG_LEVEL_NO_PREFIX, "Failed to save report to the SD card!\n");
|
||||||
|
} else {
|
||||||
print(SCREEN_LOG_LEVEL_ERROR | SCREEN_LOG_LEVEL_NO_PREFIX, "Report saved to %s\n", filepath);
|
print(SCREEN_LOG_LEVEL_ERROR | SCREEN_LOG_LEVEL_NO_PREFIX, "Report saved to %s\n", filepath);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/* Display error. */
|
/* Display error. */
|
||||||
print(SCREEN_LOG_LEVEL_ERROR | SCREEN_LOG_LEVEL_NO_PREFIX, "\nPress POWER to reboot\n");
|
print(SCREEN_LOG_LEVEL_ERROR | SCREEN_LOG_LEVEL_NO_PREFIX, "\nPress POWER to reboot\n");
|
||||||
|
|
Loading…
Reference in a new issue