mirror of
https://github.com/wiiu-env/WiiUPluginLoaderBackend.git
synced 2024-11-05 12:35:06 +01:00
Add new IPC function to get information for a plugin by filepath
This commit is contained in:
parent
532d6f8454
commit
7d7a668210
@ -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;
|
||||
|
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user