2018-02-09 21:31:05 +01:00
|
|
|
#include <wups.h>
|
|
|
|
#include <malloc.h>
|
|
|
|
#include <string.h>
|
|
|
|
#include "dynamic_libs/os_functions.h"
|
|
|
|
#include "dynamic_libs/socket_functions.h"
|
|
|
|
#include "utils/logger.h"
|
|
|
|
|
|
|
|
|
|
|
|
WUPS_MODULE_NAME("test module");
|
|
|
|
WUPS_MODULE_VERSION("v1.0");
|
|
|
|
WUPS_MODULE_AUTHOR("Maschell");
|
|
|
|
WUPS_MODULE_LICENSE("BSD");
|
|
|
|
|
2018-02-10 14:56:07 +01:00
|
|
|
DECL_FUNCTION(void,OSFatal,char * msg){
|
2018-02-09 21:31:05 +01:00
|
|
|
InitOSFunctionPointers();
|
|
|
|
InitSocketFunctionPointers();
|
|
|
|
|
|
|
|
log_init();
|
|
|
|
|
|
|
|
//log_printf is not working.
|
2018-02-10 14:56:07 +01:00
|
|
|
log_print(msg);
|
|
|
|
log_print("\n^--- Someone called OSFatal with this string. Lets modify it. Bye bye =(\n");
|
|
|
|
real_OSFatal("Does the replacement work?");
|
|
|
|
return;
|
2018-02-09 21:31:05 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2018-02-10 14:56:07 +01:00
|
|
|
WUPS_MUST_REPLACE(OSFatal,WUPS_LOADER_LIBRARY_COREINIT, OSFatal);
|