diff --git a/src/utils/ipc.cpp b/src/utils/ipc.cpp index 5c27835..d502b3e 100644 --- a/src/utils/ipc.cpp +++ b/src/utils/ipc.cpp @@ -263,6 +263,25 @@ int ipc_ioctl(ipcmessage *message) { } break; } + case IOCTL_PLUGIN_INFORMATION_GET_INFORMATION_FOR_FILEPATH: { + DEBUG_FUNCTION_LINE("IOCTL_PLUGIN_INFORMATION_GET_INFORMATION_FOR_FILEPATH\n"); + if(message->ioctl.length_in != 4 || message->ioctl.length_io != 4) { + DEBUG_FUNCTION_LINE("IPC_ERROR_INVALID_SIZE\n"); + res = IPC_ERROR_INVALID_SIZE; + } else { + char * path = (char *) message->ioctl.buffer_in[0]; + plugin_information_handle * io_handle = (plugin_information_handle *) &(message->ioctl.buffer_io[0]); + + //DEBUG_FUNCTION_LINE("filepath %08X %s\n", path,path); + + PluginInformation * plugin= PluginInformation::loadPluginInformation(path); + *io_handle = (plugin_information_handle) plugin; + + DCFlushRange(message->ioctl.buffer_io,message->ioctl.length_io); + ICInvalidateRange(message->ioctl.buffer_io,message->ioctl.length_io); + } + break; + } default: res = IPC_ERROR_INVALID_ARG; break; diff --git a/src/utils/ipc.h b/src/utils/ipc.h index 1fafe49..fb3186a 100644 --- a/src/utils/ipc.h +++ b/src/utils/ipc.h @@ -24,6 +24,7 @@ extern "C" { #define IOCTL_PLUGIN_LOADER_DELETE_INFORMATION 0x06 #define IOCTL_PLUGIN_LOADER_LINK_VIA_INFORMATION 0x07 #define IOCTL_PLUGIN_LOADER_LINK_VIA_INFORMATION_ON_RESTART 0x08 +#define IOCTL_PLUGIN_INFORMATION_GET_INFORMATION_FOR_FILEPATH 0x09 /* IPC message */ typedef struct ipcmessage {