Fix compiling

This commit is contained in:
Maschell 2022-01-26 23:18:34 +01:00
parent 1365eff9fc
commit 032459d809
3 changed files with 4 additions and 33 deletions

View File

@ -488,7 +488,7 @@ FSStatus FSOpenFileWrapper(char *path,
return FS_STATUS_USE_REAL_OS;
}
if (path == nullptr) {
OSFATAL_FUNCTION_LINE("Invalid args");
OSFatal("Invalid args");
return FS_STATUS_FATAL_ERROR;
}
@ -610,7 +610,7 @@ FSStatus FSGetStatWrapper(char *path, FSStat *stats, FSErrorFlag errorMask,
return FS_STATUS_USE_REAL_OS;
}
if (path == nullptr) {
OSFATAL_FUNCTION_LINE("Invalid args");
OSFatal("Invalid args");
return FS_STATUS_FATAL_ERROR;
}
@ -949,7 +949,7 @@ FSStatus FSRemoveWrapper(char *path,
}
if (path == nullptr) {
OSFATAL_FUNCTION_LINE("Invalid args");
OSFatal("Invalid args");
return FS_STATUS_USE_REAL_OS;
}

View File

@ -1,5 +1,6 @@
#include <wums.h>
#include <cstring>
#include <malloc.h>
#include <coreinit/debug.h>
#include <coreinit/title.h>

View File

@ -1,9 +1,5 @@
#include <string.h>
#include <stddef.h>
#include <whb/log.h>
#include <stdarg.h>
#include <stdio.h>
#include <coreinit/debug.h>
#include "utils/logger.h"
#define PRINTF_BUFFER_LENGTH 2048
@ -40,30 +36,4 @@ void dumpHex(const void *data, size_t size) {
}
}
}
}
BOOL OSFatal_printf(const char *fmt, ...) {
char *buf1 = (char *) memalign(4, PRINTF_BUFFER_LENGTH);
char *buf2 = (char *) memalign(4, PRINTF_BUFFER_LENGTH);
va_list va;
if (!buf1) {
return FALSE;
}
if (!buf2) {
free(buf1);
return FALSE;
}
va_start(va, fmt);
vsnprintf(buf1, PRINTF_BUFFER_LENGTH, fmt, va);
snprintf(buf2, PRINTF_BUFFER_LENGTH, "%s\n", buf1);
OSFatal(buf2);
free(buf1);
free(buf2);
va_end(va);
return TRUE;
}