Skip to content

Commit c7ad1cb

Browse files
committed
GetPluginSharedMemInfo move handle
1 parent 0a43539 commit c7ad1cb

File tree

3 files changed

+15
-2
lines changed

3 files changed

+15
-2
lines changed

include/eiffel/sl.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,12 @@ typedef enum {
2020
EFL_LOG_LEVEL_ERROR = 2,
2121
} EiffelLogLevel;
2222

23+
typedef struct {
24+
SlPluginName name;
25+
uint64_t size;
26+
uint32_t perm;
27+
} EiffelSlRegisterSharedMemIn;
28+
2329
#ifdef __cplusplus
2430
}
2531
#endif

include/eiffel/user.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ extern "C" {
1313

1414
typedef enum {
1515
EFL_U_CMD_GET_PLUGIN_META = 0,
16-
EFL_U_CMD_GET_PLUGIN_SHARED_MEM_INFO = 1,
16+
EFL_U_CMD_GET_PLUGIN_SHARED_MEM = 1,
1717
} EiffelUserCommandId;
1818

1919
static const Result EFL_U_RESULT_BAD_PLUGIN_NAME = MAKERESULT(EIFFEL_MODULE_ID, 0);

src/efl_u.c

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,5 +26,12 @@ Result eiffelGetPluginSharedMemInfo(SlPluginSharedMemInfo* out_pluginSharedMemIn
2626
SlPluginName name;
2727
} in;
2828
strcpy(in.name, name);
29-
return serviceDispatchInOut(&g_eiffelSrv, EFL_U_CMD_GET_PLUGIN_SHARED_MEM_INFO, in, *out_pluginSharedMemInfo);
29+
30+
Handle out_handle = INVALID_HANDLE;
31+
Result rc = serviceDispatchInOut(&g_eiffelSrv, EFL_U_CMD_GET_PLUGIN_SHARED_MEM, in, *out_pluginSharedMemInfo,
32+
.out_handle_attrs = {SfOutHandleAttr_HipcMove}, .out_handles = &out_handle);
33+
if (R_SUCCEEDED(rc)) {
34+
out_pluginSharedMemInfo->handle = out_handle;
35+
}
36+
return rc;
3037
}

0 commit comments

Comments
 (0)