diff --git a/src/FSWrapper.cpp b/src/FSWrapper.cpp index 5be00b9..99b1216 100644 --- a/src/FSWrapper.cpp +++ b/src/FSWrapper.cpp @@ -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; } diff --git a/src/main.cpp b/src/main.cpp index 46c75cb..6654c73 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -1,5 +1,6 @@ #include #include +#include #include #include diff --git a/src/utils/utils.cpp b/src/utils/utils.cpp index dd36046..9ebb415 100644 --- a/src/utils/utils.cpp +++ b/src/utils/utils.cpp @@ -1,9 +1,5 @@ #include -#include #include -#include -#include -#include #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; } \ No newline at end of file