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"
|
2018-02-11 03:26:54 +01:00
|
|
|
#include "dynamic_libs/fs_functions.h"
|
2018-02-09 21:31:05 +01:00
|
|
|
#include "utils/logger.h"
|
|
|
|
|
|
|
|
WUPS_MODULE_NAME("test module");
|
|
|
|
WUPS_MODULE_VERSION("v1.0");
|
|
|
|
WUPS_MODULE_AUTHOR("Maschell");
|
|
|
|
WUPS_MODULE_LICENSE("BSD");
|
|
|
|
|
2018-02-14 22:52:16 +01:00
|
|
|
INITIALIZE(args){
|
2018-02-09 21:31:05 +01:00
|
|
|
InitOSFunctionPointers();
|
|
|
|
InitSocketFunctionPointers();
|
|
|
|
|
|
|
|
log_init();
|
|
|
|
|
2018-02-10 17:05:32 +01:00
|
|
|
log_print("Init of example_plugin!\n");
|
|
|
|
}
|
2018-02-09 21:31:05 +01:00
|
|
|
|
2018-02-11 03:26:54 +01:00
|
|
|
DECL_FUNCTION(int, FSOpenFile, FSClient *pClient, FSCmdBlock *pCmd, const char *path, const char *mode, int *handle, int error) {
|
|
|
|
int result = real_FSOpenFile(pClient, pCmd, path, mode, handle, error);
|
|
|
|
|
|
|
|
log_printf("FSOpenFile called for folder %s! Result %d\n",path,result);
|
|
|
|
return result;
|
|
|
|
}
|
2018-02-09 21:31:05 +01:00
|
|
|
|
2018-02-11 03:26:54 +01:00
|
|
|
WUPS_MUST_REPLACE(FSOpenFile,WUPS_LOADER_LIBRARY_COREINIT, FSOpenFile);
|